Added more disguising for horses
This commit is contained in:
parent
0351974760
commit
9b0f7ba6c7
@ -99,6 +99,14 @@ public class Disguise {
|
|||||||
name = "Skeleton";
|
name = "Skeleton";
|
||||||
} else if (disguiseType == DisguiseType.PRIMED_TNT) {
|
} else if (disguiseType == DisguiseType.PRIMED_TNT) {
|
||||||
name = "TNTPrimed";
|
name = "TNTPrimed";
|
||||||
|
} else if (disguiseType == DisguiseType.DONKEY) {
|
||||||
|
name = "Horse";
|
||||||
|
} else if (disguiseType == DisguiseType.MULE) {
|
||||||
|
name = "Horse";
|
||||||
|
} else if (disguiseType == DisguiseType.ZOMBIE_HORSE) {
|
||||||
|
name = "Horse";
|
||||||
|
} else if (disguiseType == DisguiseType.SKELETON_HORSE) {
|
||||||
|
name = "Horse";
|
||||||
} else if (disguiseType == DisguiseType.MINECART_TNT) {
|
} else if (disguiseType == DisguiseType.MINECART_TNT) {
|
||||||
name = "MinecartTNT";
|
name = "MinecartTNT";
|
||||||
} else if (disguiseType == DisguiseType.SPLASH_POTION)
|
} else if (disguiseType == DisguiseType.SPLASH_POTION)
|
||||||
|
@ -17,6 +17,8 @@ public enum DisguiseType {
|
|||||||
|
|
||||||
CREEPER(EntityType.MOB),
|
CREEPER(EntityType.MOB),
|
||||||
|
|
||||||
|
DONKEY(EntityType.MOB),
|
||||||
|
|
||||||
DROPPED_ITEM(EntityType.MISC, 2, 1),
|
DROPPED_ITEM(EntityType.MISC, 2, 1),
|
||||||
|
|
||||||
EGG(EntityType.MISC, 62),
|
EGG(EntityType.MISC, 62),
|
||||||
@ -65,6 +67,8 @@ public enum DisguiseType {
|
|||||||
|
|
||||||
MINECART_TNT(EntityType.MISC, 10, 3),
|
MINECART_TNT(EntityType.MISC, 10, 3),
|
||||||
|
|
||||||
|
MULE(EntityType.MOB),
|
||||||
|
|
||||||
MUSHROOM_COW(EntityType.MOB),
|
MUSHROOM_COW(EntityType.MOB),
|
||||||
|
|
||||||
OCELOT(EntityType.MOB),
|
OCELOT(EntityType.MOB),
|
||||||
@ -85,6 +89,8 @@ public enum DisguiseType {
|
|||||||
|
|
||||||
SKELETON(EntityType.MOB),
|
SKELETON(EntityType.MOB),
|
||||||
|
|
||||||
|
SKELETON_HORSE(EntityType.MOB),
|
||||||
|
|
||||||
SLIME(EntityType.MOB),
|
SLIME(EntityType.MOB),
|
||||||
|
|
||||||
SMALL_FIREBALL(EntityType.MISC, 64, 0),
|
SMALL_FIREBALL(EntityType.MISC, 64, 0),
|
||||||
@ -113,7 +119,9 @@ public enum DisguiseType {
|
|||||||
|
|
||||||
WOLF(EntityType.MOB),
|
WOLF(EntityType.MOB),
|
||||||
|
|
||||||
ZOMBIE(EntityType.MOB);
|
ZOMBIE(EntityType.MOB),
|
||||||
|
|
||||||
|
ZOMBIE_HORSE(EntityType.MOB);
|
||||||
|
|
||||||
public static enum EntityType {
|
public static enum EntityType {
|
||||||
MISC, MOB, PLAYER;
|
MISC, MOB, PLAYER;
|
||||||
|
@ -23,6 +23,8 @@ public enum WatcherValues {
|
|||||||
|
|
||||||
CREEPER(16, (byte) 0, 17, (byte) 0),
|
CREEPER(16, (byte) 0, 17, (byte) 0),
|
||||||
|
|
||||||
|
DONKEY(12, 0, 16, 0, 19, (byte) 0, 20, 0, 21, "", 22, 0),
|
||||||
|
|
||||||
DROPPED_ITEM(10, CraftItemStack.asNMSCopy(new ItemStack(1))),
|
DROPPED_ITEM(10, CraftItemStack.asNMSCopy(new ItemStack(1))),
|
||||||
|
|
||||||
EGG(),
|
EGG(),
|
||||||
@ -71,6 +73,8 @@ public enum WatcherValues {
|
|||||||
|
|
||||||
MINECART_TNT(16, (byte) 0, 17, 0, 18, 1, 19, 0, 20, 0, 21, 6, 22, (byte) 0),
|
MINECART_TNT(16, (byte) 0, 17, 0, 18, 1, 19, 0, 20, 0, 21, 6, 22, (byte) 0),
|
||||||
|
|
||||||
|
MULE(12, 0, 16, 0, 19, (byte) 0, 20, 0, 21, "", 22, 0),
|
||||||
|
|
||||||
MUSHROOM_COW(12, 0),
|
MUSHROOM_COW(12, 0),
|
||||||
|
|
||||||
OCELOT(12, 0, 16, (byte) 0, 17, "", 18, (byte) 0),
|
OCELOT(12, 0, 16, (byte) 0, 17, "", 18, (byte) 0),
|
||||||
@ -91,6 +95,8 @@ public enum WatcherValues {
|
|||||||
|
|
||||||
SKELETON(13, (byte) 0),
|
SKELETON(13, (byte) 0),
|
||||||
|
|
||||||
|
SKELETON_HORSE(12, 0, 16, 0, 19, (byte) 0, 20, 0, 21, "", 22, 0),
|
||||||
|
|
||||||
SLIME(16, (byte) 0, 18, (byte) 0),
|
SLIME(16, (byte) 0, 18, (byte) 0),
|
||||||
|
|
||||||
SMALL_FIREBALL(),
|
SMALL_FIREBALL(),
|
||||||
@ -119,7 +125,9 @@ public enum WatcherValues {
|
|||||||
|
|
||||||
WOLF(16, (byte) 0, 17, "", 18, 8F, 19, (byte) 0, 20, (byte) 14),
|
WOLF(16, (byte) 0, 17, "", 18, 8F, 19, (byte) 0, 20, (byte) 14),
|
||||||
|
|
||||||
ZOMBIE(12, (byte) 0, 13, (byte) 0);
|
ZOMBIE(12, (byte) 0, 13, (byte) 0),
|
||||||
|
|
||||||
|
ZOMBIE_HORSE(12, 0, 16, 0, 19, (byte) 0, 20, 0, 21, "", 22, 0);
|
||||||
private HashMap<Integer, Object> values = new HashMap<Integer, Object>();
|
private HashMap<Integer, Object> values = new HashMap<Integer, Object>();
|
||||||
|
|
||||||
private WatcherValues(Object... obj) {
|
private WatcherValues(Object... obj) {
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
package me.libraryaddict.disguise.DisguiseTypes.Watchers;
|
||||||
|
|
||||||
|
public class DonkeyWatcher extends HorseWatcher {
|
||||||
|
|
||||||
|
public DonkeyWatcher(int entityId) {
|
||||||
|
super(entityId);
|
||||||
|
setHorseType(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,5 +1,7 @@
|
|||||||
package me.libraryaddict.disguise.DisguiseTypes.Watchers;
|
package me.libraryaddict.disguise.DisguiseTypes.Watchers;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class HorseWatcher extends AgeableWatcher {
|
public class HorseWatcher extends AgeableWatcher {
|
||||||
|
|
||||||
public HorseWatcher(int entityId) {
|
public HorseWatcher(int entityId) {
|
||||||
@ -12,18 +14,27 @@ public class HorseWatcher extends AgeableWatcher {
|
|||||||
// Zombie
|
// Zombie
|
||||||
// Skeleton
|
// Skeleton
|
||||||
setValue(19, (byte) 0);
|
setValue(19, (byte) 0);
|
||||||
setValue(20, 0);
|
setValue(20, new Random().nextInt(9));
|
||||||
setValue(21, "");
|
setValue(21, "");
|
||||||
setValue(22, 0);
|
setValue(22, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getColoring() {
|
||||||
|
return (Integer) getValue(20);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getHorseType() {
|
||||||
|
return (int) (Byte) getValue(19);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setColoring(int color) {
|
||||||
|
setValue(20, color);
|
||||||
|
sendData(20);
|
||||||
|
}
|
||||||
|
|
||||||
public void setHorseType(int type) {
|
public void setHorseType(int type) {
|
||||||
setValue(19, (byte) type);
|
setValue(19, (byte) type);
|
||||||
sendData(19);
|
sendData(19);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getHorseType() {
|
|
||||||
return (int) (Byte) getValue(19);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
package me.libraryaddict.disguise.DisguiseTypes.Watchers;
|
||||||
|
|
||||||
|
public class MuleWatcher extends HorseWatcher {
|
||||||
|
|
||||||
|
public MuleWatcher(int entityId) {
|
||||||
|
super(entityId);
|
||||||
|
setHorseType(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
package me.libraryaddict.disguise.DisguiseTypes.Watchers;
|
||||||
|
|
||||||
|
public class SkeletonHorseWatcher extends HorseWatcher {
|
||||||
|
|
||||||
|
public SkeletonHorseWatcher(int entityId) {
|
||||||
|
super(entityId);
|
||||||
|
setHorseType(4);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
package me.libraryaddict.disguise.DisguiseTypes.Watchers;
|
||||||
|
|
||||||
|
public class ZombieHorseWatcher extends HorseWatcher {
|
||||||
|
|
||||||
|
public ZombieHorseWatcher(int entityId) {
|
||||||
|
super(entityId);
|
||||||
|
setHorseType(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user