[Solved] How to make mining a block turn pigmen aggressive towards player

Started by Sajevius on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Solved] How to make mining a block turn pigmen aggressive towards player
Fri, 09/25/2020 - 11:05 (edited)

I wanna know how to make it so that when a player mines a certain block (e.g. an ore in the Nether), nearby zombie pigmen will get angry at said player.

thanks in advance!

( P.S. I honestly don't know if this is a duplicate forum topic, so please bear with me, for I could not find this topic anywhere else in this site as far as I searched :P )

Edited by Sajevius on Fri, 09/25/2020 - 11:05
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yeah you need "event/target…
Fri, 09/25/2020 - 08:28

yeah you need "event/target entity" to be used somewhere in the procedure for mcreator to add "entity" into the procedure's dependencies list. do this:

in your VulkatiteOreBlockDestroyedByPlayerProcedure, unlock it, and then put this code block in:

https://cdn.discordapp.com/attachments/599250311852458006/758965157522309130/unknown.png

build it, then lock the procedure and edit the code. find where the swingArm(Hand.MAIN_HAND) is and replace it with setRevengeTarget((LivingEntity)entity)

Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I didn't read the whole…
Fri, 09/25/2020 - 10:39

I didn't read the whole topic, but I read somewhere that pigmen (before 1.16) got angry at players whenever they got hurt, regardless if they were hurt by that player or not. So you could have a procedure to damage nearby pigmen and then heal them for the same amount, but I am not sure if would it work

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@ahznb omg. it actually…
Fri, 09/25/2020 - 10:58

@ahznb

omg. it actually works! i've angered an entire pigman group near me now by mining it! thank you so much. i'll keep that procedure in mind :D

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@RaolTheBest woah, you're…
Fri, 09/25/2020 - 11:14

@RaolTheBest

woah, you're here too? nice!

so i tried your suggestion, but it doesn't anger pigmen unfortunately, and it only damages a single pigman nearby (which i think isn't really the point since pigmen call for help as well). but still, i appreciate your help too! who knows, maybe i could use it, but in a different sense. ;)

 

P.S. i love your mods!

Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Well I'm glad the other…
Fri, 09/25/2020 - 11:47

Well I'm glad the other suggestion worked anyway :)