summaryrefslogtreecommitdiffstats
path: root/src/test/java/org/bukkit/DyeColorsTest.java
diff options
context:
space:
mode:
authorWesley Wolfe <weswolf@aol.com>2012-12-21 07:37:53 -0600
committerWesley Wolfe <weswolf@aol.com>2012-12-21 10:36:34 -0600
commit708252c020590de1c3a87ae628d56c05465a2167 (patch)
treef0ba5eee5c90d26e31b54188cc1f3d74c9c598b2 /src/test/java/org/bukkit/DyeColorsTest.java
parentf377a7680fb29ac55870fb6f73c2b5262241b8ef (diff)
downloadcraftbukkit-708252c020590de1c3a87ae628d56c05465a2167.tar
craftbukkit-708252c020590de1c3a87ae628d56c05465a2167.tar.gz
craftbukkit-708252c020590de1c3a87ae628d56c05465a2167.tar.lz
craftbukkit-708252c020590de1c3a87ae628d56c05465a2167.tar.xz
craftbukkit-708252c020590de1c3a87ae628d56c05465a2167.zip
Implement 1.4.6 ItemMeta. Adds BUKKIT-3236, BUKKIT-3237
Some meta functionality is refactored into common methods. CraftItemStack uses the ItemMetaKey identifiers for enchantments. Refactored unit test to include extra functionality; initially only checking the presence of the DelegateDeserialization annotation.
Diffstat (limited to 'src/test/java/org/bukkit/DyeColorsTest.java')
-rw-r--r--src/test/java/org/bukkit/DyeColorsTest.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/java/org/bukkit/DyeColorsTest.java b/src/test/java/org/bukkit/DyeColorsTest.java
index 296f49a4..8b2e8a7c 100644
--- a/src/test/java/org/bukkit/DyeColorsTest.java
+++ b/src/test/java/org/bukkit/DyeColorsTest.java
@@ -7,6 +7,7 @@ import java.util.ArrayList;
import java.util.List;
import net.minecraft.server.EntitySheep;
+import net.minecraft.server.ItemDye;
import org.bukkit.support.AbstractTestingBase;
import org.junit.Test;
@@ -36,4 +37,11 @@ public class DyeColorsTest extends AbstractTestingBase {
Color nmsColor = Color.fromRGB((int) (nmsColorArray[0] * 255), (int) (nmsColorArray[1] * 255), (int) (nmsColorArray[2] * 255));
assertThat(color, is(nmsColor));
}
+
+ @Test
+ public void checkFireworkColor() {
+ Color color = dye.getFireworkColor();
+ int nmsColor = ItemDye.b[dye.getData()];
+ assertThat(color, is(Color.fromRGB(nmsColor)));
+ }
}