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.

Featured Replies

  • Author

do I just put it in the crafting recipe code, or do I define it in a public static ?

public static ModItems.Riptide(OreDicitionary.WILDCARD_VALUE); I get an error to create a new class im still learning how to do this stuff.

Im serious don't look at it!!

  • Author

GameRegistry.addShapelessRecipe(new ItemStack(ModItems.Riptide), new ItemStack(ModItems.Riptide = OreDicitionary.WILDCARD_VALUE), new ItemStack(ModItems.anklamolses));

 

this is my recipe that I added your string to earlier, is this how I should do it ? Im guessing not because I gt an error saying that OreDicitionary is not resolved as a variable. what should I do?

Im serious don't look at it!!

new ItemStack(ModItems.Riptide = OreDicitionary.WILDCARD_VALUE)

You have no idea WTF you're doing, do you.

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.

I get the sense that you're getting into modding in order to learn how to code, and I think that's wonderful, but the forums here are very much not a Java school so I suggest you look elsewhere for those kinds of tips.

 

To answer your question by adding to what's already been said: there is a way to define an ItemStack to have a particular item, a particular size, and a particular metadata value. If you set the metadata value of an ItemStack to OreDictionary.WILDCARD_VALUE (which is actually equal to INT_MAX, behind the scenes), the ItemStack when used to define a recipe will produce a recipe ignore the damage value of the item.

 

ItemStack someItemStack = new ItemStack(yourItem, quantity, metadata)

 

Except the above code isn't copy-paste ready: you will want to pass the OreDictionary.WILDCARD_VALUE as the metadata of the item.

Boonie, just as a tip for you to learn: I enjoyed ScratchForFun and MrCrayFishs' tutorials on forge modding to help me understand programming and mod making better. I'm sure they could teach you some things to help you on your journey. :P

I am not a cat. I know my profile picture is sexy and amazing beyond anything you could imagine but my cat like features only persist in my fierce eyes. I might be a cat.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

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.