From 592f510228b0c39d7b9c31163e3ab98bf41da28f Mon Sep 17 00:00:00 2001 From: sk89q Date: Fri, 7 Jan 2011 12:27:06 -0800 Subject: [PATCH] Moved some minecart flags that don't belong in the event out of the event. --- .../net/minecraft/server/EntityMinecart.java | 21 ++----------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/main/java/net/minecraft/server/EntityMinecart.java b/src/main/java/net/minecraft/server/EntityMinecart.java index 82bedee966..b1daad0e0f 100644 --- a/src/main/java/net/minecraft/server/EntityMinecart.java +++ b/src/main/java/net/minecraft/server/EntityMinecart.java @@ -155,28 +155,11 @@ public class EntityMinecart extends Entity // CraftBukkit start private void handleMinecartCreation(World world) { - Vector derailedVelocityVector = - new Vector(derailedX, derailedY, derailedZ); - Vector flyingVelocityVector = new Vector(flyingX, flyingY, flyingZ); - CraftServer server = ((WorldServer) world).getServer(); minecart = CraftMinecart.getCraftMinecart(server, this); VehicleCreateEvent event = new VehicleCreateEvent( - Type.VEHICLE_CREATE, minecart, slowWhenEmpty, - derailedVelocityVector, flyingVelocityVector); - server.getPluginManager().callEvent(event); - - slowWhenEmpty = event.shouldSlowWhenEmpty(); - - Vector vec = event.getDerailedVelocityFactor(); - derailedX = vec.getX(); - derailedY = vec.getY(); - derailedZ = vec.getZ(); - - vec = event.getFlyingVelocityFactor(); - flyingX = vec.getX(); - flyingY = vec.getY(); - flyingZ = vec.getZ(); + Type.VEHICLE_CREATE, minecart); + server.getPluginManager().callEvent(event); } // CraftBukkit end