Fix Piglin
This commit is contained in:
parent
a0b5b065f0
commit
6b24bfa858
@ -503,10 +503,10 @@ public class MetaIndex<Y> {
|
||||
public static MetaIndex<Integer> PIG_BOOST = new MetaIndex<>(PigWatcher.class, 1, 0);
|
||||
|
||||
@NmsAddedIn(NmsVersion.v1_16)
|
||||
public static MetaIndex<Boolean> PIGLIN_ABSTRACT_BABY = new MetaIndex<>(PiglinAbstractWatcher.class, 0, false);
|
||||
public static MetaIndex<Boolean> PIGLIN_ABSTRACT_SHAKING = new MetaIndex<>(PiglinAbstractWatcher.class, 0, false);
|
||||
|
||||
@NmsAddedIn(NmsVersion.v1_16)
|
||||
public static MetaIndex<Boolean> PIGLIN_SHAKING = new MetaIndex<>(PiglinWatcher.class, 0, false);
|
||||
public static MetaIndex<Boolean> PIGLIN_BABY = new MetaIndex<>(PiglinWatcher.class, 0, false);
|
||||
|
||||
@NmsAddedIn(NmsVersion.v1_16)
|
||||
public static MetaIndex<Boolean> PIGLIN_CROSSBOW = new MetaIndex<>(PiglinWatcher.class, 1, false);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user