SPIGOT-6555: Cannot access shield BlockStateMeta

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2021-06-15 13:06:23 +10:00
parent c751b9c098
commit 6b435994e8

View file

@ -274,12 +274,11 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
@Override
public BlockState getBlockState() {
Material stateMaterial = material; // Only actually used for jigsaws
Material stateMaterial = (material != Material.SHIELD) ? material : shieldToBannerHack(blockEntityTag); // Only actually used for jigsaws
if (blockEntityTag != null) {
switch (material) {
case SHIELD:
blockEntityTag.setString("id", "banner");
stateMaterial = shieldToBannerHack(blockEntityTag);
break;
case SHULKER_BOX:
case WHITE_SHULKER_BOX: