Fix Llama setColor and setCarpet and a sound error
This commit is contained in:
parent
4db189704e
commit
c6ad0c1466
@ -16,6 +16,7 @@ import com.comphenix.protocol.wrappers.Vector3F;
|
||||
import com.comphenix.protocol.wrappers.WrappedBlockData;
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.AbstractHorseWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.AgeableWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.AreaEffectCloudWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.ArmorStandWatcher;
|
||||
@ -23,6 +24,7 @@ import me.libraryaddict.disguise.disguisetypes.watchers.ArrowWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.BatWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.BlazeWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.BoatWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.ChestedHorseWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.CreeperWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.DroppedItemWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.EnderCrystalWatcher;
|
||||
@ -34,8 +36,6 @@ import me.libraryaddict.disguise.disguisetypes.watchers.FireworkWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.FishingHookWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.GhastWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.GuardianWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.AbstractHorseWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.ChestedHorseWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.HorseWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.InsentientWatcher;
|
||||
import me.libraryaddict.disguise.disguisetypes.watchers.IronGolemWatcher;
|
||||
@ -202,9 +202,9 @@ public class FlagType<Y> {
|
||||
|
||||
public static FlagType<Integer> LIVING_POTIONS = new FlagType<Integer>(LivingWatcher.class, 2, 0);
|
||||
|
||||
public static FlagType<Integer> LLAMA_CARPET = new FlagType<Integer>(LlamaWatcher.class, 2, 0);
|
||||
public static FlagType<Integer> LLAMA_CARPET = new FlagType<Integer>(LlamaWatcher.class, 1, 0);
|
||||
|
||||
public static FlagType<Integer> LLAMA_COLOR = new FlagType<Integer>(LlamaWatcher.class, 1, -1);
|
||||
public static FlagType<Integer> LLAMA_COLOR = new FlagType<Integer>(LlamaWatcher.class, 2, -1);
|
||||
|
||||
public static FlagType<Integer> LLAMA_STRENGTH = new FlagType<Integer>(LlamaWatcher.class, 0, 0);
|
||||
|
||||
|
@ -22,7 +22,7 @@ public class LlamaWatcher extends ChestedHorseWatcher {
|
||||
}
|
||||
|
||||
public void setCarpet(AnimalColor color) {
|
||||
setData(FlagType.LLAMA_CARPET, color.ordinal());
|
||||
setData(FlagType.LLAMA_CARPET, color.getId());
|
||||
sendData(FlagType.LLAMA_CARPET);
|
||||
}
|
||||
|
||||
|
@ -175,8 +175,13 @@ public enum DisguiseSound {
|
||||
|
||||
DisguiseSound(Object hurt, Object[] step, Object death, Object idle, Object... sounds) {
|
||||
addSound(hurt, SoundType.HURT);
|
||||
for (Object obj : step)
|
||||
addSound(obj, SoundType.STEP);
|
||||
|
||||
if (step != null) {
|
||||
for (Object obj : step) {
|
||||
addSound(obj, SoundType.STEP);
|
||||
}
|
||||
}
|
||||
|
||||
addSound(death, SoundType.DEATH);
|
||||
addSound(idle, SoundType.IDLE);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user