Last active
April 23, 2016 16:23
-
-
Save tinkerstudent/e356453964d7770c4cb9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.tinkeracademy.minecraft; | |
| import net.minecraft.entity.EntityList; | |
| import net.minecraft.init.Items; | |
| import net.minecraft.item.Item; | |
| import net.minecraft.item.ItemStack; | |
| import net.minecraftforge.common.MinecraftForge; | |
| import net.minecraftforge.fml.common.Mod; | |
| import net.minecraftforge.fml.common.Mod.EventHandler; | |
| import net.minecraftforge.fml.common.SidedProxy; | |
| import net.minecraftforge.fml.common.event.FMLInitializationEvent; | |
| import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; | |
| import net.minecraftforge.fml.common.registry.GameRegistry; | |
| @Mod(modid = EntitiesMod.MODID, version = EntitiesMod.VERSION) | |
| public class EntitiesMod { | |
| public static final String MODID = "entitiesmod"; | |
| public static final String VERSION = "1.0"; | |
| @SidedProxy(clientSide = "com.tinkeracademy.minecraft.ClientProxy", serverSide = "com.tinkeracademy.minecraft.CommonProxy") | |
| public static CommonProxy proxy; | |
| public static Item snitchItem; | |
| public static Item catItem; | |
| @EventHandler | |
| public void preInit(FMLPreInitializationEvent event) { | |
| snitchItem = new SnitchItem(); | |
| catItem = new CatItem(); | |
| } | |
| @EventHandler | |
| public void init(FMLInitializationEvent event) { | |
| //TODO: 4 | |
| MinecraftForge.EVENT_BUS.register(new CatEvents()); | |
| GameRegistry.addShapedRecipe(new ItemStack(Items.nether_star, 1), | |
| new Object[]{ "GGG", "GDG", "GGG", 'D', Items.diamond, 'G', Items.gold_ingot }); | |
| proxy.registerRendering(); | |
| EntityList.addMapping(Snitch.class, "Snitch", 102); | |
| EntityList.addMapping(Cat.class, "Cat", 103); | |
| ((CatItem) catItem).init(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment