Updated datawatcher values for 1.6.1

This commit is contained in:
Andrew 2013-07-04 00:39:36 +12:00
parent 64393f6582
commit 447e5cf553
5 changed files with 46 additions and 30 deletions

View File

@ -16,9 +16,9 @@ public enum WatcherValues {
16, (byte) 0, 17, 0, 18, 1, 19, 0, 20, 0, 21, 6, 22, (byte) 0), MINECART_RIDEABLE(16, (byte) 0, 17, 0, 18, 1, 19, 0, 16, (byte) 0, 17, 0, 18, 1, 19, 0, 20, 0, 21, 6, 22, (byte) 0), MINECART_RIDEABLE(16, (byte) 0, 17, 0, 18, 1, 19, 0,
20, 0, 21, 6, 22, (byte) 0), MINECART_TNT(16, (byte) 0, 17, 0, 18, 1, 19, 0, 20, 0, 21, 6, 22, (byte) 0), MUSHROOM_COW( 20, 0, 21, 6, 22, (byte) 0), MINECART_TNT(16, (byte) 0, 17, 0, 18, 1, 19, 0, 20, 0, 21, 6, 22, (byte) 0), MUSHROOM_COW(
12, 0), OCELOT(12, 0, 16, (byte) 0, 17, "", 18, (byte) 0), PAINTING(), PIG(12, 0, 16, (byte) 0), PIG_ZOMBIE(12, 12, 0), OCELOT(12, 0, 16, (byte) 0, 17, "", 18, (byte) 0), PAINTING(), PIG(12, 0, 16, (byte) 0), PIG_ZOMBIE(12,
(byte) 0), PLAYER(8, 0, 9, (byte) 0, 10, (byte) 0, 13, 0), PRIMED_TNT(), SHEEP(12, 0, 16, (byte) 0), SILVERFISH(), SKELETON( (byte) 0), PLAYER(8, 0, 9, (byte) 0, 10, (byte) 0, 13, 0, 18, 0), PRIMED_TNT(), SHEEP(12, 0, 16, (byte) 0), SILVERFISH(), SKELETON(
13, (byte) 0), SLIME(16, (byte) 0, 18, (byte) 0), SMALL_FIREBALL(), SNOWBALL(), SNOWMAN(), SPIDER(), SPLASH_POTION(), SQUID(), THROWN_EXP_BOTTLE(), VILLAGER( 13, (byte) 0), SLIME(16, (byte) 0, 18, (byte) 0), SMALL_FIREBALL(), SNOWBALL(), SNOWMAN(), SPIDER(), SPLASH_POTION(), SQUID(), THROWN_EXP_BOTTLE(), VILLAGER(
16, 0), WITCH(), WITHER(16, 300), WITHER_SKELETON(13, (byte) 1), WITHER_SKULL(), WOLF(16, (byte) 0, 17, "", 18, 8, 16, 0), WITCH(), WITHER(16, 300), WITHER_SKELETON(13, (byte) 1), WITHER_SKULL(), WOLF(16, (byte) 0, 17, "", 18, 8F,
19, (byte) 0, 20, (byte) 14), ZOMBIE(12, (byte) 0, 13, (byte) 0); 19, (byte) 0, 20, (byte) 14), ZOMBIE(12, (byte) 0, 13, (byte) 0);
private HashMap<Integer, Object> values = new HashMap<Integer, Object>(); private HashMap<Integer, Object> values = new HashMap<Integer, Object>();

View File

