-
Notifications
You must be signed in to change notification settings - Fork 20
/
AntimatterKubeJS.java
41 lines (33 loc) · 1.29 KB
/
AntimatterKubeJS.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package muramasa.antimatter.integration.kubejs;
import dev.latvian.mods.kubejs.KubeJSPlugin;
import dev.latvian.mods.kubejs.recipe.RegisterRecipeHandlersEvent;
import dev.latvian.mods.kubejs.script.BindingsEvent;
import dev.latvian.mods.kubejs.script.ScriptType;
import muramasa.antimatter.Ref;
import muramasa.antimatter.event.MaterialEvent;
import muramasa.antimatter.util.AntimatterPlatformUtils;
import net.minecraft.resources.ResourceLocation;
public class AntimatterKubeJS extends KubeJSPlugin {
@Override
public void initStartup() {
super.initStartup();
if (AntimatterPlatformUtils.INSTANCE.isFabric()) {
KubeJSPlatform.INSTANCE.onRegister();
}
}
@Override
public void addBindings(BindingsEvent event) {
event.add("antimatter", new KubeJSBindings());
}
@Override
public void addRecipes(RegisterRecipeHandlersEvent event) {
event.register(new ResourceLocation(Ref.ID, "machine"), KubeJSRecipe::new);
}
public static void loadStartup(){
AMCreationEvent.init();
new AMCreationEvent().post(ScriptType.STARTUP, "antimatter.creation");
}
public static void loadMaterialEvent(MaterialEvent event){
new AMMaterialEvent(event).post(ScriptType.STARTUP, "antimatter.material_event");
}
}