Fix setType in DisguiseRabbit causing critical errors on 1.8
This commit is contained in:
parent
b1b31f1135
commit
0154c4d1c4
@ -26,7 +26,7 @@ public class DisguiseRabbit extends DisguiseAnimal
|
|||||||
_type = type;
|
_type = type;
|
||||||
|
|
||||||
int id = type.ordinal();
|
int id = type.ordinal();
|
||||||
DataWatcher.watch(18, id, EntityRabbit.META_TYPE, id);
|
DataWatcher.watch(18, (byte) id, EntityRabbit.META_TYPE, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Type getType()
|
public Type getType()
|
||||||
|
@ -109,7 +109,13 @@ public class MorphBunny extends MorphAbilityGadget
|
|||||||
|
|
||||||
if (disguise != null)
|
if (disguise != null)
|
||||||
{
|
{
|
||||||
Rabbit.Type newType = Rabbit.Type.values()[(disguise.getType().ordinal() + 1) % Rabbit.Type.values().length - 1];
|
Rabbit.Type newType = Rabbit.Type.values()[(disguise.getType().ordinal() + 1) % Rabbit.Type.values().length];
|
||||||
|
|
||||||
|
if (newType == Rabbit.Type.THE_KILLER_BUNNY)
|
||||||
|
{
|
||||||
|
newType = Rabbit.Type.BROWN;
|
||||||
|
}
|
||||||
|
|
||||||
disguise.setType(newType);
|
disguise.setType(newType);
|
||||||
Manager.getDisguiseManager().updateDisguise(disguise);
|
Manager.getDisguiseManager().updateDisguise(disguise);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user