Fix drop for BlockBreaker. Closes #3008

This commit is contained in:
drcrazy 2022-07-22 00:41:09 +03:00
parent 33da2ad59e
commit 48a35be5d0

View file

@ -26,6 +26,7 @@ package techreborn.blockentity.machine.tier0.block;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import reborncore.common.screen.BuiltScreenHandler;
import reborncore.common.screen.BuiltScreenHandlerProvider;
@ -54,7 +55,15 @@ public class BlockBreakerBlockEntity extends AbstractBlockBlockEntity implements
public BlockBreakerBlockEntity(BlockPos pos, BlockState state) {
super(TRBlockEntities.BLOCK_BREAKER, pos, state, "Block Breaker", TechRebornConfig.blockBreakerMaxInput, TechRebornConfig.blockBreakerMaxEnergy, TRContent.Machine.BLOCK_BREAKER.block, ENERGY_SLOT);
processor = new BlockBreakerProcessor(this, OUTPUT_SLOT, FAKE_INPUT_SLOT, TechRebornConfig.blockBreakerBaseBreakTime, TechRebornConfig.blockBreakerEnergyPerTick);
inventory = new RebornInventory<>(3, "BlockBreakerBlockEntity", 64, this);
inventory = new RebornInventory<>(3, "BlockBreakerBlockEntity", 64, this){
@Override
public ItemStack getStack(int i) {
if (i == FAKE_INPUT_SLOT) {
return ItemStack.EMPTY;
}
return super.getStack(i);
}
};
}
// BuiltScreenHandlerProvider