Skip to content

NullPointerException on cold start when adding potions to loot tables #29

Description

@GraithTiger

Minecraft Version

Neoforge 1.21.1-21.1.202

Mod Version

1.21.1-3.4.3

Describe the bug!

When adding potions to a mob loot table, KubeJS throws a java.lang.NullPointerException on initial load. Running /reload works fine with no errors.

Minimal code required to trigger the error:

LootJS.lootTables(event => {
    event.getLootTable("minecraft:entities/enderman").firstPool(pool => {
        pool.addEntry(
            LootEntry.of("minecraft:lingering_potion").addPotion("minecraft:mundane")
        );
    });
})

Crash Report

No response

Log

https://gist.github.com/GraithTiger/9f12a7736aa9f1ccc145fc11ee8044be

Additions and Modifications

Yes

Additions and Modifications Description

Mod List: https://gist.github.com/GraithTiger/faeaaa29f42abdd0921ec06e99deee58

Did the issue happen in singleplayer or on a server?

Both

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions