From f02912e7a4e620acebba14afe82d5d23e0d22d16 Mon Sep 17 00:00:00 2001 From: Robert S Date: Tue, 10 Jun 2014 10:11:08 -0400 Subject: [PATCH] Fixed client side check for TileMechanical packet handling --- .../mechanical/energy/grid/TileMechanical.java | 5 ++--- .../mechanical/energy/turbine/TileTurbine.java | 15 --------------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/mechanical/src/main/scala/resonantinduction/mechanical/energy/grid/TileMechanical.java b/mechanical/src/main/scala/resonantinduction/mechanical/energy/grid/TileMechanical.java index d91ff6cb..87742e65 100644 --- a/mechanical/src/main/scala/resonantinduction/mechanical/energy/grid/TileMechanical.java +++ b/mechanical/src/main/scala/resonantinduction/mechanical/energy/grid/TileMechanical.java @@ -40,7 +40,6 @@ public abstract class TileMechanical extends TileBase implements INodeProvider, public TileMechanical(Material material) { super(material); - mechanicalNode = new MechanicalNode(this).setLoad(0.5f); } @Override @@ -64,7 +63,7 @@ public abstract class TileMechanical extends TileBase implements INodeProvider, mechanicalNode.update(); if (!this.getWorldObj().isRemote) { - if (mechanicalNode.markRotationUpdate && ticks % 10 == 0) + if (mechanicalNode.markRotationUpdate && ticks % 3 == 0) { sendRotationPacket(); mechanicalNode.markRotationUpdate = false; @@ -98,7 +97,7 @@ public abstract class TileMechanical extends TileBase implements INodeProvider, { try { - if (!world().isRemote) + if (world().isRemote) { if (id == PACKET_NBT) { diff --git a/mechanical/src/main/scala/resonantinduction/mechanical/energy/turbine/TileTurbine.java b/mechanical/src/main/scala/resonantinduction/mechanical/energy/turbine/TileTurbine.java index cf003072..be3fdce3 100644 --- a/mechanical/src/main/scala/resonantinduction/mechanical/energy/turbine/TileTurbine.java +++ b/mechanical/src/main/scala/resonantinduction/mechanical/energy/turbine/TileTurbine.java @@ -1,29 +1,16 @@ package resonantinduction.mechanical.energy.turbine; -import java.io.IOException; import java.util.HashSet; import java.util.Set; -import com.google.common.io.ByteArrayDataInput; - import net.minecraft.block.material.Material; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.packet.Packet; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; import net.minecraftforge.common.ForgeDirection; -import resonant.api.grid.INode; import resonant.api.grid.INodeProvider; -import resonant.lib.References; -import resonant.lib.content.module.TileBase; import resonant.lib.multiblock.IMultiBlockStructure; import resonant.lib.network.IPacketReceiverWithID; -import resonant.lib.network.PacketHandler; -import resonant.lib.network.Synced; -import resonant.lib.network.Synced.SyncedInput; -import resonant.lib.network.Synced.SyncedOutput; -import resonantinduction.mechanical.energy.grid.MechanicalNode; import resonantinduction.mechanical.energy.grid.TileMechanical; import universalelectricity.api.vector.Vector3; import cpw.mods.fml.relauncher.Side; @@ -102,7 +89,6 @@ public class TileTurbine extends TileMechanical implements IMultiBlockStructure< /** Reads a tile entity from NBT. */ @Override - @SyncedInput public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); @@ -113,7 +99,6 @@ public class TileTurbine extends TileMechanical implements IMultiBlockStructure< /** Writes a tile entity to NBT. */ @Override - @SyncedOutput public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt);