From 5fa330856584696ef2faaa5d2dae6f0de6a3e2d7 Mon Sep 17 00:00:00 2001 From: aidancbrady Date: Wed, 6 Jul 2016 17:56:40 -0400 Subject: [PATCH] Add necessary networking to Reactor Port --- .../tile/reactor/TileEntityReactorPort.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/main/java/mekanism/generators/common/tile/reactor/TileEntityReactorPort.java b/src/main/java/mekanism/generators/common/tile/reactor/TileEntityReactorPort.java index 6dd0625ab..09d556655 100644 --- a/src/main/java/mekanism/generators/common/tile/reactor/TileEntityReactorPort.java +++ b/src/main/java/mekanism/generators/common/tile/reactor/TileEntityReactorPort.java @@ -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; @@ -414,6 +417,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)