diff options
author | md_5 <git@md-5.net> | 2016-11-17 12:41:03 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-11-17 12:41:03 +1100 |
commit | c25ddf063a808e3adb749e22017661f403c5fb7e (patch) | |
tree | b2efcff512be12fd3e38cf8c36386148ce6ab4ae /nms-patches/ItemDye.patch | |
parent | 51263e97187a84338f89698eef187284055a682a (diff) | |
download | craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.gz craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.lz craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.xz craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.zip |
Update to Minecraft 1.11
Diffstat (limited to 'nms-patches/ItemDye.patch')
-rw-r--r-- | nms-patches/ItemDye.patch | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nms-patches/ItemDye.patch b/nms-patches/ItemDye.patch index 0f537c0d..e92fa188 100644 --- a/nms-patches/ItemDye.patch +++ b/nms-patches/ItemDye.patch @@ -8,13 +8,13 @@ public class ItemDye extends Item { public static final int[] a = new int[] { 1973019, 11743532, 3887386, 5320730, 2437522, 8073150, 2651799, 11250603, 4408131, 14188952, 4312372, 14602026, 6719955, 12801229, 15435844, 15790320}; -@@ -87,6 +89,17 @@ +@@ -89,6 +91,17 @@ EnumColor enumcolor = EnumColor.fromInvColorIndex(itemstack.getData()); if (!entitysheep.isSheared() && entitysheep.getColor() != enumcolor) { + // CraftBukkit start + byte bColor = (byte) enumcolor.getColorIndex(); -+ SheepDyeWoolEvent event = new SheepDyeWoolEvent((org.bukkit.entity.Sheep) entitysheep.getBukkitEntity(), org.bukkit.DyeColor.getByData(bColor)); ++ SheepDyeWoolEvent event = new SheepDyeWoolEvent((org.bukkit.entity.Sheep) entitysheep.getBukkitEntity(), org.bukkit.DyeColor.getByWoolData(bColor)); + entitysheep.world.getServer().getPluginManager().callEvent(event); + + if (event.isCancelled()) { @@ -24,5 +24,5 @@ + enumcolor = EnumColor.fromColorIndex((byte) event.getColor().getWoolData()); + // CraftBukkit end entitysheep.setColor(enumcolor); - --itemstack.count; + itemstack.subtract(1); } |