Helmet With Pumpkin Behavior

Started by Cyke on

Topic category: Help with Minecraft modding (Java Edition)

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!

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

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.

Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have a solution for this…
Sat, 11/09/2024 - 13:32

I have a solution for this. Use the helmet tick and put in:

 

if [enderman near you targets you]

   set attack target of [enderman near you] to [no entity]

 

Different question tho: Do any of you have an idea to make a complete jack o lantern? A block that can behave as a helmet?