
These two methods are now deprecated and replaced by the strictly equivalent calls using wool data.
40 lines
963 B
Java
40 lines
963 B
Java
package org.bukkit.craftbukkit.entity;
|
|
|
|
import net.minecraft.server.EntityWolf;
|
|
import org.bukkit.DyeColor;
|
|
import org.bukkit.craftbukkit.CraftServer;
|
|
import org.bukkit.entity.EntityType;
|
|
import org.bukkit.entity.Wolf;
|
|
|
|
public class CraftWolf extends CraftTameableAnimal implements Wolf {
|
|
public CraftWolf(CraftServer server, EntityWolf wolf) {
|
|
super(server, wolf);
|
|
}
|
|
|
|
public boolean isAngry() {
|
|
return getHandle().isAngry();
|
|
}
|
|
|
|
public void setAngry(boolean angry) {
|
|
getHandle().setAngry(angry);
|
|
}
|
|
|
|
@Override
|
|
public EntityWolf getHandle() {
|
|
return (EntityWolf) entity;
|
|
}
|
|
|
|
@Override
|
|
public EntityType getType() {
|
|
return EntityType.WOLF;
|
|
}
|
|
|
|
public DyeColor getCollarColor() {
|
|
return DyeColor.getByWoolData((byte) getHandle().getCollarColor());
|
|
}
|
|
|
|
public void setCollarColor(DyeColor color) {
|
|
getHandle().setCollarColor(color.getWoolData());
|
|
}
|
|
}
|