Posted February 28, 20178 yr 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
February 28, 20178 yr then post your mod class please. also check if your project setup is correct. catch(Exception e) { } Yay, Pokémon exception handling, gotta catch 'em all (and then do nothing with 'em).
February 28, 20178 yr You need to edit the run configurations and go into the classpath and add your project, or you have put your mod in the improper place in the forge project so it is not loaded. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
February 28, 20178 yr Author 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.
February 28, 20178 yr 19 minutes ago, MCenderdragon said: post your mod class please. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
February 28, 20178 yr Author 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
February 28, 20178 yr Does it work if you remove the "acceptedMinecraftVersion" part from the annotation from your main class ? catch(Exception e) { } Yay, Pokémon exception handling, gotta catch 'em all (and then do nothing with 'em).
February 28, 20178 yr Your registry naming is twisted. The new get and set methods are supposed to eliminate that need for substring(5). Read prior threads on that topic and then refactor. With a new installation, your run config will need some parameters / switches. Google each of the run config tabs in the context of Minecraft + Forge + Eclipse to see prior discussions / tutorials. The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.