TelepathicGrunt / RepurposedStructures

Reusing and modifying vanilla structures for extra variety!
https://www.curseforge.com/minecraft/mc-mods/repurposed-structures
GNU Lesser General Public License v3.0
164 stars 26 forks source link

Crashes while generating ocean village loot (1.19.2) #259

Closed aria1th closed 1 year ago

aria1th commented 1 year ago

2023-02-14_02 33 03

Version 6.1.4 + 1.19.2

'{LootTable:"repurposed_structures:chests/villages/ocean_house",LootTableSeed:7287416423143193814L}'

This is block NBT of the chest.

I read the json, and this contains suspiscious level:

            {
              "function": "minecraft:enchant_with_levels",
              "levels": {
                "min": -10.0,
                "max": 15.0,
                "type": "minecraft:uniform"
              }
            }

And, I guess level should never be negative.

TelepathicGrunt commented 1 year ago

That json is fine and I opened several of those chests a few days ago and no crash. Please reproduce the crash and then give me the latest.log file. This will say exactly what is crashing and if another mod is involved

aria1th commented 1 year ago

Unfortunately, it crashes silently... and I found that its not this mod's problem, but its related somehow, reproducable with same seed.

I'm currently testing with other mods now.

TelepathicGrunt commented 1 year ago

Hmm. If you can give me the modpack and seed, I’ll test when I am able to. I might be able to find a way to see the root cause through launcher.log or doing debug builds of my mod to capture the errors

aria1th commented 1 year ago

sure, I can throw you both modded launcher, or pack resource itself.

ONLYSERVER noted mods will not allow client mods to boot, so remove them when downloading. SERVER noted mods are not necessary to reproduce the bug. Here is modpack launcher that you can use, which will download everything as launcher (built with SKCraft)

Most of the mods are unmodified, nothing has changed except some json removal.

World seed is 7462186883040536655 and coordinate is specified above.

I'll prefer using this command with carpet enabled (with SERVER fabric carpet)

script run global_nbt = nbt('{LootTable:"repurposed_structures:chests/villages/ocean_house",LootTableSeed:7287416423143193814L}')
script run b = player()~'trace';set(pos(b), 'chest', block_state(b), global_nbt)

This generates chest with specified block nbt and crashes.

aria1th commented 1 year ago

2023-02-14_03 36 53 I'm pretty sure its something related to this...

it takes very long to generate the chest in non-flat world. So its rather something related to feature finding problem?

aria1th commented 1 year ago

I found it, its https://beta.curseforge.com/minecraft/mc-mods/yungs-better-ocean-monuments-fabric Do you know why this happens?

TelepathicGrunt commented 1 year ago

Explorer map in chest tries to locate a structure in one of my structure tag. One of the structures is ocean monument. When the map tries to find said monument: it dies because of this:

https://github.com/YUNG-GANG/YUNGs-Better-Ocean-Monuments/blob/multiloader/1.18/Common/src/main/java/com/yungnickyoung/minecraft/betteroceanmonuments/mixin/LocateVanillaMonumentCommandMixin.java

aria1th commented 1 year ago

I see same thing happening in every his/her mod... for my case, temporary fix is replacing tags/worldgen/structure/explorer_map tags, then find minecraft:monument to replace betteroceanmonuments:ocean_monument

TelepathicGrunt commented 1 year ago

Override this tag file (replace = true) and make it Yung’s ocean monument https://github.com/TelepathicGrunt/RepurposedStructures/blob/1.19.3-Arch/common/src/main/resources/data/repurposed_structures/tags/worldgen/structure/explorer_maps/unknown_ocean_structure_1.json

I should make this tag look for Yung’s monument too so that’s a good reminder for myself. But yung may need to do the crash fix on his side

aria1th commented 1 year ago

Yup, I changed that and also verified if anything leaved after them, seems that was the only issue. Thanks for the help!

TelepathicGrunt commented 1 year ago

Should be fixed by default in v6.3.15