From e82cc37383ba79f22ffb609d96f5644c0e7b44a9 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Tue, 31 Dec 2013 18:30:25 +1300 Subject: [PATCH] Another fix for Prince Yukon of the apple farm --- .../disguise/utilities/FakeBoundingBox.java | 6 +++--- .../disguise/utilities/ReflectionManager.java | 20 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/me/libraryaddict/disguise/utilities/FakeBoundingBox.java b/src/me/libraryaddict/disguise/utilities/FakeBoundingBox.java index 5c516af7..59bb3e37 100644 --- a/src/me/libraryaddict/disguise/utilities/FakeBoundingBox.java +++ b/src/me/libraryaddict/disguise/utilities/FakeBoundingBox.java @@ -12,15 +12,15 @@ public class FakeBoundingBox { } public double getX() { - return xMod; + return xMod / 2; } public double getY() { - return yMod; + return yMod / 2; } public double getZ() { - return zMod; + return zMod / 2; } } diff --git a/src/me/libraryaddict/disguise/utilities/ReflectionManager.java b/src/me/libraryaddict/disguise/utilities/ReflectionManager.java index 322005cb..6f01c61b 100644 --- a/src/me/libraryaddict/disguise/utilities/ReflectionManager.java +++ b/src/me/libraryaddict/disguise/utilities/ReflectionManager.java @@ -259,33 +259,33 @@ public class ReflectionManager { stage++; switch (stage) { case 1: - x = field.getDouble(boundingBox); + x = field.getDouble(boundingBox) - oldBox.getX(); break; case 2: - y = field.getDouble(boundingBox); + y = field.getDouble(boundingBox) - oldBox.getY(); break; case 3: - z = field.getDouble(boundingBox); + z = field.getDouble(boundingBox) - oldBox.getZ(); break; case 4: - // if (entity.getType() != EntityType.PLAYER) { - field.setDouble(boundingBox, x + newBox.getX()); - // } + // if (entity.getType() != EntityType.PLAYER) { + field.setDouble(boundingBox, x + newBox.getX()); + // } break; case 5: field.setDouble(boundingBox, y + newBox.getY()); break; case 6: - // if (entity.getType() != EntityType.PLAYER) { - field.setDouble(boundingBox, z + newBox.getZ()); - // } + // if (entity.getType() != EntityType.PLAYER) { + field.setDouble(boundingBox, z + newBox.getZ()); + // } break; default: throw new Exception("Error while setting the bounding box, more doubles than I thought??"); } } } - // setSize(entity, entitySize); + // setSize(entity, entitySize); } catch (Exception ex) { ex.printStackTrace(); }