Fix beehive deployer crash

This commit is contained in:
grimmauld 2020-09-06 11:15:01 +02:00
parent d89807fad9
commit 0a4aaaf81e

View file

@ -6,6 +6,7 @@ import static net.minecraftforge.eventbus.api.Event.Result.DENY;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import net.minecraft.block.BeehiveBlock;
import org.apache.commons.lang3.tuple.Pair; import org.apache.commons.lang3.tuple.Pair;
import com.google.common.collect.Multimap; import com.google.common.collect.Multimap;
@ -245,7 +246,7 @@ public class DeployerHandler {
!(player.isSneaking() && holdingSomething) || (stack.doesSneakBypassUse(world, clickedPos, player)); !(player.isSneaking() && holdingSomething) || (stack.doesSneakBypassUse(world, clickedPos, player));
// Use on block // Use on block
if (useBlock != DENY && flag1 && clickedState.onUse(world, player, hand, result) == ActionResultType.SUCCESS) if (useBlock != DENY && flag1 && clickedState.getBlock() instanceof BeehiveBlock && clickedState.onUse(world, player, hand, result) == ActionResultType.SUCCESS)
return; return;
if (stack.isEmpty()) if (stack.isEmpty())
return; return;