diff --git a/src/main/kotlin/net/shadowfacts/phycon/block/FaceDeviceBlock.kt b/src/main/kotlin/net/shadowfacts/phycon/block/FaceDeviceBlock.kt index 47ce568..8faf586 100644 --- a/src/main/kotlin/net/shadowfacts/phycon/block/FaceDeviceBlock.kt +++ b/src/main/kotlin/net/shadowfacts/phycon/block/FaceDeviceBlock.kt @@ -7,6 +7,7 @@ import net.minecraft.item.ItemPlacementContext import net.minecraft.state.StateManager import net.minecraft.state.property.EnumProperty import net.minecraft.state.property.Properties +import net.minecraft.util.DyeColor import net.minecraft.util.StringIdentifiable import net.minecraft.util.math.BlockPos import net.minecraft.util.math.Direction @@ -28,6 +29,7 @@ abstract class FaceDeviceBlock(settings: Settings): Device companion object { val FACING = Properties.FACING val CABLE_CONNECTION = EnumProperty.of("cable_connection", FaceCableConnection::class.java) + val COLOR = EnumProperty.of("color", DyeColor::class.java) } enum class FaceCableConnection : StringIdentifiable { @@ -100,44 +102,56 @@ abstract class FaceDeviceBlock(settings: Settings): Device super.appendProperties(builder) builder.add(FACING) builder.add(CABLE_CONNECTION) + builder.add(COLOR) } override fun getPlacementState(context: ItemPlacementContext): BlockState { val facing = if (context.player?.isSneaking == true) context.side.opposite else context.playerLookDirection.opposite - val cableConnection = FaceCableConnection.from(getCableConnectedSide(context.world, context.blockPos, facing)) + // todo: this should never be called + val cableConnection = FaceCableConnection.from(getCableConnectedSide(context.world, context.blockPos, facing, DyeColor.BLUE)) return defaultState .with(FACING, facing) .with(CABLE_CONNECTION, cableConnection) } - private fun getCableConnectedSide(world: WorldAccess, pos: BlockPos, facing: Direction): Direction? { + private fun getCableConnectedSide(world: WorldAccess, pos: BlockPos, facing: Direction, color: DyeColor): Direction? { for (side in Direction.values()) { if (side == facing) { continue } val offsetPos = pos.offset(side) val state = world.getBlockState(offsetPos) - val block = state.block - if (block is NetworkComponentBlock && block.getNetworkConnectedSides(state, world, offsetPos).contains(side.opposite)) { + if (canConnectTo(world, side, state, offsetPos, color)) { return side } } return null } + private fun canConnectTo(world: WorldAccess, side: Direction, candidateState: BlockState, candidatePos: BlockPos, myColor: DyeColor): Boolean { + val block = candidateState.block + return if (block is FaceDeviceBlock<*> && candidateState[COLOR] == myColor) { + true + } else if (block is CableBlock && block.color == myColor) { + true + } else { + block is NetworkComponentBlock && block.getNetworkConnectedSides(candidateState, world, candidatePos).contains(side.opposite) + } + } + override fun getStateForNeighborUpdate(state: BlockState, side: Direction, neighborState: BlockState, world: WorldAccess, pos: BlockPos, neighborPos: BlockPos): BlockState { val current = state[CABLE_CONNECTION] var newConnection = current if (current == FaceCableConnection.NONE) { - if (neighborState.block is NetworkComponentBlock) { + if (canConnectTo(world, side, neighborState, neighborPos, state[COLOR])) { newConnection = FaceCableConnection.from(side) } } else { val currentConnectedPos = pos.offset(current.direction) if (neighborPos == currentConnectedPos && neighborState.block !is NetworkComponentBlock) { // the old cable connection is no longer correct, try to find another - newConnection = FaceCableConnection.from(getCableConnectedSide(world, pos, state[FACING])) + newConnection = FaceCableConnection.from(getCableConnectedSide(world, pos, state[FACING], state[COLOR])) } } return state.with(CABLE_CONNECTION, newConnection) diff --git a/src/main/kotlin/net/shadowfacts/phycon/client/model/ColoredCableModel.kt b/src/main/kotlin/net/shadowfacts/phycon/client/model/ColoredCableModel.kt index 59b1128..0c5acab 100644 --- a/src/main/kotlin/net/shadowfacts/phycon/client/model/ColoredCableModel.kt +++ b/src/main/kotlin/net/shadowfacts/phycon/client/model/ColoredCableModel.kt @@ -3,8 +3,6 @@ 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 @@ -13,6 +11,7 @@ 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.client.util.bakeRecoloredCable import net.shadowfacts.phycon.util.CableConnection import java.util.Random import java.util.function.Function @@ -89,8 +88,8 @@ class ColoredCableModel( 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) + this.side[side.ordinal] = loader.bakeRecoloredCable(SIDE, rot, textureGetter, color) + this.center[side.ordinal] = loader.bakeRecoloredCable(CENTER, rot, textureGetter, color) } diagCorner.clear() @@ -105,8 +104,8 @@ class ColoredCableModel( 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) + diagCorner[rot] = loader.bakeRecoloredCable(DIAG_CORNER, rot, textureGetter, color) + diagCornerCont[rot] = loader.bakeRecoloredCable(DIAG_CORNER_CONT, rot, textureGetter, color) } diagCornerXZ.clear() @@ -117,26 +116,13 @@ class ColoredCableModel( 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) + diagCornerXZ[rot] = loader.bakeRecoloredCable(DIAG_CORNER_XZ, rot, textureGetter, color) + diagCornerXZCont[rot] = loader.bakeRecoloredCable(DIAG_CORNER_XZ_CONT, rot, textureGetter, color) } return this } - private fun ModelLoader.bakeRetextured(id: Identifier, textureGetter: Function, 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 { if (state == null) { return center.flatMap { diff --git a/src/main/kotlin/net/shadowfacts/phycon/client/model/FaceDeviceModel.kt b/src/main/kotlin/net/shadowfacts/phycon/client/model/FaceDeviceModel.kt index fadfe75..a96f376 100644 --- a/src/main/kotlin/net/shadowfacts/phycon/client/model/FaceDeviceModel.kt +++ b/src/main/kotlin/net/shadowfacts/phycon/client/model/FaceDeviceModel.kt @@ -4,11 +4,13 @@ import net.minecraft.block.BlockState import net.minecraft.client.render.model.* import net.minecraft.client.texture.Sprite 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.FaceDeviceBlock import net.shadowfacts.phycon.block.FaceDeviceBlock.FaceCableConnection +import net.shadowfacts.phycon.client.util.bakeRecoloredCable import java.util.Random import java.util.function.Function @@ -21,10 +23,14 @@ abstract class FaceDeviceModel: UnbakedModel, BakedModel { private val interfaceCableCornerID = Identifier(PhysicalConnectivity.MODID, "block/interface_cable_corner") private val interfaceCableCorner2ID = Identifier(PhysicalConnectivity.MODID, "block/interface_cable_corner_2") private val interfaceCableCapID = Identifier(PhysicalConnectivity.MODID, "block/interface_cable_cap") - private var interfaceCableStraight = Array(6) { null } - private var interfaceCableCap = Array(6) { null } - private var interfaceCableCorner = mutableMapOf() - private var interfaceCableCorner2 = mutableMapOf() +// private var interfaceCableStraight = Array(6) { null } +// private var interfaceCableCap = Array(6) { null } +// private var interfaceCableCorner = mutableMapOf() +// private var interfaceCableCorner2 = mutableMapOf() + private var interfaceCableStraight = mutableMapOf>() + private var interfaceCableCap = mutableMapOf>() + private var interfaceCableCorner = mutableMapOf>() + private var interfaceCableCorner2 = mutableMapOf>() protected val defaultRotations = listOf( ModelRotation.X0_Y0, @@ -36,7 +42,7 @@ abstract class FaceDeviceModel: UnbakedModel, BakedModel { ) abstract fun getSideModelIDs(): Collection - abstract fun bakeSideModels(loader: ModelLoader) + abstract fun bakeSideModels(loader: ModelLoader, textureGetter: Function) abstract fun getSideModel(state: BlockState): BakedModel? override fun getModelDependencies(): Collection { @@ -52,36 +58,54 @@ abstract class FaceDeviceModel: UnbakedModel, BakedModel { unbakedModelGetter: Function, unresolvedTextureReferences: MutableSet> ): Collection { - return modelDependencies.map(unbakedModelGetter::apply).flatMap { it.getTextureDependencies(unbakedModelGetter, unresolvedTextureReferences) } + val textures = mutableListOf() + for (dep in modelDependencies) { + val unbakedDep = unbakedModelGetter.apply(dep) + val depTextures = unbakedDep.getTextureDependencies(unbakedModelGetter, unresolvedTextureReferences) + for (tex in depTextures) { + if (tex.textureId.namespace == PhysicalConnectivity.MODID && tex.textureId.path.startsWith("block/cable/color/")) { + for (color in DyeColor.values()) { + val newPath = tex.textureId.path.replace("block/cable/color/", "block/cable/${color.getName()}/") + val substituted = SpriteIdentifier(tex.atlasId, Identifier(PhysicalConnectivity.MODID, newPath)) + textures.add(substituted) + } + } else { + textures.add(tex) + } + } + } + return textures } override fun bake(loader: ModelLoader, textureGetter: Function, rotationContainer: ModelBakeSettings, modelId: Identifier): BakedModel { - bakeSideModels(loader) + bakeSideModels(loader, textureGetter) - defaultRotations.forEachIndexed { i, rot -> - interfaceCableStraight[i] = loader.bake(interfaceCableStraightID, rot) - interfaceCableCap[i] = loader.bake(interfaceCableCapID, rot) - } + DyeColor.values().forEach { color -> + interfaceCableStraight[color] = Array(6) { i -> + loader.bakeRecoloredCable(interfaceCableStraightID, defaultRotations[i], textureGetter, color) + } + interfaceCableCap[color] = Array(6) { i -> + loader.bakeRecoloredCable(interfaceCableCapID, defaultRotations[i], textureGetter, color) + } - mapOf( - interfaceCableCorner to interfaceCableCornerID to ModelRotation.values().toList(), - interfaceCableCorner2 to interfaceCableCorner2ID to listOf( - ModelRotation.X0_Y0, - ModelRotation.X0_Y90, - ModelRotation.X0_Y180, - ModelRotation.X0_Y270, - ModelRotation.X180_Y0, - ModelRotation.X180_Y90, - ModelRotation.X180_Y180, - ModelRotation.X180_Y270, - ), - ).forEach { (k, rotations) -> - val (map, id) = k - map.clear() - rotations.forEach { rot -> - val model = loader.bake(id, rot) - if (model == null) map.remove(rot) - else map[rot] = model + mapOf( + interfaceCableCorner to interfaceCableCornerID to ModelRotation.values().toList(), + interfaceCableCorner2 to interfaceCableCorner2ID to listOf( + ModelRotation.X0_Y0, + ModelRotation.X0_Y90, + ModelRotation.X0_Y180, + ModelRotation.X0_Y270, + ModelRotation.X180_Y0, + ModelRotation.X180_Y90, + ModelRotation.X180_Y180, + ModelRotation.X180_Y270, + ), + ).forEach { (k, rotations) -> + val (map, id) = k + map[color] = mutableMapOf() + rotations.forEach { rot -> + map[color]!![rot] = loader.bakeRecoloredCable(id, rot, textureGetter, color) + } } } @@ -92,54 +116,55 @@ abstract class FaceDeviceModel: UnbakedModel, BakedModel { if (state == null) return listOf() val facing = state[FaceDeviceBlock.FACING] val connection = state[FaceDeviceBlock.CABLE_CONNECTION] + val color = state[FaceDeviceBlock.COLOR] val sideQuads = getSideModel(state)?.getQuads(state, face, random) ?: listOf() val cableQuads = if (connection.direction == facing.opposite) { - interfaceCableStraight[facing.ordinal]?.getQuads(state, face, random) ?: listOf() + interfaceCableStraight[color]!![facing.ordinal]?.getQuads(state, face, random) ?: listOf() } else if (connection == FaceCableConnection.NONE) { - interfaceCableCap[facing.ordinal]?.getQuads(state, face, random) ?: listOf() + interfaceCableCap[color]!![facing.ordinal]?.getQuads(state, face, random) ?: listOf() } else { val model = when (facing) { Direction.DOWN -> when (connection) { - FaceCableConnection.NORTH -> interfaceCableCorner[ModelRotation.X0_Y0] - FaceCableConnection.EAST -> interfaceCableCorner[ModelRotation.X0_Y90] - FaceCableConnection.SOUTH -> interfaceCableCorner[ModelRotation.X0_Y180] - FaceCableConnection.WEST -> interfaceCableCorner[ModelRotation.X0_Y270] + FaceCableConnection.NORTH -> interfaceCableCorner[color]!![ModelRotation.X0_Y0] + FaceCableConnection.EAST -> interfaceCableCorner[color]!![ModelRotation.X0_Y90] + FaceCableConnection.SOUTH -> interfaceCableCorner[color]!![ModelRotation.X0_Y180] + FaceCableConnection.WEST -> interfaceCableCorner[color]!![ModelRotation.X0_Y270] else -> null } Direction.UP -> when (connection) { - FaceCableConnection.NORTH -> interfaceCableCorner[ModelRotation.X180_Y180] - FaceCableConnection.EAST -> interfaceCableCorner[ModelRotation.X180_Y270] - FaceCableConnection.SOUTH -> interfaceCableCorner[ModelRotation.X180_Y0] - FaceCableConnection.WEST -> interfaceCableCorner[ModelRotation.X180_Y90] + FaceCableConnection.NORTH -> interfaceCableCorner[color]!![ModelRotation.X180_Y180] + FaceCableConnection.EAST -> interfaceCableCorner[color]!![ModelRotation.X180_Y270] + FaceCableConnection.SOUTH -> interfaceCableCorner[color]!![ModelRotation.X180_Y0] + FaceCableConnection.WEST -> interfaceCableCorner[color]!![ModelRotation.X180_Y90] else -> null } Direction.NORTH -> when (connection) { - FaceCableConnection.UP -> interfaceCableCorner[ModelRotation.X270_Y0] - FaceCableConnection.EAST -> interfaceCableCorner2[ModelRotation.X180_Y180] - FaceCableConnection.DOWN -> interfaceCableCorner[ModelRotation.X90_Y180] - FaceCableConnection.WEST -> interfaceCableCorner2[ModelRotation.X0_Y0] + FaceCableConnection.UP -> interfaceCableCorner[color]!![ModelRotation.X270_Y0] + FaceCableConnection.EAST -> interfaceCableCorner2[color]!![ModelRotation.X180_Y180] + FaceCableConnection.DOWN -> interfaceCableCorner[color]!![ModelRotation.X90_Y180] + FaceCableConnection.WEST -> interfaceCableCorner2[color]!![ModelRotation.X0_Y0] else -> null } Direction.SOUTH -> when (connection) { - FaceCableConnection.UP -> interfaceCableCorner[ModelRotation.X270_Y180] - FaceCableConnection.WEST -> interfaceCableCorner2[ModelRotation.X180_Y0] - FaceCableConnection.DOWN -> interfaceCableCorner[ModelRotation.X90_Y0] - FaceCableConnection.EAST -> interfaceCableCorner2[ModelRotation.X0_Y180] + FaceCableConnection.UP -> interfaceCableCorner[color]!![ModelRotation.X270_Y180] + FaceCableConnection.WEST -> interfaceCableCorner2[color]!![ModelRotation.X180_Y0] + FaceCableConnection.DOWN -> interfaceCableCorner[color]!![ModelRotation.X90_Y0] + FaceCableConnection.EAST -> interfaceCableCorner2[color]!![ModelRotation.X0_Y180] else -> null } Direction.WEST -> when (connection) { - FaceCableConnection.UP -> interfaceCableCorner[ModelRotation.X270_Y270] - FaceCableConnection.NORTH -> interfaceCableCorner2[ModelRotation.X180_Y90] - FaceCableConnection.DOWN -> interfaceCableCorner[ModelRotation.X90_Y90] - FaceCableConnection.SOUTH -> interfaceCableCorner2[ModelRotation.X0_Y270] + FaceCableConnection.UP -> interfaceCableCorner[color]!![ModelRotation.X270_Y270] + FaceCableConnection.NORTH -> interfaceCableCorner2[color]!![ModelRotation.X180_Y90] + FaceCableConnection.DOWN -> interfaceCableCorner[color]!![ModelRotation.X90_Y90] + FaceCableConnection.SOUTH -> interfaceCableCorner2[color]!![ModelRotation.X0_Y270] else -> null } Direction.EAST -> when (connection) { - FaceCableConnection.UP -> interfaceCableCorner[ModelRotation.X270_Y90] - FaceCableConnection.SOUTH -> interfaceCableCorner2[ModelRotation.X180_Y270] - FaceCableConnection.DOWN -> interfaceCableCorner[ModelRotation.X90_Y270] - FaceCableConnection.NORTH -> interfaceCableCorner2[ModelRotation.X0_Y90] + FaceCableConnection.UP -> interfaceCableCorner[color]!![ModelRotation.X270_Y90] + FaceCableConnection.SOUTH -> interfaceCableCorner2[color]!![ModelRotation.X180_Y270] + FaceCableConnection.DOWN -> interfaceCableCorner[color]!![ModelRotation.X90_Y270] + FaceCableConnection.NORTH -> interfaceCableCorner2[color]!![ModelRotation.X0_Y90] else -> null } else -> null diff --git a/src/main/kotlin/net/shadowfacts/phycon/client/model/RedstoneControllerModel.kt b/src/main/kotlin/net/shadowfacts/phycon/client/model/RedstoneControllerModel.kt index 0b71f40..334bb6c 100644 --- a/src/main/kotlin/net/shadowfacts/phycon/client/model/RedstoneControllerModel.kt +++ b/src/main/kotlin/net/shadowfacts/phycon/client/model/RedstoneControllerModel.kt @@ -4,10 +4,12 @@ import net.minecraft.block.BlockState import net.minecraft.client.render.model.BakedModel import net.minecraft.client.render.model.ModelLoader import net.minecraft.client.texture.Sprite +import net.minecraft.client.util.SpriteIdentifier import net.minecraft.util.Identifier import net.shadowfacts.phycon.PhysicalConnectivity import net.shadowfacts.phycon.block.FaceDeviceBlock import net.shadowfacts.phycon.block.redstone_controller.RedstoneControllerBlock +import java.util.function.Function /** * @author shadowfacts @@ -23,7 +25,7 @@ object RedstoneControllerModel: FaceDeviceModel() { return listOf(ON, OFF) } - override fun bakeSideModels(loader: ModelLoader) { + override fun bakeSideModels(loader: ModelLoader, textureGetter: Function) { defaultRotations.forEachIndexed { i, rot -> onModels[i] = loader.bake(ON, rot) offModels[i] = loader.bake(OFF, rot) diff --git a/src/main/kotlin/net/shadowfacts/phycon/client/model/SimpleFaceDeviceModel.kt b/src/main/kotlin/net/shadowfacts/phycon/client/model/SimpleFaceDeviceModel.kt index bc9ca05..c42068f 100644 --- a/src/main/kotlin/net/shadowfacts/phycon/client/model/SimpleFaceDeviceModel.kt +++ b/src/main/kotlin/net/shadowfacts/phycon/client/model/SimpleFaceDeviceModel.kt @@ -4,8 +4,12 @@ import net.minecraft.block.BlockState import net.minecraft.client.render.model.BakedModel import net.minecraft.client.render.model.ModelLoader import net.minecraft.client.texture.Sprite +import net.minecraft.client.util.SpriteIdentifier +import net.minecraft.util.DyeColor import net.minecraft.util.Identifier import net.shadowfacts.phycon.block.FaceDeviceBlock +import net.shadowfacts.phycon.client.util.bakeRecoloredCable +import java.util.function.Function /** * @author shadowfacts @@ -13,23 +17,25 @@ import net.shadowfacts.phycon.block.FaceDeviceBlock class SimpleFaceDeviceModel( private val sideModelID: Identifier, ): FaceDeviceModel() { - private val sideModels = Array(6) { null } + private val sideModels = mutableMapOf>() override fun getSideModelIDs(): Collection { return listOf(sideModelID) } - override fun bakeSideModels(loader: ModelLoader) { - defaultRotations.forEachIndexed { i, rot -> - sideModels[i] = loader.bake(sideModelID, rot) + override fun bakeSideModels(loader: ModelLoader, textureGetter: Function) { + DyeColor.values().forEach { color -> + sideModels[color] = Array(6) { i -> + loader.bakeRecoloredCable(sideModelID, defaultRotations[i], textureGetter, color) + } } } - override fun getSideModel(state: BlockState): BakedModel? { - return sideModels[state[FaceDeviceBlock.FACING].ordinal] + override fun getSideModel(state: BlockState): BakedModel { + return sideModels[state[FaceDeviceBlock.COLOR]]!![state[FaceDeviceBlock.FACING].ordinal] } override fun getSprite(): Sprite { - return sideModels.first()!!.sprite + return sideModels[DyeColor.BLACK]!!.first().sprite } } diff --git a/src/main/kotlin/net/shadowfacts/phycon/client/util/ModelLoader.kt b/src/main/kotlin/net/shadowfacts/phycon/client/util/ModelLoader.kt new file mode 100644 index 0000000..aba8430 --- /dev/null +++ b/src/main/kotlin/net/shadowfacts/phycon/client/util/ModelLoader.kt @@ -0,0 +1,32 @@ +package net.shadowfacts.phycon.client.util + +import net.minecraft.client.render.model.BakedModel +import net.minecraft.client.render.model.ModelLoader +import net.minecraft.client.render.model.ModelRotation +import net.minecraft.client.texture.Sprite +import net.minecraft.client.util.SpriteIdentifier +import net.minecraft.util.DyeColor +import net.minecraft.util.Identifier +import net.shadowfacts.phycon.PhysicalConnectivity +import java.util.function.Function + +/** + * @author shadowfacts + */ +fun ModelLoader.bakeRecoloredCable( + id: Identifier, + rot: ModelRotation, + textureGetter: Function, + color: DyeColor +): 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)!! +} diff --git a/src/main/kotlin/net/shadowfacts/phycon/item/FaceDeviceBlockItem.kt b/src/main/kotlin/net/shadowfacts/phycon/item/FaceDeviceBlockItem.kt index 3ce9800..f8f010d 100644 --- a/src/main/kotlin/net/shadowfacts/phycon/item/FaceDeviceBlockItem.kt +++ b/src/main/kotlin/net/shadowfacts/phycon/item/FaceDeviceBlockItem.kt @@ -15,7 +15,8 @@ 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) { + val hitBlock = hitState.block + if (hitBlock is CableBlock) { val hitBlockEdge = context.hitPos.getComponentAlongAxis(context.side.axis) % 1 == 0.0 val placementSide = if (hitBlockEdge) context.side.opposite else context.side @@ -32,6 +33,7 @@ class FaceDeviceBlockItem(block: FaceDeviceBlock<*>, settings: Settings = Settin return block.defaultState .with(FaceDeviceBlock.FACING, placementSide) .with(FaceDeviceBlock.CABLE_CONNECTION, connection) + .with(FaceDeviceBlock.COLOR, hitBlock.color) } } return null diff --git a/src/main/resources/assets/phycon/models/block/interface_cable_cap.json b/src/main/resources/assets/phycon/models/block/interface_cable_cap.json index 7f1ef62..f9d30ea 100644 --- a/src/main/resources/assets/phycon/models/block/interface_cable_cap.json +++ b/src/main/resources/assets/phycon/models/block/interface_cable_cap.json @@ -1,7 +1,7 @@ { "textures": { - "cap": "phycon:block/cable_cap_end", - "straight": "phycon:block/cable_straight" + "cap": "phycon:block/cable/color/cap_end", + "straight": "phycon:block/cable/color/straight" }, "elements": [ { diff --git a/src/main/resources/assets/phycon/models/block/interface_cable_corner.json b/src/main/resources/assets/phycon/models/block/interface_cable_corner.json index e143872..b82f6c1 100644 --- a/src/main/resources/assets/phycon/models/block/interface_cable_corner.json +++ b/src/main/resources/assets/phycon/models/block/interface_cable_corner.json @@ -1,9 +1,9 @@ { "textures": { - "straight": "phycon:block/cable_straight", - "cap": "phycon:block/cable_cap_end", - "corner_r": "phycon:block/interface_cable_corner_r", - "corner_l": "phycon:block/interface_cable_corner_l" + "straight": "phycon:block/cable/color/straight", + "cap": "phycon:block/cable/color/cap_end", + "corner_r": "phycon:block/cable/color/corner_r_down", + "corner_l": "phycon:block/cable/color/corner_l_down" }, "elements": [ { @@ -19,4 +19,4 @@ } } ] -} \ No newline at end of file +} diff --git a/src/main/resources/assets/phycon/models/block/interface_cable_corner_2.json b/src/main/resources/assets/phycon/models/block/interface_cable_corner_2.json index e543990..c1ef2ad 100644 --- a/src/main/resources/assets/phycon/models/block/interface_cable_corner_2.json +++ b/src/main/resources/assets/phycon/models/block/interface_cable_corner_2.json @@ -1,9 +1,9 @@ { "textures": { - "straight": "phycon:block/cable_straight_rotated", - "cap": "phycon:block/cable_cap_end", - "corner_up": "phycon:block/interface_cable_corner_l_up", - "corner_down": "phycon:block/interface_cable_corner_r" + "straight": "phycon:block/cable/color/straight_rotated", + "cap": "phycon:block/cable/color/cap_end", + "corner_up": "phycon:block/cable/color/corner_l_up", + "corner_down": "phycon:block/cable/color/corner_r_down" }, "elements": [ { @@ -19,4 +19,4 @@ } } ] -} \ No newline at end of file +} diff --git a/src/main/resources/assets/phycon/models/block/interface_cable_straight.json b/src/main/resources/assets/phycon/models/block/interface_cable_straight.json index 36f53b3..b0a73fb 100644 --- a/src/main/resources/assets/phycon/models/block/interface_cable_straight.json +++ b/src/main/resources/assets/phycon/models/block/interface_cable_straight.json @@ -1,7 +1,7 @@ { "textures": { - "cable": "phycon:block/cable_straight", - "cap": "phycon:block/cable_cap_end" + "cable": "phycon:block/cable/color/straight", + "cap": "phycon:block/cable/color/cap_end" }, "elements": [ { @@ -16,4 +16,4 @@ } } ] -} \ No newline at end of file +} diff --git a/src/main/resources/assets/phycon/models/block/interface_side.json b/src/main/resources/assets/phycon/models/block/interface_side.json index 479b753..d0bf2f5 100644 --- a/src/main/resources/assets/phycon/models/block/interface_side.json +++ b/src/main/resources/assets/phycon/models/block/interface_side.json @@ -1,7 +1,7 @@ { "parent": "block/block", "textures": { - "cable": "phycon:block/cable_straight", + "cable": "phycon:block/cable/color/straight", "particle": "#front", "back": "phycon:block/interface_back", "front": "phycon:block/interface_front" @@ -13,10 +13,10 @@ "faces": { "down": { "texture": "#front" }, "up": { "texture": "#back" }, - "north": { "texture": "#back" }, - "south": { "texture": "#back" }, - "west": { "texture": "#back" }, - "east": { "texture": "#back" } + "north": { "texture": "#back", "uv": [2, 2, 14, 4] }, + "south": { "texture": "#back", "uv": [2, 2, 14, 4] }, + "west": { "texture": "#back", "uv": [2, 2, 14, 4] }, + "east": { "texture": "#back", "uv": [2, 2, 14, 4] } } }, { diff --git a/src/main/resources/assets/phycon/textures/block/cable/black/cap_end.png b/src/main/resources/assets/phycon/textures/block/cable/black/cap_end.png index 5910580..514c11e 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/black/cap_end.png and b/src/main/resources/assets/phycon/textures/block/cable/black/cap_end.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/black/corner_l_down.png b/src/main/resources/assets/phycon/textures/block/cable/black/corner_l_down.png new file mode 100644 index 0000000..5e623b4 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/black/corner_l_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/black/corner_l_up.png b/src/main/resources/assets/phycon/textures/block/cable/black/corner_l_up.png new file mode 100644 index 0000000..2c87473 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/black/corner_l_up.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/black/corner_r_down.png b/src/main/resources/assets/phycon/textures/block/cable/black/corner_r_down.png new file mode 100644 index 0000000..876affe Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/black/corner_r_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/black/straight.png b/src/main/resources/assets/phycon/textures/block/cable/black/straight.png index 7f78fa6..6fd6a98 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/black/straight.png and b/src/main/resources/assets/phycon/textures/block/cable/black/straight.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/black/straight_rotated.png b/src/main/resources/assets/phycon/textures/block/cable/black/straight_rotated.png index c75da9f..994a81a 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/black/straight_rotated.png and b/src/main/resources/assets/phycon/textures/block/cable/black/straight_rotated.png differ diff --git a/src/main/resources/assets/phycon/textures/block/interface_cable_corner_l.png b/src/main/resources/assets/phycon/textures/block/cable/blue/corner_l_down.png similarity index 100% rename from src/main/resources/assets/phycon/textures/block/interface_cable_corner_l.png rename to src/main/resources/assets/phycon/textures/block/cable/blue/corner_l_down.png diff --git a/src/main/resources/assets/phycon/textures/block/interface_cable_corner_l_up.png b/src/main/resources/assets/phycon/textures/block/cable/blue/corner_l_up.png similarity index 100% rename from src/main/resources/assets/phycon/textures/block/interface_cable_corner_l_up.png rename to src/main/resources/assets/phycon/textures/block/cable/blue/corner_l_up.png diff --git a/src/main/resources/assets/phycon/textures/block/interface_cable_corner_r.png b/src/main/resources/assets/phycon/textures/block/cable/blue/corner_r_down.png similarity index 100% rename from src/main/resources/assets/phycon/textures/block/interface_cable_corner_r.png rename to src/main/resources/assets/phycon/textures/block/cable/blue/corner_r_down.png diff --git a/src/main/resources/assets/phycon/textures/block/cable/brown/cap_end.png b/src/main/resources/assets/phycon/textures/block/cable/brown/cap_end.png index db66c36..0d17bb4 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/brown/cap_end.png and b/src/main/resources/assets/phycon/textures/block/cable/brown/cap_end.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/brown/corner_l_down.png b/src/main/resources/assets/phycon/textures/block/cable/brown/corner_l_down.png new file mode 100644 index 0000000..577ecae Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/brown/corner_l_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/brown/corner_l_up.png b/src/main/resources/assets/phycon/textures/block/cable/brown/corner_l_up.png new file mode 100644 index 0000000..d6fdc0c Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/brown/corner_l_up.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/brown/corner_r_down.png b/src/main/resources/assets/phycon/textures/block/cable/brown/corner_r_down.png new file mode 100644 index 0000000..015d1b9 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/brown/corner_r_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/brown/straight.png b/src/main/resources/assets/phycon/textures/block/cable/brown/straight.png index 56ffad5..722abec 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/brown/straight.png and b/src/main/resources/assets/phycon/textures/block/cable/brown/straight.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/brown/straight_rotated.png b/src/main/resources/assets/phycon/textures/block/cable/brown/straight_rotated.png index 137948f..137ee03 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/brown/straight_rotated.png and b/src/main/resources/assets/phycon/textures/block/cable/brown/straight_rotated.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/cyan/cap_end.png b/src/main/resources/assets/phycon/textures/block/cable/cyan/cap_end.png index 24b0b9b..0ce646b 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/cyan/cap_end.png and b/src/main/resources/assets/phycon/textures/block/cable/cyan/cap_end.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/cyan/corner_l_down.png b/src/main/resources/assets/phycon/textures/block/cable/cyan/corner_l_down.png new file mode 100644 index 0000000..6cf2398 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/cyan/corner_l_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/cyan/corner_l_up.png b/src/main/resources/assets/phycon/textures/block/cable/cyan/corner_l_up.png new file mode 100644 index 0000000..f2f8413 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/cyan/corner_l_up.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/cyan/corner_r_down.png b/src/main/resources/assets/phycon/textures/block/cable/cyan/corner_r_down.png new file mode 100644 index 0000000..f1f2e32 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/cyan/corner_r_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/cyan/straight.png b/src/main/resources/assets/phycon/textures/block/cable/cyan/straight.png index 8c258f2..c3461b8 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/cyan/straight.png and b/src/main/resources/assets/phycon/textures/block/cable/cyan/straight.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/cyan/straight_rotated.png b/src/main/resources/assets/phycon/textures/block/cable/cyan/straight_rotated.png index 8f7c310..16e4d9e 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/cyan/straight_rotated.png and b/src/main/resources/assets/phycon/textures/block/cable/cyan/straight_rotated.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/gray/cap_end.png b/src/main/resources/assets/phycon/textures/block/cable/gray/cap_end.png index 794161b..20d7823 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/gray/cap_end.png and b/src/main/resources/assets/phycon/textures/block/cable/gray/cap_end.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/gray/corner_l_down.png b/src/main/resources/assets/phycon/textures/block/cable/gray/corner_l_down.png new file mode 100644 index 0000000..b9582ba Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/gray/corner_l_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/gray/corner_l_up.png b/src/main/resources/assets/phycon/textures/block/cable/gray/corner_l_up.png new file mode 100644 index 0000000..b604754 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/gray/corner_l_up.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/gray/corner_r_down.png b/src/main/resources/assets/phycon/textures/block/cable/gray/corner_r_down.png new file mode 100644 index 0000000..844f2f3 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/gray/corner_r_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/gray/straight.png b/src/main/resources/assets/phycon/textures/block/cable/gray/straight.png index 7bae3df..0318b8e 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/gray/straight.png and b/src/main/resources/assets/phycon/textures/block/cable/gray/straight.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/gray/straight_rotated.png b/src/main/resources/assets/phycon/textures/block/cable/gray/straight_rotated.png index 8f2516a..223569b 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/gray/straight_rotated.png and b/src/main/resources/assets/phycon/textures/block/cable/gray/straight_rotated.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/green/cap_end.png b/src/main/resources/assets/phycon/textures/block/cable/green/cap_end.png index d276738..f058b67 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/green/cap_end.png and b/src/main/resources/assets/phycon/textures/block/cable/green/cap_end.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/green/corner_l_down.png b/src/main/resources/assets/phycon/textures/block/cable/green/corner_l_down.png new file mode 100644 index 0000000..cefa99e Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/green/corner_l_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/green/corner_l_up.png b/src/main/resources/assets/phycon/textures/block/cable/green/corner_l_up.png new file mode 100644 index 0000000..ba004b2 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/green/corner_l_up.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/green/corner_r_down.png b/src/main/resources/assets/phycon/textures/block/cable/green/corner_r_down.png new file mode 100644 index 0000000..fc06ba3 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/green/corner_r_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/green/straight.png b/src/main/resources/assets/phycon/textures/block/cable/green/straight.png index d864f0a..5c56056 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/green/straight.png and b/src/main/resources/assets/phycon/textures/block/cable/green/straight.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/green/straight_rotated.png b/src/main/resources/assets/phycon/textures/block/cable/green/straight_rotated.png index 9259cff..88f2aaf 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/green/straight_rotated.png and b/src/main/resources/assets/phycon/textures/block/cable/green/straight_rotated.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/light_blue/cap_end.png b/src/main/resources/assets/phycon/textures/block/cable/light_blue/cap_end.png index 850d566..431343b 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/light_blue/cap_end.png and b/src/main/resources/assets/phycon/textures/block/cable/light_blue/cap_end.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/light_blue/corner_l_down.png b/src/main/resources/assets/phycon/textures/block/cable/light_blue/corner_l_down.png new file mode 100644 index 0000000..6b0d83f Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/light_blue/corner_l_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/light_blue/corner_l_up.png b/src/main/resources/assets/phycon/textures/block/cable/light_blue/corner_l_up.png new file mode 100644 index 0000000..4c94fc0 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/light_blue/corner_l_up.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/light_blue/corner_r_down.png b/src/main/resources/assets/phycon/textures/block/cable/light_blue/corner_r_down.png new file mode 100644 index 0000000..3045126 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/light_blue/corner_r_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/light_blue/straight.png b/src/main/resources/assets/phycon/textures/block/cable/light_blue/straight.png index f2c1fcb..fc58c12 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/light_blue/straight.png and b/src/main/resources/assets/phycon/textures/block/cable/light_blue/straight.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/light_blue/straight_rotated.png b/src/main/resources/assets/phycon/textures/block/cable/light_blue/straight_rotated.png index 47db50a..a1aa38a 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/light_blue/straight_rotated.png and b/src/main/resources/assets/phycon/textures/block/cable/light_blue/straight_rotated.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/light_gray/cap_end.png b/src/main/resources/assets/phycon/textures/block/cable/light_gray/cap_end.png index 660a51a..8abf4e7 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/light_gray/cap_end.png and b/src/main/resources/assets/phycon/textures/block/cable/light_gray/cap_end.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/light_gray/corner_l_down.png b/src/main/resources/assets/phycon/textures/block/cable/light_gray/corner_l_down.png new file mode 100644 index 0000000..4762e55 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/light_gray/corner_l_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/light_gray/corner_l_up.png b/src/main/resources/assets/phycon/textures/block/cable/light_gray/corner_l_up.png new file mode 100644 index 0000000..d535174 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/light_gray/corner_l_up.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/light_gray/corner_r_down.png b/src/main/resources/assets/phycon/textures/block/cable/light_gray/corner_r_down.png new file mode 100644 index 0000000..859cf6d Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/light_gray/corner_r_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/light_gray/straight.png b/src/main/resources/assets/phycon/textures/block/cable/light_gray/straight.png index 1a5fe17..5eedc03 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/light_gray/straight.png and b/src/main/resources/assets/phycon/textures/block/cable/light_gray/straight.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/light_gray/straight_rotated.png b/src/main/resources/assets/phycon/textures/block/cable/light_gray/straight_rotated.png index 26efcde..d16b916 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/light_gray/straight_rotated.png and b/src/main/resources/assets/phycon/textures/block/cable/light_gray/straight_rotated.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/lime/cap_end.png b/src/main/resources/assets/phycon/textures/block/cable/lime/cap_end.png index cadc431..b6d3458 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/lime/cap_end.png and b/src/main/resources/assets/phycon/textures/block/cable/lime/cap_end.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/lime/corner_l_down.png b/src/main/resources/assets/phycon/textures/block/cable/lime/corner_l_down.png new file mode 100644 index 0000000..7033b8c Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/lime/corner_l_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/lime/corner_l_up.png b/src/main/resources/assets/phycon/textures/block/cable/lime/corner_l_up.png new file mode 100644 index 0000000..54432cd Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/lime/corner_l_up.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/lime/corner_r_down.png b/src/main/resources/assets/phycon/textures/block/cable/lime/corner_r_down.png new file mode 100644 index 0000000..076f1a9 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/lime/corner_r_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/lime/straight.png b/src/main/resources/assets/phycon/textures/block/cable/lime/straight.png index 7df7df4..9ecc46e 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/lime/straight.png and b/src/main/resources/assets/phycon/textures/block/cable/lime/straight.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/lime/straight_rotated.png b/src/main/resources/assets/phycon/textures/block/cable/lime/straight_rotated.png index ec4f6eb..8840ae7 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/lime/straight_rotated.png and b/src/main/resources/assets/phycon/textures/block/cable/lime/straight_rotated.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/magenta/cap_end.png b/src/main/resources/assets/phycon/textures/block/cable/magenta/cap_end.png index 590f73b..ddb1b5a 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/magenta/cap_end.png and b/src/main/resources/assets/phycon/textures/block/cable/magenta/cap_end.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/magenta/corner_l_down.png b/src/main/resources/assets/phycon/textures/block/cable/magenta/corner_l_down.png new file mode 100644 index 0000000..b9c9e2b Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/magenta/corner_l_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/magenta/corner_l_up.png b/src/main/resources/assets/phycon/textures/block/cable/magenta/corner_l_up.png new file mode 100644 index 0000000..85b380d Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/magenta/corner_l_up.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/magenta/corner_r_down.png b/src/main/resources/assets/phycon/textures/block/cable/magenta/corner_r_down.png new file mode 100644 index 0000000..67928a4 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/magenta/corner_r_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/magenta/straight.png b/src/main/resources/assets/phycon/textures/block/cable/magenta/straight.png index 88886f6..b8f3326 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/magenta/straight.png and b/src/main/resources/assets/phycon/textures/block/cable/magenta/straight.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/magenta/straight_rotated.png b/src/main/resources/assets/phycon/textures/block/cable/magenta/straight_rotated.png index 4ee9afe..c5dd48e 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/magenta/straight_rotated.png and b/src/main/resources/assets/phycon/textures/block/cable/magenta/straight_rotated.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/orange/cap_end.png b/src/main/resources/assets/phycon/textures/block/cable/orange/cap_end.png index 7a7d255..94ba2a6 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/orange/cap_end.png and b/src/main/resources/assets/phycon/textures/block/cable/orange/cap_end.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/orange/corner_l_down.png b/src/main/resources/assets/phycon/textures/block/cable/orange/corner_l_down.png new file mode 100644 index 0000000..a6d3af9 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/orange/corner_l_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/orange/corner_l_up.png b/src/main/resources/assets/phycon/textures/block/cable/orange/corner_l_up.png new file mode 100644 index 0000000..63a33d1 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/orange/corner_l_up.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/orange/corner_r_down.png b/src/main/resources/assets/phycon/textures/block/cable/orange/corner_r_down.png new file mode 100644 index 0000000..dd6fce1 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/orange/corner_r_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/orange/straight.png b/src/main/resources/assets/phycon/textures/block/cable/orange/straight.png index f9266e3..236945a 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/orange/straight.png and b/src/main/resources/assets/phycon/textures/block/cable/orange/straight.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/orange/straight_rotated.png b/src/main/resources/assets/phycon/textures/block/cable/orange/straight_rotated.png index 90c2fdb..929872c 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/orange/straight_rotated.png and b/src/main/resources/assets/phycon/textures/block/cable/orange/straight_rotated.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/pink/cap_end.png b/src/main/resources/assets/phycon/textures/block/cable/pink/cap_end.png index 5cfa2a9..71d9c1f 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/pink/cap_end.png and b/src/main/resources/assets/phycon/textures/block/cable/pink/cap_end.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/pink/corner_l_down.png b/src/main/resources/assets/phycon/textures/block/cable/pink/corner_l_down.png new file mode 100644 index 0000000..310be89 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/pink/corner_l_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/pink/corner_l_up.png b/src/main/resources/assets/phycon/textures/block/cable/pink/corner_l_up.png new file mode 100644 index 0000000..75ee8d0 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/pink/corner_l_up.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/pink/corner_r_down.png b/src/main/resources/assets/phycon/textures/block/cable/pink/corner_r_down.png new file mode 100644 index 0000000..86c026f Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/pink/corner_r_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/pink/straight.png b/src/main/resources/assets/phycon/textures/block/cable/pink/straight.png index ef1cd35..7b2b0c7 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/pink/straight.png and b/src/main/resources/assets/phycon/textures/block/cable/pink/straight.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/pink/straight_rotated.png b/src/main/resources/assets/phycon/textures/block/cable/pink/straight_rotated.png index 1d7a84b..455e578 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/pink/straight_rotated.png and b/src/main/resources/assets/phycon/textures/block/cable/pink/straight_rotated.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/purple/cap_end.png b/src/main/resources/assets/phycon/textures/block/cable/purple/cap_end.png index ea10eab..470f8ca 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/purple/cap_end.png and b/src/main/resources/assets/phycon/textures/block/cable/purple/cap_end.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/purple/corner_l_down.png b/src/main/resources/assets/phycon/textures/block/cable/purple/corner_l_down.png new file mode 100644 index 0000000..338e1e6 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/purple/corner_l_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/purple/corner_l_up.png b/src/main/resources/assets/phycon/textures/block/cable/purple/corner_l_up.png new file mode 100644 index 0000000..c681210 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/purple/corner_l_up.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/purple/corner_r_down.png b/src/main/resources/assets/phycon/textures/block/cable/purple/corner_r_down.png new file mode 100644 index 0000000..62cb983 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/purple/corner_r_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/purple/straight.png b/src/main/resources/assets/phycon/textures/block/cable/purple/straight.png index adb6569..aae7144 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/purple/straight.png and b/src/main/resources/assets/phycon/textures/block/cable/purple/straight.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/purple/straight_rotated.png b/src/main/resources/assets/phycon/textures/block/cable/purple/straight_rotated.png index bd950e7..2c4e986 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/purple/straight_rotated.png and b/src/main/resources/assets/phycon/textures/block/cable/purple/straight_rotated.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/red/cap_end.png b/src/main/resources/assets/phycon/textures/block/cable/red/cap_end.png index 816d332..328932b 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/red/cap_end.png and b/src/main/resources/assets/phycon/textures/block/cable/red/cap_end.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/red/corner_l_down.png b/src/main/resources/assets/phycon/textures/block/cable/red/corner_l_down.png new file mode 100644 index 0000000..74aefbe Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/red/corner_l_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/red/corner_l_up.png b/src/main/resources/assets/phycon/textures/block/cable/red/corner_l_up.png new file mode 100644 index 0000000..e544297 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/red/corner_l_up.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/red/corner_r_down.png b/src/main/resources/assets/phycon/textures/block/cable/red/corner_r_down.png new file mode 100644 index 0000000..c86351c Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/red/corner_r_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/red/straight.png b/src/main/resources/assets/phycon/textures/block/cable/red/straight.png index 16b41eb..0b3a910 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/red/straight.png and b/src/main/resources/assets/phycon/textures/block/cable/red/straight.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/red/straight_rotated.png b/src/main/resources/assets/phycon/textures/block/cable/red/straight_rotated.png index 7d850ca..100f11e 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/red/straight_rotated.png and b/src/main/resources/assets/phycon/textures/block/cable/red/straight_rotated.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/white/cap_end.png b/src/main/resources/assets/phycon/textures/block/cable/white/cap_end.png index fb84335..d83afea 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/white/cap_end.png and b/src/main/resources/assets/phycon/textures/block/cable/white/cap_end.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/white/corner_l_down.png b/src/main/resources/assets/phycon/textures/block/cable/white/corner_l_down.png new file mode 100644 index 0000000..bcd61d0 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/white/corner_l_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/white/corner_l_up.png b/src/main/resources/assets/phycon/textures/block/cable/white/corner_l_up.png new file mode 100644 index 0000000..c6b3ab7 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/white/corner_l_up.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/white/corner_r_down.png b/src/main/resources/assets/phycon/textures/block/cable/white/corner_r_down.png new file mode 100644 index 0000000..4a79574 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/white/corner_r_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/white/straight.png b/src/main/resources/assets/phycon/textures/block/cable/white/straight.png index 67246a3..6d1d607 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/white/straight.png and b/src/main/resources/assets/phycon/textures/block/cable/white/straight.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/white/straight_rotated.png b/src/main/resources/assets/phycon/textures/block/cable/white/straight_rotated.png index 7502f3f..4758662 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/white/straight_rotated.png and b/src/main/resources/assets/phycon/textures/block/cable/white/straight_rotated.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/yellow/cap_end.png b/src/main/resources/assets/phycon/textures/block/cable/yellow/cap_end.png index 4969f35..5509046 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/yellow/cap_end.png and b/src/main/resources/assets/phycon/textures/block/cable/yellow/cap_end.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/yellow/corner_l_down.png b/src/main/resources/assets/phycon/textures/block/cable/yellow/corner_l_down.png new file mode 100644 index 0000000..02040d1 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/yellow/corner_l_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/yellow/corner_l_up.png b/src/main/resources/assets/phycon/textures/block/cable/yellow/corner_l_up.png new file mode 100644 index 0000000..6881599 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/yellow/corner_l_up.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/yellow/corner_r_down.png b/src/main/resources/assets/phycon/textures/block/cable/yellow/corner_r_down.png new file mode 100644 index 0000000..4e791eb Binary files /dev/null and b/src/main/resources/assets/phycon/textures/block/cable/yellow/corner_r_down.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/yellow/straight.png b/src/main/resources/assets/phycon/textures/block/cable/yellow/straight.png index b49453f..90d0f6a 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/yellow/straight.png and b/src/main/resources/assets/phycon/textures/block/cable/yellow/straight.png differ diff --git a/src/main/resources/assets/phycon/textures/block/cable/yellow/straight_rotated.png b/src/main/resources/assets/phycon/textures/block/cable/yellow/straight_rotated.png index 3ed4d55..4f2be8b 100644 Binary files a/src/main/resources/assets/phycon/textures/block/cable/yellow/straight_rotated.png and b/src/main/resources/assets/phycon/textures/block/cable/yellow/straight_rotated.png differ