Deprecated the setId() of the watchers. Not going to remove them. But still shouldn't be used.

This commit is contained in:
libraryaddict 2013-11-24 08:48:39 +13:00
parent 3ab4706af3
commit 979ff545a5
5 changed files with 8 additions and 2 deletions

View File

@ -69,7 +69,7 @@ public class MiscDisguise extends Disguise {
((FallingBlockWatcher) getWatcher()).setBlock(new ItemStack(this.id, 1, (short) this.data)); ((FallingBlockWatcher) getWatcher()).setBlock(new ItemStack(this.id, 1, (short) this.data));
break; break;
case PAINTING: case PAINTING:
((PaintingWatcher) getWatcher()).setPainting(this.data); ((PaintingWatcher) getWatcher()).setPaintingId(this.data);
break; break;
case SPLASH_POTION: case SPLASH_POTION:
((SplashPotionWatcher) getWatcher()).setPotionId(this.data); ((SplashPotionWatcher) getWatcher()).setPotionId(this.data);

View File

@ -81,6 +81,7 @@ public class HorseWatcher extends AgeableWatcher {
sendData(20); sendData(20);
} }
@Deprecated
public void setColorId(int color) { public void setColorId(int color) {
setValue(20, (color % Color.values().length) & 0xFF | getStyle().ordinal() << 8); setValue(20, (color % Color.values().length) & 0xFF | getStyle().ordinal() << 8);
sendData(20); sendData(20);
@ -122,6 +123,7 @@ public class HorseWatcher extends AgeableWatcher {
sendData(20); sendData(20);
} }
@Deprecated
public void setStyleId(int style) { public void setStyleId(int style) {
setValue(20, getColor().ordinal() & 0xFF | (style % Style.values().length) << 8); setValue(20, getColor().ordinal() & 0xFF | (style % Style.values().length) << 8);
sendData(20); sendData(20);

View File

@ -39,6 +39,7 @@ public class OcelotWatcher extends AgeableWatcher {
sendData(18); sendData(18);
} }
@Deprecated
public void setTypeId(int type) { public void setTypeId(int type) {
setValue(18, (byte) (type % Type.values().length)); setValue(18, (byte) (type % Type.values().length));
sendData(18); sendData(18);

View File

@ -30,7 +30,8 @@ public class PaintingWatcher extends FlagWatcher {
} }
} }
public void setPainting(int paintingNo) { @Deprecated
public void setPaintingId(int paintingNo) {
painting = Art.values()[paintingNo % Art.values().length]; painting = Art.values()[paintingNo % Art.values().length];
} }

View File

@ -17,6 +17,7 @@ public class VillagerWatcher extends AgeableWatcher {
return Profession.values()[(Integer) getValue(16, 0)]; return Profession.values()[(Integer) getValue(16, 0)];
} }
@Deprecated
public int getProfessionId() { public int getProfessionId() {
return (Integer) getValue(16, 0); return (Integer) getValue(16, 0);
} }
@ -25,6 +26,7 @@ public class VillagerWatcher extends AgeableWatcher {
setProfessionId(newProfession.getId()); setProfessionId(newProfession.getId());
} }
@Deprecated
public void setProfessionId(int profession) { public void setProfessionId(int profession) {
setValue(16, profession % 6); setValue(16, profession % 6);
sendData(16); sendData(16);