From 05035305f4e43e0097eb7fb33ea3d5f82c6ccba3 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sat, 12 Feb 2011 12:29:22 +1100 Subject: [PATCH] Added implementation of Colorable to CraftSheep inspired by xpansive By: Andrew Ardill --- .../org/bukkit/craftbukkit/entity/CraftSheep.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java index 9ce015d03f..2135c9c526 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java @@ -2,6 +2,7 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntitySheep; +import org.bukkit.DyeColor; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Sheep; @@ -16,4 +17,14 @@ public class CraftSheep extends CraftAnimals implements Sheep { return "CraftSheep"; } + public DyeColor getColor() { + EntitySheep entity = (EntitySheep) getHandle(); + return DyeColor.getByData((byte) entity.e_()); + } + + public void setColor(DyeColor color) { + EntitySheep entity = (EntitySheep) getHandle(); + entity.a(color.getData()); + } + }