mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Trigger the press fix automatically
This commit is contained in:
parent
0eb87524ab
commit
3b36807242
@ -3,6 +3,7 @@ package com.hbm.tileentity.machine;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.UpgradeManagerNT;
|
||||
import com.hbm.inventory.container.ContainerMachineEPress;
|
||||
@ -64,6 +65,17 @@ public class TileEntityMachineEPress extends TileEntityMachineBase implements IE
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
// Triggers the legacy monoblock fix
|
||||
if (worldObj.getBlockMetadata(xCoord, yCoord, zCoord) < BlockDummyable.offset) {
|
||||
// Does nothing
|
||||
// worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
|
||||
BlockDummyable block = (BlockDummyable)worldObj.getBlock(xCoord, yCoord, zCoord);
|
||||
if (block != null) {
|
||||
block.onNeighborBlockChange(worldObj, xCoord, yCoord, zCoord, null);
|
||||
}
|
||||
}
|
||||
|
||||
this.updateConnections();
|
||||
power = Library.chargeTEFromItems(slots, 0, power, maxPower);
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.container.ContainerMachinePress;
|
||||
import com.hbm.inventory.gui.GUIMachinePress;
|
||||
@ -53,6 +54,17 @@ public class TileEntityMachinePress extends TileEntityMachineBase implements IGU
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
// Triggers the legacy monoblock fix
|
||||
if (worldObj.getBlockMetadata(xCoord, yCoord, zCoord) < BlockDummyable.offset) {
|
||||
// Does nothing
|
||||
// worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
|
||||
BlockDummyable block = (BlockDummyable)worldObj.getBlock(xCoord, yCoord, zCoord);
|
||||
if (block != null) {
|
||||
block.onNeighborBlockChange(worldObj, xCoord, yCoord, zCoord, null);
|
||||
}
|
||||
}
|
||||
|
||||
boolean preheated = false;
|
||||
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user