LootJS: KubeJS Addon

LootJS: KubeJS Addon

8M Downloads

Cannot invoke "net.minecraft.class_2960.toString()" because "resourceLocation" is null

3dEADto2 opened this issue ยท 1 comments

commented

Version

1.20.1

Crash Report

https://pastebin.com/JcUF9BV4

Log

https://pastebin.com/thPfEPVE

Additional Context

Yes

Modifications

This is my lootjs file: `LootJS.modifiers((event) => {
event
.addLootTableModifier(/^minecraft:chests/.*/)
.removeLoot('minecraft:enchanted_book')
.removeLoot(/minecraft:[a-z_]*helmet/)
.removeLoot(/minecraft:[a-z_]*chestplate/)
.removeLoot(/minecraft:[a-z_]*leggings/)
.removeLoot(/minecraft:[a-z_]*boots/)
.removeLoot(/minecraft:[a-z_]*sword/)
.removeLoot(/minecraft:[a-z_]*axe/)
.removeLoot(/minecraft:[a-z_]*pickaxe/)
.removeLoot(/minecraft:[a-z_]*shovel/)
.removeLoot(/minecraft:[a-z_]hoe/)
.removeLoot(/^(?!minecraft:).
/);

event
.addLootTableModifier('minecraft:gameplay/fishing/treasure')
.removeLoot('minecraft:enchanted_book')
.removeLoot('minecraft:bow');
});`. I hope im right here because there are these lines in my crash report: at com.almostreliable.lootjs.filters.ResourceLocationFilter$ByPattern.test(ResourceLocationFilter.java:20) ~[lootjs-fabric-1.20.1-2.10.1.jar:?]
at com.almostreliable.lootjs.filters.ResourceLocationFilter$ByPattern.test(ResourceLocationFilter.java:17) ~[lootjs-fabric-1.20.1-2.10.1.jar:?]
at com.almostreliable.lootjs.core.LootModificationByTable.shouldExecute(LootModificationByTable.java:21) ~[lootjs-fabric-1.20.1-2.10.1.jar:?]
at com.almostreliable.lootjs.core.AbstractLootModification.applyLootHandler(AbstractLootModification.java:23) ~[lootjs-fabric-1.20.1-2.10.1.jar:?]
at com.almostreliable.lootjs.LootModificationsAPI.invokeActions(LootModificationsAPI.java:62) ~[lootjs-fabric-1.20.1-2.10.1.jar:?]

Did the crash happen in singleplayer or on a server?

Singleplayer

commented

For support please join the discord. .addLootTableModifier(/^minecraft:chests/.*/), your regex is wrong, you have to escape the / correctly. Please use an editor like Visual Studio Code with error highlighting. It tells you whats wrong.