mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Added implementation of Colorable to CraftSheep
inspired by xpansive By: Andrew Ardill <andrew.ardill@gmail.com>
This commit is contained in:
parent
4b63a73ffe
commit
05035305f4
1 changed files with 11 additions and 0 deletions
|
@ -2,6 +2,7 @@ package org.bukkit.craftbukkit.entity;
|
||||||
|
|
||||||
import net.minecraft.server.EntitySheep;
|
import net.minecraft.server.EntitySheep;
|
||||||
|
|
||||||
|
import org.bukkit.DyeColor;
|
||||||
import org.bukkit.craftbukkit.CraftServer;
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
import org.bukkit.entity.Sheep;
|
import org.bukkit.entity.Sheep;
|
||||||
|
|
||||||
|
@ -16,4 +17,14 @@ public class CraftSheep extends CraftAnimals implements Sheep {
|
||||||
return "CraftSheep";
|
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());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue