@@ -1,5 +1,6 @@
|
||||
package org.bukkit.craftbukkit.entity;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import net.minecraft.server.EntityMushroomCow;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.entity.EntityType;
|
||||
@@ -15,11 +16,24 @@ public class CraftMushroomCow extends CraftCow implements MushroomCow {
|
||||
return (EntityMushroomCow) entity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Variant getVariant() {
|
||||
return Variant.values()[getHandle().dV().ordinal()];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVariant(Variant variant) {
|
||||
Preconditions.checkArgument(variant != null, "variant");
|
||||
|
||||
getHandle().a(EntityMushroomCow.Type.values()[variant.ordinal()]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CraftMushroomCow";
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityType getType() {
|
||||
return EntityType.MUSHROOM_COW;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user