How to make a mob despawn when the player right clicks it with a bottle?

Started by squib___ on

Topic category: Help with MCreator software

Last seen on 01:33, 14. Mar 2023
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a mob despawn when the player right clicks it with a bottle?

So, I want a mob i'm making to despawn when right clicked with a bottle, but I'm not sure how to do that. Can someone please help?

Last seen on 22:29, 27. Mar 2024
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
are you coding it or using…
Wed, 09/16/2020 - 22:56

are you coding it or using block coding?

Last seen on 22:29, 27. Mar 2024
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if its block coding open…
Wed, 09/16/2020 - 23:00

if its block coding open your entity and go to triggers, the one that says "when right clicked on entity" use if item in main hand is empty bottle do despawn entity/target.

Last seen on 01:33, 14. Mar 2023
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i'm using block coding
Wed, 09/16/2020 - 23:47

i'm using block coding

Last seen on 01:33, 14. Mar 2023
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i can't find "if item in…
Wed, 09/16/2020 - 23:53

i can't find "if item in main hand is" anywhere. are you sure that codeblock exists?

plus, the "when right clicked on entity" doesn't interact with the player at all normally, so it'd check for the item in the entity's hand, not the player's.

Last seen on 22:29, 27. Mar 2024
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
its easy to get in template…
Wed, 09/16/2020 - 23:59

its easy to get in template library there is add potion effect if specific item in hand click it and you get the block, as for the when right click problem you can also check for the entity doing it, its in the entity tape entity is sub type of, and choose player (its near the end) and it should work, as i just tested it for myself (btw i'm running the newest version/ not the newest snapshot)

Last seen on 01:33, 14. Mar 2023
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i can't find a codeblock…
Thu, 09/17/2020 - 00:28

i can't find a codeblock that sets the entity subtype. there's an "Is entity subtype of" codeblock, though

Last seen on 22:29, 27. Mar 2024
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you don't need it in this…
Thu, 09/17/2020 - 00:31

you don't need it in this instance but when you need it open the entity tab on the left, and scroll down near the bottom it should be there third from the bottom of entity procedures 

Last seen on 01:33, 14. Mar 2023
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
wait, nevermind, i know what…
Thu, 09/17/2020 - 00:34

wait, nevermind, i know what you're saying now. i just can't find a way to have both "is entity subtype of" and "Item in main hand of.." blocks

Last seen on 22:29, 27. Mar 2024
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
oh alright anyways i hope i…
Thu, 09/17/2020 - 00:37

oh alright anyways i hope i helped you with your problem