From 99b67d9c3c750483b1d2f605bce1300a92b75db8 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Wed, 20 Mar 2019 15:45:25 -0600 Subject: [PATCH] Remove unnecessary logic from Laser --- .../mekanism/common/tile/TileEntityLaser.java | 63 +------------------ 1 file changed, 1 insertion(+), 62 deletions(-) diff --git a/src/main/java/mekanism/common/tile/TileEntityLaser.java b/src/main/java/mekanism/common/tile/TileEntityLaser.java index 7021f3f88..6920a455f 100644 --- a/src/main/java/mekanism/common/tile/TileEntityLaser.java +++ b/src/main/java/mekanism/common/tile/TileEntityLaser.java @@ -23,15 +23,11 @@ import net.minecraft.util.NonNullList; import net.minecraft.util.math.RayTraceResult; import net.minecraftforge.fml.common.FMLCommonHandler; -public class TileEntityLaser extends TileEntityEffectsBlock implements IActiveState { +public class TileEntityLaser extends TileEntityEffectsBlock { public Coord4D digging; public double diggingProgress; - public boolean isActive; - - public boolean clientActive; - public TileEntityLaser() { super("machine.laser", "Laser", 2 * usage.laserUsage); inventory = NonNullList.withSize(0, ItemStack.EMPTY); @@ -107,23 +103,6 @@ public class TileEntityLaser extends TileEntityEffectsBlock implements IActiveSt return side == facing.getOpposite(); } - @Override - public boolean getActive() { - return isActive; - } - - @Override - public void setActive(boolean active) { - isActive = active; - - if (clientActive != active) { - Mekanism.packetHandler - .sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new TileNetworkList())), - new Range4D(Coord4D.get(this))); - clientActive = active; - } - } - @Override public boolean renderUpdate() { return false; @@ -133,44 +112,4 @@ public class TileEntityLaser extends TileEntityEffectsBlock implements IActiveSt public boolean lightUpdate() { return false; } - - @Override - public TileNetworkList getNetworkedData(TileNetworkList data) { - super.getNetworkedData(data); - - data.add(isActive); - - return data; - } - - @Override - public void handlePacketData(ByteBuf dataStream) { - super.handlePacketData(dataStream); - - if (FMLCommonHandler.instance().getEffectiveSide().isClient()) { - clientActive = dataStream.readBoolean(); - - if (clientActive != isActive) { - isActive = clientActive; - MekanismUtils.updateBlock(world, getPos()); - } - } - } - - @Override - public void readFromNBT(NBTTagCompound nbtTags) { - super.readFromNBT(nbtTags); - - isActive = nbtTags.getBoolean("isActive"); - } - - @Nonnull - @Override - public NBTTagCompound writeToNBT(NBTTagCompound nbtTags) { - super.writeToNBT(nbtTags); - - nbtTags.setBoolean("isActive", isActive); - - return nbtTags; - } }