Started by
HanBran8
on
Topic category: General Minecraft forum
Why isn't my procedure working? I want to have it that whenever you right click my custom mob with a glass bottle, it fills the bottle with juice. In game, whenever I right click it, it just plays the "use" animation of your main hand.
The image link is broken, you need to make sure you upload it somewhere else on the internet, (like Mediafire, or Imgur), and then copy the url.
That being said, this procedure shouldn't be too tricky. Make sure you're using the global trigger 'player right clicks entity,' checking for that the event/target entity, (the one being clicked on), is your custom entity, and the item in the main hand of the source entity, (the player doing the clicking), is a glass bottle. If it is, shrink the item in the main hand of the event/target entity for one, and set one of your juice bottles in the player's inventory.
The 'item in main-hand of (entity)', 'shrink (item),' and 'Set (number) (item) in inventory of (entity)' functions should all be helpful. You need to make sure you're correctly referencing the item in the main hand of the correct entity, and that you add the item to the player's inventory instead of the main hand. (Empty glass bottles can stack to 16, so you can't just change the item in the main hand.)