Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
loldev69 opened this issue Sep 13, 2023 · 1 comment
Open
Assignees

Comments

@loldev69
Copy link

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 pupnewfster self-assigned this Sep 14, 2023
@pupnewfster
Copy link
Collaborator

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());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants