Explicitly make pig zombies angry when they spawn.

This commit changes the MACreature spawn logic such that any pig zombie spawned will be angered immediately.

Fixes #561
This commit is contained in:
Andreas Troelsen 2019-08-03 20:30:45 +02:00
parent ba41e51e48
commit 3c533ea683
2 changed files with 9 additions and 0 deletions

View File

@ -21,6 +21,7 @@ These changes will (most likely) be included in the next version.
- Wither skeletons now correctly spawn with stone swords.
- Mobs now correctly take damage from player-made iron golems.
- Cat and parrot pets now also sit when their owner joins an arena (although parrots perching on players' shoulders will still follow them into the arena).
- Pig zombies are now angry immediately after they spawn as they should be.
- Support for denoting potion effects by magic number IDs has been dropped. This means that if your config-file has any such magic numbers in it, MobArena will no longer successfully parse them and will throw an error on startup.
## [0.103.2] - 2019-04-23

View File

@ -10,6 +10,7 @@ import org.bukkit.entity.Creature;
import org.bukkit.entity.Creeper;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.PigZombie;
import org.bukkit.entity.Rabbit;
import org.bukkit.entity.Sheep;
import org.bukkit.entity.Slime;
@ -171,8 +172,15 @@ public class MACreature
break;
case "babyzombievillager":
case "babyzombie":
((Zombie) e).setBaby(true);
break;
case "babypigman":
((Zombie) e).setBaby(true);
((PigZombie) e).setAngry(true);
break;
case "pigzombie":
case "zombiepigman":
((PigZombie) e).setAngry(true);
break;
case "killerbunny":
((Rabbit) e).setRabbitType(Rabbit.Type.THE_KILLER_BUNNY);