mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 11:24:11 +01:00
aW() does re register Attributes which causes a IllegalArgumentException. This fixes it and sets the Guardian back to a normal Guardian without any problem.
This commit is contained in:
parent
f233e7d0fe
commit
ce7dd34b5c
1 changed files with 7 additions and 1 deletions
|
@ -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
|
// Since minecraft does not reset the elder Guardian to a guardian we have to do that
|
||||||
entity.a(0.85F, 0.85F);
|
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)
|
// Update pathfinding (random stroll back to 80)
|
||||||
entityGuardian.bq.b(80);
|
entityGuardian.bq.b(80);
|
||||||
|
|
Loading…
Reference in a new issue