Add necessary networking to Reactor Port

This commit is contained in:
aidancbrady 2016-07-06 17:56:40 -04:00
parent 52daff9f67
commit 5fa3308565

View file

@ -1,5 +1,7 @@
package mekanism.generators.common.tile.reactor;
import io.netty.buffer.ByteBuf;
import java.util.ArrayList;
import java.util.EnumSet;
@ -21,6 +23,7 @@ import mekanism.common.util.CableUtils;
import mekanism.common.util.HeatUtils;
import mekanism.common.util.InventoryUtils;
import mekanism.common.util.LangUtils;
import mekanism.common.util.MekanismUtils;
import mekanism.generators.common.item.ItemHohlraum;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
@ -415,6 +418,29 @@ public class TileEntityReactorPort extends TileEntityReactorBlock implements IFl
return false;
}
@Override
public void handlePacketData(ByteBuf dataStream)
{
super.handlePacketData(dataStream);
if(worldObj.isRemote)
{
fluidEject = dataStream.readBoolean();
MekanismUtils.updateBlock(worldObj, xCoord, yCoord, zCoord);
}
}
@Override
public ArrayList getNetworkedData(ArrayList data)
{
super.getNetworkedData(data);
data.add(fluidEject);
return data;
}
@Override
public boolean onSneakRightClick(EntityPlayer player, int side)
{