Posted September 28, 201411 yr 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
September 28, 201411 yr 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!
September 28, 201411 yr 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. Currently updating my Mod to 1.10.2 https://bitbucket.org/hugo_the_dwarf/riseoftristram2016/src?at=master
September 28, 201411 yr 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.