Deprecate minor capital spelling mistake in minecart watcher

This commit is contained in:
libraryaddict 2014-06-18 04:09:56 +12:00
parent 50e94afd11
commit fb3b7d86ee

View File

@ -17,10 +17,15 @@ public class MinecartWatcher extends FlagWatcher {
return new ItemStack(id, 1, (short) data); return new ItemStack(id, 1, (short) data);
} }
public int getBlockOffSet() { public int getBlockOffset() {
return (Integer) getValue(21, 0); return (Integer) getValue(21, 0);
} }
@Deprecated
public int getBlockOffSet() {
return getBlockOffset();
}
public float getDamage() { public float getDamage() {
return (Float) getValue(19, 0F); return (Float) getValue(19, 0F);
} }
@ -33,22 +38,27 @@ public class MinecartWatcher extends FlagWatcher {
int id = item.getTypeId(); int id = item.getTypeId();
int data = item.getDurability(); int data = item.getDurability();
setValue(20, (int) (id & 0xffff | data << 16)); setValue(20, (int) (id & 0xffff | data << 16));
sendData(20); setValue(22, (byte) 1);
setViewBlockInCart(true); sendData(20, 22);
} }
public void setBlockOffSet(int i) { public void setBlockOffset(int i) {
setValue(21, i); setValue(21, i);
sendData(21); sendData(21);
} }
@Deprecated
public void setBlockOffSet(int i) {
setBlockOffset(i);
}
public void setDamage(float damage) { public void setDamage(float damage) {
setValue(19, damage); setValue(19, damage);
sendData(19); sendData(19);
} }
public void setViewBlockInCart(boolean custom) { public void setViewBlockInCart(boolean viewBlock) {
setValue(22, (byte) (custom ? 1 : 0)); setValue(22, (byte) (viewBlock ? 1 : 0));
sendData(22); sendData(22);
} }
} }