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

How to set all less than 1 emc items to 1 #2355

Open
boiii12345 opened this issue Aug 11, 2024 · 0 comments
Open

How to set all less than 1 emc items to 1 #2355

boiii12345 opened this issue Aug 11, 2024 · 0 comments

Comments

@boiii12345
Copy link

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

ProjectE-1.18.2-PE1.0.1

Forge-40.2.21

I want to set all things with less than 1 emc(like glass pane)to 1. I realize this could cheese it but its a singleplayer world and I just want to. Anyway I was looking at the mod(listed at top) and (unzipped) atC:\Users\Charlie\Downloads\ProjectE-1.18.2-PE1.0.1\moze_intel\projecte\integration\crafttweaker\CrTCustomConversion.class it has the code.

public class CrTCustomEMC {
private CrTCustomEMC() {
}

@method
public static void setEMCValue(NormalizedSimpleStack stack, long emc) {
if (emc < 0L) {
throw new IllegalArgumentException("EMC cannot be set to a negative number. Was set to: " + emc);
} else {
CraftTweakerAPI.apply(new CustomEMCAction(stack, emc));
}
}

@method
public static void removeEMCValue(NormalizedSimpleStack stack) {
CraftTweakerAPI.apply(new CustomEMCAction(stack, 0L));
}
}

it looks like if I knew how to code i could for if emc is less than zero set to 1 but i dont know how to do that. If this is not how to do it than you can correct me i dont really know what I am doing. Also if this is already solved if there is link to that, that would work cause i cant find it.
Ps file posted is the .class file changed to .java by https://www.decompiler.com then changed by me to .txt
CrTCustomEMC.txt

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

No branches or pull requests

1 participant