Started by
Sajevius
on
Topic category: Help with Minecraft modding (Java Edition)
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
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:
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)
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
@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
@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!
Well I'm glad the other suggestion worked anyway :)