Daomephsta / LootTweaker

A CraftTweaker addon that adds the ability to tweak loot tables
MIT License
17 stars 2 forks source link

Incompatible with mystcraft #79

Closed Sunconure11 closed 3 years ago

Sunconure11 commented 4 years ago

https://pastebin.com/BT6qBHGx

Tried testing mystcraft against my pack, ran into this.

Daomephsta commented 4 years ago

It's a known issue on Mystcraft's side, #69 was the same issue, though the paste has now expired. The error is deliberate, but it doesn't have to crash Minecraft. I'll see what I can do about that.

xJon commented 4 years ago

I've only ran into this issue since the latest update.

Daomephsta commented 4 years ago

@xJon It's the same root cause. Internal changes in LootTweaker cause it to manifest differently.

TheFloydman commented 4 years ago

Not a Mystcraft dev but am slightly familiar with the source. Could this be fixed on Mystcraft's end by extending LootEntryEmpty, LootEntryItem, or LootEntryTable instead of LootEntry directly?

Daomephsta commented 4 years ago

@TheFloydman Mystcraft's current loot code is frankly a mess, it needs a rewrite. TreasureGenWrapper doesn't do anything. Symbol pages are generated in Mystcraft library chests with another custom subclass of LootEntry, which could have been an item entry with a set_count loot function.

Daomephsta commented 4 years ago

Considering the number of mods with custom loot entry types, I've opted to make LootTweaker handle them as best it can. It's not perfect, but the next version will handle custom loot entry types much better. They won't cause the mutable loot system to crash; and when dumping loot tables, they'll be serialised in a best effort manner.

I've got docs to write for the new features in the next version, so hopefully I can get it out tomorrow.

Daomephsta commented 4 years ago

0.2.0 implements the above behaviour, so the crash will no longer occur. Everything should work as expected now. https://www.curseforge.com/minecraft/mc-mods/loottweaker/files/2988990

I'm keeping this issue open though, as a reminder to work on a guide to doing loot modification in a clean, robust manner.

Daomephsta commented 3 years ago

There's no longer any point to making a guide, as I am unfamiliar with Forge's new loot system, and do not intend to port LootTweaker past 1.12 (CraftTweaker has native support for the new loot system).