Entity picks up item event set to a specific item only?

Started by Hijitori on

Topic category: Help with Minecraft modding (Java Edition)

Active 1 year ago
Joined Jun 2020
Points:
673

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 16
Entity picks up item event set to a specific item only?

I want my item to play a sound when player picks it up.

I created a Procedure, set Trigger Event to "Entity picks up item" and saved the Procedure in my specific item's "When in inventory tick".

Then when I have the item in my inventory, any item which I pick makes the sound, so I need to specify somehow the item which I want to make the sound. How?

Active 1 year ago
Joined Oct 2020
Points:
1621

User statistics:

  • Modifications: 0
  • Forum topics: 15
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1874
Another idea is to make the…
Mon, 11/23/2020 - 18:19

Another idea is to make the sound play when player has it in inventory. To not make it sound constantly try with the repeat blocks. Hope it helps!

Active 3 years ago
Joined Jun 2020
Points:
649

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 28
Use: if provided itemstack …
Mon, 11/23/2020 - 19:37

Use:

  • if provided itemstack = [custom item]:
    • {play the sound}
Active 1 year ago
Joined Jun 2020
Points:
673

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 16
(No subject)
Mon, 11/23/2020 - 21:12

This error shows up.

Active 1 year ago
Joined Jun 2020
Points:
673

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 16
(No subject)
Mon, 11/23/2020 - 21:14

This error shows up.

Active 1 year ago
Joined Jun 2020
Points:
673

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 16
I think you mean repeating…
Mon, 11/23/2020 - 21:22

I think you mean repeating command block, but I am not sure how can I use that in this way.

Active 1 year ago
Joined Oct 2020
Points:
1621

User statistics:

  • Modifications: 0
  • Forum topics: 15
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1874
I meant this:  
Mon, 11/23/2020 - 21:50

I meant this:

 Procedure

Active 1 year ago
Joined Oct 2020
Points:
1621

User statistics:

  • Modifications: 0
  • Forum topics: 15
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1874
I'm not 100% sure if it will…
Mon, 11/23/2020 - 21:50

I'm not 100% sure if it will work but it should

Active 1 year ago
Joined Oct 2020
Points:
1621

User statistics:

  • Modifications: 0
  • Forum topics: 15
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1874
For me it works, idk abt you
Mon, 11/23/2020 - 21:55

For me it works, idk abt you

Active 1 year ago
Joined Jun 2020
Points:
673

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 16
Unfortunately it still doesn…
Mon, 11/23/2020 - 22:35

Unfortunately it still doesn't work.
I mean with trigger "entity picks up item" - if I have the apple - all items make the sound.
Without trigger "entity picks up item" - if I have the apple - sound spams every tick once again.

Active 1 year ago
Joined Oct 2020
Points:
1621

User statistics:

  • Modifications: 0
  • Forum topics: 15
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1874
I have tried many ways (I…
Mon, 11/23/2020 - 22:44

I have tried many ways (I have spent almost 1 hour) and I don't find a solution. The only way I found is using repeat blocks but if it doesn't work for you then it's not a solution. (While I was writing this came to mind: how about do the same as I putted in the photo but on extra trigger do player tick update. You should try it, maybe it works.)

Active 1 year ago
Joined Jun 2020
Points:
673

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 16
  However my procedure has …
Mon, 11/23/2020 - 22:44

procedure

 

However my procedure has "Has provided entity in inventory" because I couldn't find the "Event/target entity"
I don't know if that's the problem

Active 1 year ago
Joined Jun 2020
Points:
673

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 16
Still doesn't work with…
Mon, 11/23/2020 - 23:02

Still doesn't work with event trigger "On player tick update" and with being in item's "When item in inventory tick".
I hope there is some way to specify only one item event trigger and not all.