Poisonous injection

Started by Nikola Z on

Topic category: Help with modding (Java Edition)

Last seen on 07:46, 25. Feb 2024
Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Poisonous injection

Hi! I want to make something like an injection that when is right clicked on a silverfish to replace the injection to poisonous injection. I made a code, but it doesn't work. Can someone help me? (Sorry for bad english)The code

Last seen on 17:02, 18. Jun 2024
Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if player has item in main…
Sun, 02/18/2024 - 01:37

if player has item in main hand and right clicks, check entity is silverfish, if so, remove the old item and add new one.

or if you meant to give the silverfish poison, then just do that after checking where player is looking, or make it so you need to punch it.

use raytrace distance.