[ci-skip] More attributes work

This commit is contained in:
BillyGalbreath
2020-12-23 09:47:27 -06:00
parent 19ec1c311f
commit 7ad2c5d503
24 changed files with 432 additions and 676 deletions

View File

@@ -5,22 +5,19 @@ Subject: [PATCH] Illusioners AI settings
diff --git a/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java b/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java
index 50442b3a498d1bab4270e69952a79f5182153ece..a9dcf6875efda502d174c74bd17026a5c8f0fdcb 100644
index 50442b3a498d1bab4270e69952a79f5182153ece..c57bf5091430709778dc21d70c8a32819c9d6639 100644
--- a/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java
+++ b/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java
@@ -19,6 +19,18 @@ public class EntityIllagerIllusioner extends EntityIllagerWizard implements IRan
@@ -19,6 +19,15 @@ public class EntityIllagerIllusioner extends EntityIllagerWizard implements IRan
}
+ // Purpur start
+ @Override
+ protected void initAttributes(World world) {
+ if (world != null) {
+ getAttributeMap().getAttribute(GenericAttributes.MOVEMENT_SPEED).setValue(world.purpurConfig.illusionerMovementSpeed);
+ getAttributeMap().getAttribute(GenericAttributes.FOLLOW_RANGE).setValue(world.purpurConfig.illusionerFollowRange);
+ getAttributeMap().getAttribute(GenericAttributes.MAX_HEALTH).setValue(world.purpurConfig.illusionerMaxHealth);
+ setHealth(getMaxHealth());
+ }
+ protected void initAttributes() {
+ this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(this.world.purpurConfig.illusionerMovementSpeed);
+ this.getAttributeInstance(GenericAttributes.FOLLOW_RANGE).setValue(this.world.purpurConfig.illusionerFollowRange);
+ this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(this.world.purpurConfig.illusionerMaxHealth);
+ }
+ // Purpur end
+