use of net.minecraftforge.fml.common.Mod.EventHandler in project malmo by Microsoft.
the class MalmoMod method init.
@EventHandler
public void init(FMLInitializationEvent event) {
if (event.getSide().isClient()) {
this.client = new MalmoModClient();
this.client.init(event);
}
if (event.getSide().isServer()) {
this.server = new MalmoModServer();
this.server.init(event);
}
}
use of net.minecraftforge.fml.common.Mod.EventHandler in project MinecraftForge by MinecraftForge.
the class WRNormalMod method init.
@EventHandler
public void init(FMLPreInitializationEvent event) {
EntityRegistry.registerModEntity(new ResourceLocation("wrnormal", "scale_test"), EntityScaleTest.class, "scale_test", 0, instance, 60, 3, true);
proxy.registerRenders();
}
use of net.minecraftforge.fml.common.Mod.EventHandler in project MinecraftForge by MinecraftForge.
the class BrewingRecipeRegistryTest method init.
@EventHandler
public void init(FMLInitializationEvent event) {
if (!ENABLE)
return;
// The following adds a recipe that brews a piece of rotten flesh "into" a diamond sword resulting in a diamond hoe
BrewingRecipeRegistry.addRecipe(new ItemStack(Items.DIAMOND_SWORD), new ItemStack(Items.ROTTEN_FLESH), new ItemStack(Items.DIAMOND_HOE));
ItemStack output0 = BrewingRecipeRegistry.getOutput(new ItemStack(Items.DIAMOND_SWORD), new ItemStack(Items.ROTTEN_FLESH));
if (output0.getItem() == Items.DIAMOND_HOE)
System.out.println("Recipe succefully registered and working. Diamond Hoe obtained.");
// Testing if OreDictionary support is working. Register a recipe that brews a gemDiamond into a gold sword resulting in a diamond sword
BrewingRecipeRegistry.addRecipe(new ItemStack(Items.GOLDEN_SWORD), "gemDiamond", new ItemStack(Items.DIAMOND_SWORD));
ItemStack output1 = BrewingRecipeRegistry.getOutput(new ItemStack(Items.GOLDEN_SWORD), new ItemStack(Items.DIAMOND));
if (output1.getItem() == Items.DIAMOND_SWORD)
System.out.println("Recipe succefully registered and working. Diamond Sword obtained.");
// In vanilla, brewing netherwart into a water bottle results in an awkward potion (with metadata 16). The following tests if that still happens
ItemStack output2 = BrewingRecipeRegistry.getOutput(new ItemStack(Items.POTIONITEM, 1, 0), new ItemStack(Items.NETHER_WART));
if (output2 != null && output2.getItem() == Items.POTIONITEM && output2.getItemDamage() == 16)
System.out.println("Vanilla behaviour still in place. Brewed Water Bottle with Nether Wart and got Awkward Potion");
}
use of net.minecraftforge.fml.common.Mod.EventHandler in project Valkyrien-Warfare-Revamped by ValkyrienWarfare.
the class ValkyrienWarfareControlMod method preInit.
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
config = new Configuration(new File(ValkyrienWarfareMod.getWorkingFolder() + "/config/valkyrienwarfarecontrol.cfg"));
config.load();
proxy.preInit(event);
config.save();
registerBlocks(event);
registerItems(event);
registerCapibilities(event);
proxy.preInit(event);
}
use of net.minecraftforge.fml.common.Mod.EventHandler in project Valkyrien-Warfare-Revamped by ValkyrienWarfare.
the class ValkyrienWarfareControlMod method init.
@EventHandler
public void init(FMLInitializationEvent event) {
registerTileEntities(event);
registerRecipies(event);
registerNetworks(event);
NetworkRegistry.INSTANCE.registerGuiHandler(this, new ControlGUIHandler());
proxy.init(event);
}
Aggregations