diff --git a/src/main/java/forestry/core/inventory/InventoryEscritoire.java b/src/main/java/forestry/core/inventory/InventoryEscritoire.java index e59559552..ec930cde8 100644 --- a/src/main/java/forestry/core/inventory/InventoryEscritoire.java +++ b/src/main/java/forestry/core/inventory/InventoryEscritoire.java @@ -12,11 +12,13 @@ package forestry.core.inventory; import forestry.api.genetics.AlleleManager; import forestry.api.genetics.IIndividual; +import forestry.core.tiles.EscritoireGame; import forestry.core.tiles.TileEscritoire; import forestry.core.utils.GeneticsUtil; import forestry.core.utils.SlotUtil; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; +import net.minecraft.world.World; public class InventoryEscritoire extends InventoryAdapterTile { public static final short SLOT_ANALYZE = 0; @@ -79,8 +81,10 @@ public class InventoryEscritoire extends InventoryAdapterTile { super.setInventorySlotContents(SLOT_ANALYZE, ersatz); } } - if (!tile.getWorld().isRemote) { - tile.getGame().initialize(getStackInSlot(SLOT_ANALYZE)); + World world = tile.getWorld(); + if (world != null && !world.isRemote) { + EscritoireGame game = tile.getGame(); + game.initialize(getStackInSlot(SLOT_ANALYZE)); } } }