How to make music discs (or any other item) drop through entity interaction (2022.2)

Started by Funni_aka_artman on

Topic category: User side tutorials

Last seen on 02:32, 17. Jun 2023
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make music discs (or any other item) drop through entity interaction (2022.2)

I made this account specifically to post this, but just now I discovered that you can make music discs drop from entity reaction using the visual code. I (personally) made it so when a skeleton shoots a drowned to death, the disc for C418 - Shuniji disc pops up, and I thought I'd share my visual code for it for other people to copy.

Anything in the 'do' section can be changed to your liking, by the way. I'll do my best with my limited knowledge of the visual coding to explain how this works.

But as far as I know, when the entity dies it checks if the source entity- the entity that caused the event- is a skeleton, and if the entity that died is a drowned. If both of the conditions are met, it spawns the Shuniji disc.

Here's the visual code for you to follow along;

Other than that, I just felt like I should post this in the forums so that other people know how to do this sort of thing.

Oh, and, in case you didn't read the title, the version I'm working with is 2022.2.

Hope this helped :)