add safeguard to loading power event
All checks were successful
/ Auto-Build-App (push) Successful in 1m7s

This commit is contained in:
pietru 2024-07-21 15:57:25 +02:00
parent 6ef46acfe7
commit 10a62fc43c
2 changed files with 11 additions and 2 deletions

View file

@ -4,7 +4,7 @@ org.gradle.parallel=true
org.gradle.caching=false org.gradle.caching=false
# Project Info # Project Info
version=1.6 version=1.6.1
group=net.pietru group=net.pietru
id=omni_power id=omni_power

View file

@ -21,10 +21,19 @@ public class OmniPower implements ModInitializer {
//if (QuiltLoader.isModLoaded("becraft")) //if (QuiltLoader.isModLoaded("becraft"))
block_entities=true; block_entities=true;
System.out.println("OmniPower Mod Initialized!"); System.out.println("OmniPower Mod Initialized!");
BlockEvents.registerBlockEventAction(Power.class); load_power_event();
for (String block:blocks) { for (String block:blocks) {
Block.getInstance(block); Block.getInstance(block);
} }
} }
public void load_power_event(){
try {
BlockEvents.registerBlockEventAction(Power.class);
} catch (Exception e){
System.out.println(e);
System.out.println("If msg above says something Duplicate block event action key it might be intended behaviour...");
}
}
} }