summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java
index 39225beb..4b363c12 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java
@@ -211,8 +211,30 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
@Override
public BlockState getBlockState() {
- if (blockEntityTag != null && material == Material.SHIELD) {
- blockEntityTag.setString("id", "Banner"); // Hack
+ if (blockEntityTag != null) {
+ switch (material) {
+ case SHIELD:
+ blockEntityTag.setString("id", "banner");
+ break;
+ case WHITE_SHULKER_BOX:
+ case ORANGE_SHULKER_BOX:
+ case MAGENTA_SHULKER_BOX:
+ case LIGHT_BLUE_SHULKER_BOX:
+ case YELLOW_SHULKER_BOX:
+ case LIME_SHULKER_BOX:
+ case PINK_SHULKER_BOX:
+ case GRAY_SHULKER_BOX:
+ case SILVER_SHULKER_BOX:
+ case CYAN_SHULKER_BOX:
+ case PURPLE_SHULKER_BOX:
+ case BLUE_SHULKER_BOX:
+ case BROWN_SHULKER_BOX:
+ case GREEN_SHULKER_BOX:
+ case RED_SHULKER_BOX:
+ case BLACK_SHULKER_BOX:
+ blockEntityTag.setString("id", "shulker_box");
+ break;
+ }
}
TileEntity te = (blockEntityTag == null) ? null : TileEntity.a(null, blockEntityTag);