Attempt another Dynamic Tank fix
This commit is contained in:
parent
6bdbb41b2d
commit
43b71cb8cc
3 changed files with 8 additions and 9 deletions
|
@ -321,11 +321,6 @@ public class PacketHandler
|
|||
public void sendToServer(IMessage message)
|
||||
{
|
||||
netHandler.sendToServer(message);
|
||||
|
||||
if(general.logPackets)
|
||||
{
|
||||
System.out.println("[Mekanism] Sending '" + message + "' packet to server");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,13 +8,13 @@ import mekanism.api.Coord4D;
|
|||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.base.ITileNetwork;
|
||||
import mekanism.common.network.PacketTileEntity.TileEntityMessage;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
public class PacketTileEntity implements IMessageHandler<TileEntityMessage, IMessage>
|
||||
{
|
||||
|
@ -61,9 +61,11 @@ public class PacketTileEntity implements IMessageHandler<TileEntityMessage, IMes
|
|||
dataStream.writeInt(coord4D.zCoord);
|
||||
dataStream.writeInt(coord4D.dimensionId);
|
||||
|
||||
if(FMLCommonHandler.instance().getSide() == Side.SERVER)
|
||||
MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
|
||||
if(server != null)
|
||||
{
|
||||
World world = FMLCommonHandler.instance().getMinecraftServerInstance().worldServerForDimension(coord4D.dimensionId);
|
||||
World world = server.worldServerForDimension(coord4D.dimensionId);
|
||||
PacketHandler.log("Sending TileEntity packet from coordinate " + coord4D + " (" + coord4D.getTileEntity(world) + ")");
|
||||
}
|
||||
|
||||
|
|
|
@ -111,6 +111,8 @@ public class TileEntityDynamicTank extends TileEntityMultiblock<SynchronizedTank
|
|||
{
|
||||
sendPacketToRenderer();
|
||||
}
|
||||
|
||||
structure.prevFluid = structure.fluidStored;
|
||||
}
|
||||
|
||||
manageInventory();
|
||||
|
|
Loading…
Reference in a new issue