Vswe / Production

12 stars 11 forks source link

Crash when removing machine with upgrades #3

Closed estranged42 closed 10 years ago

estranged42 commented 10 years ago

I removed a crafting table from the Upgrades tab and received the following crash report.

  java.lang.NullPointerException: Ticking block entity
    at vswe.production.tileentity.TileEntityTable.transfer(TileEntityTable.java:351)
    at vswe.production.tileentity.TileEntityTable.func_145845_h(TileEntityTable.java:328)
    at net.minecraft.world.World.func_72939_s(World.java:1888)
    at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:489)
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:636)
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547)
    at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:111)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427)
    at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)

  A detailed walkthrough of the error, its code path and all known details is as follows:
  ---------------------------------------------------------------------------------------

  -- Head --
  Stacktrace:
    at vswe.production.tileentity.TileEntityTable.transfer(TileEntityTable.java:351)
    at vswe.production.tileentity.TileEntityTable.func_145845_h(TileEntityTable.java:328)

  -- Block entity being ticked --
  Details:
    Name: production_table // vswe.production.tileentity.TileEntityTable
    Block type: ID #796 (tile.null // vswe.production.block.BlockTable)
    Block data value: 1 / 0x1 / 0b0001
    Block location: World: (-2,78,51), Chunk: (at 14,4,3 in -1,3; contains blocks -16,0,48 to -1,255,63), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
    Actual block type: ID #796 (tile.null // vswe.production.block.BlockTable)
    Actual block data value: 1 / 0x1 / 0b0001
  Stacktrace:
    at net.minecraft.world.World.func_72939_s(World.java:1888)
    at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:489)
estranged42 commented 10 years ago

Steps to reproduce:

This seems to make the world un-loadable also, as it immediately crashes when trying to re-enter the world.

Vswe commented 10 years ago

I've found the issue, it still thinks it can auto transfer but once it tries to do so it can't find the target slots since the machine was removed. It was an easy fix and it will be released in a bit.