Helmet With Pumpkin Behavior

Started by Cyke on

Topic category: Help with modding (Java Edition)

Last seen on 21:02, 10. Jan 2022
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Helmet With Pumpkin Behavior

Hi, I'm making a mod and I'm trying to make a helmet that basically replicates the behavior of a pumpkin. I already coded the overlay and all, but I can't figure out how to make it so when looking at an Enderman, it doesn't attack you. I'm also having issues with making the overlay disappear when the player is not in 1st person. Thanks!

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

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm not sure how you would…
Tue, 01/11/2022 - 23:34

I'm not sure how you would go about doing this in an optimized way without actually changing the vanilla Enderman's code.

 

You could try setting up a procedure that adds every nearby enderman to the same team as the player whenever the player is wearing a pumpkin and then remove every enderman from their team when the pumpkin is taken off. You'd also have to make it so that if the player hits an enderman, that enderman is removed from the player's team as well... This however would run poorly and also might have some issues. I'm unsure if the endermen would attack whatever entity the player hits if the endermen are on the player's team or not

Last seen on 02:14, 20. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Similar problem- not sure if…
Mon, 10/17/2022 - 02:25

Similar problem- not sure if there's a good way to do this. Probably some way custom code could be used to disable aggravation; I've seen it done with other mods.