#how fix this command isntn wor with item

1 messages ยท Page 1 of 1 (latest)

hazy marlin
#

How

#

I want just work wit lure itemized

rugged basin
#

[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.

hazy marlin
#

@rugged basin

#

Sorry for ping

hazy marlin
#

Chain comman

#

But how add hsitem and what lin in add

rugged basin
#

/execute as @a[tag=Police,hasitem={item=fishing_rod,location=slot.weapon.mainhand}] at @s run tp @e[r=3,tag=!Police] ^^^1

hazy marlin
#

Agg ok wait me lem try

rugged basin
#

i didn't test it yet

hazy marlin
#

Ok wait bro

#

Pls

#

Pl

rugged basin
#

Try using it

hazy marlin
#

@rugged basin thx br very thx

rugged basin
#

๐Ÿ‘

hazy marlin
#

Bro sorry I have 1 quest for another command u have time

rugged basin
hazy marlin
rugged basin
#

spill it

hazy marlin
#

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

rugged basin
#

what exactly do you mean by: "hit entity with item coming inventory"?

hazy marlin
#

Now u hit snowgolem with item like fishing rod and with your hit thei entity com to your inventory

rugged basin
#

What do you want the snow golem to drop? (Item send to the inventory)

#

Like their loottable when they die?

hazy marlin
#

Yes with hit snowgolem die and item com to your inventory or drop

rugged basin
#

"Entity drop immediately enter the player inventory"

hazy marlin
#

Yes like this

rugged basin
#

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.

hazy marlin
#

Hmmm

rugged basin
#

If you want the javascript answer I could provide you with one... but it would not be the best...

hazy marlin
#

Just kill entity with one hit but with item and drok item how did this

hazy marlin
rugged basin
#

[ 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

hazy marlin
#

What about coding use

#

Command block bad for this work

#

๐Ÿ™‚@rugged basin

rugged basin
#
  1. subscribe to entityHurt event
  2. test if the hurtEntity is a snow golem, test if the damage source is the player
  3. 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 )

hazy marlin
#

Hmmm

#

Ok bro thx