From 2b7808f416b912d9a8ee00e1a8bd4944f0f15fc0 Mon Sep 17 00:00:00 2001 From: kaenganxt Date: Fri, 25 Nov 2016 21:02:13 +0100 Subject: [PATCH] Fix banner color. Banners have inverted color bytes. --- src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java index b769af0891..f0b1703ddf 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java @@ -26,7 +26,7 @@ public class CraftBanner extends CraftBlockState implements Banner { CraftWorld world = (CraftWorld) block.getWorld(); banner = (TileEntityBanner) world.getTileEntityAt(getX(), getY(), getZ()); - base = DyeColor.getByDyeData((byte) banner.color.getColorIndex()); + base = DyeColor.getByDyeData((byte) banner.color.getInvColorIndex()); if (banner.patterns != null) { for (int i = 0; i < banner.patterns.size(); i++) { @@ -40,7 +40,7 @@ public class CraftBanner extends CraftBlockState implements Banner { super(material); banner = te; - base = DyeColor.getByDyeData((byte) banner.color.getColorIndex()); + base = DyeColor.getByDyeData((byte) banner.color.getInvColorIndex()); if (banner.patterns != null) { for (int i = 0; i < banner.patterns.size(); i++) { @@ -100,7 +100,7 @@ public class CraftBanner extends CraftBlockState implements Banner { boolean result = (isPlaced()) ? super.update(force, applyPhysics) : true; if (result) { - banner.color = EnumColor.fromColorIndex(base.getDyeData()); + banner.color = EnumColor.fromInvColorIndex(base.getDyeData()); NBTTagList newPatterns = new NBTTagList();