Fix controller not spreading load
This commit is contained in:
@@ -98,6 +98,12 @@ public class ClientProxy extends CommonProxy {
|
||||
ModelLoader.setCustomModelResourceLocation(RefinedStorageItems.UPGRADE, ItemUpgrade.TYPE_CRAFTING, new ModelResourceLocation("refinedstorage:crafting_upgrade", "inventory"));
|
||||
|
||||
// Blocks
|
||||
ModelLoader.setCustomStateMapper(RefinedStorageBlocks.STORAGE, (new StateMap.Builder())
|
||||
.ignore(RefinedStorageBlocks.STORAGE.DIRECTION)
|
||||
.ignore(RefinedStorageBlocks.STORAGE.CONNECTED)
|
||||
.build()
|
||||
);
|
||||
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RefinedStorageBlocks.CABLE), 0, new ModelResourceLocation("refinedstorage:cable", "inventory"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RefinedStorageBlocks.GRID), EnumGridType.NORMAL.getId(), new ModelResourceLocation("refinedstorage:grid", "inventory"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RefinedStorageBlocks.GRID), EnumGridType.CRAFTING.getId(), new ModelResourceLocation("refinedstorage:grid", "inventory"));
|
||||
@@ -108,7 +114,7 @@ public class ClientProxy extends CommonProxy {
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RefinedStorageBlocks.EXTERNAL_STORAGE), 0, new ModelResourceLocation("refinedstorage:external_storage", "inventory"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RefinedStorageBlocks.DISK_DRIVE), 0, new ModelResourceLocation("refinedstorage:disk_drive", "inventory"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RefinedStorageBlocks.CONTROLLER), EnumControllerType.NORMAL.getId(), new ModelResourceLocation("refinedstorage:controller", "inventory"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RefinedStorageBlocks.CONTROLLER), EnumControllerType.CREATIVE.getId(), new ModelResourceLocation("refinedstorage:controller", "inventory"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RefinedStorageBlocks.CONTROLLER), EnumControllerType.CREATIVE.getId(), new ModelResourceLocation("refinedstorage:creative_controller", "inventory"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RefinedStorageBlocks.CONSTRUCTOR), 0, new ModelResourceLocation("refinedstorage:constructor", "inventory"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RefinedStorageBlocks.DESTRUCTOR), 0, new ModelResourceLocation("refinedstorage:destructor", "inventory"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RefinedStorageBlocks.SOLDERER), 0, new ModelResourceLocation("refinedstorage:solderer", "inventory"));
|
||||
@@ -119,13 +125,6 @@ public class ClientProxy extends CommonProxy {
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RefinedStorageBlocks.CRAFTING_MONITOR), 0, new ModelResourceLocation("refinedstorage:crafting_monitor", "inventory"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RefinedStorageBlocks.CRAFTER), 0, new ModelResourceLocation("refinedstorage:crafter", "inventory"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RefinedStorageBlocks.PROCESSING_PATTERN_ENCODER), 0, new ModelResourceLocation("refinedstorage:processing_pattern_encoder", "inventory"));
|
||||
|
||||
ModelLoader.setCustomStateMapper(RefinedStorageBlocks.STORAGE, (new StateMap.Builder())
|
||||
.ignore(RefinedStorageBlocks.STORAGE.DIRECTION)
|
||||
.ignore(RefinedStorageBlocks.STORAGE.CONNECTED)
|
||||
.build()
|
||||
);
|
||||
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RefinedStorageBlocks.STORAGE), EnumStorageType.TYPE_1K.getId(), new ModelResourceLocation("refinedstorage:storage", "type=1k"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RefinedStorageBlocks.STORAGE), EnumStorageType.TYPE_4K.getId(), new ModelResourceLocation("refinedstorage:storage", "type=4k"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(RefinedStorageBlocks.STORAGE), EnumStorageType.TYPE_16K.getId(), new ModelResourceLocation("refinedstorage:storage", "type=16k"));
|
||||
|
||||
@@ -32,7 +32,7 @@ public abstract class TileBase extends TileEntity implements ITickable {
|
||||
if (!worldObj.isRemote) {
|
||||
if (this instanceof ISynchronizedContainer) {
|
||||
for (EntityPlayer player : worldObj.playerEntities) {
|
||||
if (((ISynchronizedContainer) this).getContainer() == player.openContainer.getClass()) {
|
||||
if (((ISynchronizedContainer) this).getContainer() == player.openContainer.getClass() && ticks % 4 == 0) {
|
||||
RefinedStorage.NETWORK.sendTo(new MessageTileContainerUpdate(this), (EntityPlayerMP) player);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +62,10 @@ public abstract class TileMachine extends TileBase implements ISynchronizedConta
|
||||
|
||||
RefinedStorageUtils.updateBlock(worldObj, pos);
|
||||
}
|
||||
|
||||
if (isActive()) {
|
||||
updateMachine();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -104,12 +104,6 @@ public class TileController extends TileBase implements IEnergyReceiver, ISynchr
|
||||
syncMachines();
|
||||
}
|
||||
|
||||
for (TileMachine machine : machines) {
|
||||
if (machine.mayUpdate()) {
|
||||
machine.updateMachine();
|
||||
}
|
||||
}
|
||||
|
||||
for (ICraftingTask taskToCancel : craftingTasksToCancel) {
|
||||
taskToCancel.onCancelled(this);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"model": "orientable",
|
||||
"textures": {
|
||||
"side": "refinedstorage:blocks/side",
|
||||
"top": "refinedstorage:blocks/side",
|
||||
"front": "refinedstorage:blocks/controller_8"
|
||||
}
|
||||
},
|
||||
"variants": {
|
||||
"inventory": [
|
||||
{
|
||||
"y": 0,
|
||||
"transform": "forge:default-block"
|
||||
}
|
||||
],
|
||||
"energy": {
|
||||
"0": {
|
||||
},
|
||||
"1": {
|
||||
},
|
||||
"2": {
|
||||
},
|
||||
"3": {
|
||||
},
|
||||
"4": {
|
||||
},
|
||||
"5": {
|
||||
},
|
||||
"6": {
|
||||
},
|
||||
"7": {
|
||||
},
|
||||
"8": {
|
||||
}
|
||||
},
|
||||
"type": {
|
||||
"normal": {
|
||||
},
|
||||
"creative": {
|
||||
}
|
||||
},
|
||||
"direction": {
|
||||
"north": {
|
||||
"y": 0
|
||||
},
|
||||
"east": {
|
||||
"y": 90
|
||||
},
|
||||
"south": {
|
||||
"y": 180
|
||||
},
|
||||
"west": {
|
||||
"y": 270
|
||||
},
|
||||
"up": {
|
||||
"x": 270
|
||||
},
|
||||
"down": {
|
||||
"x": 90
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user