From fb3b7d86ee3ae7f88f94c2a025aa9e08d68ba091 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Wed, 18 Jun 2014 04:09:56 +1200 Subject: [PATCH] Deprecate minor capital spelling mistake in minecart watcher --- .../watchers/MinecartWatcher.java | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/me/libraryaddict/disguise/disguisetypes/watchers/MinecartWatcher.java b/src/me/libraryaddict/disguise/disguisetypes/watchers/MinecartWatcher.java index eeab69cd..eeab652d 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/watchers/MinecartWatcher.java +++ b/src/me/libraryaddict/disguise/disguisetypes/watchers/MinecartWatcher.java @@ -17,10 +17,15 @@ public class MinecartWatcher extends FlagWatcher { return new ItemStack(id, 1, (short) data); } - public int getBlockOffSet() { + public int getBlockOffset() { return (Integer) getValue(21, 0); } + @Deprecated + public int getBlockOffSet() { + return getBlockOffset(); + } + public float getDamage() { return (Float) getValue(19, 0F); } @@ -33,22 +38,27 @@ public class MinecartWatcher extends FlagWatcher { int id = item.getTypeId(); int data = item.getDurability(); setValue(20, (int) (id & 0xffff | data << 16)); - sendData(20); - setViewBlockInCart(true); + setValue(22, (byte) 1); + sendData(20, 22); } - public void setBlockOffSet(int i) { + public void setBlockOffset(int i) { setValue(21, i); sendData(21); } + @Deprecated + public void setBlockOffSet(int i) { + setBlockOffset(i); + } + public void setDamage(float damage) { setValue(19, damage); sendData(19); } - public void setViewBlockInCart(boolean custom) { - setValue(22, (byte) (custom ? 1 : 0)); + public void setViewBlockInCart(boolean viewBlock) { + setValue(22, (byte) (viewBlock ? 1 : 0)); sendData(22); } }