Skip to content

Commit

Permalink
Fix #1982 Wrong drop Greenhouse Window
Browse files Browse the repository at this point in the history
  • Loading branch information
Nedelosk committed Feb 16, 2018
1 parent 4ea0795 commit a093e7c
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,19 @@ protected BlockStateContainer createBlockState() {
return new ExtendedBlockState(this, new IProperty[]{State.PROPERTY, FACING}, new IUnlistedProperty[]{UnlistedBlockPos.POS, UnlistedBlockAccess.BLOCKACCESS});
}

@Override
public void breakBlock(World worldIn, BlockPos pos, IBlockState state) {
dropBlockAsItem(worldIn, pos, state, 0);
super.breakBlock(worldIn, pos, state);
}

@Override
public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
String glass = "glass";
List<ItemStack> ret = new java.util.ArrayList<>();
TileGreenhouseWindow window = TileUtil.getTile(world, pos, TileGreenhouseWindow.class);
if (window != null) {
glass = window.getGlass();
ret.add(getItem(window.getGlass()));
}
ret.add(getItem(glass));
return ret;
}

Expand Down

0 comments on commit a093e7c

Please sign in to comment.