LootJS: KubeJS Addon

LootJS: KubeJS Addon

8M Downloads

Crash when using vitalize mod

genesy opened this issue · 7 comments

commented

Version

2.7.7

Describe the bug!

[22.12 12:34:17] [Server] [Server thread/ERROR] [minecraft/MinecraftServer]: Encountered an unexpected exception
[22.12 12:34:17] [Server] net.minecraft.ReportedExceptionTicking block entity
[22.12 12:34:17] [Server] 	at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:870) ~[server-1.19.2-20220805.130853-srg.jar%23463!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:epic_rei_lmao:B,pl:accesstransformer:B,re:classloading,pl:epic_rei_lmao:B,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:structure_gel.mixins.json:MinecraftServerMixin,pl:mixin:APP:fastload.mixins.json:MinecraftServerMixin,pl:mixin:A}
[22.12 12:34:17] [Server] 	at net.minecraft.server.dedicated.DedicatedServer.m_5703_(DedicatedServer.java:292) ~[server-1.19.2-20220805.130853-srg.jar%23463!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:epic_rei_lmao:B,pl:accesstransformer:B,re:classloading,pl:epic_rei_lmao:B,pl:accesstransformer:B,pl:mixin:APP:blueprint.mixins.json:DedicatedServerMixin,pl:mixin:APP:nochatreports.mixins.json:server.MixinDedicatedServer,pl:mixin:A}
[22.12 12:34:17] [Server] 	at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:806) ~[server-1.19.2-20220805.130853-srg.jar%23463!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:epic_rei_lmao:B,pl:accesstransformer:B,re:classloading,pl:epic_rei_lmao:B,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:structure_gel.mixins.json:MinecraftServerMixin,pl:mixin:APP:fastload.mixins.json:MinecraftServerMixin,pl:mixin:A}
[22.12 12:34:17] [Server] 	at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:654) ~[server-1.19.2-20220805.130853-srg.jar%23463!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:epic_rei_lmao:B,pl:accesstransformer:B,re:classloading,pl:epic_rei_lmao:B,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:structure_gel.mixins.json:MinecraftServerMixin,pl:mixin:APP:fastload.mixins.json:MinecraftServerMixin,pl:mixin:A}
[22.12 12:34:17] [Server] 	at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:244) ~[server-1.19.2-20220805.130853-srg.jar%23463!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:epic_rei_lmao:B,pl:accesstransformer:B,re:classloading,pl:epic_rei_lmao:B,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:structure_gel.mixins.json:MinecraftServerMixin,pl:mixin:APP:fastload.mixins.json:MinecraftServerMixin,pl:mixin:A}
[22.12 12:34:17] [Server] 	at java.lang.Thread.run(Thread.java:833) [?:?] {re:mixin}
[22.12 12:34:17] [Server] Caused byjava.lang.IllegalStateException: Something went wrong - LootContext has no data. Please report this for the mod LootJS
[22.12 12:34:17] [Server] 	at net.minecraftforge.common.ForgeHooks.handler$zjp000$invokeActions(ForgeHooks.java:1749) ~[forge-1.19.2-43.1.65-universal.jar%23468!/:?] {re:mixin,re:classloading,pl:epic_rei_lmao:B,pl:mixin:APP:lootjs-forge.mixins.json:ForgeHooksMixin,pl:mixin:A}
[22.12 12:34:17] [Server] 	at net.minecraftforge.common.ForgeHooks.modifyLoot(ForgeHooks.java:1322) ~[forge-1.19.2-43.1.65-universal.jar%23468!/:?] {re:mixin,re:classloading,pl:epic_rei_lmao:B,pl:mixin:APP:lootjs-forge.mixins.json:ForgeHooksMixin,pl:mixin:A}
[22.12 12:34:17] [Server] 	at net.minecraft.world.level.storage.loot.LootTable.m_230922_(LootTable.java:90) ~[server-1.19.2-20220805.130853-srg.jar%23463!/:?] {re:mixin,re:classloading,pl:epic_rei_lmao:B,pl:mixin:A}
[22.12 12:34:17] [Server] 	at earth.terrarium.vitalize.api.LootTableUtils.getLootTable(LootTableUtils.java:22) ~[vitalize-forge-1.19.2-1.1.1.jar%23454!/:?] {re:classloading,pl:epic_rei_lmao:B}
[22.12 12:34:17] [Server] 	at earth.terrarium.vitalize.blocks.SoulRevitalizerBlockEntity.tick(SoulRevitalizerBlockEntity.java:157) ~[vitalize-forge-1.19.2-1.1.1.jar%23454!/:?] {re:classloading,pl:epic_rei_lmao:B}
[22.12 12:34:17] [Server] 	at net.minecraft.world.level.chunk.LevelChunk$BoundTickingBlockEntity.m_142224_(LevelChunk.java:687) ~[server-1.19.2-20220805.130853-srg.jar%23463!/:?] {re:classloading,pl:epic_rei_lmao:B}
[22.12 12:34:17] [Server] 	at net.minecraft.world.level.chunk.LevelChunk$RebindableTickingBlockEntityWrapper.m_142224_(LevelChunk.java:780) ~[server-1.19.2-20220805.130853-srg.jar%23463!/:?] {re:classloading,pl:epic_rei_lmao:B}
[22.12 12:34:17] [Server] 	at net.minecraft.world.level.Level.m_46463_(Level.java:446) ~[server-1.19.2-20220805.130853-srg.jar%23463!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:epic_rei_lmao:B,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:LevelMixin,pl:mixin:APP:antixray.mixins.json:LevelMixin,pl:mixin:APP:itshallnottick.mixins.json:EntityTickMixin,pl:mixin:APP:brazier-common.mixins.json:WorldMixin,pl:mixin:APP:lootr.mixins.json:MixinLevel,pl:mixin:A}
[22.12 12:34:17] [Server] 	at net.minecraft.server.level.ServerLevel.m_8793_(ServerLevel.java:331) ~[server-1.19.2-20220805.130853-srg.jar%23463!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:epic_rei_lmao:B,pl:accesstransformer:B,pl:mixin:APP:performant.mixins.json:world.ServerWorldBlockUpdateMixin,pl:mixin:APP:kubejs-common.mixins.json:ServerLevelMixin,pl:mixin:APP:antixray.mixins.json:ServerLevelMixin,pl:mixin:APP:supplementaries-common.mixins.json:ServerLevelMixin,pl:mixin:APP:examplemod-common.mixins.json:ServerWorldMixin,pl:mixin:APP:pluto.mixins.json:server.fastchunkentityaccess.ServerWorldMixin,pl:mixin:APP:blueprint.mixins.json:ServerLevelMixin,pl:mixin:APP:rottencreatures-common.mixins.json:common.ServerLevelMixin,pl:mixin:APP:performant.mixins.json:world.ServerWorldEntityDistMixin,pl:mixin:APP:performant.mixins.json:world.ServerWorldMixin,pl:mixin:APP:vanishmod.mixins.json:sound.MixinServerLevel,pl:mixin:APP:create.mixins.json:accessor.ServerLevelAccessor,pl:mixin:A}
[22.12 12:34:17] [Server] 	at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:866) ~[server-1.19.2-20220805.130853-srg.jar%23463!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:epic_rei_lmao:B,pl:accesstransformer:B,re:classloading,pl:epic_rei_lmao:B,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:structure_gel.mixins.json:MinecraftServerMixin,pl:mixin:APP:fastload.mixins.json:MinecraftServerMixin,pl:mixin:A}
[22.12 12:34:17] [Server] 	... more

