Help replicating bucket crafting functionality

Started by deeptwisty on

Topic category: Help with MCreator software

Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help replicating bucket crafting functionality

I'm trying to recreate the behavior of buckets in crafting, i.e. when you use a bucket in a crafting recipe you get the empty bucket back. Is there a way to do this?

Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Nevermind, I figured out you…
Tue, 12/24/2019 - 07:23

Nevermind, I figured out you can do it by setting up a custom item meant to look like the item being crafted and setting this procedure (replace the bottle with whatever item you want to give bucket behavior to) to trigger when the item is crafted: [Procedure that does nothing but add 1 glass bottle to the player's inventory]

and a second procedure (replace the first dirt block with an item meant to look like the item you want crafted, and the second with the actual item) to trigger every tick when the item is in a player's inventory:

[Procedure that checks if the provided item is an item meant to look like a dirt block, and if so gives the player a dirt block, and afterwards removes the provided item from the player's inventory]

and setting the recipe for the item to create the fake item that instantly replaces itself instead.

Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Addendum: I would use the …
Tue, 12/24/2019 - 07:25

Addendum: I would use the "when crafted" feature on the desired item in the first place, but I needed a way to do this with vanilla items. If anyone has a more elegant solution than this I would love to hear it.