Files
Purpur/patches/server/0027-Illusioners-AI-settings.patch
BillyGalbreath 1d3f710297 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
840e72091 [CI-SKIP] [Auto] Rebuild Patches
a33232d4a Add beacon activation and deactivation events (#5121)
bc7ea673a Add internal channel initialization listeners (#5557)
b28ad17ac Check for world change in MoveEvent API methods
3095c7592 [Auto] Updated Upstream (CraftBukkit)
f56989c97 Add RespawnFlags to PlayerRespawnEvent (#5533)
7579c2667 Add more API to PlayerMoveEvent (#5553)
2021-04-30 16:18:11 -05:00

52 lines
2.7 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Fri, 5 Jul 2019 11:09:25 -0500
Subject: [PATCH] Illusioners AI settings
diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityIllagerIllusioner.java b/src/main/java/net/minecraft/world/entity/monster/EntityIllagerIllusioner.java
index fee9a5140f097225b5da58b18bfbd528dffdc77b..cb092bee9d6827d4b0276bfa9b033cf7ca86ead4 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EntityIllagerIllusioner.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EntityIllagerIllusioner.java
@@ -56,6 +56,15 @@ public class EntityIllagerIllusioner extends EntityIllagerWizard implements IRan
}
+ // Purpur start
+ @Override
+ 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
+
@Override
protected void initPathfinder() {
super.initPathfinder();
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 1c87c929aaae17631100d1aa30b3e7ecce52686f..d6bd971a62af7341f8dc8b3afe32786ced6fcd41 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -135,6 +135,20 @@ public class PurpurWorldConfig {
giantMaxHealth = getDouble("mobs.giant.attributes.max-health", giantMaxHealth);
}
+ public double illusionerMovementSpeed = 0.5D;
+ public double illusionerFollowRange = 18.0D;
+ public double illusionerMaxHealth = 32.0D;
+ private void illusionerSettings() {
+ illusionerMovementSpeed = getDouble("mobs.illusioner.movement-speed", illusionerMovementSpeed);
+ illusionerFollowRange = getDouble("mobs.illusioner.follow-range", illusionerFollowRange);
+ if (PurpurConfig.version < 8) {
+ double oldValue = getDouble("mobs.illusioner.max-health", illusionerMaxHealth);
+ set("mobs.illusioner.attributes.max-health", oldValue);
+ set("mobs.illusioner.max-health", null);
+ }
+ illusionerMaxHealth = getDouble("mobs.illusioner.attributes.max-health", illusionerMaxHealth);
+ }
+
public int villagerBrainTicks = 1;
public boolean villagerUseBrainTicksOnlyWhenLagging = true;
private void villagerSettings() {