@ -6,9 +6,9 @@ public class BoatWatcher extends FlagWatcher {
public BoatWatcher(int entityId) { public BoatWatcher(int entityId) {
super(entityId); super(entityId);
setValue(19, 40);
setValue(17, 10); setValue(17, 10);
setValue(18, 0); setValue(18, 0);
setValue(19, 40);
} }
public void setDamage(int dmg) { public void setDamage(int dmg) {

View File

@ -16,8 +16,8 @@ public class LivingWatcher extends FlagWatcher {
public LivingWatcher(int entityId) { public LivingWatcher(int entityId) {
super(entityId); super(entityId);
setValue(5, ""); setValue(10, "");
setValue(6, (byte) 0); setValue(11, (byte) 0);
} }
public void addPotionEffect(PotionEffect potionEffect) { public void addPotionEffect(PotionEffect potionEffect) {
@ -27,16 +27,12 @@ public class LivingWatcher extends FlagWatcher {
sendPotionEffects(); sendPotionEffects();
} }
public int getArrowsSticking() {
return (Byte) getValue(10);
}
public String getCustomName() { public String getCustomName() {
return (String) getValue(5); return (String) getValue(10);
} }
public boolean getPotionParticlesRemoved() { public boolean getPotionParticlesRemoved() {
return (Byte) getValue(9) == 1; return (Byte) getValue(8) == 1;
} }
public boolean hasCustomName() { public boolean hasCustomName() {
@ -64,34 +60,27 @@ public class LivingWatcher extends FlagWatcher {
public void removePotionParticles(boolean particles) { public void removePotionParticles(boolean particles) {
if (particles != getPotionParticlesRemoved()) { if (particles != getPotionParticlesRemoved()) {
setValue(9, (byte) (particles ? 1 : 0)); setValue(8, (byte) (particles ? 1 : 0));
sendData(9); sendData(8);
} }
} }
private void sendPotionEffects() { private void sendPotionEffects() {
setValue(8, PotionBrewer.a(potionEffects)); setValue(7, PotionBrewer.a(potionEffects));
sendData(8); sendData(7);
}
public void setArrowsSticking(int arrowsNo) {
if (arrowsNo != getArrowsSticking()) {
setValue(10, (byte) arrowsNo);
sendData(10);
}
} }
public void setCustomName(String name) { public void setCustomName(String name) {
if (!getCustomName().equals(name)) { if (!getCustomName().equals(name)) {
setValue(5, name); setValue(10, name);
sendData(5); sendData(10);
} }
} }
public void setCustomNameVisible(boolean display) { public void setCustomNameVisible(boolean display) {
if ((Byte) getValue(6) != (display ? 1 : 0)) { if ((Byte) getValue(11) != (display ? 1 : 0)) {
setValue(6, (byte) (display ? 1 : 0)); setValue(11, (byte) (display ? 1 : 0));
sendData(6); sendData(11);
} }
} }

View File

@ -0,0 +1,22 @@
package me.libraryaddict.disguise.DisguiseTypes.Watchers;
public class PlayerWatcher extends LivingWatcher {
public PlayerWatcher(int entityId) {
super(entityId);
setValue(9, (byte) 0);
setValue(18, 0);
}
public int getArrowsSticking() {
return (Byte) getValue(9);
}
public void setArrowsSticking(int arrowsNo) {
if (arrowsNo != getArrowsSticking()) {
setValue(9, (byte) arrowsNo);
sendData(9);
}
}
}

View File

@ -12,7 +12,7 @@ public class WolfWatcher extends AgeableWatcher {
super(entityId); super(entityId);
setValue(16, (byte) 0); setValue(16, (byte) 0);
setValue(17, ""); setValue(17, "");
setValue(18, 8); setValue(18, 8F);
setValue(19, (byte) 0); setValue(19, (byte) 0);
setValue(20, (byte) collarColor.getId()); setValue(20, (byte) collarColor.getId());
} }
@ -21,8 +21,8 @@ public class WolfWatcher extends AgeableWatcher {
return collarColor; return collarColor;
} }
public int getHealth() { public float getHealth() {
return (Integer) getValue(18); return (Float) getValue(18);
} }
public String getName() { public String getName() {
@ -69,6 +69,11 @@ public class WolfWatcher extends AgeableWatcher {
updateStatus(); updateStatus();
} }
} }
public void setHealth(float newHealth) {
setValue(18, newHealth);
sendData(18);
}
private void updateStatus() { private void updateStatus() {
setValue(16, (byte) ((isTamed ? 4 : 0) + (isSitting ? 1 : 0) + (isAgressive ? 2 : 0))); setValue(16, (byte) ((isTamed ? 4 : 0) + (isSitting ? 1 : 0) + (isAgressive ? 2 : 0)));