1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 11:45:51 +00:00

Readded hasItemMeta() check

This commit is contained in:
AlexLander123 2019-10-10 00:14:02 +08:00
parent 8b8486a2e7
commit 5d107de6ac

View File

@ -57,7 +57,7 @@ public class BlockPlacer extends SimpleSlimefunItem<AutonomousMachineHandler> {
}
else {
block.setType(e.getItem().getType());
if (e.getItem().getItemMeta() instanceof BlockStateMeta) {
if (e.getItem().hasItemMeta() && e.getItem().getItemMeta() instanceof BlockStateMeta) {
BlockState itemBlockState = ((BlockStateMeta) e.getItem().getItemMeta()).getBlockState();
BlockState blockState = block.getState();