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 everyone,

I'm writing on my first mod and i want to make smelting recipe that uses a waterbucket.

I want to make salt out of water and my problem is i can't figure out how i can how i can get an empty bucket back when the melting is finished.

I put the waterbucket into the furnace and as soon as the melting is finished i get the salt but the bucket is gone.

I have a crafting recipe and there it works.

 

I hope anybody of you can help me

 

Maybe you can override a little more of the process and just manually add a bucket to the players inventory as a workaround?

I'll need help, and I'll give help. Just ask, you know I will!

that or make your salt have sub items, and one of them is "bucket of salt" which has an onUpdate function that when it's in a player's inventory will turn into salt, and give an empty bucket.

 

So smelt water bucket -> salt bucket -> salt + bucket

 

salt is damage value of 0

salt bucket is damage value of 1

 

onUpdate()

if (itemstack.getitemDamage == 1)

{

consume salt bucket, add salt, and add bucket

}

 

EDIT:

Thinking about it now, no need to consume the salt bucket, just set it's damage to 0, which is salt.

so

if (itemstack.getItemDamage() == 1)

{

itemstack.setitemdamage(0);

player.inventory.addItemStackToInventory(new itemstack(items.bucket));

}

 

that is the rough idea.

 

that or make your salt have sub items, and one of them is "bucket of salt" which has an onUpdate function that when it's in a player's inventory will turn into salt, and give an empty bucket.

 

So smelt water bucket -> salt bucket -> salt + bucket

 

salt is damage value of 0

salt bucket is damage value of 1

 

onUpdate()

if (itemstack.getitemDamage == 1)

{

consume salt bucket, add salt, and add bucket

}

 

This!

I'll need help, and I'll give help. Just ask, you know I will!

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.