Check multiblock before crafting vacuum freezer
This commit is contained in:
parent
4b2042a100
commit
a36a0e6f4a
1 changed files with 11 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue