Project-RT / RandomTweaker

Provides many more mods support and great features for CraftTweaker.
https://www.curseforge.com/minecraft/mc-mods/randomtweaker
MIT License
21 stars 8 forks source link

`IBook.changeMaterialItem` not working #66

Closed Krutoy242 closed 7 months ago

Krutoy242 commented 1 year ago

I used mods.randomtweaker.tconstruct.IBook.changeMaterialItem('xu_magical_wood', <extrautils2:decorativesolidwood:1>); to change item representation in book. This what i see in logs:

[INITIALIZATION][CLIENT][INFO] [crafttweaker | SIDE_CLIENT]: Loading Script: {[0:crafttweaker]: mods\randomtweaker.zs}
[INITIALIZATION][CLIENT][INFO] Changing material fusewood to item <botania:shimmerwoodplanks>
[INITIALIZATION][CLIENT][INFO] Changing material xu_magical_wood to item <extrautils2:decorativesolidwood:1>

This what i see in book. Its didn't changed =(

image

ikexing-cn commented 1 year ago

The implementation within the IAction ofchangeMaterialItem method only checks for the existence of a key related to the material in the HashMap.

If no duplicates are found, it logs a success message.

But it doesn't verify the legitimacy of the material itself. So, I think you need to manually ensure that the string you input is a valid material.

Krutoy242 commented 1 year ago

I checked - Shard of this material have xu_magical_wood in its NBT tag. Also, xu_magical_wood key is used in my other tweak mods like TweakerConstruct. Also, i tried this tweak with another material fusewood and its not working too.

There is debug.log file and its have this line:

[Client thread/INFO] [toolprogression]: TiC Material registered: xu_magical_wood

debug.log

ikexing-cn commented 1 year ago

image

hmmm, it works in my tests, I believe it could be an issue related to compatibility with other expansion mods for TC. It's quite challenging to debug. Using the latest built mod, after the game has started, you can search for the ASMDebug.class file in the .minecraft directory and then upload it. Additionally, I would need thelatest.logfile to help me understand what's happening.

RandomTweaker-latest.debug.zip

Krutoy242 commented 1 year ago

Thank you! I will try this later.

Krutoy242 commented 1 year ago

There you go!

ASMDebug.zip

debug.log

ikexing-cn commented 1 year ago

All of these are expected result, sorry I couldn't offer any more help.

Krutoy242 commented 1 year ago

I will try to find other mod that incompatible then.

ikexing-cn commented 7 months ago

Fixed, #1397ec6