Added CTM integration for Network Transmitter/Receiver
This commit is contained in:
@@ -212,8 +212,6 @@ public class ProxyClient extends ProxyCommon {
|
||||
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.NETWORK_TRANSMITTER), 0, new ModelResourceLocation("refinedstorage:network_transmitter", "inventory"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RSBlocks.NETWORK_RECEIVER), 0, new ModelResourceLocation("refinedstorage:network_receiver", "inventory"));
|
||||
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_16K.getId(), new ModelResourceLocation("refinedstorage:storage", "type=16k"));
|
||||
@@ -251,6 +249,22 @@ public class ProxyClient extends ProxyCommon {
|
||||
}
|
||||
});
|
||||
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RSBlocks.NETWORK_TRANSMITTER), 0, new ModelResourceLocation("refinedstorage:network_transmitter", "inventory"));
|
||||
ModelLoader.setCustomStateMapper(RSBlocks.NETWORK_TRANSMITTER, new StateMapperBase() {
|
||||
@Override
|
||||
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
|
||||
return new ModelResourceLocation("refinedstorage:network_transmitter" + (Loader.isModLoaded("ctm") ? "_glow" : ""), "connected=" + state.getValue(BlockNetworkTransmitter.CONNECTED));
|
||||
}
|
||||
});
|
||||
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RSBlocks.NETWORK_RECEIVER), 0, new ModelResourceLocation("refinedstorage:network_receiver", "inventory"));
|
||||
ModelLoader.setCustomStateMapper(RSBlocks.NETWORK_RECEIVER, new StateMapperBase() {
|
||||
@Override
|
||||
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
|
||||
return new ModelResourceLocation("refinedstorage:network_receiver" + (Loader.isModLoaded("ctm") ? "_glow" : ""), "connected=" + state.getValue(BlockNetworkReceiver.CONNECTED));
|
||||
}
|
||||
});
|
||||
|
||||
ModelLoader.setCustomMeshDefinition(Item.getItemFromBlock(RSBlocks.CONTROLLER), stack -> {
|
||||
ControllerEnergyType energyType = stack.getItemDamage() == ControllerType.CREATIVE.getId() ? ControllerEnergyType.ON : TileController.getEnergyType(ItemBlockController.getEnergyStored(stack), ItemBlockController.getEnergyCapacity(stack));
|
||||
|
||||
|
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"model": "refinedstorage:cube_all_glow",
|
||||
"textures": {
|
||||
"all": "refinedstorage:blocks/network_receiver_disconnected",
|
||||
"glow": "refinedstorage:blocks/none"
|
||||
}
|
||||
},
|
||||
"variants": {
|
||||
"inventory": [
|
||||
{
|
||||
"transform": "forge:default-block"
|
||||
}
|
||||
],
|
||||
"connected": {
|
||||
"true": {
|
||||
"textures": {
|
||||
"all": "refinedstorage:blocks/network_receiver_connected",
|
||||
"glow": "refinedstorage:blocks/network_receiver_connected_glow"
|
||||
}
|
||||
},
|
||||
"false": {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"model": "refinedstorage:cube_all_glow",
|
||||
"textures": {
|
||||
"all": "refinedstorage:blocks/network_transmitter_disconnected",
|
||||
"glow": "refinedstorage:blocks/none"
|
||||
}
|
||||
},
|
||||
"variants": {
|
||||
"inventory": [
|
||||
{
|
||||
"transform": "forge:default-block"
|
||||
}
|
||||
],
|
||||
"connected": {
|
||||
"true": {
|
||||
"textures": {
|
||||
"all": "refinedstorage:blocks/network_transmitter_connected",
|
||||
"glow": "refinedstorage:blocks/network_transmitter_connected_glow"
|
||||
}
|
||||
},
|
||||
"false": {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 338 B |
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ctm": {
|
||||
"ctm_version": 1,
|
||||
"layer": "CUTOUT",
|
||||
"extra": {
|
||||
"light": 15
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 342 B |
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ctm": {
|
||||
"ctm_version": 1,
|
||||
"layer": "CUTOUT",
|
||||
"extra": {
|
||||
"light": 15
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user