Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

satyreyes

Members
  • Joined

  • Last visited

  1. Thank you very much. There is nothing like seeing a working example! I have it working, and I understand Java better now to boot. (Anyone who stumbles on this thread later: stack.itemID, which is used in the linked example to identify the armor we're looking at, no longer works. We now test this with stack.getItem() == Yourmod.exampleItem.)
  2. I hang my head in shame; in hindsight, yeah, trying to create an ItemStack of the object before the object was initialized was probably not the best idea. But I have no idea what to do instead.
  3. I'm trying to get my armor to render correctly, and I'm running into what's probably a basic problem. The method I'm using to get the texture, which I think is all right, is: public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type){ if(stack.getItem() == Heart.heartstoneChestplate) { return "tutorial:textures/models/armor/heartstone_1.png"; } else return null; } The problem comes when I actually try to call this method, from my main mod file: heartstoneChestplate = new ItemArmor(HEARTSTONE, proxy.addArmor("heartstone"), 1) .getArmorTexture(new ItemStack(this.heartstoneChestplate), null, 1, "heartstone"); ...Which underlines the whole definition in red and invites me to change heartstoneChestplate to a string rather than an item. The problem seems to be tied to the "new ItemStack" part. Am I calling ItemStack incorrectly? Is new the wrong keyword to use here? Thanks for your help!
  4. Thank you, that's the push I needed! I had checked the Referenced Libraries, but most of them didn't look Minecraft-specific. If anyone else has the same trouble, the path in Eclipse is Minecraft/Referenced Libraries/forgeSrc-1.7.2-10.12.0.1024.jar (or the numbering of your build of Forge).
  5. Windows 7, 64-bit. It's my first time modding Minecraft and I'm trying to add some smelting recipes. It's tough to find a tutorial with code that works in the current version of Forge, so I thought I'd go look at the syntax used in net.minecraft.item.crafting.FurnaceRecipes. But I can't find any vanilla Minecraft code in the directory to which I pointed Eclipse: http://i70.photobucket.com/albums/i117/satyreyes/forge-eclipse-structure_zps100a2883.png[/img] All of my import statements are working fine -- but I can't see what I'm importing! Have I installed Forge incorrectly? I acknowledge that I'm new at Java. I hope this isn't a "go learn Java" kind of question, and that someone will be able to answer it in the spirit of helping a man teach himself to fish.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.