mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-21 04:22:32 +00:00
Fix #1982 Wrong drop Greenhouse Window
This commit is contained in:
1 parent
4ea0795063
commit
a093e7c094
1 file changed
+8
-4
@@ -207,15 +207,19 @@ public class BlockGreenhouseWindow extends Block implements IBlockRotatable, ITi
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user