summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-11-19 15:59:04 +1100
committermd_5 <git@md-5.net>2016-11-19 15:59:04 +1100
commit1d01e41570b43e76c0b9a8226323acadccc6c0f0 (patch)
tree773da6ccda0f5bdb0e0698c76d669debb37f106f /src/main/java/org
parentead445ec995e66378957ed400f1b4c698febfb9f (diff)
downloadcraftbukkit-1d01e41570b43e76c0b9a8226323acadccc6c0f0.tar
craftbukkit-1d01e41570b43e76c0b9a8226323acadccc6c0f0.tar.gz
craftbukkit-1d01e41570b43e76c0b9a8226323acadccc6c0f0.tar.lz
craftbukkit-1d01e41570b43e76c0b9a8226323acadccc6c0f0.tar.xz
craftbukkit-1d01e41570b43e76c0b9a8226323acadccc6c0f0.zip
SPIGOT-2798: Fix ShulkerBox BlockStateMeta
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);