diff --git a/src/main/java/com/raoulvdberge/refinedstorage/block/BlockController.java b/src/main/java/com/raoulvdberge/refinedstorage/block/BlockController.java index 3bb156a17..24eb1c666 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/block/BlockController.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/block/BlockController.java @@ -8,6 +8,7 @@ import com.raoulvdberge.refinedstorage.block.info.BlockInfoBuilder; import com.raoulvdberge.refinedstorage.item.itemblock.ItemBlockController; import com.raoulvdberge.refinedstorage.render.IModelRegistration; import com.raoulvdberge.refinedstorage.render.meshdefinition.ItemMeshDefinitionController; +import com.raoulvdberge.refinedstorage.render.model.baked.BakedModelFullbright; import com.raoulvdberge.refinedstorage.tile.TileController; import net.minecraft.block.properties.PropertyEnum; import net.minecraft.block.state.BlockStateContainer; @@ -19,6 +20,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.BlockRenderLayer; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.NonNullList; @@ -36,12 +38,24 @@ public class BlockController extends BlockNodeProxy { super(BlockInfoBuilder.forId("controller").tileEntity(TileController::new).create()); } + @Override + public BlockRenderLayer getBlockLayer() { + return BlockRenderLayer.CUTOUT; + } + @Override @SideOnly(Side.CLIENT) public void registerModels(IModelRegistration modelRegistration) { modelRegistration.setModelMeshDefinition(this, new ItemMeshDefinitionController()); modelRegistration.setStateMapper(this, new StateMap.Builder().ignore(TYPE).build()); + + modelRegistration.addBakedModelOverride(info.getId(), base -> new BakedModelFullbright( + base, + RS.ID + ":blocks/controller/cutouts/nearly_off", + RS.ID + ":blocks/controller/cutouts/nearly_on", + RS.ID + ":blocks/controller/cutouts/on" + )); } @Override diff --git a/src/main/java/com/raoulvdberge/refinedstorage/block/BlockSecurityManager.java b/src/main/java/com/raoulvdberge/refinedstorage/block/BlockSecurityManager.java index e2cb10905..080fe18c1 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/block/BlockSecurityManager.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/block/BlockSecurityManager.java @@ -33,11 +33,11 @@ public class BlockSecurityManager extends BlockNode { modelRegistration.addBakedModelOverride(info.getId(), base -> new BakedModelFullbright( base, - "refinedstorage:blocks/security_manager/cutouts/top_connected", - "refinedstorage:blocks/security_manager/cutouts/front_connected", - "refinedstorage:blocks/security_manager/cutouts/left_connected", - "refinedstorage:blocks/security_manager/cutouts/back_connected", - "refinedstorage:blocks/security_manager/cutouts/right_connected" + RS.ID + ":blocks/security_manager/cutouts/top_connected", + RS.ID + ":blocks/security_manager/cutouts/front_connected", + RS.ID + ":blocks/security_manager/cutouts/left_connected", + RS.ID + ":blocks/security_manager/cutouts/back_connected", + RS.ID + ":blocks/security_manager/cutouts/right_connected" )); } diff --git a/src/main/resources/assets/refinedstorage/blockstates/controller.json b/src/main/resources/assets/refinedstorage/blockstates/controller.json index f28032431..f6da20ef9 100755 --- a/src/main/resources/assets/refinedstorage/blockstates/controller.json +++ b/src/main/resources/assets/refinedstorage/blockstates/controller.json @@ -1,10 +1,11 @@ { "forge_marker": 1, "defaults": { - "model": "cube_all", + "model": "refinedstorage:cube_all_cutout", "textures": { - "particle": "refinedstorage:blocks/controller_off", - "all": "refinedstorage:blocks/controller_off" + "particle": "refinedstorage:blocks/controller/controller_off", + "all": "refinedstorage:blocks/controller/controller_off", + "cutout": "refinedstorage:blocks/controller/cutouts/off" } }, "variants": { @@ -17,18 +18,25 @@ "off": { }, "nearly_off": { + "model": "refinedstorage:controller_nearly_on_off", "textures": { - "all": "refinedstorage:blocks/controller_nearly_off" + "all": "refinedstorage:blocks/controller/controller", + "cutout": "refinedstorage:blocks/controller/cutouts/nearly_off", + "cutout_gray": "refinedstorage:blocks/controller/cutouts/nearly_off_gray" } }, "nearly_on": { + "model": "refinedstorage:controller_nearly_on_off", "textures": { - "all": "refinedstorage:blocks/controller_nearly_on" + "all": "refinedstorage:blocks/controller/controller", + "cutout": "refinedstorage:blocks/controller/cutouts/nearly_on", + "cutout_gray": "refinedstorage:blocks/controller/cutouts/nearly_on_gray" } }, "on": { "textures": { - "all": "refinedstorage:blocks/controller_on" + "all": "refinedstorage:blocks/controller/controller", + "cutout": "refinedstorage:blocks/controller/cutouts/on" } } } diff --git a/src/main/resources/assets/refinedstorage/models/block/controller_nearly_on_off.json b/src/main/resources/assets/refinedstorage/models/block/controller_nearly_on_off.json new file mode 100644 index 000000000..99cab458b --- /dev/null +++ b/src/main/resources/assets/refinedstorage/models/block/controller_nearly_on_off.json @@ -0,0 +1,119 @@ +{ + "parent": "block/cube", + "elements": [ + { + "from": [ + 0, + 0, + 0 + ], + "to": [ + 16, + 16, + 16 + ], + "faces": { + "down": { + "texture": "#all", + "cullface": "down" + }, + "up": { + "texture": "#all", + "cullface": "up" + }, + "north": { + "texture": "#all", + "cullface": "north" + }, + "south": { + "texture": "#all", + "cullface": "south" + }, + "west": { + "texture": "#all", + "cullface": "west" + }, + "east": { + "texture": "#all", + "cullface": "east" + } + } + }, + { + "from": [ + 0, + 0, + 0 + ], + "to": [ + 16, + 16, + 16 + ], + "faces": { + "up": { + "texture": "#cutout", + "cullface": "up" + }, + "down": { + "texture": "#cutout", + "cullface": "down" + }, + "north": { + "texture": "#cutout", + "cullface": "north" + }, + "south": { + "texture": "#cutout", + "cullface": "south" + }, + "west": { + "texture": "#cutout", + "cullface": "west" + }, + "east": { + "texture": "#cutout", + "cullface": "east" + } + } + }, + { + "from": [ + 0, + 0, + 0 + ], + "to": [ + 16, + 16, + 16 + ], + "faces": { + "up": { + "texture": "#cutout_gray", + "cullface": "up" + }, + "down": { + "texture": "#cutout_gray", + "cullface": "down" + }, + "north": { + "texture": "#cutout_gray", + "cullface": "north" + }, + "south": { + "texture": "#cutout_gray", + "cullface": "south" + }, + "west": { + "texture": "#cutout_gray", + "cullface": "west" + }, + "east": { + "texture": "#cutout_gray", + "cullface": "east" + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/refinedstorage/models/block/cube_all_cutout.json b/src/main/resources/assets/refinedstorage/models/block/cube_all_cutout.json new file mode 100644 index 000000000..913f1de69 --- /dev/null +++ b/src/main/resources/assets/refinedstorage/models/block/cube_all_cutout.json @@ -0,0 +1,81 @@ +{ + "parent": "block/cube", + "elements": [ + { + "from": [ + 0, + 0, + 0 + ], + "to": [ + 16, + 16, + 16 + ], + "faces": { + "down": { + "texture": "#all", + "cullface": "down" + }, + "up": { + "texture": "#all", + "cullface": "up" + }, + "north": { + "texture": "#all", + "cullface": "north" + }, + "south": { + "texture": "#all", + "cullface": "south" + }, + "west": { + "texture": "#all", + "cullface": "west" + }, + "east": { + "texture": "#all", + "cullface": "east" + } + } + }, + { + "from": [ + 0, + 0, + 0 + ], + "to": [ + 16, + 16, + 16 + ], + "faces": { + "up": { + "texture": "#cutout", + "cullface": "up" + }, + "down": { + "texture": "#cutout", + "cullface": "down" + }, + "north": { + "texture": "#cutout", + "cullface": "north" + }, + "south": { + "texture": "#cutout", + "cullface": "south" + }, + "west": { + "texture": "#cutout", + "cullface": "west" + }, + "east": { + "texture": "#cutout", + "cullface": "east" + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/refinedstorage/models/block/security_manager.json b/src/main/resources/assets/refinedstorage/models/block/security_manager.json index a71b69487..694697d59 100644 --- a/src/main/resources/assets/refinedstorage/models/block/security_manager.json +++ b/src/main/resources/assets/refinedstorage/models/block/security_manager.json @@ -50,7 +50,6 @@ 16, 16 ], - "shade": false, "faces": { "up": { "texture": "#cutout_up", diff --git a/src/main/resources/assets/refinedstorage/textures/blocks/controller/controller.png b/src/main/resources/assets/refinedstorage/textures/blocks/controller/controller.png new file mode 100644 index 000000000..211dbf792 Binary files /dev/null and b/src/main/resources/assets/refinedstorage/textures/blocks/controller/controller.png differ diff --git a/src/main/resources/assets/refinedstorage/textures/blocks/controller/controller_off.png b/src/main/resources/assets/refinedstorage/textures/blocks/controller/controller_off.png new file mode 100644 index 000000000..aeabbb031 Binary files /dev/null and b/src/main/resources/assets/refinedstorage/textures/blocks/controller/controller_off.png differ diff --git a/src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/nearly_off.png b/src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/nearly_off.png new file mode 100644 index 000000000..a840cfefd Binary files /dev/null and b/src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/nearly_off.png differ diff --git a/src/main/resources/assets/refinedstorage/textures/blocks/controller_nearly_off.png.mcmeta b/src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/nearly_off.png.mcmeta similarity index 100% rename from src/main/resources/assets/refinedstorage/textures/blocks/controller_nearly_off.png.mcmeta rename to src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/nearly_off.png.mcmeta diff --git a/src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/nearly_off_gray.png b/src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/nearly_off_gray.png new file mode 100644 index 000000000..912dd1a6e Binary files /dev/null and b/src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/nearly_off_gray.png differ diff --git a/src/main/resources/assets/refinedstorage/textures/blocks/controller_nearly_off_glow.png.mcmeta b/src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/nearly_off_gray.png.mcmeta similarity index 63% rename from src/main/resources/assets/refinedstorage/textures/blocks/controller_nearly_off_glow.png.mcmeta rename to src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/nearly_off_gray.png.mcmeta index cf47bbbf2..852b87796 100644 --- a/src/main/resources/assets/refinedstorage/textures/blocks/controller_nearly_off_glow.png.mcmeta +++ b/src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/nearly_off_gray.png.mcmeta @@ -1,11 +1,4 @@ { - "ctm": { - "ctm_version": 1, - "layer": "CUTOUT", - "extra": { - "light": 15 - } - }, "animation": { "frametime": 1, "frames": [ diff --git a/src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/nearly_on.png b/src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/nearly_on.png new file mode 100644 index 000000000..a840cfefd Binary files /dev/null and b/src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/nearly_on.png differ diff --git a/src/main/resources/assets/refinedstorage/textures/blocks/controller_nearly_on.png.mcmeta b/src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/nearly_on.png.mcmeta similarity index 100% rename from src/main/resources/assets/refinedstorage/textures/blocks/controller_nearly_on.png.mcmeta rename to src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/nearly_on.png.mcmeta diff --git a/src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/nearly_on_gray.png b/src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/nearly_on_gray.png new file mode 100644 index 000000000..912dd1a6e Binary files /dev/null and b/src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/nearly_on_gray.png differ diff --git a/src/main/resources/assets/refinedstorage/textures/blocks/controller_on.png.mcmeta b/src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/nearly_on_gray.png.mcmeta old mode 100755 new mode 100644 similarity index 100% rename from src/main/resources/assets/refinedstorage/textures/blocks/controller_on.png.mcmeta rename to src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/nearly_on_gray.png.mcmeta diff --git a/src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/off.png b/src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/off.png new file mode 100644 index 000000000..4267d220b Binary files /dev/null and b/src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/off.png differ diff --git a/src/main/resources/assets/refinedstorage/textures/blocks/controller_on_glow.png b/src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/on.png similarity index 100% rename from src/main/resources/assets/refinedstorage/textures/blocks/controller_on_glow.png rename to src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/on.png diff --git a/src/main/resources/assets/refinedstorage/textures/blocks/controller_on_glow.png.mcmeta b/src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/on.png.mcmeta similarity index 63% rename from src/main/resources/assets/refinedstorage/textures/blocks/controller_on_glow.png.mcmeta rename to src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/on.png.mcmeta index f82377449..cd4999598 100644 --- a/src/main/resources/assets/refinedstorage/textures/blocks/controller_on_glow.png.mcmeta +++ b/src/main/resources/assets/refinedstorage/textures/blocks/controller/cutouts/on.png.mcmeta @@ -1,11 +1,4 @@ { - "ctm": { - "ctm_version": 1, - "layer": "CUTOUT", - "extra": { - "light": 15 - } - }, "animation": { "frametime": 2, "frames": [ diff --git a/src/main/resources/assets/refinedstorage/textures/blocks/controller_nearly_off.png b/src/main/resources/assets/refinedstorage/textures/blocks/controller_nearly_off.png deleted file mode 100644 index 8cdc7c581..000000000 Binary files a/src/main/resources/assets/refinedstorage/textures/blocks/controller_nearly_off.png and /dev/null differ diff --git a/src/main/resources/assets/refinedstorage/textures/blocks/controller_nearly_off_glow.png b/src/main/resources/assets/refinedstorage/textures/blocks/controller_nearly_off_glow.png deleted file mode 100644 index ab07cf604..000000000 Binary files a/src/main/resources/assets/refinedstorage/textures/blocks/controller_nearly_off_glow.png and /dev/null differ diff --git a/src/main/resources/assets/refinedstorage/textures/blocks/controller_nearly_on.png b/src/main/resources/assets/refinedstorage/textures/blocks/controller_nearly_on.png deleted file mode 100644 index 34f0b109b..000000000 Binary files a/src/main/resources/assets/refinedstorage/textures/blocks/controller_nearly_on.png and /dev/null differ diff --git a/src/main/resources/assets/refinedstorage/textures/blocks/controller_nearly_on_glow.png b/src/main/resources/assets/refinedstorage/textures/blocks/controller_nearly_on_glow.png deleted file mode 100644 index ab07cf604..000000000 Binary files a/src/main/resources/assets/refinedstorage/textures/blocks/controller_nearly_on_glow.png and /dev/null differ diff --git a/src/main/resources/assets/refinedstorage/textures/blocks/controller_nearly_on_glow.png.mcmeta b/src/main/resources/assets/refinedstorage/textures/blocks/controller_nearly_on_glow.png.mcmeta deleted file mode 100644 index 905f13623..000000000 --- a/src/main/resources/assets/refinedstorage/textures/blocks/controller_nearly_on_glow.png.mcmeta +++ /dev/null @@ -1,26 +0,0 @@ -{ - "ctm": { - "ctm_version": 1, - "layer": "CUTOUT", - "extra": { - "light": 15 - } - }, - "animation": { - "frametime": 2, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 - ] - } -} diff --git a/src/main/resources/assets/refinedstorage/textures/blocks/controller_off.png b/src/main/resources/assets/refinedstorage/textures/blocks/controller_off.png deleted file mode 100644 index c91484b31..000000000 Binary files a/src/main/resources/assets/refinedstorage/textures/blocks/controller_off.png and /dev/null differ diff --git a/src/main/resources/assets/refinedstorage/textures/blocks/controller_on.png b/src/main/resources/assets/refinedstorage/textures/blocks/controller_on.png deleted file mode 100755 index 4c3838386..000000000 Binary files a/src/main/resources/assets/refinedstorage/textures/blocks/controller_on.png and /dev/null differ