Sanguimancy

Sanguimancy

4M Downloads

[1.1.8] Putting strange stuff into the Blood Cleanser breaks the world

Belgabor opened this issue ยท 5 comments

commented

Not knowing what it was for I tried to put a BoP blood bucket into the Blood Cleanser. Server crashed, world is broken (crashes on load). Fortunately it was a creative test world =)

Description: Ticking block entity

java.lang.NullPointerException: Ticking block entity
    at tombenpotter.sanguimancy.recipes.RecipeBloodCleanser.isRecipeValid(RecipeBloodCleanser.java:49)
    at tombenpotter.sanguimancy.tile.TileBloodCleaner.canBloodClean(TileBloodCleaner.java:70)
    at tombenpotter.sanguimancy.tile.TileBloodCleaner.func_145845_h(TileBloodCleaner.java:36)
    at net.minecraft.world.World.func_72939_s(World.java:1939)
    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 tombenpotter.sanguimancy.recipes.RecipeBloodCleanser.isRecipeValid(RecipeBloodCleanser.java:49)
    at tombenpotter.sanguimancy.tile.TileBloodCleaner.canBloodClean(TileBloodCleaner.java:70)
    at tombenpotter.sanguimancy.tile.TileBloodCleaner.func_145845_h(TileBloodCleaner.java:36)

-- Block entity being ticked --
Details:
    Name: TileBloodCleaner // tombenpotter.sanguimancy.tile.TileBloodCleaner
    Block type: ID #1256 (tile.Sanguimancy.lumpCleaner // tombenpotter.sanguimancy.blocks.BlockLumpCleaner)
    Block data value: 2 / 0x2 / 0b0010
    Block location: World: (-498,64,133), Chunk: (at 14,4,5 in -32,8; contains blocks -512,0,128 to -497,255,143), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
    Actual block type: ID #1256 (tile.Sanguimancy.lumpCleaner // tombenpotter.sanguimancy.blocks.BlockLumpCleaner)
    Actual block data value: 2 / 0x2 / 0b0010
Stacktrace:
    at net.minecraft.world.World.func_72939_s(World.java:1939)
    at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:489)

-- Affected level --
Details:
    Level name: Test Flat
    All players: 1 total; [EntityPlayerMP['Belgabor'/661698, l='Test Flat', x=-497.17, y=64.00, z=131.67]]
    Chunk stats: ServerChunkCache: 727 Drop: 0
    Level seed: -779105249273256775
    Level generator: ID 01 - flat, ver 0. Features enabled: false
    Level generator options: 2;7,59x1,3x3,2;1;stronghold,biome_1,village,decoration,dungeon,lake,mineshaft,lava_lake
    Level spawn location: World: (-503,4,132), Chunk: (at 9,0,4 in -32,8; contains blocks -512,0,128 to -497,255,143), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
    Level time: 117436 game time, 463386 day time
    Level dimension: 0
    Level storage version: 0x04ABD - Anvil
    Level weather: Rain time: 105809 (now: false), thunder time: 76714 (now: false)
    Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true
Stacktrace:
    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)
commented

Did you try this with the 1.1.9Pre versions available on the Jenkins?

commented

Yes, I tried build 20, same issue.

commented
    public static boolean isRecipeValid(ItemStack input) {
        RecipeBloodCleanser recipe = getRecipe(input);
        if (recipe.fInput.isItemEqual(input) && recipe.fOutput != null && recipe.fInput.stackTagCompound.equals(input.stackTagCompound)) {
            return true;
        }
        return false;
    }

If there is no recipe for an item, recipe is null and the first condition NPEs.

commented

Could you try build 21 once it finishes?

commented

Yep, fixes it, thanks =)