diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java index e9c8ce7a1e..fcf2a18107 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java @@ -2,6 +2,7 @@ package org.bukkit.craftbukkit.block; import net.minecraft.sounds.SoundCategory; import net.minecraft.sounds.SoundEffects; +import net.minecraft.world.item.EnumColor; import net.minecraft.world.level.World; import net.minecraft.world.level.block.BlockShulkerBox; import net.minecraft.world.level.block.entity.TileEntityShulkerBox; @@ -39,9 +40,9 @@ public class CraftShulkerBox extends CraftLootable impleme @Override public DyeColor getColor() { - net.minecraft.world.level.block.Block block = CraftMagicNumbers.getBlock(this.getType()); + EnumColor color = ((BlockShulkerBox) CraftMagicNumbers.getBlock(this.getType())).color; - return DyeColor.getByWoolData((byte) ((BlockShulkerBox) block).color.getColorIndex()); + return (color == null) ? null : DyeColor.getByWoolData((byte) color.getColorIndex()); } @Override