MinecraftScripterAI
Discord ↗
Link Copied to Clipboard
×
"create a mod"
/* First, create a main mod class with the @Mod annotation */ @Mod("scripterai_mod") public class ScripterAIMod { /* Create a static instance of the mod */ public static final String MOD_ID = "scripterai_mod"; public static final ScripterAIMod INSTANCE = new ScripterAIMod(); /* Register the mod event bus */ public ScripterAIMod() { final IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus(); /* Register custom blocks, items, and other mod elements */ BlockInit.BLOCKS.register(modEventBus); ItemInit.ITEMS.register(modEventBus); /* Register mod setup events */ modEventBus.addListener(this::setup); modEventBus.addListener(this::clientSetup); } /* Mod setup method */ private void setup(final FMLCommonSetupEvent event) { /* Add mod setup code here */ } /* Client-side mod setup method */ private void clientSetup(final FMLClientSetupEvent event) { /* Add client-side mod setup code here */ } }