diff options
Diffstat (limited to 'src/main/java/net/minecraft/server/ItemBoat.java')
-rw-r--r-- | src/main/java/net/minecraft/server/ItemBoat.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/main/java/net/minecraft/server/ItemBoat.java b/src/main/java/net/minecraft/server/ItemBoat.java index 393b94b5..a628a643 100644 --- a/src/main/java/net/minecraft/server/ItemBoat.java +++ b/src/main/java/net/minecraft/server/ItemBoat.java @@ -20,35 +20,35 @@ public class ItemBoat extends Item { double d0 = entityhuman.lastX + (entityhuman.locX - entityhuman.lastX) * (double) f; double d1 = entityhuman.lastY + (entityhuman.locY - entityhuman.lastY) * (double) f + 1.62D - (double) entityhuman.height; double d2 = entityhuman.lastZ + (entityhuman.locZ - entityhuman.lastZ) * (double) f; - Vec3D vec3d = Vec3D.b(d0, d1, d2); - float f3 = MathHelper.b(-f2 * 0.017453292F - 3.1415927F); - float f4 = MathHelper.a(-f2 * 0.017453292F - 3.1415927F); - float f5 = -MathHelper.b(-f1 * 0.017453292F); - float f6 = MathHelper.a(-f1 * 0.017453292F); + Vec3D vec3d = Vec3D.create(d0, d1, d2); + float f3 = MathHelper.cos(-f2 * 0.017453292F - 3.1415927F); + float f4 = MathHelper.sin(-f2 * 0.017453292F - 3.1415927F); + float f5 = -MathHelper.cos(-f1 * 0.017453292F); + float f6 = MathHelper.sin(-f1 * 0.017453292F); float f7 = f4 * f5; float f8 = f3 * f5; double d3 = 5.0D; - Vec3D vec3d1 = vec3d.c((double) f7 * d3, (double) f6 * d3, (double) f8 * d3); - MovingObjectPosition movingobjectposition = world.a(vec3d, vec3d1, true); + Vec3D vec3d1 = vec3d.add((double) f7 * d3, (double) f6 * d3, (double) f8 * d3); + MovingObjectPosition movingobjectposition = world.rayTrace(vec3d, vec3d1, true); if (movingobjectposition == null) { return itemstack; } else { - if (movingobjectposition.a == EnumMovingObjectType.TILE) { + if (movingobjectposition.type == EnumMovingObjectType.TILE) { int i = movingobjectposition.b; int j = movingobjectposition.c; int k = movingobjectposition.d; if (!world.isStatic) { // CraftBukkit start - Boat placement - PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(entityhuman, Action.RIGHT_CLICK_BLOCK, i, j, k, movingobjectposition.e, itemstack); + PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(entityhuman, Action.RIGHT_CLICK_BLOCK, i, j, k, movingobjectposition.face, itemstack); if (event.isCancelled()) { return itemstack; } // CraftBukkit end - world.a((Entity) (new EntityBoat(world, (double) ((float) i + 0.5F), (double) ((float) j + 1.5F), (double) ((float) k + 0.5F)))); + world.addEntity(new EntityBoat(world, (double) ((float) i + 0.5F), (double) ((float) j + 1.5F), (double) ((float) k + 0.5F))); } --itemstack.count; |