mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-10-25 20:22:26 +00:00
fix crash if block is null in TileWood#getPickBlock (#114)
Co-authored-by: UltraProdigy <187078471+UltraProdigy@users.noreply.github.com>
This commit is contained in:
1 parent
3b63133790
commit
cc4b16e2a5
1 file changed
+2
-2
@@ -95,8 +95,7 @@ public class TileWood extends TileEntity implements IStreamable {
|
||||
EnumWoodType woodType = wood.getWoodType();
|
||||
|
||||
int amount = 1;
|
||||
if (block instanceof BlockSlab) {
|
||||
BlockSlab blockSlab = (BlockSlab) block;
|
||||
if (block instanceof BlockSlab blockSlab) {
|
||||
if (blockSlab.isDoubleSlab()) {
|
||||
amount = 2;
|
||||
block = PluginArboriculture.blocks.slabs;
|
||||
@@ -104,6 +103,7 @@ public class TileWood extends TileEntity implements IStreamable {
|
||||
}
|
||||
|
||||
ItemStack itemStack = new ItemStack(block, amount);
|
||||
if (itemStack.getItem() == null) return null;
|
||||
ItemBlockWood.saveToItemStack(woodType, itemStack);
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user