Skip to content

Commit

Permalink
Override getItem in BlockMachine.class (GregTechCEu#2555)
Browse files Browse the repository at this point in the history
  • Loading branch information
MCTian-mi authored Aug 2, 2024
1 parent 427867f commit 48d707a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/gregtech/api/block/machines/BlockMachine.java
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,15 @@ public ItemStack getPickBlock(@NotNull IBlockState state, @NotNull RayTraceResul
return ItemStack.EMPTY;
}

@NotNull
@Override
public ItemStack getItem(@NotNull World world, @NotNull BlockPos pos, @NotNull IBlockState state) {
MetaTileEntity metaTileEntity = getMetaTileEntity(world, pos);
if (metaTileEntity == null)
return ItemStack.EMPTY;
return metaTileEntity.getStackForm();
}

@Override
public void addCollisionBoxToList(@NotNull IBlockState state, @NotNull World worldIn, @NotNull BlockPos pos,
@NotNull AxisAlignedBB entityBox, @NotNull List<AxisAlignedBB> collidingBoxes,
Expand Down

0 comments on commit 48d707a

Please sign in to comment.