SHsuperCM / CITResewn

Fabric implementation of mcpatcher's cit
MIT License
165 stars 93 forks source link

Crash started happening only after I added a custom enchant glint #253

Open dbrighthd opened 1 year ago

dbrighthd commented 1 year ago

This is hard to reproduce because it only happens after playing for a couple minutes. Due to it's seemingly random occurrences, I cant definitively blame the enchantment glint but its an educated guess. Here is my file structure: image

And here is my blank.properties:

image

Visually it works fine until the crash. Does it have to do with how I wrote the properties file? or is it a mod incompatibility?

Here are some crash reports: crash-2023-04-10_18.04.00-client.txt crash-2023-04-10_20.52.20-client.txt crash-2023-04-10_20.57.19-client.txt

Traben-0 commented 1 year ago

interesting it doesn't look like it should ever be null here

this is the relevant line https://github.com/SHsuperCM/CITResewn/blob/main/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeEnchantment.java#L219

unilock commented 1 year ago

Try replacing the space between golden_hoe and netherite_hoe with a comma. So: matchItems=golden_hoe,netherite_hoe

dbrighthd commented 1 year ago

image putting a comma gives an error

unilock commented 1 year ago

Try stating the namespace explicitly. matchItems=minecraft:golden_hoe,minecraft:netherite_hoe

dbrighthd commented 1 year ago

as per the screenshot I sent, it doesn't allow for putting commas at all (only certain characters).

my problem isn't with the enchant not working (it works fine with the properties files I posted), it's with the crash

I seem to have found a way to make the game not crash by editing the lines of code in the mod that cause the error to check for null first (thanks traben)

unilock commented 1 year ago

I'm just now checking the documentation, and it looks list entries being separated with a space instead of a comma by CIT Resewn is intentional. Sorry about that :v

Taking a closer look at the crash logs, I think Essential might be the problem, given that one of its mixins is named Mixin_DisableArmorRendering (as per line 51 of "crash-2023-04-10_20.52.20-client.txt"). Armor won't be able to be made to render differently if it isn't rendered at all, I imagine. (I cannot be sure how Essential goes about "disabling armor rendering", as the mod is closed source - but perhaps it's worth looking at nonetheless.)

dbrighthd commented 1 year ago

Interesting theory

I have no idea how mixins work but to test it I played without essential but the crash still persisted

but the idea that an other mod might be influencing it is good to look into, ill try playing with just CITR for a bit to see if it still happens