From 31baac3c8cbed8f2d21bcbab3ff3a1265ca72a57 Mon Sep 17 00:00:00 2001 From: grimmauld Date: Wed, 14 Oct 2020 16:13:09 +0200 Subject: [PATCH] Not Enough Bugs - fixed last blaze burner of a stack disappearing when clicking a blaze entity - remove dead code from the valve handle class --- .../contraptions/components/crank/ValveHandleBlock.java | 7 ------- .../processing/burner/BlazeBurnerBlockItem.java | 6 +++--- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crank/ValveHandleBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/crank/ValveHandleBlock.java index cd222ae53..ee0d66d43 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crank/ValveHandleBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crank/ValveHandleBlock.java @@ -1,12 +1,8 @@ package com.simibubi.create.content.contraptions.components.crank; -import java.util.ArrayList; -import java.util.List; - import javax.annotation.ParametersAreNonnullByDefault; import com.simibubi.create.AllBlockPartials; -import com.tterrag.registrate.util.entry.BlockEntry; import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemStack; @@ -16,9 +12,6 @@ import net.minecraftforge.api.distmarker.OnlyIn; @ParametersAreNonnullByDefault public class ValveHandleBlock extends HandCrankBlock { - - public static final List> entries = new ArrayList<>(); - private final boolean inCreativeTab; public static ValveHandleBlock copper(Properties properties) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerBlockItem.java b/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerBlockItem.java index 95ff6f7dc..b4391b62e 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerBlockItem.java +++ b/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerBlockItem.java @@ -40,7 +40,7 @@ import net.minecraftforge.fml.common.ObfuscationReflectionHelper; @ParametersAreNonnullByDefault public class BlazeBurnerBlockItem extends BlockItem { - private boolean capturedBlaze; + private final boolean capturedBlaze; public static BlazeBurnerBlockItem empty(Properties properties) { return new BlazeBurnerBlockItem(AllBlocks.BLAZE_BURNER.get(), properties, false); @@ -104,7 +104,7 @@ public class BlazeBurnerBlockItem extends BlockItem { continue; spawnCaptureEffects(world, VecHelper.getCenterOf(pos)); - if (world.isRemote) + if (world.isRemote || player == null) return ActionResultType.SUCCESS; giveBurnerItemTo(player, context.getItem(), context.getHand()); @@ -128,7 +128,7 @@ public class BlazeBurnerBlockItem extends BlockItem { giveBurnerItemTo(player, heldItem, hand); entity.remove(); - return true; + return false; } protected void giveBurnerItemTo(PlayerEntity player, ItemStack heldItem, Hand hand) {