From a36a0e6f4ad19eb5746c3ebfda9b4db9bbcf7674 Mon Sep 17 00:00:00 2001 From: Justin Vitale <4002351+justinvvitale@users.noreply.github.com> Date: Thu, 9 Jul 2020 22:55:00 +1000 Subject: [PATCH] Check multiblock before crafting vacuum freezer --- .../machine/multiblock/VacuumFreezerBlockEntity.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/techreborn/blockentity/machine/multiblock/VacuumFreezerBlockEntity.java b/src/main/java/techreborn/blockentity/machine/multiblock/VacuumFreezerBlockEntity.java index 3694db5d3..e1529387c 100644 --- a/src/main/java/techreborn/blockentity/machine/multiblock/VacuumFreezerBlockEntity.java +++ b/src/main/java/techreborn/blockentity/machine/multiblock/VacuumFreezerBlockEntity.java @@ -25,12 +25,14 @@ package techreborn.blockentity.machine.multiblock; import net.minecraft.block.BlockState; +import net.minecraft.block.entity.BlockEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.util.math.Direction; import reborncore.client.screen.BuiltScreenHandlerProvider; import reborncore.client.screen.builder.BuiltScreenHandler; import reborncore.client.screen.builder.ScreenHandlerBuilder; import reborncore.common.blockentity.MultiblockWriter; +import reborncore.common.crafting.RebornRecipe; import reborncore.common.recipes.RecipeCrafter; import reborncore.common.util.RebornInventory; import techreborn.blockentity.machine.GenericMachineBlockEntity; @@ -67,4 +69,13 @@ public class VacuumFreezerBlockEntity extends GenericMachineBlockEntity implemen .blockEntity(this).slot(0, 55, 45).outputSlot(1, 101, 45).energySlot(2, 8, 72).syncEnergyValue() .syncCrafterValue().addInventory().create(this, syncID); } + + @Override + public boolean canCraft(RebornRecipe rebornRecipe) { + if (!this.isMultiblockValid()) { + return false; + } + + return super.canCraft(rebornRecipe); + } } \ No newline at end of file