Compare commits
No commits in common. "611c4bb0ae1ece716535311099847d1102ea422f" and "9305b1e0efb3cfe33a9a5e95b6bedaca5a3758ef" have entirely different histories.
611c4bb0ae
...
9305b1e0ef
|
@ -1,35 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
base_color=blue
|
||||
|
||||
modulate() {
|
||||
echo $1, $2
|
||||
mkdir -p src/main/resources/assets/phycon/textures/block/cable/$1
|
||||
for f in src/main/resources/assets/phycon/textures/block/cable/$base_color/*; do
|
||||
echo $f
|
||||
convert $f -modulate $2 src/main/resources/assets/phycon/textures/block/cable/$1/$(basename $f)
|
||||
done
|
||||
echo "---"
|
||||
}
|
||||
|
||||
# modulate <color> <brightness>,<saturation>,<hue>
|
||||
# brightness: 100 is initial, +/- 100
|
||||
# saturnation: 100 is initial, +/- 100
|
||||
# hue: (<gimp hue> / 180) * 100 + 100
|
||||
|
||||
modulate white 200,0,100
|
||||
modulate orange 100,120,200
|
||||
modulate magenta 100,100,146
|
||||
modulate light_blue 140,65,100
|
||||
modulate yellow 100,109,8
|
||||
modulate lime 100,100,53
|
||||
modulate pink 172,50,172
|
||||
modulate gray 60,10,100
|
||||
modulate light_gray 105,3,39
|
||||
modulate cyan 112,65,84
|
||||
modulate purple 109,76,133
|
||||
modulate brown 60,45,190
|
||||
modulate green 60,50,30
|
||||
modulate red 100,100,176
|
||||
modulate black 30,0,100
|
||||
|
|
@ -8,7 +8,6 @@ import net.minecraft.item.ItemPlacementContext
|
|||
import net.minecraft.state.StateManager
|
||||
import net.minecraft.state.property.EnumProperty
|
||||
import net.minecraft.util.ActionResult
|
||||
import net.minecraft.util.DyeColor
|
||||
import net.minecraft.util.Hand
|
||||
import net.minecraft.util.Identifier
|
||||
import net.minecraft.util.hit.BlockHitResult
|
||||
|
@ -33,9 +32,7 @@ import java.util.*
|
|||
/**
|
||||
* @author shadowfacts
|
||||
*/
|
||||
class CableBlock(
|
||||
val color: DyeColor,
|
||||
): Block(
|
||||
class CableBlock: Block(
|
||||
FabricBlockSettings.of(CABLE_MATERIAL)
|
||||
.strength(0.3f)
|
||||
.nonOpaque()
|
||||
|
@ -115,20 +112,22 @@ class CableBlock(
|
|||
val offsetPos = pos.offset(direction)
|
||||
val state = world.getBlockState(offsetPos)
|
||||
val block = state.block
|
||||
return if (block == this) {
|
||||
return when (block) {
|
||||
this -> {
|
||||
val prop = CONNECTIONS[direction.opposite]
|
||||
when (state[prop]) {
|
||||
CableConnection.DISABLED -> CableConnection.DISABLED
|
||||
else -> CableConnection.ON
|
||||
}
|
||||
} else if (block is NetworkComponentBlock && block !is CableBlock) {
|
||||
}
|
||||
is NetworkComponentBlock -> {
|
||||
if (block.getNetworkConnectedSides(state, world, offsetPos).contains(direction.opposite)) {
|
||||
CableConnection.ON
|
||||
} else {
|
||||
CableConnection.OFF
|
||||
}
|
||||
} else {
|
||||
CableConnection.OFF
|
||||
}
|
||||
else -> CableConnection.OFF
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,10 +4,8 @@ import net.fabricmc.fabric.api.client.model.ModelProviderContext
|
|||
import net.fabricmc.fabric.api.client.model.ModelResourceProvider
|
||||
import net.minecraft.client.render.model.UnbakedModel
|
||||
import net.minecraft.resource.ResourceManager
|
||||
import net.minecraft.util.DyeColor
|
||||
import net.minecraft.util.Identifier
|
||||
import net.shadowfacts.phycon.PhysicalConnectivity
|
||||
import net.shadowfacts.phycon.client.model.ColoredCableModel
|
||||
import net.shadowfacts.phycon.client.model.RedstoneControllerModel
|
||||
import net.shadowfacts.phycon.client.model.SimpleFaceDeviceModel
|
||||
|
||||
|
@ -25,10 +23,6 @@ class PhyModelProvider(resourceManager: ResourceManager) : ModelResourceProvider
|
|||
val EXTRACTOR_SIDE = Identifier(PhysicalConnectivity.MODID, "block/extractor_side")
|
||||
val INSERTER = Identifier(PhysicalConnectivity.MODID, "block/inserter")
|
||||
val INSERTER_SIDE = Identifier(PhysicalConnectivity.MODID, "block/inserter_side")
|
||||
|
||||
val CABLES = DyeColor.values().map {
|
||||
Identifier(PhysicalConnectivity.MODID, "block/cable/${it.getName()}") to it
|
||||
}.toMap()
|
||||
}
|
||||
|
||||
override fun loadModelResource(resourceId: Identifier, context: ModelProviderContext): UnbakedModel? {
|
||||
|
@ -38,7 +32,6 @@ class PhyModelProvider(resourceManager: ResourceManager) : ModelResourceProvider
|
|||
REDSTONE_EMITTER -> SimpleFaceDeviceModel(REDSTONE_EMITTER_SIDE)
|
||||
EXTRACTOR -> SimpleFaceDeviceModel(EXTRACTOR_SIDE)
|
||||
INSERTER -> SimpleFaceDeviceModel(INSERTER_SIDE)
|
||||
in CABLES -> ColoredCableModel(CABLES[resourceId]!!)
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,282 +0,0 @@
|
|||
package net.shadowfacts.phycon.client.model
|
||||
|
||||
import com.mojang.datafixers.util.Pair
|
||||
import net.minecraft.block.BlockState
|
||||
import net.minecraft.client.render.model.*
|
||||
import net.minecraft.client.render.model.json.ModelOverrideList
|
||||
import net.minecraft.client.render.model.json.ModelTransformation
|
||||
import net.minecraft.client.texture.Sprite
|
||||
import net.minecraft.client.texture.SpriteAtlasTexture
|
||||
import net.minecraft.client.util.SpriteIdentifier
|
||||
import net.minecraft.util.DyeColor
|
||||
import net.minecraft.util.Identifier
|
||||
import net.minecraft.util.math.Direction
|
||||
import net.shadowfacts.phycon.PhysicalConnectivity
|
||||
import net.shadowfacts.phycon.block.cable.CableBlock
|
||||
import net.shadowfacts.phycon.util.CableConnection
|
||||
import java.util.Random
|
||||
import java.util.function.Function
|
||||
|
||||
/**
|
||||
* @author shadowfacts
|
||||
*/
|
||||
class ColoredCableModel(
|
||||
val color: DyeColor,
|
||||
): UnbakedModel, BakedModel {
|
||||
companion object {
|
||||
val SIDE = Identifier(PhysicalConnectivity.MODID, "block/cable_side")
|
||||
val CENTER = Identifier(PhysicalConnectivity.MODID, "block/cable_center")
|
||||
val DIAG_CORNER = Identifier(PhysicalConnectivity.MODID, "block/cable_diag_corner")
|
||||
val DIAG_CORNER_CONT = Identifier(PhysicalConnectivity.MODID, "block/cable_diag_corner_cont")
|
||||
val DIAG_CORNER_XZ = Identifier(PhysicalConnectivity.MODID, "block/cable_diag_corner_xz")
|
||||
val DIAG_CORNER_XZ_CONT = Identifier(PhysicalConnectivity.MODID, "block/cable_diag_corner_xz_cont")
|
||||
}
|
||||
|
||||
private var centerSprite: Sprite? = null
|
||||
|
||||
private var side: Array<BakedModel?> = Array(6) { null }
|
||||
private var center: Array<BakedModel?> = Array(6) { null }
|
||||
private var diagCorner = mutableMapOf<ModelRotation, BakedModel>()
|
||||
private var diagCornerCont = mutableMapOf<ModelRotation, BakedModel>()
|
||||
private var diagCornerXZ = mutableMapOf<ModelRotation, BakedModel>()
|
||||
private var diagCornerXZCont = mutableMapOf<ModelRotation, BakedModel>()
|
||||
|
||||
private val sideRotations = listOf(
|
||||
Direction.DOWN to ModelRotation.X0_Y0,
|
||||
Direction.UP to ModelRotation.X180_Y0,
|
||||
Direction.NORTH to ModelRotation.X270_Y0,
|
||||
Direction.SOUTH to ModelRotation.X90_Y0,
|
||||
Direction.WEST to ModelRotation.X90_Y90,
|
||||
Direction.EAST to ModelRotation.X90_Y270,
|
||||
)
|
||||
|
||||
override fun getModelDependencies(): Collection<Identifier> {
|
||||
return setOf(
|
||||
SIDE,
|
||||
CENTER,
|
||||
DIAG_CORNER,
|
||||
DIAG_CORNER_CONT,
|
||||
DIAG_CORNER_XZ,
|
||||
DIAG_CORNER_XZ_CONT,
|
||||
)
|
||||
}
|
||||
|
||||
override fun getTextureDependencies(
|
||||
unbakedModelGetter: Function<Identifier, UnbakedModel>,
|
||||
unresolvedTextureDependencies: MutableSet<Pair<String, String>>
|
||||
): Collection<SpriteIdentifier> {
|
||||
val newSet = mutableSetOf<Pair<String, String>>()
|
||||
val res = modelDependencies.map(unbakedModelGetter::apply).flatMap {
|
||||
it.getTextureDependencies(unbakedModelGetter, newSet)
|
||||
}
|
||||
unresolvedTextureDependencies.addAll(newSet)
|
||||
return res.map {
|
||||
if (it.textureId.namespace == PhysicalConnectivity.MODID && it.textureId.path.startsWith("block/cable/color/")) {
|
||||
val newPath = it.textureId.path.replace("block/cable/color/", "block/cable/${color.getName()}/")
|
||||
SpriteIdentifier(it.atlasId, Identifier(PhysicalConnectivity.MODID, newPath))
|
||||
} else {
|
||||
it
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun bake(
|
||||
loader: ModelLoader,
|
||||
textureGetter: Function<SpriteIdentifier, Sprite>,
|
||||
rotationContainer: ModelBakeSettings,
|
||||
modelId: Identifier
|
||||
): BakedModel {
|
||||
centerSprite = textureGetter.apply(SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE, Identifier(PhysicalConnectivity.MODID, "block/cable/${color.getName()}/straight")))
|
||||
|
||||
sideRotations.forEach { (side, rot) ->
|
||||
this.side[side.ordinal] = loader.bakeRetextured(SIDE, textureGetter, rot)
|
||||
this.center[side.ordinal] = loader.bakeRetextured(CENTER, textureGetter, rot)
|
||||
}
|
||||
|
||||
diagCorner.clear()
|
||||
diagCornerCont.clear()
|
||||
listOf(
|
||||
ModelRotation.X0_Y0,
|
||||
ModelRotation.X0_Y180,
|
||||
ModelRotation.X180_Y180,
|
||||
ModelRotation.X180_Y0,
|
||||
ModelRotation.X0_Y270,
|
||||
ModelRotation.X0_Y90,
|
||||
ModelRotation.X180_Y90,
|
||||
ModelRotation.X180_Y270,
|
||||
).forEach { rot ->
|
||||
diagCorner[rot] = loader.bakeRetextured(DIAG_CORNER, textureGetter, rot)
|
||||
diagCornerCont[rot] = loader.bakeRetextured(DIAG_CORNER_CONT, textureGetter, rot)
|
||||
}
|
||||
|
||||
diagCornerXZ.clear()
|
||||
diagCornerXZCont.clear()
|
||||
listOf(
|
||||
ModelRotation.X0_Y0,
|
||||
ModelRotation.X0_Y90,
|
||||
ModelRotation.X0_Y180,
|
||||
ModelRotation.X0_Y270,
|
||||
).forEach { rot ->
|
||||
diagCornerXZ[rot] = loader.bakeRetextured(DIAG_CORNER_XZ, textureGetter, rot)
|
||||
diagCornerXZCont[rot] = loader.bakeRetextured(DIAG_CORNER_XZ_CONT, textureGetter, rot)
|
||||
}
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
private fun ModelLoader.bakeRetextured(id: Identifier, textureGetter: Function<SpriteIdentifier, Sprite>, rot: ModelRotation): BakedModel {
|
||||
val unbaked = getOrLoadModel(id)
|
||||
val wrappedTextureGetter: (SpriteIdentifier) -> Sprite = {
|
||||
var newId = it
|
||||
if (it.textureId.namespace == PhysicalConnectivity.MODID && it.textureId.path.startsWith("block/cable/color/")) {
|
||||
val newPath = it.textureId.path.replace("block/cable/color/", "block/cable/${color.getName()}/")
|
||||
newId = SpriteIdentifier(it.atlasId, Identifier(PhysicalConnectivity.MODID, newPath))
|
||||
}
|
||||
textureGetter.apply(newId)
|
||||
}
|
||||
return unbaked.bake(this, wrappedTextureGetter, rot, id)!!
|
||||
}
|
||||
|
||||
override fun getQuads(state: BlockState?, face: Direction?, random: Random): List<BakedQuad> {
|
||||
if (state == null) {
|
||||
return center.flatMap {
|
||||
it?.getQuads(state, face, random) ?: listOf()
|
||||
}
|
||||
}
|
||||
|
||||
val quads = mutableListOf<BakedQuad>()
|
||||
|
||||
fun addModel(model: BakedModel?) {
|
||||
if (model == null) return
|
||||
quads.addAll(model.getQuads(state, face, random))
|
||||
}
|
||||
|
||||
for ((side, prop) in CableBlock.CONNECTIONS) {
|
||||
if (state[prop] == CableConnection.ON) {
|
||||
addModel(this.side[side.ordinal])
|
||||
} else {
|
||||
addModel(this.center[side.ordinal])
|
||||
}
|
||||
}
|
||||
|
||||
val down = state[CableBlock.CONNECTIONS[Direction.DOWN]] == CableConnection.ON
|
||||
val up = state[CableBlock.CONNECTIONS[Direction.UP]] == CableConnection.ON
|
||||
val north = state[CableBlock.CONNECTIONS[Direction.NORTH]] == CableConnection.ON
|
||||
val south = state[CableBlock.CONNECTIONS[Direction.SOUTH]] == CableConnection.ON
|
||||
val west = state[CableBlock.CONNECTIONS[Direction.WEST]] == CableConnection.ON
|
||||
val east = state[CableBlock.CONNECTIONS[Direction.EAST]] == CableConnection.ON
|
||||
|
||||
if (!down && !north) {
|
||||
if (up && south && !east && !west) {
|
||||
addModel(diagCornerCont[ModelRotation.X0_Y0])
|
||||
} else {
|
||||
addModel(diagCorner[ModelRotation.X0_Y0])
|
||||
}
|
||||
}
|
||||
|
||||
if (!down && !south) {
|
||||
if (up && north && !east && !west) {
|
||||
addModel(diagCornerCont[ModelRotation.X0_Y180])
|
||||
} else {
|
||||
addModel(diagCorner[ModelRotation.X0_Y180])
|
||||
}
|
||||
}
|
||||
|
||||
if (!up && !north) {
|
||||
if (down && south && !east && !west) {
|
||||
addModel(diagCornerCont[ModelRotation.X180_Y180])
|
||||
} else {
|
||||
addModel(diagCorner[ModelRotation.X180_Y180])
|
||||
}
|
||||
}
|
||||
|
||||
if (!up && !south) {
|
||||
if (down && north && !east && !west) {
|
||||
addModel(diagCornerCont[ModelRotation.X180_Y0])
|
||||
} else {
|
||||
addModel(diagCorner[ModelRotation.X180_Y0])
|
||||
}
|
||||
}
|
||||
|
||||
if (!down && !west) {
|
||||
if (up && east && !north && !south) {
|
||||
addModel(diagCornerCont[ModelRotation.X0_Y270])
|
||||
} else {
|
||||
addModel(diagCorner[ModelRotation.X0_Y270])
|
||||
}
|
||||
}
|
||||
|
||||
if (!down && !east) {
|
||||
if (up && west && !north && !south) {
|
||||
addModel(diagCornerCont[ModelRotation.X0_Y90])
|
||||
} else {
|
||||
addModel(diagCorner[ModelRotation.X0_Y90])
|
||||
}
|
||||
}
|
||||
|
||||
if (!up && !west) {
|
||||
if (down && east && !north && !south) {
|
||||
addModel(diagCornerCont[ModelRotation.X180_Y90])
|
||||
} else {
|
||||
addModel(diagCorner[ModelRotation.X180_Y90])
|
||||
}
|
||||
}
|
||||
|
||||
if (!up && !east) {
|
||||
if (down && west && !north && !south) {
|
||||
addModel(diagCornerCont[ModelRotation.X180_Y270])
|
||||
} else {
|
||||
addModel(diagCorner[ModelRotation.X180_Y270])
|
||||
}
|
||||
}
|
||||
|
||||
if (!north && !west) {
|
||||
if (south && east && !down && !up) {
|
||||
addModel(diagCornerXZCont[ModelRotation.X0_Y0])
|
||||
} else {
|
||||
addModel(diagCornerXZ[ModelRotation.X0_Y0])
|
||||
}
|
||||
}
|
||||
|
||||
if (!north && !east) {
|
||||
if (south && west && !down && !up) {
|
||||
addModel(diagCornerXZCont[ModelRotation.X0_Y90])
|
||||
} else {
|
||||
addModel(diagCornerXZ[ModelRotation.X0_Y90])
|
||||
}
|
||||
}
|
||||
|
||||
if (!south && !east) {
|
||||
if (north && west && !down && !up) {
|
||||
addModel(diagCornerXZCont[ModelRotation.X0_Y180])
|
||||
} else {
|
||||
addModel(diagCornerXZ[ModelRotation.X0_Y180])
|
||||
}
|
||||
}
|
||||
|
||||
if (!south && !west) {
|
||||
if (north && east && !down && !up) {
|
||||
addModel(diagCornerXZCont[ModelRotation.X0_Y270])
|
||||
} else {
|
||||
addModel(diagCornerXZ[ModelRotation.X0_Y270])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return quads
|
||||
}
|
||||
|
||||
override fun useAmbientOcclusion() = true
|
||||
|
||||
override fun hasDepth() = false
|
||||
|
||||
override fun isSideLit() = false
|
||||
|
||||
override fun isBuiltin() = false
|
||||
|
||||
override fun getSprite() = centerSprite
|
||||
|
||||
override fun getTransformation() = null
|
||||
|
||||
override fun getOverrides() = null
|
||||
}
|
|
@ -1,10 +1,8 @@
|
|||
package net.shadowfacts.phycon.init
|
||||
|
||||
import net.minecraft.block.Block
|
||||
import net.minecraft.util.DyeColor
|
||||
import net.minecraft.util.Identifier
|
||||
import net.minecraft.util.registry.Registry
|
||||
import net.shadowfacts.phycon.PhysicalConnectivity
|
||||
import net.shadowfacts.phycon.block.cable.CableBlock
|
||||
import net.shadowfacts.phycon.block.extractor.ExtractorBlock
|
||||
import net.shadowfacts.phycon.block.inserter.InserterBlock
|
||||
|
@ -20,11 +18,10 @@ import net.shadowfacts.phycon.block.terminal.TerminalBlock
|
|||
*/
|
||||
object PhyBlocks {
|
||||
|
||||
val CABLES = DyeColor.values().map { it to CableBlock(it) }.toMap()
|
||||
|
||||
val INTERFACE = InterfaceBlock()
|
||||
val TERMINAL = TerminalBlock()
|
||||
val SWITCH = SwitchBlock()
|
||||
val CABLE = CableBlock()
|
||||
val EXTRACTOR = ExtractorBlock()
|
||||
val INSERTER = InserterBlock()
|
||||
val MINER = MinerBlock()
|
||||
|
@ -32,13 +29,10 @@ object PhyBlocks {
|
|||
val REDSTONE_EMITTER = RedstoneEmitterBlock()
|
||||
|
||||
fun init() {
|
||||
for ((color, block) in CABLES) {
|
||||
register(Identifier(PhysicalConnectivity.MODID, "cable_${color.getName()}"), block)
|
||||
}
|
||||
|
||||
register(InterfaceBlock.ID, INTERFACE)
|
||||
register(TerminalBlock.ID, TERMINAL)
|
||||
register(SwitchBlock.ID, SWITCH)
|
||||
register(CableBlock.ID, CABLE)
|
||||
register(ExtractorBlock.ID, EXTRACTOR)
|
||||
register(InserterBlock.ID, INSERTER)
|
||||
register(MinerBlock.ID, MINER)
|
||||
|
|
|
@ -24,13 +24,10 @@ import net.shadowfacts.phycon.item.FaceDeviceBlockItem
|
|||
*/
|
||||
object PhyItems {
|
||||
|
||||
val CABLES = PhyBlocks.CABLES.map { (color, block) ->
|
||||
color to BlockItem(block, Item.Settings())
|
||||
}.toMap()
|
||||
|
||||
val INTERFACE = FaceDeviceBlockItem(PhyBlocks.INTERFACE, Item.Settings())
|
||||
val TERMINAL = DeviceBlockItem(PhyBlocks.TERMINAL, Item.Settings())
|
||||
val SWITCH = BlockItem(PhyBlocks.SWITCH, Item.Settings())
|
||||
val CABLE = BlockItem(PhyBlocks.CABLE, Item.Settings())
|
||||
val EXTRACTOR = FaceDeviceBlockItem(PhyBlocks.EXTRACTOR, Item.Settings())
|
||||
val INSERTER = FaceDeviceBlockItem(PhyBlocks.INSERTER, Item.Settings())
|
||||
val MINER = DeviceBlockItem(PhyBlocks.MINER, Item.Settings())
|
||||
|
@ -47,13 +44,10 @@ object PhyItems {
|
|||
val REDSTONE_PROCESSOR = Item(Item.Settings())
|
||||
|
||||
fun init() {
|
||||
for ((color, item) in CABLES) {
|
||||
register(Identifier(PhysicalConnectivity.MODID, "cable_${color.getName()}"), item)
|
||||
}
|
||||
|
||||
register(InterfaceBlock.ID, INTERFACE)
|
||||
register(TerminalBlock.ID, TERMINAL)
|
||||
register(SwitchBlock.ID, SWITCH)
|
||||
register(CableBlock.ID, CABLE)
|
||||
register(ExtractorBlock.ID, EXTRACTOR)
|
||||
register(InserterBlock.ID, INSERTER)
|
||||
register(MinerBlock.ID, MINER)
|
||||
|
|
|
@ -15,7 +15,7 @@ class FaceDeviceBlockItem(block: FaceDeviceBlock<*>, settings: Settings = Settin
|
|||
|
||||
override fun getPlacementState(context: ItemPlacementContext): BlockState? {
|
||||
val hitState = context.world.getBlockState(context.blockPos)
|
||||
if (hitState.block is CableBlock) {
|
||||
if (hitState.block == PhyBlocks.CABLE) {
|
||||
val hitBlockEdge = context.hitPos.getComponentAlongAxis(context.side.axis) % 1 == 0.0
|
||||
|
||||
val placementSide = if (hitBlockEdge) context.side.opposite else context.side
|
||||
|
|
|
@ -14,7 +14,6 @@ import net.minecraft.util.math.Vec3d
|
|||
import net.shadowfacts.phycon.PhysicalConnectivity
|
||||
import net.shadowfacts.phycon.block.DeviceBlock
|
||||
import net.shadowfacts.phycon.block.FaceDeviceBlock
|
||||
import net.shadowfacts.phycon.block.cable.CableBlock
|
||||
import net.shadowfacts.phycon.init.PhyBlocks
|
||||
import net.shadowfacts.phycon.util.containsInclusive
|
||||
|
||||
|
@ -35,7 +34,7 @@ class ScrewdriverItem: Item(Settings().maxCount(1)) {
|
|||
val newState =
|
||||
when (block) {
|
||||
is DeviceBlock<*> -> screwdriverDeviceBlock(context, state, block)
|
||||
is CableBlock -> screwdriverCableBlock(context, state)
|
||||
PhyBlocks.CABLE -> screwdriverCableBlock(context)
|
||||
PhyBlocks.SWITCH -> screwdriverSwitchBlock(context)
|
||||
else -> null
|
||||
}
|
||||
|
@ -82,19 +81,19 @@ class ScrewdriverItem: Item(Settings().maxCount(1)) {
|
|||
val faceShape = block.faceShapes[state[FaceDeviceBlock.FACING]]!!
|
||||
// if we hit the face part of block, leave the cable behind
|
||||
if (faceShape.boundingBox.containsInclusive(hitInsideBlock)) {
|
||||
return (state.block as CableBlock).getInitialState(context.world, context.blockPos)
|
||||
return PhyBlocks.CABLE.getInitialState(context.world, context.blockPos)
|
||||
} else {
|
||||
if (!context.world.isClient) {
|
||||
val cable = ItemEntity(context.world, context.blockPos.x.toDouble(), context.blockPos.y.toDouble(), context.blockPos.z.toDouble(), ItemStack(state.block))
|
||||
val cable = ItemEntity(context.world, context.blockPos.x.toDouble(), context.blockPos.y.toDouble(), context.blockPos.z.toDouble(), ItemStack(PhyBlocks.CABLE))
|
||||
context.world.spawnEntity(cable)
|
||||
}
|
||||
return Blocks.AIR.defaultState
|
||||
}
|
||||
}
|
||||
|
||||
private fun screwdriverCableBlock(context: ItemUsageContext, state: BlockState): BlockState? {
|
||||
private fun screwdriverCableBlock(context: ItemUsageContext): BlockState? {
|
||||
if (!context.world.isClient) {
|
||||
val entity = ItemEntity(context.world, context.blockPos.x.toDouble(), context.blockPos.y.toDouble(), context.blockPos.z.toDouble(), ItemStack(state.block))
|
||||
val entity = ItemEntity(context.world, context.blockPos.x.toDouble(), context.blockPos.y.toDouble(), context.blockPos.z.toDouble(), ItemStack(PhyBlocks.CABLE))
|
||||
context.world.spawnEntity(entity)
|
||||
}
|
||||
return Blocks.AIR.defaultState
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
package net.shadowfacts.phycon.screen
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack
|
||||
import net.minecraft.util.Identifier
|
||||
import net.shadowfacts.cacao.geometry.Point
|
||||
import net.shadowfacts.cacao.geometry.Size
|
||||
import net.shadowfacts.cacao.util.texture.Texture
|
||||
import net.shadowfacts.cacao.view.TextureView
|
||||
import net.shadowfacts.cacao.view.button.AbstractButton
|
||||
import net.shadowfacts.phycon.PhysicalConnectivity
|
||||
|
||||
/**
|
||||
* @author shadowfacts
|
||||
*/
|
||||
class ClipboardButton(
|
||||
handler: (ClipboardButton) -> Unit,
|
||||
): AbstractButton<ClipboardButton>(
|
||||
TextureView(DEFAULT)
|
||||
) {
|
||||
|
||||
companion object {
|
||||
private val DEFAULT = Texture(Identifier(PhysicalConnectivity.MODID, "textures/gui/icons.png"), 16, 0)
|
||||
private val HOVER = Texture(Identifier(PhysicalConnectivity.MODID, "textures/gui/icons.png"), 0, 0)
|
||||
}
|
||||
|
||||
private val textureView: TextureView
|
||||
get() = content as TextureView
|
||||
|
||||
init {
|
||||
intrinsicContentSize = Size(9.0, 7.0)
|
||||
content.intrinsicContentSize = Size(9.0, 7.0)
|
||||
|
||||
this.handler = handler
|
||||
|
||||
this.background = null
|
||||
this.hoveredBackground = null
|
||||
this.disabledBackground = null
|
||||
}
|
||||
|
||||
override fun draw(matrixStack: MatrixStack, mouse: Point, delta: Float) {
|
||||
textureView.texture = if (mouse in bounds) HOVER else DEFAULT
|
||||
super.draw(matrixStack, mouse, delta)
|
||||
}
|
||||
|
||||
}
|
|
@ -1,16 +1,13 @@
|
|||
package net.shadowfacts.phycon.screen.console
|
||||
|
||||
import net.minecraft.client.MinecraftClient
|
||||
import net.minecraft.text.TranslatableText
|
||||
import net.shadowfacts.cacao.geometry.Axis
|
||||
import net.shadowfacts.cacao.util.Color
|
||||
import net.shadowfacts.cacao.view.Label
|
||||
import net.shadowfacts.cacao.view.StackView
|
||||
import net.shadowfacts.cacao.view.View
|
||||
import net.shadowfacts.cacao.viewcontroller.ViewController
|
||||
import net.shadowfacts.kiwidsl.dsl
|
||||
import net.shadowfacts.phycon.block.DeviceBlockEntity
|
||||
import net.shadowfacts.phycon.screen.ClipboardButton
|
||||
|
||||
/**
|
||||
* @author shadowfacts
|
||||
|
@ -33,29 +30,14 @@ class DeviceDetailsViewController(val device: DeviceBlockEntity): ViewController
|
|||
textColor = Color.TEXT
|
||||
}
|
||||
stack.addArrangedSubview(ipLabel)
|
||||
val copyIP = ClipboardButton {
|
||||
MinecraftClient.getInstance().keyboard.clipboard = device.ipAddress.toString()
|
||||
}
|
||||
view.addSubview(copyIP)
|
||||
|
||||
val macLabel = Label(TranslatableText("gui.phycon.console.details.mac", device.macAddress.toString())).apply {
|
||||
textColor = Color.TEXT
|
||||
}
|
||||
stack.addArrangedSubview(macLabel)
|
||||
val copyMAC = ClipboardButton {
|
||||
MinecraftClient.getInstance().keyboard.clipboard = device.macAddress.toString()
|
||||
}
|
||||
view.addSubview(copyMAC)
|
||||
|
||||
view.solver.dsl {
|
||||
stack.leftAnchor equalTo view.leftAnchor
|
||||
stack.topAnchor equalTo view.topAnchor
|
||||
|
||||
copyIP.leftAnchor equalTo (ipLabel.rightAnchor + 2)
|
||||
copyIP.topAnchor equalTo ipLabel.topAnchor
|
||||
|
||||
copyMAC.leftAnchor equalTo (macLabel.rightAnchor + 2)
|
||||
copyMAC.topAnchor equalTo macLabel.topAnchor
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,244 @@
|
|||
{
|
||||
"multipart": [
|
||||
{
|
||||
"when": { "down": "on" },
|
||||
"apply": { "model": "phycon:block/cable_side" }
|
||||
},
|
||||
{
|
||||
"when": { "up": "on" },
|
||||
"apply": { "model": "phycon:block/cable_side", "x": 180 }
|
||||
},
|
||||
{
|
||||
"when": { "north": "on" },
|
||||
"apply": { "model": "phycon:block/cable_side", "x": 270 }
|
||||
},
|
||||
{
|
||||
"when": { "south": "on" },
|
||||
"apply": { "model": "phycon:block/cable_side", "x": 90 }
|
||||
},
|
||||
{
|
||||
"when": { "west": "on" },
|
||||
"apply": { "model": "phycon:block/cable_side", "x": 90, "y": 90 }
|
||||
},
|
||||
{
|
||||
"when": { "east": "on" },
|
||||
"apply": { "model": "phycon:block/cable_side", "x": 90, "y": 270 }
|
||||
},
|
||||
{
|
||||
"when": { "down": "off|disabled" },
|
||||
"apply": { "model": "phycon:block/cable_center" }
|
||||
},
|
||||
{
|
||||
"when": { "up": "off|disabled" },
|
||||
"apply": { "model": "phycon:block/cable_center", "x": 180 }
|
||||
},
|
||||
{
|
||||
"when": { "north": "off|disabled" },
|
||||
"apply": { "model": "phycon:block/cable_center", "x": 270 }
|
||||
},
|
||||
{
|
||||
"when": { "south": "off|disabled" },
|
||||
"apply": { "model": "phycon:block/cable_center", "x": 90 }
|
||||
},
|
||||
{
|
||||
"when": { "west": "off|disabled" },
|
||||
"apply": { "model": "phycon:block/cable_center", "x": 90, "y": 90 }
|
||||
},
|
||||
{
|
||||
"when": { "east": "off|disabled" },
|
||||
"apply": { "model": "phycon:block/cable_center", "x": 90, "y": 270 }
|
||||
},
|
||||
|
||||
{
|
||||
"when": {
|
||||
"OR": [
|
||||
{ "down": "off|disabled", "north": "off|disabled", "up": "off|disabled" },
|
||||
{ "down": "off|disabled", "north": "off|disabled", "south": "off|disabled" },
|
||||
{ "down": "off|disabled", "north": "off|disabled", "east": "on" },
|
||||
{ "down": "off|disabled", "north": "off|disabled", "west": "on" }
|
||||
]
|
||||
},
|
||||
"apply": { "model": "phycon:block/cable_diag_corner" }
|
||||
},
|
||||
{
|
||||
"when": { "down": "off|disabled", "north": "off|disabled", "up": "on", "south": "on", "east": "off|disabled", "west": "off|disabled" },
|
||||
"apply": { "model": "phycon:block/cable_diag_corner_cont" }
|
||||
},
|
||||
|
||||
{
|
||||
"when": {
|
||||
"OR": [
|
||||
{ "down": "off|disabled", "south": "off|disabled", "up": "off|disabled" },
|
||||
{ "down": "off|disabled", "south": "off|disabled", "north": "off|disabled" },
|
||||
{ "down": "off|disabled", "south": "off|disabled", "east": "on" },
|
||||
{ "down": "off|disabled", "south": "off|disabled", "west": "on" }
|
||||
]
|
||||
},
|
||||
"apply": { "model": "phycon:block/cable_diag_corner", "y": 180 }
|
||||
},
|
||||
{
|
||||
"when": { "down": "off|disabled", "south": "off|disabled", "up": "on", "north": "on", "east": "off|disabled", "west": "off|disabled" },
|
||||
"apply": { "model": "phycon:block/cable_diag_corner_cont", "y": 180 }
|
||||
},
|
||||
|
||||
{
|
||||
"when": {
|
||||
"OR": [
|
||||
{ "up": "off|disabled", "north": "off|disabled", "down": "off|disabled" },
|
||||
{ "up": "off|disabled", "north": "off|disabled", "south": "off|disabled" },
|
||||
{ "up": "off|disabled", "north": "off|disabled", "east": "on" },
|
||||
{ "up": "off|disabled", "north": "off|disabled", "west": "on" }
|
||||
]
|
||||
},
|
||||
"apply": { "model": "phycon:block/cable_diag_corner", "x": 180, "y": 180 }
|
||||
},
|
||||
{
|
||||
"when": { "up": "off|disabled", "north": "off|disabled", "down": "on", "south": "on", "east": "off|disabled", "west": "off|disabled" },
|
||||
"apply": { "model": "phycon:block/cable_diag_corner_cont", "x": 180, "y": 180 }
|
||||
},
|
||||
|
||||
{
|
||||
"when": {
|
||||
"OR": [
|
||||
{ "up": "off|disabled", "south": "off|disabled", "down": "off|disabled" },
|
||||
{ "up": "off|disabled", "south": "off|disabled", "north": "off|disabled" },
|
||||
{ "up": "off|disabled", "south": "off|disabled", "east": "on" },
|
||||
{ "up": "off|disabled", "south": "off|disabled", "west": "on" }
|
||||
]
|
||||
},
|
||||
"apply": { "model": "phycon:block/cable_diag_corner", "x": 180 }
|
||||
},
|
||||
{
|
||||
"when": { "up": "off|disabled", "south": "off|disabled", "down": "on", "north": "on", "east": "off|disabled", "west": "off|disabled" },
|
||||
"apply": { "model": "phycon:block/cable_diag_corner_cont", "x": 180}
|
||||
},
|
||||
|
||||
{
|
||||
"when": {
|
||||
"OR": [
|
||||
{ "down": "off|disabled", "west": "off|disabled", "up": "off|disabled" },
|
||||
{ "down": "off|disabled", "west": "off|disabled", "east": "off|disabled" },
|
||||
{ "down": "off|disabled", "west": "off|disabled", "north": "on" },
|
||||
{ "down": "off|disabled", "west": "off|disabled", "south": "on" }
|
||||
]
|
||||
},
|
||||
"apply": { "model": "phycon:block/cable_diag_corner", "y": 270 }
|
||||
},
|
||||
{
|
||||
"when": { "down": "off|disabled", "west": "off|disabled", "up": "on", "east": "on", "north": "off|disabled", "south": "off|disabled" },
|
||||
"apply": { "model": "phycon:block/cable_diag_corner_cont", "y": 270 }
|
||||
},
|
||||
|
||||
{
|
||||
"when": {
|
||||
"OR": [
|
||||
{ "down": "off|disabled", "east": "off|disabled", "up": "off|disabled" },
|
||||
{ "down": "off|disabled", "east": "off|disabled", "west": "off|disabled" },
|
||||
{ "down": "off|disabled", "east": "off|disabled", "north": "on" },
|
||||
{ "down": "off|disabled", "east": "off|disabled", "south": "on" }
|
||||
]
|
||||
},
|
||||
"apply": { "model": "phycon:block/cable_diag_corner", "y": 90 }
|
||||
},
|
||||
{
|
||||
"when": { "down": "off|disabled", "east": "off|disabled", "up": "on", "west": "on", "north": "off|disabled", "south": "off|disabled" },
|
||||
"apply": { "model": "phycon:block/cable_diag_corner_cont", "y": 90 }
|
||||
},
|
||||
|
||||
{
|
||||
"when": {
|
||||
"OR": [
|
||||
{ "up": "off|disabled", "west": "off|disabled", "down": "off|disabled" },
|
||||
{ "up": "off|disabled", "west": "off|disabled", "east": "off|disabled" },
|
||||
{ "up": "off|disabled", "west": "off|disabled", "north": "on" },
|
||||
{ "up": "off|disabled", "west": "off|disabled", "south": "on" }
|
||||
]
|
||||
},
|
||||
"apply": { "model": "phycon:block/cable_diag_corner", "x": 180, "y": 90 }
|
||||
},
|
||||
{
|
||||
"when": { "up": "off|disabled", "west": "off|disabled", "down": "on", "east": "on", "north": "off|disabled", "south": "off|disabled" },
|
||||
"apply": { "model": "phycon:block/cable_diag_corner_cont", "x": 180, "y": 90 }
|
||||
},
|
||||
|
||||
{
|
||||
"when": {
|
||||
"OR": [
|
||||
{ "up": "off|disabled", "east": "off|disabled", "down": "off|disabled" },
|
||||
{ "up": "off|disabled", "east": "off|disabled", "west": "off|disabled" },
|
||||
{ "up": "off|disabled", "east": "off|disabled", "north": "on" },
|
||||
{ "up": "off|disabled", "east": "off|disabled", "south": "on" }
|
||||
]
|
||||
},
|
||||
"apply": { "model": "phycon:block/cable_diag_corner", "x": 180, "y": 270 }
|
||||
},
|
||||
{
|
||||
"when": { "up": "off|disabled", "east": "off|disabled", "down": "on", "west": "on", "north": "off|disabled", "south": "off|disabled" },
|
||||
"apply": { "model": "phycon:block/cable_diag_corner_cont", "x": 180, "y": 270 }
|
||||
},
|
||||
|
||||
{
|
||||
"when": {
|
||||
"OR": [
|
||||
{ "north": "off|disabled", "west": "off|disabled", "south": "off|disabled" },
|
||||
{ "north": "off|disabled", "west": "off|disabled", "east": "off|disabled" },
|
||||
{ "north": "off|disabled", "west": "off|disabled", "down": "on" },
|
||||
{ "north": "off|disabled", "west": "off|disabled", "up": "on" }
|
||||
]
|
||||
},
|
||||
"apply": { "model": "phycon:block/cable_diag_corner_xz" }
|
||||
},
|
||||
{
|
||||
"when": { "north": "off|disabled", "west": "off|disabled", "south": "on", "east": "on", "down": "off|disabled", "up": "off|disabled" },
|
||||
"apply": { "model": "phycon:block/cable_diag_corner_xz_cont" }
|
||||
},
|
||||
|
||||
{
|
||||
"when": {
|
||||
"OR": [
|
||||
{ "north": "off|disabled", "east": "off|disabled", "south": "off|disabled" },
|
||||
{ "north": "off|disabled", "east": "off|disabled", "west": "off|disabled" },
|
||||
{ "north": "off|disabled", "east": "off|disabled", "down": "on" },
|
||||
{ "north": "off|disabled", "east": "off|disabled", "up": "on" }
|
||||
]
|
||||
},
|
||||
"apply": { "model": "phycon:block/cable_diag_corner_xz", "y": 90 }
|
||||
},
|
||||
{
|
||||
"when": { "north": "off|disabled", "east": "off|disabled", "south": "on", "west": "on", "down": "off|disabled", "up": "off|disabled" },
|
||||
"apply": { "model": "phycon:block/cable_diag_corner_xz_cont", "y": 90 }
|
||||
},
|
||||
|
||||
{
|
||||
"when": {
|
||||
"OR": [
|
||||
{ "south": "off|disabled", "east": "off|disabled", "north": "off|disabled" },
|
||||
{ "south": "off|disabled", "east": "off|disabled", "west": "off|disabled" },
|
||||
{ "south": "off|disabled", "east": "off|disabled", "down": "on" },
|
||||
{ "south": "off|disabled", "east": "off|disabled", "up": "on" }
|
||||
]
|
||||
},
|
||||
"apply": { "model": "phycon:block/cable_diag_corner_xz", "y": 180 }
|
||||
},
|
||||
{
|
||||
"when": { "south": "off|disabled", "east": "off|disabled", "north": "on", "west": "on", "down": "off|disabled", "up": "off|disabled" },
|
||||
"apply": { "model": "phycon:block/cable_diag_corner_xz_cont", "y": 180 }
|
||||
},
|
||||
|
||||
{
|
||||
"when": {
|
||||
"OR": [
|
||||
{ "south": "off|disabled", "west": "off|disabled", "north": "off|disabled" },
|
||||
{ "south": "off|disabled", "west": "off|disabled", "east": "off|disabled" },
|
||||
{ "south": "off|disabled", "west": "off|disabled", "down": "on" },
|
||||
{ "south": "off|disabled", "west": "off|disabled", "up": "on" }
|
||||
]
|
||||
},
|
||||
"apply": { "model": "phycon:block/cable_diag_corner_xz", "y": 270 }
|
||||
},
|
||||
{
|
||||
"when": { "south": "off|disabled", "west": "off|disabled", "north": "on", "east": "on", "down": "off|disabled", "up": "off|disabled" },
|
||||
"apply": { "model": "phycon:block/cable_diag_corner_xz_cont", "y": 270 }
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"multipart": [
|
||||
{
|
||||
"apply": { "model": "phycon:block/cable/black" }
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"multipart": [
|
||||
{
|
||||
"apply": { "model": "phycon:block/cable/blue" }
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"multipart": [
|
||||
{
|
||||
"apply": { "model": "phycon:block/cable/brown" }
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"multipart": [
|
||||
{
|
||||
"apply": { "model": "phycon:block/cable/cyan" }
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"multipart": [
|
||||
{
|
||||
"apply": { "model": "phycon:block/cable/gray" }
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"multipart": [
|
||||
{
|
||||
"apply": { "model": "phycon:block/cable/green" }
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"multipart": [
|
||||
{
|
||||
"apply": { "model": "phycon:block/cable/light_blue" }
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"multipart": [
|
||||
{
|
||||
"apply": { "model": "phycon:block/cable/light_gray" }
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"multipart": [
|
||||
{
|
||||
"apply": { "model": "phycon:block/cable/lime" }
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"multipart": [
|
||||
{
|
||||
"apply": { "model": "phycon:block/cable/magenta" }
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"multipart": [
|
||||
{
|
||||
"apply": { "model": "phycon:block/cable/orange" }
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"multipart": [
|
||||
{
|
||||
"apply": { "model": "phycon:block/cable/pink" }
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"multipart": [
|
||||
{
|
||||
"apply": { "model": "phycon:block/cable/purple" }
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"multipart": [
|
||||
{
|
||||
"apply": { "model": "phycon:block/cable/red" }
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"multipart": [
|
||||
{
|
||||
"apply": { "model": "phycon:block/cable/white" }
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"multipart": [
|
||||
{
|
||||
"apply": { "model": "phycon:block/cable/yellow" }
|
||||
}
|
||||
]
|
||||
}
|
|
@ -2,22 +2,7 @@
|
|||
"block.phycon.switch": "Network Switch",
|
||||
"block.phycon.network_interface": "Inventory Interface",
|
||||
"block.phycon.terminal": "Terminal",
|
||||
"block.phycon.cable_white": "White Cable",
|
||||
"block.phycon.cable_orange": "Orange Cable",
|
||||
"block.phycon.cable_magenta": "Magenta Cable",
|
||||
"block.phycon.cable_light_blue": "Light Blue Cable",
|
||||
"block.phycon.cable_yellow": "Yellow Cable",
|
||||
"block.phycon.cable_lime": "Lime Cable",
|
||||
"block.phycon.cable_pink": "Pink Cable",
|
||||
"block.phycon.cable_gray": "Gray Cable",
|
||||
"block.phycon.cable_light_gray": "Light Gray Cable",
|
||||
"block.phycon.cable_cyan": "Cyan Cable",
|
||||
"block.phycon.cable_purple": "Purple Cable",
|
||||
"block.phycon.cable_blue": "Blue Cable",
|
||||
"block.phycon.cable_brown": "Brown Cable",
|
||||
"block.phycon.cable_green": "Green Cable",
|
||||
"block.phycon.cable_red": "Red Cable",
|
||||
"block.phycon.cable_black": "Black Cable",
|
||||
"block.phycon.cable": "Cable",
|
||||
"block.phycon.extractor": "Inventory Extractor",
|
||||
"block.phycon.inserter": "Inventory Inserter",
|
||||
"block.phycon.miner": "Block Miner",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"textures": {
|
||||
"center": "phycon:block/cable/color/cap_end",
|
||||
"center": "phycon:block/cable_cap_end",
|
||||
"particle": "#center"
|
||||
},
|
||||
"elements": [
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"textures": {
|
||||
"corner": "phycon:block/cable/color/cap_end"
|
||||
"corner": "phycon:block/cable_cap_end"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"textures": {
|
||||
"corner": "phycon:block/cable/color/straight"
|
||||
"corner": "phycon:block/cable_straight"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"textures": {
|
||||
"corner": "phycon:block/cable/color/cap_end"
|
||||
"corner": "phycon:block/cable_cap_end"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"textures": {
|
||||
"corner": "phycon:block/cable/color/straight_rotated"
|
||||
"corner": "phycon:block/cable_straight_rotated"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"parent": "block/block",
|
||||
"textures": {
|
||||
"side": "phycon:block/cable/color/straight",
|
||||
"side": "phycon:block/cable_straight",
|
||||
"particle": "#side"
|
||||
},
|
||||
"elements": [
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"textures": {
|
||||
"center": "phycon:block/cable/red/cap_end"
|
||||
"center": "phycon:block/cable_cap_end"
|
||||
},
|
||||
"elements": [
|
||||
{
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"textures": {
|
||||
"center": "phycon:block/cable/black/cap_end"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [6, 6, 6],
|
||||
"to": [10, 10, 10],
|
||||
"faces": {
|
||||
"down": {"texture": "#center"},
|
||||
"up": {"texture": "#center"},
|
||||
"north": {"texture": "#center"},
|
||||
"south": {"texture": "#center"},
|
||||
"west": {"texture": "#center"},
|
||||
"east": {"texture": "#center"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"textures": {
|
||||
"center": "phycon:block/cable/blue/cap_end"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [6, 6, 6],
|
||||
"to": [10, 10, 10],
|
||||
"faces": {
|
||||
"down": {"texture": "#center"},
|
||||
"up": {"texture": "#center"},
|
||||
"north": {"texture": "#center"},
|
||||
"south": {"texture": "#center"},
|
||||
"west": {"texture": "#center"},
|
||||
"east": {"texture": "#center"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"textures": {
|
||||
"center": "phycon:block/cable/brown/cap_end"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [6, 6, 6],
|
||||
"to": [10, 10, 10],
|
||||
"faces": {
|
||||
"down": {"texture": "#center"},
|
||||
"up": {"texture": "#center"},
|
||||
"north": {"texture": "#center"},
|
||||
"south": {"texture": "#center"},
|
||||
"west": {"texture": "#center"},
|
||||
"east": {"texture": "#center"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"textures": {
|
||||
"center": "phycon:block/cable/cyan/cap_end"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [6, 6, 6],
|
||||
"to": [10, 10, 10],
|
||||
"faces": {
|
||||
"down": {"texture": "#center"},
|
||||
"up": {"texture": "#center"},
|
||||
"north": {"texture": "#center"},
|
||||
"south": {"texture": "#center"},
|
||||
"west": {"texture": "#center"},
|
||||
"east": {"texture": "#center"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"textures": {
|
||||
"center": "phycon:block/cable/gray/cap_end"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [6, 6, 6],
|
||||
"to": [10, 10, 10],
|
||||
"faces": {
|
||||
"down": {"texture": "#center"},
|
||||
"up": {"texture": "#center"},
|
||||
"north": {"texture": "#center"},
|
||||
"south": {"texture": "#center"},
|
||||
"west": {"texture": "#center"},
|
||||
"east": {"texture": "#center"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"textures": {
|
||||
"center": "phycon:block/cable/green/cap_end"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [6, 6, 6],
|
||||
"to": [10, 10, 10],
|
||||
"faces": {
|
||||
"down": {"texture": "#center"},
|
||||
"up": {"texture": "#center"},
|
||||
"north": {"texture": "#center"},
|
||||
"south": {"texture": "#center"},
|
||||
"west": {"texture": "#center"},
|
||||
"east": {"texture": "#center"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"textures": {
|
||||
"center": "phycon:block/cable/light_blue/cap_end"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [6, 6, 6],
|
||||
"to": [10, 10, 10],
|
||||
"faces": {
|
||||
"down": {"texture": "#center"},
|
||||
"up": {"texture": "#center"},
|
||||
"north": {"texture": "#center"},
|
||||
"south": {"texture": "#center"},
|
||||
"west": {"texture": "#center"},
|
||||
"east": {"texture": "#center"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"textures": {
|
||||
"center": "phycon:block/cable/light_gray/cap_end"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [6, 6, 6],
|
||||
"to": [10, 10, 10],
|
||||
"faces": {
|
||||
"down": {"texture": "#center"},
|
||||
"up": {"texture": "#center"},
|
||||
"north": {"texture": "#center"},
|
||||
"south": {"texture": "#center"},
|
||||
"west": {"texture": "#center"},
|
||||
"east": {"texture": "#center"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"textures": {
|
||||
"center": "phycon:block/cable/lime/cap_end"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [6, 6, 6],
|
||||
"to": [10, 10, 10],
|
||||
"faces": {
|
||||
"down": {"texture": "#center"},
|
||||
"up": {"texture": "#center"},
|
||||
"north": {"texture": "#center"},
|
||||
"south": {"texture": "#center"},
|
||||
"west": {"texture": "#center"},
|
||||
"east": {"texture": "#center"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"textures": {
|
||||
"center": "phycon:block/cable/magenta/cap_end"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [6, 6, 6],
|
||||
"to": [10, 10, 10],
|
||||
"faces": {
|
||||
"down": {"texture": "#center"},
|
||||
"up": {"texture": "#center"},
|
||||
"north": {"texture": "#center"},
|
||||
"south": {"texture": "#center"},
|
||||
"west": {"texture": "#center"},
|
||||
"east": {"texture": "#center"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"textures": {
|
||||
"center": "phycon:block/cable/orange/cap_end"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [6, 6, 6],
|
||||
"to": [10, 10, 10],
|
||||
"faces": {
|
||||
"down": {"texture": "#center"},
|
||||
"up": {"texture": "#center"},
|
||||
"north": {"texture": "#center"},
|
||||
"south": {"texture": "#center"},
|
||||
"west": {"texture": "#center"},
|
||||
"east": {"texture": "#center"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"textures": {
|
||||
"center": "phycon:block/cable/pink/cap_end"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [6, 6, 6],
|
||||
"to": [10, 10, 10],
|
||||
"faces": {
|
||||
"down": {"texture": "#center"},
|
||||
"up": {"texture": "#center"},
|
||||
"north": {"texture": "#center"},
|
||||
"south": {"texture": "#center"},
|
||||
"west": {"texture": "#center"},
|
||||
"east": {"texture": "#center"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"textures": {
|
||||
"center": "phycon:block/cable/purple/cap_end"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [6, 6, 6],
|
||||
"to": [10, 10, 10],
|
||||
"faces": {
|
||||
"down": {"texture": "#center"},
|
||||
"up": {"texture": "#center"},
|
||||
"north": {"texture": "#center"},
|
||||
"south": {"texture": "#center"},
|
||||
"west": {"texture": "#center"},
|
||||
"east": {"texture": "#center"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"textures": {
|
||||
"center": "phycon:block/cable/white/cap_end"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [6, 6, 6],
|
||||
"to": [10, 10, 10],
|
||||
"faces": {
|
||||
"down": {"texture": "#center"},
|
||||
"up": {"texture": "#center"},
|
||||
"north": {"texture": "#center"},
|
||||
"south": {"texture": "#center"},
|
||||
"west": {"texture": "#center"},
|
||||
"east": {"texture": "#center"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"textures": {
|
||||
"center": "phycon:block/cable/yellow/cap_end"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [6, 6, 6],
|
||||
"to": [10, 10, 10],
|
||||
"faces": {
|
||||
"down": {"texture": "#center"},
|
||||
"up": {"texture": "#center"},
|
||||
"north": {"texture": "#center"},
|
||||
"south": {"texture": "#center"},
|
||||
"west": {"texture": "#center"},
|
||||
"east": {"texture": "#center"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
Before Width: | Height: | Size: 104 B |
Before Width: | Height: | Size: 173 B |
Before Width: | Height: | Size: 128 B |
Before Width: | Height: | Size: 146 B |
Before Width: | Height: | Size: 243 B |
Before Width: | Height: | Size: 222 B |
Before Width: | Height: | Size: 144 B |
Before Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 217 B |
Before Width: | Height: | Size: 148 B |
Before Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 229 B |
Before Width: | Height: | Size: 142 B |
Before Width: | Height: | Size: 231 B |
Before Width: | Height: | Size: 206 B |
Before Width: | Height: | Size: 143 B |
Before Width: | Height: | Size: 228 B |
Before Width: | Height: | Size: 211 B |
Before Width: | Height: | Size: 148 B |
Before Width: | Height: | Size: 276 B |
Before Width: | Height: | Size: 246 B |
Before Width: | Height: | Size: 145 B |
Before Width: | Height: | Size: 249 B |
Before Width: | Height: | Size: 222 B |
Before Width: | Height: | Size: 149 B |
Before Width: | Height: | Size: 274 B |
Before Width: | Height: | Size: 243 B |
Before Width: | Height: | Size: 148 B |
Before Width: | Height: | Size: 255 B |
Before Width: | Height: | Size: 236 B |
Before Width: | Height: | Size: 145 B |
Before Width: | Height: | Size: 259 B |
Before Width: | Height: | Size: 236 B |
Before Width: | Height: | Size: 150 B |
Before Width: | Height: | Size: 280 B |
Before Width: | Height: | Size: 249 B |
Before Width: | Height: | Size: 148 B |
Before Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 243 B |
Before Width: | Height: | Size: 148 B |
Before Width: | Height: | Size: 258 B |
Before Width: | Height: | Size: 228 B |
Before Width: | Height: | Size: 109 B |
Before Width: | Height: | Size: 169 B |
Before Width: | Height: | Size: 148 B |
Before Width: | Height: | Size: 149 B |
Before Width: | Height: | Size: 261 B |
Before Width: | Height: | Size: 234 B |
After Width: | Height: | Size: 598 B |
After Width: | Height: | Size: 765 B |