Jump to content

Naah

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Naah

  1. In this same vein, seeing some sample/tutorial code specifically pertaining to 1.7.2 would be awesome for us noobs. Although I am slowly patching things together.
  2. I'm *really* new to this, but don't you have to register the same string name through GameRegistry.registerBlock and LanguageRegistry.addName? At least, I'm doing that and I have things showing up in the Creative inventory. It may not actually be required, but couldn't hurt to check right?
  3. EDIT: The tutorial I linked from the wiki was missing a *very* important bit of code! GameRegistry.registerItem(genericItem,"Generic Item"); After adding this for each item, they both show up now. Now I just have to figure out why LanguageRegistry.addName isn't setting the in-game item name properly. /EDIT DISCLAIMER - I am new to Minecraft mod creation, please don't hate me for it. I promise I have coded before(although not in Java), and I am very good at taking a little bit of information a long way. I'm attempting to go off of the tutorial at http://www.minecraftforge.net/wiki/Basic_Items to create an item that I can select in Creative Mode. No grand schemes at the moment, I just want to put an item into the game. My code will compile and run, but the item doesn't show up. I feel like maybe the reason this isn't working is because item IDs have gone out the window - but I haven't yet figured out how to bridge the gap from the old tutorial code to working 1.7.2 code. Is there anyone who would be so kind as to post the basic 1.7.2 code/information needed to create an item? EDIT: Using Forge 10.12.0.997 The tutorial code in the Generic Class (parts relating to items): public class Generic { private static Item genericItem; private static Item genericIngot; @EventHandler public void preInit(FMLPreInitializationEvent event) { genericItem = new GenericItem(5000); genericIngot = new GenericItem(5001) .setMaxStackSize(16).setUnlocalizedName("genericIngot"); } @EventHandler public void load(FMLInitializationEvent event) { LanguageRegistry.addName(genericItem, "Generic Item"); LanguageRegistry.addName(genericIngot, "Generic Ingot"); } But for 1.7.2 itemId isn't a property of items, so I would think simply changing to THIS would work: @EventHandler public void preInit(FMLPreInitializationEvent event) { genericItem = new GenericItem(); genericIngot = new GenericItem().setMaxStackSize(16).setUnlocalizedName("genericIngot"); } But it doesn't seem to.
  4. Hi everybody, I've been using Forge for awhile but am new to the forums. I wanted to share an issue and solution I found after installing the latest Forge for 1.7.2. If clicking "Play" on the launcher ends up not launching the game, and just brings the launcher back up, the issue is most likely lack of a version being properly specified in one of your mods (codechicken core, for instance!) this causes the outdated and incompatible mod to be loaded and crashes MC before you get to see it come up. To identify the mod(s) specifically causing this issue for you, you will need to look at the "Development Console" tab of your Minecraft Launcher and look for lines like this: [WARNING] [ForgeModLoader] The (Insert Mod Info Here) does not have a MCVersion annotation, it may cause issues with this version of Minecraft You will want to move any mods named in these errors to a different folder(I just have a subfolder under Mods) to prevent them from loading and crashing the game. If you get the error from multiple mods, you may want to try adding them back in one at a time and see if any of them will work. Alternatively, if reading an error log isn't your forte, you can move all of your mods to a different folder and try to relaunch MC. If this works, the problem I described above was the one affecting you. I hope this helps! ~Naah EDIT: if your minecraft is installed in the default location, and you paste the following into a command prompt, and press enter, it will rename your "mods" folder to "oldmods" - effectively disabling all of them: ren %appdata%\.minecraft\mods oldmods The mods folder will automatically be recreated when you launch MC - with Forge, at least. I haven't checked to see if Vanilla recreates the folder as well.
×
×
  • Create New...

Important Information

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