From ac9573ff83df61ee49aefb4fd7e69a0d7e0fedb7 Mon Sep 17 00:00:00 2001 From: Robert Date: Sat, 9 Nov 2013 18:53:06 -0500 Subject: [PATCH] Forgot to register the entity to receive key events --- src/dark/core/network/PacketManagerKeyEvent.java | 2 -- src/dark/core/prefab/vehicles/EntityDrivable.java | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dark/core/network/PacketManagerKeyEvent.java b/src/dark/core/network/PacketManagerKeyEvent.java index 415634169..5fbc41455 100644 --- a/src/dark/core/network/PacketManagerKeyEvent.java +++ b/src/dark/core/network/PacketManagerKeyEvent.java @@ -66,7 +66,6 @@ public class PacketManagerKeyEvent implements IPacketManager try { int key = data.readInt(); - for (IControlReceiver receiver : receivers) { receiver.keyTyped((EntityPlayer) player, key); @@ -74,7 +73,6 @@ public class PacketManagerKeyEvent implements IPacketManager } catch (Exception e) { - System.out.println("[CoreMachine] Error reading packet at tile packet manager"); e.printStackTrace(); } diff --git a/src/dark/core/prefab/vehicles/EntityDrivable.java b/src/dark/core/prefab/vehicles/EntityDrivable.java index 01f8d2081..04ed1faf1 100644 --- a/src/dark/core/prefab/vehicles/EntityDrivable.java +++ b/src/dark/core/prefab/vehicles/EntityDrivable.java @@ -8,6 +8,7 @@ import net.minecraft.util.DamageSource; import net.minecraft.world.World; import cpw.mods.fml.client.FMLClientHandler; import dark.core.interfaces.IControlReceiver; +import dark.core.network.PacketManagerKeyEvent; import dark.core.prefab.EntityAdvanced; public class EntityDrivable extends EntityAdvanced implements IControlReceiver @@ -25,6 +26,7 @@ public class EntityDrivable extends EntityAdvanced implements IControlReceiver this.ignoreFrustumCheck = true; this.isImmuneToFire = true; this.yOffset = 1.0f; + PacketManagerKeyEvent.instance().register(this); } public EntityDrivable(World world, double xx, double yy, double zz)