Generic code cleanup

This commit is contained in:
Erik Broes
2011-02-23 13:56:36 +01:00
parent 332d9c4f18
commit 09aa37fe4a
57 changed files with 415 additions and 344 deletions

View File

@@ -220,7 +220,8 @@ public class EntityBoat extends Entity {
this.motZ += this.passenger.motZ * 0.2D;
}
d4 = this.maxSpeed; // CraftBukkit
// CraftBukkit
d4 = this.maxSpeed;
if (this.motX < -d4) {
this.motX = -d4;
}
@@ -325,7 +326,9 @@ public class EntityBoat extends Entity {
Location from = new Location(world, prevX, prevY, prevZ, prevYaw, prevPitch);
Location to = new Location(world, this.locX, this.locY, this.locZ, this.yaw, this.pitch);
Vehicle vehicle = (Vehicle) this.getBukkitEntity();
server.getPluginManager().callEvent(new VehicleEvent(Type.VEHICLE_UPDATE, vehicle));
if (!from.equals(to)) {
VehicleMoveEvent event = new VehicleMoveEvent(Type.VEHICLE_MOVE, vehicle, from, to);
server.getPluginManager().callEvent(event);