mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 12:59:41 +00:00
Fixed a few energy transfer issues
This commit is contained in:
1 parent
2b5bb53bc6
commit
bb8985b6f8
4 files changed
+23
-23
No files matched your search
@@ -20,7 +20,6 @@ import net.minecraft.util.MathHelper;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import cpw.mods.fml.common.Optional.Interface;
|
||||
import cpw.mods.fml.common.Optional.Method;
|
||||
|
||||
import dan200.computercraft.api.lua.ILuaContext;
|
||||
import dan200.computercraft.api.peripheral.IComputerAccess;
|
||||
import dan200.computercraft.api.peripheral.IPeripheral;
|
||||
@@ -55,22 +54,25 @@ public class TileEntityEnergyCube extends TileEntityElectricBlock implements IPe
|
||||
{
|
||||
super.onUpdate();
|
||||
|
||||
ChargeUtils.charge(0, this);
|
||||
ChargeUtils.discharge(1, this);
|
||||
|
||||
if(MekanismUtils.canFunction(this))
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
CableUtils.emit(this);
|
||||
ChargeUtils.charge(0, this);
|
||||
ChargeUtils.discharge(1, this);
|
||||
|
||||
if(MekanismUtils.canFunction(this))
|
||||
{
|
||||
CableUtils.emit(this);
|
||||
}
|
||||
|
||||
int newScale = getScaledEnergyLevel(20);
|
||||
|
||||
if(newScale != prevScale)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAllAround(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), Coord4D.get(this).getTargetPoint(50D));
|
||||
}
|
||||
|
||||
prevScale = newScale;
|
||||
}
|
||||
|
||||
int newScale = getScaledEnergyLevel(20);
|
||||
|
||||
if(newScale != prevScale)
|
||||
{
|
||||
Mekanism.packetHandler.sendToAllAround(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), Coord4D.get(this).getTargetPoint(50D));
|
||||
}
|
||||
|
||||
prevScale = newScale;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user