Jump to content

GreenSheep123

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by GreenSheep123

  1. MinecraftXXL.java (The Mod Class) package com.greensheep.mod; import com.greensheep.mod.init.ModItems; import com.greensheep.mod.proxy.CommonProxy; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @Mod(modid = Reference.MOD_ID, name = Reference.NAME, version = Reference.VERSION, acceptedMinecraftVersions = Reference.ACCEPTED_VERSIONS) public class MinecraftXXL { @Instance public static MinecraftXXL myInstance; @SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS) public static CommonProxy myProxy; @EventHandler public static void preInit(FMLPreInitializationEvent event) { ModItems.init(); ModItems.register(); } @EventHandler public static void Init(FMLInitializationEvent event) { myProxy.init(); } @EventHandler public static void postInit(FMLPostInitializationEvent event) { } } Reference.java (Where I'm keeping some important variables) package com.greensheep.mod; public class Reference { public static final String MOD_ID = "mcxxl"; public static final String NAME = "Minecraft XXL"; public static final String VERSION = "1.0"; public static final String ACCEPTED_VERSIONS = "(1.11.2)"; public static final String CLIENT_PROXY_CLASS = "com.greensheep.mod.proxy.ClientProxy"; public static final String SERVER_PROXY_CLASS = "com.greensheep.mod.proxy.ServerProxy"; public static enum TheItems{ LAVA_INGOT("lavaIngot","LavaIngot"); private String unLocalizedName, registryName; TheItems(String unLocalizedName, String registryName) { this.unLocalizedName = unLocalizedName; this.registryName = registryName; } public String getUnLocalizedName() { return unLocalizedName; } public String getRegistryName() { return registryName; } } } ModItems.java package com.greensheep.mod.init; import com.greensheep.mod.Reference; import com.greensheep.mod.items.LavaIngot; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraftforge.fml.common.registry.GameRegistry; public class ModItems { public static Item lavaIngot; public static void init() { lavaIngot = new LavaIngot(); } public static void register() { GameRegistry.register(lavaIngot); } public static void registerRenders() { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register (lavaIngot, 0, new ModelResourceLocation (Reference.MOD_ID + ":" + lavaIngot.getUnlocalizedName().substring(5), "inventory")); } } LavaIngot.java (My very creative item) package com.greensheep.mod.items; import com.greensheep.mod.Reference; import net.minecraft.item.Item; public class LavaIngot extends Item{ public LavaIngot() { setUnlocalizedName(Reference.TheItems.LAVA_INGOT.getUnLocalizedName()); setRegistryName(Reference.TheItems.LAVA_INGOT.getRegistryName()); } } I'm assuming you don't need the proxies
  2. AnimeFan8888, I'm following a tutorial which uses the default forge template project as the actual mod project. And all of my code is in the src/main/java area, if that helps.
  3. I've started modding and have created my very first item today. I wanted to test this item. However, when I loaded up the Forge Client run configuration it came up with only 4 mods, why didn't it come up with 5, the 5th mod being my mod? I'm getting no errors from eclipse whatsoever and my code is all fine, but why doesn't my mod or the item show up? Please help, I have such a long way to go and I don't want to be stopped on day one. Thank you
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.