#how fix this command isntn wor with item
1 messages ยท Page 1 of 1 (latest)
[Fix] Make the chain command block conditional
Suggestion
You can just use the hasitem={} in the selector instead. Using Enchant to detect if a player is holding something isn't a great way of doing it, especially in a multiplayer environment.
Ok but add where has item what line
@rugged basin
Sorry for ping
I did this but isn't working
Chain comman
But how add hsitem and what lin in add
/execute as @a[tag=Police,hasitem={item=fishing_rod,location=slot.weapon.mainhand}] at @s run tp @e[r=3,tag=!Police] ^^^1
Agg ok wait me lem try
i didn't test it yet
Try using it
๐
Bro sorry I have 1 quest for another command u have time
Adding the enchant "Lure" is kinda unnecessary, it instantly checks if the player holding a fishing rod
Ok
.@rugged basin
spill it
This server roleplay is mine I want add garage pickup with item and hit entity with item coming inventory
This my quest I hope give me answer
what exactly do you mean by: "hit entity with item coming inventory"?
Now u hit snowgolem with item like fishing rod and with your hit thei entity com to your inventory

What do you want the snow golem to drop? (Item send to the inventory)
Like their loottable when they die?
Yes with hit snowgolem die and item com to your inventory or drop
"Entity drop immediately enter the player inventory"
Yes like this
Well uh, not sure... I started JavaScript a few weeks ago...
With a command block, you can /tp the nearest item entity to the player.
Hmmm
If you want the javascript answer I could provide you with one... but it would not be the best...
Just kill entity with one hit but with item and drok item how did this
No jav I think this command block use
[ Command Block ]
You can give yourself strength with an amplifier of 100 ( For 1 hitting the entity )
and teleport the item dropped to the player
- subscribe to entityHurt event
- test if the hurtEntity is a snow golem, test if the damage source is the player
- check if the player holding a fishing rod
( This is the part that I'm not sure this correct )
4. kill the entityHurt
5. give the player an Item ( this can be done with ItemStack or commands )