From 312debe947530b9aef593ebe552c5d9cc1c9873b Mon Sep 17 00:00:00 2001 From: Robert Date: Thu, 26 Dec 2013 17:03:01 -0500 Subject: [PATCH] Fixed armbot rotation packet updates --- .../builtbroken/assemblyline/armbot/TileEntityArmbot.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/builtbroken/assemblyline/armbot/TileEntityArmbot.java b/src/main/java/com/builtbroken/assemblyline/armbot/TileEntityArmbot.java index 476028a96..9e6653e2b 100644 --- a/src/main/java/com/builtbroken/assemblyline/armbot/TileEntityArmbot.java +++ b/src/main/java/com/builtbroken/assemblyline/armbot/TileEntityArmbot.java @@ -102,7 +102,7 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock, if (this.isFunctioning()) { float preYaw = this.targetYaw, prePitch = this.targetPitch; - if (!this.worldObj.isRemote && this.ticks % 10 == 0) + if (!this.worldObj.isRemote && this.ticks % 5 == 0) { this.programHelper.onUpdate(this.worldObj, new Vector3(this)); if (this.targetYaw != preYaw || this.targetPitch != prePitch) @@ -299,12 +299,12 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock, @Override public Packet getDescriptionPacket() { - return PacketHandler.instance().getTilePacket(this.getChannel(), "armbot", this, this.functioning, this.targetYaw, this.targetPitch); + return PacketHandler.instance().getTilePacket(this.getChannel(), "armbot", this, this.functioning, this.targetYaw, this.targetPitch, this.actualYaw, this.actualPitch); } public void sendRotationPacket() { - PacketHandler.instance().sendPacketToClients(PacketHandler.instance().getPacket(this.getChannel(), "arbotRotation", this.targetYaw, this.targetPitch, this.actualYaw, this.actualPitch), worldObj, new Vector3(this).translate(new Vector3(.5f, 1f, .5f)), 40); + PacketHandler.instance().sendPacketToClients(PacketHandler.instance().getTilePacket(this.getChannel(), "arbotRotation", this, this.targetYaw, this.targetPitch, this.actualYaw, this.actualPitch), worldObj, new Vector3(this).translate(new Vector3(.5f, 1f, .5f)), 40); } @Override @@ -319,6 +319,8 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock, this.functioning = dis.readBoolean(); this.targetYaw = dis.readInt(); this.targetPitch = dis.readInt(); + this.actualYaw = dis.readInt(); + this.actualPitch = dis.readInt(); return true; } else if (id.equalsIgnoreCase("arbotRotation"))