Added CTM integration for Crafting Monitor
This commit is contained in:
@@ -210,7 +210,6 @@ public class ProxyClient extends ProxyCommon {
|
|||||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RSBlocks.RELAY), 0, new ModelResourceLocation("refinedstorage:relay", "inventory"));
|
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RSBlocks.RELAY), 0, new ModelResourceLocation("refinedstorage:relay", "inventory"));
|
||||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RSBlocks.INTERFACE), 0, new ModelResourceLocation("refinedstorage:interface", "inventory"));
|
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RSBlocks.INTERFACE), 0, new ModelResourceLocation("refinedstorage:interface", "inventory"));
|
||||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RSBlocks.FLUID_INTERFACE), 0, new ModelResourceLocation("refinedstorage:fluid_interface", "inventory"));
|
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RSBlocks.FLUID_INTERFACE), 0, new ModelResourceLocation("refinedstorage:fluid_interface", "inventory"));
|
||||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RSBlocks.CRAFTING_MONITOR), 0, new ModelResourceLocation("refinedstorage:crafting_monitor", "inventory"));
|
|
||||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RSBlocks.CRAFTER), 0, new ModelResourceLocation("refinedstorage:crafter", "connected=false,direction=north"));
|
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RSBlocks.CRAFTER), 0, new ModelResourceLocation("refinedstorage:crafter", "connected=false,direction=north"));
|
||||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RSBlocks.STORAGE), ItemStorageType.TYPE_1K.getId(), new ModelResourceLocation("refinedstorage:storage", "type=1k"));
|
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RSBlocks.STORAGE), ItemStorageType.TYPE_1K.getId(), new ModelResourceLocation("refinedstorage:storage", "type=1k"));
|
||||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RSBlocks.STORAGE), ItemStorageType.TYPE_4K.getId(), new ModelResourceLocation("refinedstorage:storage", "type=4k"));
|
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RSBlocks.STORAGE), ItemStorageType.TYPE_4K.getId(), new ModelResourceLocation("refinedstorage:storage", "type=4k"));
|
||||||
@@ -237,15 +236,23 @@ public class ProxyClient extends ProxyCommon {
|
|||||||
ModelLoader.setCustomStateMapper(RSBlocks.GRID, new StateMapperBase() {
|
ModelLoader.setCustomStateMapper(RSBlocks.GRID, new StateMapperBase() {
|
||||||
@Override
|
@Override
|
||||||
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
|
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
|
||||||
return new ModelResourceLocation("refinedstorage:grid" + (Loader.isModLoaded("ctm") ? "_glow" : ""), "connected=" + state.getValue(BlockGrid.CONNECTED) + ",direction=" + state.getValue(RSBlocks.GRID.getDirection().getProperty()) + ",type=" + state.getValue(BlockGrid.TYPE));
|
return new ModelResourceLocation("refinedstorage:grid" + (Loader.isModLoaded("ctm") ? "_glow" : ""), getPropertyString(state.getProperties()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RSBlocks.WIRELESS_TRANSMITTER), 0, new ModelResourceLocation("refinedstorage:wireless_transmitter" + (Loader.isModLoaded("ctm") ? "_glow" : ""), "inventory"));
|
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RSBlocks.CRAFTING_MONITOR), 0, new ModelResourceLocation("refinedstorage:crafting_monitor", "inventory"));
|
||||||
|
ModelLoader.setCustomStateMapper(RSBlocks.CRAFTING_MONITOR, new StateMapperBase() {
|
||||||
|
@Override
|
||||||
|
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
|
||||||
|
return new ModelResourceLocation("refinedstorage:crafting_monitor" + (Loader.isModLoaded("ctm") ? "_glow" : ""), getPropertyString(state.getProperties()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RSBlocks.WIRELESS_TRANSMITTER), 0, new ModelResourceLocation("refinedstorage:wireless_transmitter", "inventory"));
|
||||||
ModelLoader.setCustomStateMapper(RSBlocks.WIRELESS_TRANSMITTER, new StateMapperBase() {
|
ModelLoader.setCustomStateMapper(RSBlocks.WIRELESS_TRANSMITTER, new StateMapperBase() {
|
||||||
@Override
|
@Override
|
||||||
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
|
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
|
||||||
return new ModelResourceLocation("refinedstorage:wireless_transmitter" + (Loader.isModLoaded("ctm") ? "_glow" : ""), "connected=" + state.getValue(BlockWirelessTransmitter.CONNECTED));
|
return new ModelResourceLocation("refinedstorage:wireless_transmitter" + (Loader.isModLoaded("ctm") ? "_glow" : ""), getPropertyString(state.getProperties()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -253,7 +260,7 @@ public class ProxyClient extends ProxyCommon {
|
|||||||
ModelLoader.setCustomStateMapper(RSBlocks.NETWORK_TRANSMITTER, new StateMapperBase() {
|
ModelLoader.setCustomStateMapper(RSBlocks.NETWORK_TRANSMITTER, new StateMapperBase() {
|
||||||
@Override
|
@Override
|
||||||
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
|
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
|
||||||
return new ModelResourceLocation("refinedstorage:network_transmitter" + (Loader.isModLoaded("ctm") ? "_glow" : ""), "connected=" + state.getValue(BlockNetworkTransmitter.CONNECTED));
|
return new ModelResourceLocation("refinedstorage:network_transmitter" + (Loader.isModLoaded("ctm") ? "_glow" : ""), getPropertyString(state.getProperties()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -261,7 +268,7 @@ public class ProxyClient extends ProxyCommon {
|
|||||||
ModelLoader.setCustomStateMapper(RSBlocks.NETWORK_RECEIVER, new StateMapperBase() {
|
ModelLoader.setCustomStateMapper(RSBlocks.NETWORK_RECEIVER, new StateMapperBase() {
|
||||||
@Override
|
@Override
|
||||||
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
|
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
|
||||||
return new ModelResourceLocation("refinedstorage:network_receiver" + (Loader.isModLoaded("ctm") ? "_glow" : ""), "connected=" + state.getValue(BlockNetworkReceiver.CONNECTED));
|
return new ModelResourceLocation("refinedstorage:network_receiver" + (Loader.isModLoaded("ctm") ? "_glow" : ""), getPropertyString(state.getProperties()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
"connected": {
|
"connected": {
|
||||||
"true": {
|
"true": {
|
||||||
"textures": {
|
"textures": {
|
||||||
"north": "refinedstorage:blocks/crafting_monitor_connected_front"
|
"north": "refinedstorage:blocks/crafting_monitor_front_connected"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"false": {
|
"false": {
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
"forge_marker": 1,
|
||||||
|
"defaults": {
|
||||||
|
"model": "refinedstorage:cube_glow",
|
||||||
|
"textures": {
|
||||||
|
"particle": "refinedstorage:blocks/crafting_monitor_front",
|
||||||
|
"north": "refinedstorage:blocks/crafting_monitor_front",
|
||||||
|
"east": "refinedstorage:blocks/crafting_monitor_left",
|
||||||
|
"south": "refinedstorage:blocks/crafting_monitor_back",
|
||||||
|
"west": "refinedstorage:blocks/crafting_monitor_right",
|
||||||
|
"up": "refinedstorage:blocks/crafting_monitor_top",
|
||||||
|
"down": "refinedstorage:blocks/bottom",
|
||||||
|
"glow": "refinedstorage:blocks/none"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"variants": {
|
||||||
|
"inventory": [
|
||||||
|
{
|
||||||
|
"transform": "forge:default-block",
|
||||||
|
"y": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"connected": {
|
||||||
|
"true": {
|
||||||
|
"textures": {
|
||||||
|
"north": "refinedstorage:blocks/crafting_monitor_front_connected",
|
||||||
|
"glow": "refinedstorage:blocks/crafting_monitor_front_connected_glow"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"false": {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"north": {
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"east": {
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"south": {
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"west": {
|
||||||
|
"y": 270
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 553 B |
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"ctm": {
|
||||||
|
"ctm_version": 1,
|
||||||
|
"layer": "CUTOUT",
|
||||||
|
"extra": {
|
||||||
|
"light": 15
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user