Skip to content

Commit

Permalink
Removed empty hand check
Browse files Browse the repository at this point in the history
  • Loading branch information
Chailotl authored Jul 28, 2024
1 parent c6f928d commit 019680d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos po
protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) {
if(!(world.getBlockEntity(pos) instanceof ItemDisplayBlockEntity be)) return ActionResult.CONSUME;

if (be.canGiveTo(player) && player.getStackInHand(Hand.MAIN_HAND).isEmpty()) {
if (be.canGiveTo(player)) {
if(!world.isClient) be.giveTo(player);
return ActionResult.SUCCESS;
}
Expand Down Expand Up @@ -96,4 +96,4 @@ public BlockEntity createBlockEntity(BlockPos pos, BlockState state) {
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type) {
return checkType(type, Glowcase.ITEM_DISPLAY_BLOCK_ENTITY.get(), ItemDisplayBlockEntity::tick);
}
}
}

0 comments on commit 019680d

Please sign in to comment.