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);
|
public static MetaIndex<Integer> PIG_BOOST = new MetaIndex<>(PigWatcher.class, 1, 0);
|
||||||
|
|
||||||
@NmsAddedIn(NmsVersion.v1_16)
|
@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)
|
@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)
|
@NmsAddedIn(NmsVersion.v1_16)
|
||||||
public static MetaIndex<Boolean> PIGLIN_CROSSBOW = new MetaIndex<>(PiglinWatcher.class, 1, false);
|
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 abstract class PiglinAbstractWatcher extends InsentientWatcher {
|
||||||
public PiglinAbstractWatcher(Disguise disguise) {
|
public PiglinAbstractWatcher(Disguise disguise) {
|
||||||
super(disguise);
|
super(disguise);
|
||||||
|
|
||||||
|
setShaking(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isBaby() {
|
public boolean isShaking() {
|
||||||
return getData(MetaIndex.PIGLIN_ABSTRACT_BABY);
|
return !getData(MetaIndex.PIGLIN_ABSTRACT_SHAKING);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBaby(boolean baby) {
|
public void setShaking(boolean shaking) {
|
||||||
setData(MetaIndex.PIGLIN_ABSTRACT_BABY, baby);
|
setData(MetaIndex.PIGLIN_ABSTRACT_SHAKING, !shaking);
|
||||||
sendData(MetaIndex.PIGLIN_ABSTRACT_BABY);
|
sendData(MetaIndex.PIGLIN_ABSTRACT_SHAKING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,8 +9,6 @@ import me.libraryaddict.disguise.disguisetypes.MetaIndex;
|
|||||||
public class PiglinWatcher extends PiglinAbstractWatcher {
|
public class PiglinWatcher extends PiglinAbstractWatcher {
|
||||||
public PiglinWatcher(Disguise disguise) {
|
public PiglinWatcher(Disguise disguise) {
|
||||||
super(disguise);
|
super(disguise);
|
||||||
|
|
||||||
setShaking(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isDancing() {
|
public boolean isDancing() {
|
||||||
@ -31,12 +29,12 @@ public class PiglinWatcher extends PiglinAbstractWatcher {
|
|||||||
sendData(MetaIndex.PIGLIN_CROSSBOW);
|
sendData(MetaIndex.PIGLIN_CROSSBOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isShaking() {
|
public boolean isBaby() {
|
||||||
return !getData(MetaIndex.PIGLIN_SHAKING);
|
return getData(MetaIndex.PIGLIN_BABY);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setShaking(boolean shaking) {
|
public void setBaby(boolean baby) {
|
||||||
setData(MetaIndex.PIGLIN_SHAKING, !shaking);
|
setData(MetaIndex.PIGLIN_BABY, baby);
|
||||||
sendData(MetaIndex.PIGLIN_SHAKING);
|
sendData(MetaIndex.PIGLIN_BABY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user