Crash Report

No response

Log

No response

Additional Context

Yes

Modifications

vitalize mod conflict

Did the issue happen in singleplayer or on a server?

Server

commented

Is it safe to suppress the warning, if I'm not using LootJS to modify any of the affected loot tables? I'm not using Vitalize, but something else is erroring a lot, clogging up the logs with "Loot table id is null, something went wrong.".

commented

Is it safe to suppress the warning, if I'm not using LootJS to modify any of the affected loot tables? I'm not using Vitalize, but something else is erroring a lot, clogging up the logs with "Loot table id is null, something went wrong.".

mmh, I had some report with an crash about that but never manage to find why it happens. So I logged it instead of crashing. But can you give me a list of mods you put together that this logs a lot? If you can minimize it it would be cool.

commented

Fixed in the newest version. It will no longer crash but loot by vitalize is not supported.

commented

The Vitalize Mod does not use the default way of creating a loot context. I will add a check in LootJS for this, but with this LootJS will not be able to modify loot created by vitalize.

commented

Here's the full log, with the list of mods, from an instance where the log spam happened: https://gist.github.com/SplendidAlakey/5f392b4fae4df4b04f07af15c45a152f. It's on Quilt, but I'm gonna see if it also happens on Fabric and try to narrow down the mods. The only script I have, that utilizes LootJS is the following (remove a horn drop from a ravager, added by It Takes A Pillage):

// priority: 8

LootJS.modifiers((event) => {
	event
		.addEntityLootModifier("minecraft:ravager")
		.removeLoot("takesapillage:ravager_horn");
});
Gist
LootJS: log clutter. GitHub Gist: instantly share code, notes, and snippets.
commented

Narrowed it down to YUNG'S mods. The issue happens only on Quilt. Note, that I've never crashed with this set of mods before and the log spam only appeared after the recent LootJS update.

I replaced my previous logs with the new ones: https://gist.github.com/SplendidAlakey/5f392b4fae4df4b04f07af15c45a152f#file-latest_quilt-log

Fabric log with the same set of mods, for comparison: https://gist.github.com/SplendidAlakey/5f392b4fae4df4b04f07af15c45a152f#file-latest_fabric-log

Gist
LootJS: log clutter on Quilt with the latest version - latest_fabric.log
Gist
LootJS: log clutter on Quilt with the latest version - latest_fabric.log
commented

You never run into a crash probably because you don't have a event.addLootTableModifier("foo_example_bla"). This should crash.

If the log only appears on quilt then my fabric mixin probably does not hit correctly. I will try to maybe find another point where I can inject stuff which also covers quilt and remove the warning until I find a better way. If I can't really move my mixin I will not cover quilt for now.