diff options
author | Fabian Faßbender <fabian.fassbender42@googlemail.com> | 2014-12-20 16:58:45 +0100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2014-12-21 08:52:20 +1100 |
commit | ce7dd34b5c96a417a2ad870d66c79180eacda57d (patch) | |
tree | 26b0f48724aa37eac0182095f77ce2adc01004cc /src/main/java | |
parent | f233e7d0fe901f1465b89538e4d10b83f83fd709 (diff) | |
download | craftbukkit-ce7dd34b5c96a417a2ad870d66c79180eacda57d.tar craftbukkit-ce7dd34b5c96a417a2ad870d66c79180eacda57d.tar.gz craftbukkit-ce7dd34b5c96a417a2ad870d66c79180eacda57d.tar.lz craftbukkit-ce7dd34b5c96a417a2ad870d66c79180eacda57d.tar.xz craftbukkit-ce7dd34b5c96a417a2ad870d66c79180eacda57d.zip |
aW() does re register Attributes which causes a IllegalArgumentException. This fixes it and sets the Guardian back to a normal Guardian without any problem.
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java index d25a2666..073d5e19 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java +++ b/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); |