sinkillerj / ProjectE

ProjectE. A complete rewrite of EE2 for modern Minecraft versions.
MIT License
406 stars 206 forks source link

CraftTweaker integration WorldTransmutation.remove() is non-functional #2300

Open loldev69 opened 1 year ago

loldev69 commented 1 year ago

Tickets that do not conform to this template will be closed without comment

Exact ProjectE version (do not say "latest", "latest on Curse", or similar): 1.18.2-PE1.0.1

Exact Forge version: tested on 40.2.0 and 40.2.10

Steps to reproduce: install crafttweaker and run the following script import crafttweaker.api.block.Block; import mods.projecte.WorldTransmutation; WorldTransmutation.remove(<block:minecraft:gravel>.getDefaultState(), <block:minecraft:sandstone>.getDefaultState());

What I expected to happen: the world transmutation from gravel to sandstone was removed

What happened instead: the world transmutation from gravel to standstone was not removed, no error was logged and it seems that the script had no effect

Additional notes: the other two WorldTransmutation functions seem to be working correctly, the following script does in fact remove all transmutations then adds back the gravel to sandstone transmutation. import crafttweaker.api.block.Block; import mods.projecte.WorldTransmutation; WorldTransmutation.removeAll(); WorldTransmutation.add(<block:minecraft:gravel>.getDefaultState(), <block:minecraft:sandstone>.getDefaultState());

pupnewfster commented 1 year ago

I see what is wrong and will fix it, a workaround for this should be to pass the state twice:

WorldTransmutation.remove(<block:minecraft:gravel>.getDefaultState(), <block:minecraft:sandstone>.getDefaultState(), <block:minecraft:sandstone>.getDefaultState());