How can i make a syringe? (w procedures)

Started by Brianitsagoodname on

Topic category: Help with modding (Java Edition)

Last seen on 19:04, 24. Feb 2022
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can i make a syringe? (w procedures)

i wanna make when a syringe hit a mob the mob's id are store inside a nbt tag inside the syringe, there is a way that i can do this with procedure blocks?

Last seen on 02:51, 19. Feb 2022
Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Not entirely sure if I…
Wed, 01/12/2022 - 00:07

Not entirely sure if I completely understand you, but if by "mob's id" you're talking about Minecraft IDs like "minecraft:minecart" then I'm not sure off the top of my head if there is a procedure that can get the Minecraft id of an entity. There are two potential things you could try though.

 

If you just want to store the name of the entity, and don't need the Minecraft id of the entity, then that would be a lot simpler to do.

Firstly, you could try creating a procedure for the syringe with the trigger "when right clicked on an entity". Next, you would set the text NBT tag of the syringe to "get display name of event/target entity". The issues with this would be it may not work with other modded entities and if you would like it to work with your modded entities, you'd likely have to set up some if statements that check to see if the display name matches one of your modded entities, and if it does, you add in your mods id. It also wouldn't work properly if the entity's display name has been changed with a name tag.

 

Secondly, if you don't have a lot of entities, then you could just create a procedure for each entity involving the syringe... you could add if is event/target entity (name of entity), then set NBT string to (that entity's Minecraft id)

Last seen on 19:04, 24. Feb 2022
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
that was very usefull thank…
Thu, 01/20/2022 - 06:04

that was very usefull thank you, but if you know someway to do this same thing in the first exemple but with mobs id like "minecraft:minecraft" i would like to know too