Sort them

This commit is contained in:
libraryaddict 2013-11-24 08:42:12 +13:00
parent fddbabf931
commit 4d42dca712
3 changed files with 23 additions and 19 deletions

View File

@ -13,21 +13,21 @@ public class FallingBlockWatcher extends FlagWatcher {
super(disguise); super(disguise);
} }
public void setBlock(ItemStack block) {
this.block = block;
if (getDisguise().getEntity() != null && getDisguise().getWatcher() == this) {
DisguiseUtilities.refreshTrackers(getDisguise().getEntity());
}
}
public ItemStack getBlock() {
return block;
}
@Override @Override
public FallingBlockWatcher clone(Disguise disguise) { public FallingBlockWatcher clone(Disguise disguise) {
FallingBlockWatcher watcher = (FallingBlockWatcher) super.clone(disguise); FallingBlockWatcher watcher = (FallingBlockWatcher) super.clone(disguise);
watcher.setBlock(getBlock()); watcher.setBlock(getBlock());
return watcher; return watcher;
} }
public ItemStack getBlock() {
return block;
}
public void setBlock(ItemStack block) {
this.block = block;
if (getDisguise().getEntity() != null && getDisguise().getWatcher() == this) {
DisguiseUtilities.refreshTrackers(getDisguise().getEntity());
}
}
} }

View File

@ -12,10 +12,6 @@ public class PaintingWatcher extends FlagWatcher {
super(disguise); super(disguise);
} }
public Art getPainting() {
return painting;
}
@Override @Override
public PaintingWatcher clone(Disguise disguise) { public PaintingWatcher clone(Disguise disguise) {
PaintingWatcher watcher = (PaintingWatcher) super.clone(disguise); PaintingWatcher watcher = (PaintingWatcher) super.clone(disguise);
@ -23,6 +19,10 @@ public class PaintingWatcher extends FlagWatcher {
return watcher; return watcher;
} }
public Art getPainting() {
return painting;
}
public void setPainting(Art newPainting) { public void setPainting(Art newPainting) {
this.painting = newPainting; this.painting = newPainting;
if (getDisguise().getEntity() != null && getDisguise().getWatcher() == this) { if (getDisguise().getEntity() != null && getDisguise().getWatcher() == this) {
@ -30,4 +30,8 @@ public class PaintingWatcher extends FlagWatcher {
} }
} }
public void setPainting(int paintingNo) {
painting = Art.values()[paintingNo % Art.values().length];
}
} }

View File

@ -11,10 +11,6 @@ public class SplashPotionWatcher extends FlagWatcher {
super(disguise); super(disguise);
} }
public int getPotionId() {
return potionId;
}
@Override @Override
public SplashPotionWatcher clone(Disguise disguise) { public SplashPotionWatcher clone(Disguise disguise) {
SplashPotionWatcher watcher = (SplashPotionWatcher) super.clone(disguise); SplashPotionWatcher watcher = (SplashPotionWatcher) super.clone(disguise);
@ -22,6 +18,10 @@ public class SplashPotionWatcher extends FlagWatcher {
return watcher; return watcher;
} }
public int getPotionId() {
return potionId;
}
public void setPotionId(int newPotionId) { public void setPotionId(int newPotionId) {
this.potionId = newPotionId; this.potionId = newPotionId;
if (getDisguise().getEntity() != null && getDisguise().getWatcher() == this) { if (getDisguise().getEntity() != null && getDisguise().getWatcher() == this) {