From 2313c026d7185111c8cacdc1f57c5b3c62f2e753 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sat, 20 Dec 2014 16:58:45 +0100 Subject: [PATCH] aW() does re register Attributes which causes a IllegalArgumentException. This fixes it and sets the Guardian back to a normal Guardian without any problem. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By: Fabian Faßbender --- .../java/org/bukkit/craftbukkit/entity/CraftGuardian.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java index d25a26660..073d5e19a 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java @@ -38,7 +38,13 @@ public class CraftGuardian extends CraftMonster implements Guardian { // Since minecraft does not reset the elder Guardian to a guardian we have to do that entity.a(0.85F, 0.85F); - entityGuardian.aW(); + + // Since aW() calls its supers it will try to re register attributes which is invalid + // PAIL: rename and check these on update + entityGuardian.getAttributeInstance(GenericAttributes.e).setValue(6.0D); + entityGuardian.getAttributeInstance(GenericAttributes.d).setValue(0.5D); + entityGuardian.getAttributeInstance(GenericAttributes.b).setValue(16.0D); + entityGuardian.getAttributeInstance(GenericAttributes.maxHealth).setValue(30.0D); // Update pathfinding (random stroll back to 80) entityGuardian.bq.b(80);