mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-23 16:56:31 +01:00
SPIGOT-2798: Fix ShulkerBox BlockStateMeta
By: md_5 <git@md-5.net>
This commit is contained in:
parent
3e21482d20
commit
1159a15bf0
1 changed files with 24 additions and 2 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue