Started by
Bob the legend_
on
Topic category: Troubleshooting, bugs, and solutions
I am trying to make an item that when right clicked on entity position detects if that entity is a creeper and if it is it kills it. When I rick click a creeper it names the player the ther targer entity. how do I change this? (the player holds this item and right clicks an entity for the procedure to run.)
Edited by Bob the legend_ on Sat, 08/26/2023 - 01:56
As you said it doesn't work properly, can you show us what you've gotten yet?
if event/target entity tagged in entity tags as minecraft:creeper
do: deal 1000 damage to event/target entity type: generic
When i use the item it damages me rather then the creeper I used it on.
use the global trigger on rightclick one entity. Then this should work:
if item in main hand of source entity = itemname
do: if event/target entity tagged in entity tags as minecraft:creeper
do: deal 1000 damage to event/target entity type: generic
rightclick on entity*
thank you so much!
were do i find the "if main hand of source entity = itemname" and "if event/target entity tagged in entity tags as minecraft:creeper
do: deal 1000 damage to event/target entity type: generic"
in the entity data section theres a block "item in main hand of (event/target entity)". Then replace the event/target entity with source entity which is located in minecraft components.
For event/target tagged in entity tag:
not really needed. Can be replaced with the logic procedure "is (event/target entity) sub type of (entity name)"
source entity is the entity that did the action. In this case its the player that rightclicked on the creeper
when I try to detect if I right clicked a creeper I used the " is event/target entity tagged in entity tags as minecraft:creeper " When I right click a creeper it doesn't detect the creeper and says I did not right click a creeper, what is the problem?
I use a flow control block
if
do
else
not all mobs are in entity tags. In the logic procedure section theres the "is event/target entity sub type of (entity name)" which should work
I will try, thank you
Oh it got solved good