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

I have a few questions about recipes, or my options for what I want, and I want to ask them before I start implementing code.

I have a block that holds experience, and there is an input and output. Currently I just have a book that holds experience as an NBT tag.

But in the future I want to fill a bottle with experience for other uses. Right now I look to see if the tag is present and then take the exp from it, but this doesn't work for what I want in the future.

 

Should I make a Recipe type for this block -- but my question here is how can I use the nbt data of the item and output the item with no tag?

 

Sorry if I don't make much sense here. Basically I have an item with nbt data that is drawn out of the item and into the block, but I want to "future-proof" it so I don't have any problems in next time.

  • Author

I was thinking, have the Recipe type and put the recipe for the item as (Item Input) -> (Item Output), and put the timeTaken as some arbitrary number like 0/60. Then when I actually put the item in, it checks if it has the NBT tag and then give it a custom timeTaken based on how full it is. That way a half full item won't take as long as a completely full item. And if the item doesnt have the tag, then it will check if there is a recipe that uses it and it will have the correct timeTaken.

 

I don't know if this is the best way tbh, this is just me thinking based on what I know so far. If anybody has a better way then I'd love to hear it.

Thank you.

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.