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

Posted

Hi. I want to make a crafting recipe that will output a vanilla item with a special name.

 

Like, instead of crafting an item and putting it in an anvil to change its name, I want to make it so its name is a certain thing when I craft it.

 

How would I do that?

I belive you can use normal recipe registry and in place where you create new ItemStack you can call NBT field and set it to other name for item. I'm not sure if that will work for any Item tho. Why not looking into Anvli code where it outputs new item?

1.7.10 is no longer supported by forge, you are on your own.

  • Author

I cant figure out how to reply, so I hope you find this, Ernio.

 

I am super new to modding and have no idea how to call an NBT field or set names or whatever.

 

Plz explain

  • Author

I belive you can use normal recipe registry and in place where you create new ItemStack you can call NBT field and set it to other name for item. I'm not sure if that will work for any Item tho. Why not looking into Anvli code where it outputs new item?

 

Oh here we go now I think im replying to you...

so...how do I look at the anvil code? and how to I do the NBT thing?

You're new to forums in general?

 

Welcome, in any case :)

 

You "reply" to someone simply by posting a reply in the thread you wish to reply in, as you have done now. If you're replying to the entirety of the newest post in the thread, there is no need to "quote" that post, as your reply is implicitly regarded as a reply to either the latest post, the original post, or the topic in general.

 

 

You will find the Anvil code in build/tmp/recompSrc/net/minecraft/block/BlockAnvil.java. As for NBT tags, there are plenty of tutorials on the subject.

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.