From 6b24bfa858c531e7a2a9058d56e005ad9d2d517b Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Thu, 27 Aug 2020 10:59:55 +1200 Subject: [PATCH] Fix Piglin --- .../disguise/disguisetypes/MetaIndex.java | 4 ++-- .../watchers/PiglinAbstractWatcher.java | 12 +++++++----- .../disguisetypes/watchers/PiglinWatcher.java | 12 +++++------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/main/java/me/libraryaddict/disguise/disguisetypes/MetaIndex.java b/src/main/java/me/libraryaddict/disguise/disguisetypes/MetaIndex.java index 3b31df23..b3438d95 100644 --- a/src/main/java/me/libraryaddict/disguise/disguisetypes/MetaIndex.java +++ b/src/main/java/me/libraryaddict/disguise/disguisetypes/MetaIndex.java @@ -503,10 +503,10 @@ public class MetaIndex { public static MetaIndex PIG_BOOST = new MetaIndex<>(PigWatcher.class, 1, 0); @NmsAddedIn(NmsVersion.v1_16) - public static MetaIndex PIGLIN_ABSTRACT_BABY = new MetaIndex<>(PiglinAbstractWatcher.class, 0, false); + public static MetaIndex PIGLIN_ABSTRACT_SHAKING = new MetaIndex<>(PiglinAbstractWatcher.class, 0, false); @NmsAddedIn(NmsVersion.v1_16) - public static MetaIndex PIGLIN_SHAKING = new MetaIndex<>(PiglinWatcher.class, 0, false); + public static MetaIndex PIGLIN_BABY = new MetaIndex<>(PiglinWatcher.class, 0, false); @NmsAddedIn(NmsVersion.v1_16) public static MetaIndex PIGLIN_CROSSBOW = new MetaIndex<>(PiglinWatcher.class, 1, false); diff --git a/src/main/java/me/libraryaddict/disguise/disguisetypes/watchers/PiglinAbstractWatcher.java b/src/main/java/me/libraryaddict/disguise/disguisetypes/watchers/PiglinAbstractWatcher.java index 5007b2d7..aab05983 100644 --- a/src/main/java/me/libraryaddict/disguise/disguisetypes/watchers/PiglinAbstractWatcher.java +++ b/src/main/java/me/libraryaddict/disguise/disguisetypes/watchers/PiglinAbstractWatcher.java @@ -9,14 +9,16 @@ import me.libraryaddict.disguise.disguisetypes.MetaIndex; public abstract class PiglinAbstractWatcher extends InsentientWatcher { public PiglinAbstractWatcher(Disguise disguise) { super(disguise); + + setShaking(false); } - public boolean isBaby() { - return getData(MetaIndex.PIGLIN_ABSTRACT_BABY); + public boolean isShaking() { + return !getData(MetaIndex.PIGLIN_ABSTRACT_SHAKING); } - public void setBaby(boolean baby) { - setData(MetaIndex.PIGLIN_ABSTRACT_BABY, baby); - sendData(MetaIndex.PIGLIN_ABSTRACT_BABY); + public void setShaking(boolean shaking) { + setData(MetaIndex.PIGLIN_ABSTRACT_SHAKING, !shaking); + sendData(MetaIndex.PIGLIN_ABSTRACT_SHAKING); } } diff --git a/src/main/java/me/libraryaddict/disguise/disguisetypes/watchers/PiglinWatcher.java b/src/main/java/me/libraryaddict/disguise/disguisetypes/watchers/PiglinWatcher.java index 32792f53..94536652 100644 --- a/src/main/java/me/libraryaddict/disguise/disguisetypes/watchers/PiglinWatcher.java +++ b/src/main/java/me/libraryaddict/disguise/disguisetypes/watchers/PiglinWatcher.java @@ -9,8 +9,6 @@ import me.libraryaddict.disguise.disguisetypes.MetaIndex; public class PiglinWatcher extends PiglinAbstractWatcher { public PiglinWatcher(Disguise disguise) { super(disguise); - - setShaking(false); } public boolean isDancing() { @@ -31,12 +29,12 @@ public class PiglinWatcher extends PiglinAbstractWatcher { sendData(MetaIndex.PIGLIN_CROSSBOW); } - public boolean isShaking() { - return !getData(MetaIndex.PIGLIN_SHAKING); + public boolean isBaby() { + return getData(MetaIndex.PIGLIN_BABY); } - public void setShaking(boolean shaking) { - setData(MetaIndex.PIGLIN_SHAKING, !shaking); - sendData(MetaIndex.PIGLIN_SHAKING); + public void setBaby(boolean baby) { + setData(MetaIndex.PIGLIN_BABY, baby); + sendData(MetaIndex.PIGLIN_BABY); } }