From 4d42dca712a3637e204884825fe1086dc6fe82a2 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sun, 24 Nov 2013 08:42:12 +1300 Subject: [PATCH] Sort them --- .../watchers/FallingBlockWatcher.java | 22 +++++++++---------- .../watchers/PaintingWatcher.java | 12 ++++++---- .../watchers/SplashPotionWatcher.java | 8 +++---- 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/src/me/libraryaddict/disguise/disguisetypes/watchers/FallingBlockWatcher.java b/src/me/libraryaddict/disguise/disguisetypes/watchers/FallingBlockWatcher.java index 2fae0844..11d6797f 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/watchers/FallingBlockWatcher.java +++ b/src/me/libraryaddict/disguise/disguisetypes/watchers/FallingBlockWatcher.java @@ -13,21 +13,21 @@ public class FallingBlockWatcher extends FlagWatcher { 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 public FallingBlockWatcher clone(Disguise disguise) { FallingBlockWatcher watcher = (FallingBlockWatcher) super.clone(disguise); watcher.setBlock(getBlock()); 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()); + } + } } diff --git a/src/me/libraryaddict/disguise/disguisetypes/watchers/PaintingWatcher.java b/src/me/libraryaddict/disguise/disguisetypes/watchers/PaintingWatcher.java index 82ba2258..9ec12373 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/watchers/PaintingWatcher.java +++ b/src/me/libraryaddict/disguise/disguisetypes/watchers/PaintingWatcher.java @@ -12,10 +12,6 @@ public class PaintingWatcher extends FlagWatcher { super(disguise); } - public Art getPainting() { - return painting; - } - @Override public PaintingWatcher clone(Disguise disguise) { PaintingWatcher watcher = (PaintingWatcher) super.clone(disguise); @@ -23,6 +19,10 @@ public class PaintingWatcher extends FlagWatcher { return watcher; } + public Art getPainting() { + return painting; + } + public void setPainting(Art newPainting) { this.painting = newPainting; 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]; + } + } diff --git a/src/me/libraryaddict/disguise/disguisetypes/watchers/SplashPotionWatcher.java b/src/me/libraryaddict/disguise/disguisetypes/watchers/SplashPotionWatcher.java index 7ef268a0..44d1c45c 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/watchers/SplashPotionWatcher.java +++ b/src/me/libraryaddict/disguise/disguisetypes/watchers/SplashPotionWatcher.java @@ -11,10 +11,6 @@ public class SplashPotionWatcher extends FlagWatcher { super(disguise); } - public int getPotionId() { - return potionId; - } - @Override public SplashPotionWatcher clone(Disguise disguise) { SplashPotionWatcher watcher = (SplashPotionWatcher) super.clone(disguise); @@ -22,6 +18,10 @@ public class SplashPotionWatcher extends FlagWatcher { return watcher; } + public int getPotionId() { + return potionId; + } + public void setPotionId(int newPotionId) { this.potionId = newPotionId; if (getDisguise().getEntity() != null && getDisguise().getWatcher() == this) {