Started by
_Dark_Xaver_
on
Topic category: Help with Minecraft modding (Java Edition)
I add Ents in my mod but I want make them rage when player cut tree around them like Piglins and mining gold.
Did I need use custom coding to make this?
On block broken check for the entity in a radius.
Add a nbt logic data to the entity in a radius.
Then on the entity tick update if the entity has the nbt to be true
add custom code snippet: entity.setAggroed(true);
else
add custom code snippet: entity.setAggroed(false);
On entity spawn add custom code snippet: entity.setAggroed(false);