mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-28 03:19:21 +00:00
Current implementation of OP lock is not an appropriate solution to prevent plugins that contain backdoor or malicious code. There are many ways to bypass this check to manipulate the OP list or permissions. The best way to prevent this kind of grief is to get plugins from valid and trustworthy places.
1137 lines
75 KiB
Diff
1137 lines
75 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: hayanesuru <hayanesuru@outlook.jp>
|
|
Date: Wed, 13 Aug 2025 23:35:42 +0900
|
|
Subject: [PATCH] fix purpur attribute base patch
|
|
|
|
|
|
diff --git a/net/minecraft/world/entity/GlowSquid.java b/net/minecraft/world/entity/GlowSquid.java
|
|
index 86a694b94045b47f6e98c480645f75738b8a052c..bb9554463a6983ab98323f4dd665c7c1f6434640 100644
|
|
--- a/net/minecraft/world/entity/GlowSquid.java
|
|
+++ b/net/minecraft/world/entity/GlowSquid.java
|
|
@@ -50,7 +50,7 @@ public class GlowSquid extends Squid {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.glowSquidMaxHealth);
|
|
+ this.setAttributeBaseValue(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH, this.level().purpurConfig.glowSquidMaxHealth);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
|
index 0e7ff8093241c9ac5c4a62edb2c250eeb0e80d3e..e2f532433df740926ddfb44b6f65299d42241bff 100644
|
|
--- a/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -2853,6 +2853,16 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
|
return this.getAttributes().getBaseValue(attribute);
|
|
}
|
|
|
|
+ // Leaf start
|
|
+ public double setAttributeBaseValue(Holder<Attribute> attribute, double d) {
|
|
+ double old = this.getAttributes().getBaseValue(attribute);
|
|
+ if (old != d) {
|
|
+ this.getAttributes().getInstance(attribute).setBaseValue(d);
|
|
+ }
|
|
+ return old;
|
|
+ }
|
|
+ // Leaf end
|
|
+
|
|
public AttributeMap getAttributes() {
|
|
return this.attributes;
|
|
}
|
|
diff --git a/net/minecraft/world/entity/ambient/Bat.java b/net/minecraft/world/entity/ambient/Bat.java
|
|
index 59a849f5471a94bfbf364fe169d1a27a402629bd..893ff74b2a5171870f757b3d3c005077226e4459 100644
|
|
--- a/net/minecraft/world/entity/ambient/Bat.java
|
|
+++ b/net/minecraft/world/entity/ambient/Bat.java
|
|
@@ -99,15 +99,15 @@ public class Bat extends AmbientCreature {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.batMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.batScale);
|
|
- this.getAttribute(Attributes.FOLLOW_RANGE).setBaseValue(this.level().purpurConfig.batFollowRange);
|
|
- this.getAttribute(Attributes.KNOCKBACK_RESISTANCE).setBaseValue(this.level().purpurConfig.batKnockbackResistance);
|
|
- this.getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(this.level().purpurConfig.batMovementSpeed);
|
|
- this.getAttribute(Attributes.FLYING_SPEED).setBaseValue(this.level().purpurConfig.batFlyingSpeed);
|
|
- this.getAttribute(Attributes.ARMOR).setBaseValue(this.level().purpurConfig.batArmor);
|
|
- this.getAttribute(Attributes.ARMOR_TOUGHNESS).setBaseValue(this.level().purpurConfig.batArmorToughness);
|
|
- this.getAttribute(Attributes.ATTACK_KNOCKBACK).setBaseValue(this.level().purpurConfig.batAttackKnockback);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.batMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.batScale);
|
|
+ this.setAttributeBaseValue(Attributes.FOLLOW_RANGE, this.level().purpurConfig.batFollowRange);
|
|
+ this.setAttributeBaseValue(Attributes.KNOCKBACK_RESISTANCE, this.level().purpurConfig.batKnockbackResistance);
|
|
+ this.setAttributeBaseValue(Attributes.MOVEMENT_SPEED, this.level().purpurConfig.batMovementSpeed);
|
|
+ this.setAttributeBaseValue(Attributes.FLYING_SPEED, this.level().purpurConfig.batFlyingSpeed);
|
|
+ this.setAttributeBaseValue(Attributes.ARMOR, this.level().purpurConfig.batArmor);
|
|
+ this.setAttributeBaseValue(Attributes.ARMOR_TOUGHNESS, this.level().purpurConfig.batArmorToughness);
|
|
+ this.setAttributeBaseValue(Attributes.ATTACK_KNOCKBACK, this.level().purpurConfig.batAttackKnockback);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/Bee.java b/net/minecraft/world/entity/animal/Bee.java
|
|
index 4821ec280cbd6f4b19241748c3bcc3fb66149ac2..eadc64f497631c048cf6a7d72e6f692763c98c6c 100644
|
|
--- a/net/minecraft/world/entity/animal/Bee.java
|
|
+++ b/net/minecraft/world/entity/animal/Bee.java
|
|
@@ -476,8 +476,8 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.beeMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.beeScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.beeMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.beeScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/Cat.java b/net/minecraft/world/entity/animal/Cat.java
|
|
index 09d518a59fe93afbeacb2d41a0c9d287f4a74443..14dfac12438b02ca9172a494a5730b5bf094aef1 100644
|
|
--- a/net/minecraft/world/entity/animal/Cat.java
|
|
+++ b/net/minecraft/world/entity/animal/Cat.java
|
|
@@ -120,8 +120,8 @@ public class Cat extends TamableAnimal {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.catMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.catScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.catMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.catScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/Chicken.java b/net/minecraft/world/entity/animal/Chicken.java
|
|
index eaf913805195a580e3aa816dc28053abb9bdc246..f908d57776c533b6d42b8f3cd4da088a7ec03ed1 100644
|
|
--- a/net/minecraft/world/entity/animal/Chicken.java
|
|
+++ b/net/minecraft/world/entity/animal/Chicken.java
|
|
@@ -92,11 +92,11 @@ public class Chicken extends Animal {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.chickenMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.chickenScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.chickenMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.chickenScale);
|
|
// Purpur start - Chickens can retaliate
|
|
if (level().purpurConfig.chickenRetaliate) {
|
|
- this.getAttribute(Attributes.ATTACK_DAMAGE).setBaseValue(2.0D);
|
|
+ this.setAttributeBaseValue(Attributes.ATTACK_DAMAGE, 2.0D);
|
|
}
|
|
// Purpur end - Chickens can retaliate
|
|
}
|
|
diff --git a/net/minecraft/world/entity/animal/Cod.java b/net/minecraft/world/entity/animal/Cod.java
|
|
index 7e08573cba6efcd78fcce37bccc2923f374f3c44..b954aa5d402c56bd6067d3d3b204bd3dd1f5616c 100644
|
|
--- a/net/minecraft/world/entity/animal/Cod.java
|
|
+++ b/net/minecraft/world/entity/animal/Cod.java
|
|
@@ -28,7 +28,7 @@ public class Cod extends AbstractSchoolingFish {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.codMaxHealth);
|
|
+ this.setAttributeBaseValue(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH, this.level().purpurConfig.codMaxHealth);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/Cow.java b/net/minecraft/world/entity/animal/Cow.java
|
|
index b2fa170b14bc3037e5c143d320d0a1ef24738f1c..aaa710ca8629235fc3395a3f96df21f60278bca3 100644
|
|
--- a/net/minecraft/world/entity/animal/Cow.java
|
|
+++ b/net/minecraft/world/entity/animal/Cow.java
|
|
@@ -51,9 +51,9 @@ public class Cow extends AbstractCow {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.cowMaxHealth);
|
|
- this.getAttribute(net.minecraft.world.entity.ai.attributes.Attributes.SCALE).setBaseValue(this.level().purpurConfig.cowScale);
|
|
- this.getAttribute(net.minecraft.world.entity.ai.attributes.Attributes.ATTACK_DAMAGE).setBaseValue(this.level().purpurConfig.cowNaturallyAggressiveToPlayersDamage); // Purpur - Cows naturally aggressive to players chance
|
|
+ this.setAttributeBaseValue(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH, this.level().purpurConfig.cowMaxHealth);
|
|
+ this.setAttributeBaseValue(net.minecraft.world.entity.ai.attributes.Attributes.SCALE, this.level().purpurConfig.cowScale);
|
|
+ this.setAttributeBaseValue(net.minecraft.world.entity.ai.attributes.Attributes.ATTACK_DAMAGE, this.level().purpurConfig.cowNaturallyAggressiveToPlayersDamage); // Purpur - Cows naturally aggressive to players chance
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/Dolphin.java b/net/minecraft/world/entity/animal/Dolphin.java
|
|
index 23696a5e2871ea07f34d4b4f6a20e2896ac3f5bd..cb539644232ba9e949c1c6fb25dfcc54e096e4fd 100644
|
|
--- a/net/minecraft/world/entity/animal/Dolphin.java
|
|
+++ b/net/minecraft/world/entity/animal/Dolphin.java
|
|
@@ -154,8 +154,8 @@ public class Dolphin extends AgeableWaterCreature {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.dolphinMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.dolphinScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.dolphinMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.dolphinScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/Fox.java b/net/minecraft/world/entity/animal/Fox.java
|
|
index 8964bb5098c0dc36741af3656af6bc0b5b463abe..619e7ec6ccfc076cd483a7215ab80e6bf4aaad83 100644
|
|
--- a/net/minecraft/world/entity/animal/Fox.java
|
|
+++ b/net/minecraft/world/entity/animal/Fox.java
|
|
@@ -183,8 +183,8 @@ public class Fox extends Animal {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.foxMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.foxScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.foxMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.foxScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/HappyGhast.java b/net/minecraft/world/entity/animal/HappyGhast.java
|
|
index b7306bcc60c2986b7f9b054d217a2b8cd76b118e..788ee2632301c4a40b5c96e137d8cb0e96253a5f 100644
|
|
--- a/net/minecraft/world/entity/animal/HappyGhast.java
|
|
+++ b/net/minecraft/world/entity/animal/HappyGhast.java
|
|
@@ -134,13 +134,13 @@ public class HappyGhast extends Animal {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.happyGhastMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.happyGhastScale);
|
|
- this.getAttribute(Attributes.TEMPT_RANGE).setBaseValue(this.level().purpurConfig.happyGhastTemptRange);
|
|
- this.getAttribute(Attributes.FLYING_SPEED).setBaseValue(this.level().purpurConfig.happyGhastFlyingSpeed);
|
|
- this.getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(this.level().purpurConfig.happyGhastMovementSpeed);
|
|
- this.getAttribute(Attributes.FOLLOW_RANGE).setBaseValue(this.level().purpurConfig.happyGhastFollowRange);
|
|
- this.getAttribute(Attributes.CAMERA_DISTANCE).setBaseValue(this.level().purpurConfig.happyGhastCameraDistance);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.happyGhastMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.happyGhastScale);
|
|
+ this.setAttributeBaseValue(Attributes.TEMPT_RANGE, this.level().purpurConfig.happyGhastTemptRange);
|
|
+ this.setAttributeBaseValue(Attributes.FLYING_SPEED, this.level().purpurConfig.happyGhastFlyingSpeed);
|
|
+ this.setAttributeBaseValue(Attributes.MOVEMENT_SPEED, this.level().purpurConfig.happyGhastMovementSpeed);
|
|
+ this.setAttributeBaseValue(Attributes.FOLLOW_RANGE, this.level().purpurConfig.happyGhastFollowRange);
|
|
+ this.setAttributeBaseValue(Attributes.CAMERA_DISTANCE, this.level().purpurConfig.happyGhastCameraDistance);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/IronGolem.java b/net/minecraft/world/entity/animal/IronGolem.java
|
|
index 8885ab56eb72c0106ef57359ca11f70c012fc348..009e0ae65875696aed23ede1ec1ac1a905dea322 100644
|
|
--- a/net/minecraft/world/entity/animal/IronGolem.java
|
|
+++ b/net/minecraft/world/entity/animal/IronGolem.java
|
|
@@ -95,8 +95,8 @@ public class IronGolem extends AbstractGolem implements NeutralMob {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.ironGolemMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.ironGolemScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.ironGolemMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.ironGolemScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/MushroomCow.java b/net/minecraft/world/entity/animal/MushroomCow.java
|
|
index cdb11eabdd246fb6c6aed11c9f1f264648b55c26..86bdc7f6cc4aa463a6995c041f003f1d112fee90 100644
|
|
--- a/net/minecraft/world/entity/animal/MushroomCow.java
|
|
+++ b/net/minecraft/world/entity/animal/MushroomCow.java
|
|
@@ -82,7 +82,7 @@ public class MushroomCow extends AbstractCow implements Shearable {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.mooshroomMaxHealth);
|
|
+ this.setAttributeBaseValue(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH, this.level().purpurConfig.mooshroomMaxHealth);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/Ocelot.java b/net/minecraft/world/entity/animal/Ocelot.java
|
|
index 4c20569ec5c504c582575851ab1d74248289b1c0..c83d47caf8572e7f1375829f7dcb1b3b4bbf9ed0 100644
|
|
--- a/net/minecraft/world/entity/animal/Ocelot.java
|
|
+++ b/net/minecraft/world/entity/animal/Ocelot.java
|
|
@@ -84,8 +84,8 @@ public class Ocelot extends Animal {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.ocelotMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.ocelotScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.ocelotMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.ocelotScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/Panda.java b/net/minecraft/world/entity/animal/Panda.java
|
|
index 02bfa88568e635770675ea9173f2cf3ca21457fa..c4cfcab5be629e83c0418bcb9ef1062bc8459af9 100644
|
|
--- a/net/minecraft/world/entity/animal/Panda.java
|
|
+++ b/net/minecraft/world/entity/animal/Panda.java
|
|
@@ -136,9 +136,8 @@ public class Panda extends Animal {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.pandaMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.pandaScale);
|
|
- setAttributes();
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.pandaMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.pandaScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/Parrot.java b/net/minecraft/world/entity/animal/Parrot.java
|
|
index dddf3a2e372bd0d483c1da01d36fe59b17b3d4e2..4989ece4cea3a881cf3832527eea69be0f77ebdd 100644
|
|
--- a/net/minecraft/world/entity/animal/Parrot.java
|
|
+++ b/net/minecraft/world/entity/animal/Parrot.java
|
|
@@ -196,8 +196,8 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.parrotMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.parrotScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.parrotMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.parrotScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/Pig.java b/net/minecraft/world/entity/animal/Pig.java
|
|
index adbbe938c14d14a628d9963acec57c32661957cd..fbda6b378f9fc8fe97f4282326f86ea9633a5c98 100644
|
|
--- a/net/minecraft/world/entity/animal/Pig.java
|
|
+++ b/net/minecraft/world/entity/animal/Pig.java
|
|
@@ -86,8 +86,8 @@ public class Pig extends Animal implements ItemSteerable {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.pigMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.pigScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.pigMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.pigScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/PolarBear.java b/net/minecraft/world/entity/animal/PolarBear.java
|
|
index e0b51b482607ec5a9f5b4d13d918d79b2f52f9c0..a8cbddde557b36d081224810aaf9f44423c55fb7 100644
|
|
--- a/net/minecraft/world/entity/animal/PolarBear.java
|
|
+++ b/net/minecraft/world/entity/animal/PolarBear.java
|
|
@@ -120,8 +120,8 @@ public class PolarBear extends Animal implements NeutralMob {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.polarBearMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.polarBearScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.polarBearMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.polarBearScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/Pufferfish.java b/net/minecraft/world/entity/animal/Pufferfish.java
|
|
index 685176ce37538cbbc614401db568acdb0ad264bb..7c6ccac4ae5de741753a6e75936416b1402fc67d 100644
|
|
--- a/net/minecraft/world/entity/animal/Pufferfish.java
|
|
+++ b/net/minecraft/world/entity/animal/Pufferfish.java
|
|
@@ -62,7 +62,7 @@ public class Pufferfish extends AbstractFish {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.pufferfishMaxHealth);
|
|
+ this.setAttributeBaseValue(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH, this.level().purpurConfig.pufferfishMaxHealth);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/Rabbit.java b/net/minecraft/world/entity/animal/Rabbit.java
|
|
index 041ccb96d36cbe0f5683ff6e8b2adb0b79a96738..c0a63a8d1a3c33d9d151aaf3131ea583f4f48588 100644
|
|
--- a/net/minecraft/world/entity/animal/Rabbit.java
|
|
+++ b/net/minecraft/world/entity/animal/Rabbit.java
|
|
@@ -148,8 +148,8 @@ public class Rabbit extends Animal {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.rabbitMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.rabbitScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.rabbitMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.rabbitScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/Salmon.java b/net/minecraft/world/entity/animal/Salmon.java
|
|
index d2679beaa3be6de36227c5b66609e0df393c4376..3156a837dc9fedfefe3306f7cce092e9b7690663 100644
|
|
--- a/net/minecraft/world/entity/animal/Salmon.java
|
|
+++ b/net/minecraft/world/entity/animal/Salmon.java
|
|
@@ -54,7 +54,7 @@ public class Salmon extends AbstractSchoolingFish {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.salmonMaxHealth);
|
|
+ this.setAttributeBaseValue(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH, this.level().purpurConfig.salmonMaxHealth);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/SnowGolem.java b/net/minecraft/world/entity/animal/SnowGolem.java
|
|
index 8984a4fc0aae9fd72bc3f7222003c7593810ab77..f1ff33038725a04fc54bfe8816dc3cc1b81b94ad 100644
|
|
--- a/net/minecraft/world/entity/animal/SnowGolem.java
|
|
+++ b/net/minecraft/world/entity/animal/SnowGolem.java
|
|
@@ -83,8 +83,8 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.snowGolemMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.snowGolemScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.snowGolemMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.snowGolemScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/Squid.java b/net/minecraft/world/entity/animal/Squid.java
|
|
index 8371f3892e50150db018f0b265986ffab37f21e7..0e4c460dea66d1f77186a9606c35a84b66f4af50 100644
|
|
--- a/net/minecraft/world/entity/animal/Squid.java
|
|
+++ b/net/minecraft/world/entity/animal/Squid.java
|
|
@@ -94,8 +94,8 @@ public class Squid extends AgeableWaterCreature {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.squidMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.squidScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.squidMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.squidScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/TropicalFish.java b/net/minecraft/world/entity/animal/TropicalFish.java
|
|
index 8d1fa86c6f4881c05f11fa80018b8de7f4920006..35d6f1f8582b94c808594f5f8dbd3ca417fae5e1 100644
|
|
--- a/net/minecraft/world/entity/animal/TropicalFish.java
|
|
+++ b/net/minecraft/world/entity/animal/TropicalFish.java
|
|
@@ -92,7 +92,7 @@ public class TropicalFish extends AbstractSchoolingFish {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.tropicalFishMaxHealth);
|
|
+ this.setAttributeBaseValue(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH, this.level().purpurConfig.tropicalFishMaxHealth);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/Turtle.java b/net/minecraft/world/entity/animal/Turtle.java
|
|
index 9bdc1f10e3b40672449ad166f130ecabdacc75d3..0065a43871605c8d2a8b29d1aed174aeed8be3b2 100644
|
|
--- a/net/minecraft/world/entity/animal/Turtle.java
|
|
+++ b/net/minecraft/world/entity/animal/Turtle.java
|
|
@@ -106,8 +106,8 @@ public class Turtle extends Animal {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.turtleMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.turtleScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.turtleMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.turtleScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/allay/Allay.java b/net/minecraft/world/entity/animal/allay/Allay.java
|
|
index cb88b1afe261f95998a19fcb555f91143834ba3a..868dd1362112dd507ce2392023bfa9bc24686842 100644
|
|
--- a/net/minecraft/world/entity/animal/allay/Allay.java
|
|
+++ b/net/minecraft/world/entity/animal/allay/Allay.java
|
|
@@ -169,8 +169,8 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.allayMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.allayScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.allayMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.allayScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/armadillo/Armadillo.java b/net/minecraft/world/entity/animal/armadillo/Armadillo.java
|
|
index c520c4e478e3191cea7c2345a2e4c42b67c0762a..1a0ade86ca8d59d53b3d61be1417d0b840126b6c 100644
|
|
--- a/net/minecraft/world/entity/animal/armadillo/Armadillo.java
|
|
+++ b/net/minecraft/world/entity/animal/armadillo/Armadillo.java
|
|
@@ -100,8 +100,8 @@ public class Armadillo extends Animal {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.armadilloMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.armadilloScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.armadilloMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.armadilloScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
|
index 2cdf2fb60d4d3642f0870944be9bd5abafa9e817..45125fad187b101fbe72337c128bffc44dbb800c 100644
|
|
--- a/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
|
+++ b/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
|
@@ -140,8 +140,8 @@ public class Axolotl extends Animal implements Bucketable {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.axolotlMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.axolotlScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.axolotlMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.axolotlScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/frog/Frog.java b/net/minecraft/world/entity/animal/frog/Frog.java
|
|
index 7143a7b8aae713fd7f2f167a949f98b964e72c78..06da2da712e747639574620d73801bca13fabfa5 100644
|
|
--- a/net/minecraft/world/entity/animal/frog/Frog.java
|
|
+++ b/net/minecraft/world/entity/animal/frog/Frog.java
|
|
@@ -183,7 +183,7 @@ public class Frog extends Animal {
|
|
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.frogMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.frogMaxHealth);
|
|
}
|
|
// Leaf end - Plazma - Add missing purpur configuration options
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/frog/Tadpole.java b/net/minecraft/world/entity/animal/frog/Tadpole.java
|
|
index 0e322f480e0a6302124847e26c4bed06678e78e4..bc648534baccbb806f14a7353f71348e1de029de 100644
|
|
--- a/net/minecraft/world/entity/animal/frog/Tadpole.java
|
|
+++ b/net/minecraft/world/entity/animal/frog/Tadpole.java
|
|
@@ -121,7 +121,7 @@ public class Tadpole extends AbstractFish {
|
|
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.tadpoleMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.tadpoleMaxHealth);
|
|
}
|
|
// Leaf end - Plazma - Add missing purpur configuration options
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
|
index 6f1006281128d6da0dda43cc61ee672e872186af..d3b21d7c54349045c29df09602bda9d7a7eaec52 100644
|
|
--- a/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
|
+++ b/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
|
@@ -142,9 +142,9 @@ public abstract class AbstractHorse extends Animal implements HasCustomInventory
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.generateMaxHealth(random));
|
|
- this.getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(this.generateSpeed(random));
|
|
- this.getAttribute(Attributes.JUMP_STRENGTH).setBaseValue(this.generateJumpStrength(random));
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.generateMaxHealth(random));
|
|
+ this.setAttributeBaseValue(Attributes.MOVEMENT_SPEED, this.generateSpeed(random));
|
|
+ this.setAttributeBaseValue(Attributes.JUMP_STRENGTH, this.generateJumpStrength(random));
|
|
}
|
|
|
|
protected double generateMaxHealth(double min, double max) {
|
|
diff --git a/net/minecraft/world/entity/animal/sheep/Sheep.java b/net/minecraft/world/entity/animal/sheep/Sheep.java
|
|
index 500c87f5f7b2eda637103125d6e541f7c9fb385f..d0b40c1186328b501e1847f29283023b81eeddc3 100644
|
|
--- a/net/minecraft/world/entity/animal/sheep/Sheep.java
|
|
+++ b/net/minecraft/world/entity/animal/sheep/Sheep.java
|
|
@@ -82,8 +82,8 @@ public class Sheep extends Animal implements Shearable {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.sheepMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.sheepScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.sheepMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.sheepScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
|
index 1f545d4c9a3de0d6630a92481920ed6c3553ce97..eddf4ece4ba06d1f6e8c2ff80c81629c324e2199 100644
|
|
--- a/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
|
+++ b/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
|
@@ -107,8 +107,8 @@ public class Sniffer extends Animal {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.snifferMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.snifferScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.snifferMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.snifferScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/wolf/Wolf.java b/net/minecraft/world/entity/animal/wolf/Wolf.java
|
|
index 7e7cb9db1c84bdb173b444bec90663a93fb3b549..5d3fd6a6ce2eb3c462bfb10abdc817a114821ca1 100644
|
|
--- a/net/minecraft/world/entity/animal/wolf/Wolf.java
|
|
+++ b/net/minecraft/world/entity/animal/wolf/Wolf.java
|
|
@@ -211,8 +211,8 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.wolfMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.wolfScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.wolfMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.wolfScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
|
index e9fc2bf959949a8589a9ab87e00c85ffbe598a83..4b9ed1682fc9880127ce691b56b1e74118ff411d 100644
|
|
--- a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
|
+++ b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
|
@@ -168,7 +168,7 @@ public class EnderDragon extends Mob implements Enemy {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.enderDragonMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.enderDragonMaxHealth);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/boss/wither/WitherBoss.java b/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
|
index d8336fc8852b9939f341aedd17403913c7dadcf9..f169764f0b3737509a520aa36afccc4f9e6471db 100644
|
|
--- a/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
|
+++ b/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
|
@@ -216,8 +216,8 @@ public class WitherBoss extends Monster implements RangedAttackMob {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.witherMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.witherScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.witherMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.witherScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/Blaze.java b/net/minecraft/world/entity/monster/Blaze.java
|
|
index fa21b7dba208d5ba6ecf1d2b68965bb50642b53a..032be48fbfbe5de5f584103a95a2b7b8cef5e63f 100644
|
|
--- a/net/minecraft/world/entity/monster/Blaze.java
|
|
+++ b/net/minecraft/world/entity/monster/Blaze.java
|
|
@@ -78,8 +78,8 @@ public class Blaze extends Monster {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.blazeMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.blazeScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.blazeMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.blazeScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/Bogged.java b/net/minecraft/world/entity/monster/Bogged.java
|
|
index cace310ad4ad320a8a5745c6af3ec4b57e75b6a5..f9e6d9a26216ba3a12643b979e72a9d0f4cbcee6 100644
|
|
--- a/net/minecraft/world/entity/monster/Bogged.java
|
|
+++ b/net/minecraft/world/entity/monster/Bogged.java
|
|
@@ -63,8 +63,8 @@ public class Bogged extends AbstractSkeleton implements Shearable {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.boggedMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.boggedScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.boggedMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.boggedScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/CaveSpider.java b/net/minecraft/world/entity/monster/CaveSpider.java
|
|
index 7eca4b751d900c6d6ee34993c3e2368127d19e03..2ba24d2e2f73a3da6f8fb404dba96d2fdffc958e 100644
|
|
--- a/net/minecraft/world/entity/monster/CaveSpider.java
|
|
+++ b/net/minecraft/world/entity/monster/CaveSpider.java
|
|
@@ -46,8 +46,8 @@ public class CaveSpider extends Spider {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.caveSpiderMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.caveSpiderScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.caveSpiderMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.caveSpiderScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/Creeper.java b/net/minecraft/world/entity/monster/Creeper.java
|
|
index 2839c755e5ca58896bc14f95ce4889d48ec415b3..9bcfd34ab0de8f3c12d01a9f26a97311384e3e72 100644
|
|
--- a/net/minecraft/world/entity/monster/Creeper.java
|
|
+++ b/net/minecraft/world/entity/monster/Creeper.java
|
|
@@ -139,8 +139,8 @@ public class Creeper extends Monster {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.creeperMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.creeperScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.creeperMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.creeperScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/Drowned.java b/net/minecraft/world/entity/monster/Drowned.java
|
|
index 7ff380212ce5e56e0e58e5f52f8c75bda5061ef0..85c095cd384965789e3146493f6017154d5a4995 100644
|
|
--- a/net/minecraft/world/entity/monster/Drowned.java
|
|
+++ b/net/minecraft/world/entity/monster/Drowned.java
|
|
@@ -96,9 +96,9 @@ public class Drowned extends Zombie implements RangedAttackMob {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.drownedMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.drownedScale);
|
|
- this.getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(this.level().purpurConfig.drownedMovementSpeed); // Leaf - Configurable movement speed of more entities - drowned
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.drownedMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.drownedScale);
|
|
+ this.setAttributeBaseValue(Attributes.MOVEMENT_SPEED, this.level().purpurConfig.drownedMovementSpeed); // Leaf - Configurable movement speed of more entities - drowned
|
|
}
|
|
|
|
@Override
|
|
diff --git a/net/minecraft/world/entity/monster/ElderGuardian.java b/net/minecraft/world/entity/monster/ElderGuardian.java
|
|
index ab1c050ff326a072e817a05958b8f4ec803af063..7207e9838b05ae352094fe79784b1a1af5696bc3 100644
|
|
--- a/net/minecraft/world/entity/monster/ElderGuardian.java
|
|
+++ b/net/minecraft/world/entity/monster/ElderGuardian.java
|
|
@@ -46,8 +46,8 @@ public class ElderGuardian extends Guardian {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.elderGuardianMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.elderGuardianScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.elderGuardianMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.elderGuardianScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/EnderMan.java b/net/minecraft/world/entity/monster/EnderMan.java
|
|
index 58887b2cc931892f96793edd7a7d1db22cb8686c..301c760ced45b22175a29cb662c3949c424538c0 100644
|
|
--- a/net/minecraft/world/entity/monster/EnderMan.java
|
|
+++ b/net/minecraft/world/entity/monster/EnderMan.java
|
|
@@ -109,8 +109,8 @@ public class EnderMan extends Monster implements NeutralMob {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.endermanMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.endermanScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.endermanMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.endermanScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/Endermite.java b/net/minecraft/world/entity/monster/Endermite.java
|
|
index 4ea0e5f24664a1c8f2c8bdae559784434374adf6..e7bd6bf9e2a36b8d2f78cc744db93f4470db7094 100644
|
|
--- a/net/minecraft/world/entity/monster/Endermite.java
|
|
+++ b/net/minecraft/world/entity/monster/Endermite.java
|
|
@@ -67,8 +67,8 @@ public class Endermite extends Monster {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.endermiteMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.endermiteScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.endermiteMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.endermiteScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/Evoker.java b/net/minecraft/world/entity/monster/Evoker.java
|
|
index 5c1992a7fd5d7c5fe23ebfad35a828263d0ff93c..1b2c471c0509d8e77454169df8a5dc247d5e09a6 100644
|
|
--- a/net/minecraft/world/entity/monster/Evoker.java
|
|
+++ b/net/minecraft/world/entity/monster/Evoker.java
|
|
@@ -68,8 +68,8 @@ public class Evoker extends SpellcasterIllager {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.evokerMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.evokerScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.evokerMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.evokerScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/Ghast.java b/net/minecraft/world/entity/monster/Ghast.java
|
|
index 6ec83870c67810c7d0239ff7075549a93dc232eb..c249946248a5465fd9b08eac07a306ad2aee2ae6 100644
|
|
--- a/net/minecraft/world/entity/monster/Ghast.java
|
|
+++ b/net/minecraft/world/entity/monster/Ghast.java
|
|
@@ -77,8 +77,8 @@ public class Ghast extends Mob implements Enemy {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.ghastMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.ghastScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.ghastMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.ghastScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/Giant.java b/net/minecraft/world/entity/monster/Giant.java
|
|
index f4ec41a74b13be98f3ac78521fdd357842bc9ebd..96e42cd011124e85a30394c3bf8130b5f9f7f9c9 100644
|
|
--- a/net/minecraft/world/entity/monster/Giant.java
|
|
+++ b/net/minecraft/world/entity/monster/Giant.java
|
|
@@ -55,10 +55,10 @@ public class Giant extends Monster {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
protected void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.giantMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.giantScale);
|
|
- this.getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(this.level().purpurConfig.giantMovementSpeed);
|
|
- this.getAttribute(Attributes.ATTACK_DAMAGE).setBaseValue(this.level().purpurConfig.giantAttackDamage);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.giantMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.giantScale);
|
|
+ this.setAttributeBaseValue(Attributes.MOVEMENT_SPEED, this.level().purpurConfig.giantMovementSpeed);
|
|
+ this.setAttributeBaseValue(Attributes.ATTACK_DAMAGE, this.level().purpurConfig.giantAttackDamage);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/Guardian.java b/net/minecraft/world/entity/monster/Guardian.java
|
|
index 3ba8da3bd04774fb3131fdbd2aa0bd6c9f31c817..1ee5a2512dba74cf4949f5bf71c07dcf1275171f 100644
|
|
--- a/net/minecraft/world/entity/monster/Guardian.java
|
|
+++ b/net/minecraft/world/entity/monster/Guardian.java
|
|
@@ -93,8 +93,8 @@ public class Guardian extends Monster {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.guardianMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.guardianScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.guardianMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.guardianScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/Husk.java b/net/minecraft/world/entity/monster/Husk.java
|
|
index f4200bdf2002c13259821b27811370896adf4b3e..1e7f7bfe9d9fc53ae46fe6f17226dc192de597cc 100644
|
|
--- a/net/minecraft/world/entity/monster/Husk.java
|
|
+++ b/net/minecraft/world/entity/monster/Husk.java
|
|
@@ -42,8 +42,8 @@ public class Husk extends Zombie {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.huskMaxHealth);
|
|
- this.getAttribute(net.minecraft.world.entity.ai.attributes.Attributes.MOVEMENT_SPEED).setBaseValue(this.level().purpurConfig.huskMovementSpeed); // Leaf - Configurable movement speed of more entities - husk
|
|
+ this.setAttributeBaseValue(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH, this.level().purpurConfig.huskMaxHealth);
|
|
+ this.setAttributeBaseValue(net.minecraft.world.entity.ai.attributes.Attributes.MOVEMENT_SPEED, this.level().purpurConfig.huskMovementSpeed); // Leaf - Configurable movement speed of more entities - husk
|
|
}
|
|
|
|
@Override
|
|
diff --git a/net/minecraft/world/entity/monster/Illusioner.java b/net/minecraft/world/entity/monster/Illusioner.java
|
|
index 2ea8c8480dcc15eb5b4bc9686554ec912ef1f3f4..7fe4694497280cb85573250e0526bfbd7387b0c6 100644
|
|
--- a/net/minecraft/world/entity/monster/Illusioner.java
|
|
+++ b/net/minecraft/world/entity/monster/Illusioner.java
|
|
@@ -77,10 +77,10 @@ public class Illusioner extends SpellcasterIllager implements RangedAttackMob {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
protected void initAttributes() {
|
|
- this.getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(this.level().purpurConfig.illusionerMovementSpeed);
|
|
- this.getAttribute(Attributes.FOLLOW_RANGE).setBaseValue(this.level().purpurConfig.illusionerFollowRange);
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.illusionerMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.illusionerScale);
|
|
+ this.setAttributeBaseValue(Attributes.MOVEMENT_SPEED, this.level().purpurConfig.illusionerMovementSpeed);
|
|
+ this.setAttributeBaseValue(Attributes.FOLLOW_RANGE, this.level().purpurConfig.illusionerFollowRange);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.illusionerMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.illusionerScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/Pillager.java b/net/minecraft/world/entity/monster/Pillager.java
|
|
index 2ed473468032bb6edbd03882b5f5405b90a2f0f4..451ae7b45dc96066f5da8e7b44086527dab9499c 100644
|
|
--- a/net/minecraft/world/entity/monster/Pillager.java
|
|
+++ b/net/minecraft/world/entity/monster/Pillager.java
|
|
@@ -84,8 +84,8 @@ public class Pillager extends AbstractIllager implements CrossbowAttackMob, Inve
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.pillagerMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.pillagerScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.pillagerMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.pillagerScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/Ravager.java b/net/minecraft/world/entity/monster/Ravager.java
|
|
index 2b85cedf235e673d6030c2a649abf60b5792b242..ac13a83d8b7fbbb57999b23869ac97d7fc006fd0 100644
|
|
--- a/net/minecraft/world/entity/monster/Ravager.java
|
|
+++ b/net/minecraft/world/entity/monster/Ravager.java
|
|
@@ -96,8 +96,8 @@ public class Ravager extends Raider {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.ravagerMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.ravagerScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.ravagerMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.ravagerScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/Shulker.java b/net/minecraft/world/entity/monster/Shulker.java
|
|
index a46ca09f661a4f8f3ede6550d613e0c704a9389b..9a0e634144ad852bb308ec957b21c1dc373e9d06 100644
|
|
--- a/net/minecraft/world/entity/monster/Shulker.java
|
|
+++ b/net/minecraft/world/entity/monster/Shulker.java
|
|
@@ -129,8 +129,8 @@ public class Shulker extends AbstractGolem implements Enemy {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.shulkerMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.shulkerScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.shulkerMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.shulkerScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/Silverfish.java b/net/minecraft/world/entity/monster/Silverfish.java
|
|
index bcae390578519fef362a126fbcf2b5cfd18c3dc4..bec362df43c3396a9a9d9b9204f0605ed7113aac 100644
|
|
--- a/net/minecraft/world/entity/monster/Silverfish.java
|
|
+++ b/net/minecraft/world/entity/monster/Silverfish.java
|
|
@@ -59,10 +59,10 @@ public class Silverfish extends Monster {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.silverfishMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.silverfishScale);
|
|
- this.getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(this.level().purpurConfig.silverfishMovementSpeed);
|
|
- this.getAttribute(Attributes.ATTACK_DAMAGE).setBaseValue(this.level().purpurConfig.silverfishAttackDamage);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.silverfishMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.silverfishScale);
|
|
+ this.setAttributeBaseValue(Attributes.MOVEMENT_SPEED, this.level().purpurConfig.silverfishMovementSpeed);
|
|
+ this.setAttributeBaseValue(Attributes.ATTACK_DAMAGE, this.level().purpurConfig.silverfishAttackDamage);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/Skeleton.java b/net/minecraft/world/entity/monster/Skeleton.java
|
|
index c6ab31fa5204220f4c89dd48dd0966036a4975cf..7683c6a2ab2a9775c7a7297f46b73724c44b4caa 100644
|
|
--- a/net/minecraft/world/entity/monster/Skeleton.java
|
|
+++ b/net/minecraft/world/entity/monster/Skeleton.java
|
|
@@ -47,7 +47,7 @@ public class Skeleton extends AbstractSkeleton {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.skeletonMaxHealth);
|
|
+ this.setAttributeBaseValue(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH, this.level().purpurConfig.skeletonMaxHealth);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/Spider.java b/net/minecraft/world/entity/monster/Spider.java
|
|
index 7c50ed0b7bd0d7138b80613ea08519ae457f49a3..22eaf7cc5235546452cd01dc69fd7f57bf59bc81 100644
|
|
--- a/net/minecraft/world/entity/monster/Spider.java
|
|
+++ b/net/minecraft/world/entity/monster/Spider.java
|
|
@@ -70,8 +70,8 @@ public class Spider extends Monster {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.spiderMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.spiderScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.spiderMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.spiderScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/Stray.java b/net/minecraft/world/entity/monster/Stray.java
|
|
index e69a5c552d2f57bc373cb2b89690a7dd9c2faefc..cfbb89f278e84d39a2b412fb72d7114de42c9b40 100644
|
|
--- a/net/minecraft/world/entity/monster/Stray.java
|
|
+++ b/net/minecraft/world/entity/monster/Stray.java
|
|
@@ -42,7 +42,7 @@ public class Stray extends AbstractSkeleton {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.strayMaxHealth);
|
|
+ this.setAttributeBaseValue(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH, this.level().purpurConfig.strayMaxHealth);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/Strider.java b/net/minecraft/world/entity/monster/Strider.java
|
|
index 31cace20dfd61bd591f501d840a190799808926f..4a4f3ed5dbc6b1934b2901c3a21597ba783b1806 100644
|
|
--- a/net/minecraft/world/entity/monster/Strider.java
|
|
+++ b/net/minecraft/world/entity/monster/Strider.java
|
|
@@ -112,8 +112,8 @@ public class Strider extends Animal implements ItemSteerable {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.striderMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.striderScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.striderMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.striderScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/Vex.java b/net/minecraft/world/entity/monster/Vex.java
|
|
index ab320cf5a8c68fd239e81172a2f3909a67931105..d22216b533c01e1ed7bc8947f95f765c89195831 100644
|
|
--- a/net/minecraft/world/entity/monster/Vex.java
|
|
+++ b/net/minecraft/world/entity/monster/Vex.java
|
|
@@ -107,8 +107,8 @@ public class Vex extends Monster implements TraceableEntity {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.vexMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.vexScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.vexMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.vexScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/Vindicator.java b/net/minecraft/world/entity/monster/Vindicator.java
|
|
index 7f70b2387842f65da4632f1a27669a02d4e0402d..52b2f4e1bf1732b46e5e2914f37f38ea80158997 100644
|
|
--- a/net/minecraft/world/entity/monster/Vindicator.java
|
|
+++ b/net/minecraft/world/entity/monster/Vindicator.java
|
|
@@ -76,8 +76,8 @@ public class Vindicator extends AbstractIllager {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.vindicatorMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.vindicatorScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.vindicatorMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.vindicatorScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/Witch.java b/net/minecraft/world/entity/monster/Witch.java
|
|
index bfb0e3381abb93bea1079fb0d476cf856fca442e..5d0c0afc178cea8dd6fbd5e133693eb2c09e80ec 100644
|
|
--- a/net/minecraft/world/entity/monster/Witch.java
|
|
+++ b/net/minecraft/world/entity/monster/Witch.java
|
|
@@ -76,8 +76,8 @@ public class Witch extends Raider implements RangedAttackMob {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.witchMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.witchScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.witchMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.witchScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/WitherSkeleton.java b/net/minecraft/world/entity/monster/WitherSkeleton.java
|
|
index b3f5b2e3e2cfc378de948c0e186727d5687c0e98..1af64a3f0d5c31086dba6802b6294eb80ab50de7 100644
|
|
--- a/net/minecraft/world/entity/monster/WitherSkeleton.java
|
|
+++ b/net/minecraft/world/entity/monster/WitherSkeleton.java
|
|
@@ -54,8 +54,8 @@ public class WitherSkeleton extends AbstractSkeleton {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.witherSkeletonMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.witherSkeletonScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.witherSkeletonMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.witherSkeletonScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/Zoglin.java b/net/minecraft/world/entity/monster/Zoglin.java
|
|
index 385e6d997ea511dd44a7319879baff14addee8bd..eb82a05d39d22e917f63fcb50143c42a0f05d9fa 100644
|
|
--- a/net/minecraft/world/entity/monster/Zoglin.java
|
|
+++ b/net/minecraft/world/entity/monster/Zoglin.java
|
|
@@ -105,8 +105,8 @@ public class Zoglin extends Monster implements HoglinBase {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.zoglinMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.zoglinScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.zoglinMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.zoglinScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java
|
|
index c27aa33e667abd89c10708f64b172efdf2f07a60..8a8b47366acf1d368d098a06d2996879a80df19a 100644
|
|
--- a/net/minecraft/world/entity/monster/Zombie.java
|
|
+++ b/net/minecraft/world/entity/monster/Zombie.java
|
|
@@ -124,9 +124,9 @@ public class Zombie extends Monster {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.zombieMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.zombieScale);
|
|
- this.getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(this.level().purpurConfig.zombieMovementSpeed); // Leaf - Configurable movement speed of more entities - zombie
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.zombieMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.zombieScale);
|
|
+ this.setAttributeBaseValue(Attributes.MOVEMENT_SPEED, this.level().purpurConfig.zombieMovementSpeed); // Leaf - Configurable movement speed of more entities - zombie
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/ZombieVillager.java b/net/minecraft/world/entity/monster/ZombieVillager.java
|
|
index e89e4c26c40cbb3ef002022f22886d5faa7869fd..ced3734403c136f03a571e1e1c3afdde92cd2f6d 100644
|
|
--- a/net/minecraft/world/entity/monster/ZombieVillager.java
|
|
+++ b/net/minecraft/world/entity/monster/ZombieVillager.java
|
|
@@ -96,8 +96,8 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.zombieVillagerMaxHealth);
|
|
- this.getAttribute(net.minecraft.world.entity.ai.attributes.Attributes.MOVEMENT_SPEED).setBaseValue(this.level().purpurConfig.zombieVillagerMovementSpeed); // Leaf - Configurable movement speed of more entities - zombieVillager
|
|
+ this.setAttributeBaseValue(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH, this.level().purpurConfig.zombieVillagerMaxHealth);
|
|
+ this.setAttributeBaseValue(net.minecraft.world.entity.ai.attributes.Attributes.MOVEMENT_SPEED, this.level().purpurConfig.zombieVillagerMovementSpeed); // Leaf - Configurable movement speed of more entities - zombieVillager
|
|
}
|
|
|
|
@Override
|
|
diff --git a/net/minecraft/world/entity/monster/ZombifiedPiglin.java b/net/minecraft/world/entity/monster/ZombifiedPiglin.java
|
|
index cc349403ceb9b094362e706f4e5b200a51071380..41cb3ad889dfd224e68e024309fc10065878620b 100644
|
|
--- a/net/minecraft/world/entity/monster/ZombifiedPiglin.java
|
|
+++ b/net/minecraft/world/entity/monster/ZombifiedPiglin.java
|
|
@@ -84,9 +84,9 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.zombifiedPiglinMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.zombifiedPiglinScale);
|
|
- this.getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(this.level().purpurConfig.zombifiedPiglinMovementSpeed); // Leaf - Configurable movement speed of more entities - zombifiedPiglin
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.zombifiedPiglinMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.zombifiedPiglinScale);
|
|
+ this.setAttributeBaseValue(Attributes.MOVEMENT_SPEED, this.level().purpurConfig.zombifiedPiglinMovementSpeed); // Leaf - Configurable movement speed of more entities - zombifiedPiglin
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/creaking/Creaking.java b/net/minecraft/world/entity/monster/creaking/Creaking.java
|
|
index ef0522feaa1cc9704f778309c1e6cf1d68379376..9b49a3eda5f6da9b6761c59e37a0285ebbf8a05c 100644
|
|
--- a/net/minecraft/world/entity/monster/creaking/Creaking.java
|
|
+++ b/net/minecraft/world/entity/monster/creaking/Creaking.java
|
|
@@ -127,8 +127,8 @@ public class Creaking extends Monster {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.creakingMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.creakingScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.creakingMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.creakingScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
|
index 8c9f240badf5a678ee4e1815e010a204f8704f4e..17f8f2ec482c49d0094fa88c2795704ed65191cd 100644
|
|
--- a/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
|
+++ b/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
|
@@ -114,8 +114,8 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.hoglinMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.hoglinScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.hoglinMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.hoglinScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/piglin/Piglin.java b/net/minecraft/world/entity/monster/piglin/Piglin.java
|
|
index e442784741f1d0b4892284b6811343f954b50182..6080f990819ced3ce11d748313908828f8fb7242 100644
|
|
--- a/net/minecraft/world/entity/monster/piglin/Piglin.java
|
|
+++ b/net/minecraft/world/entity/monster/piglin/Piglin.java
|
|
@@ -155,8 +155,8 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.piglinMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.piglinScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.piglinMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.piglinScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/piglin/PiglinBrute.java b/net/minecraft/world/entity/monster/piglin/PiglinBrute.java
|
|
index c4eb58d0b0c51e930f9cb72e1de0103902badba7..97f00d3a124403a98ece7acc2868825e56e191bd 100644
|
|
--- a/net/minecraft/world/entity/monster/piglin/PiglinBrute.java
|
|
+++ b/net/minecraft/world/entity/monster/piglin/PiglinBrute.java
|
|
@@ -83,8 +83,8 @@ public class PiglinBrute extends AbstractPiglin {
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.piglinBruteMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.piglinBruteScale);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.piglinBruteMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.piglinBruteScale);
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/warden/Warden.java b/net/minecraft/world/entity/monster/warden/Warden.java
|
|
index e0bd1268f77b7234331c9fea0b11b5b04a66a4ad..a04689ea17fb84eca4a29d7476acf5fd6268cd45 100644
|
|
--- a/net/minecraft/world/entity/monster/warden/Warden.java
|
|
+++ b/net/minecraft/world/entity/monster/warden/Warden.java
|
|
@@ -161,7 +161,7 @@ public class Warden extends Monster implements VibrationSystem {
|
|
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.wardenMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.wardenMaxHealth);
|
|
}
|
|
// Leaf end - Plazma - Add missing purpur configuration options
|
|
|
|
diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java
|
|
index b0c7bd4c38561194edfa003a1fc942a6fab5ce72..0812b9a150854f257a96a198652bca594eab3668 100644
|
|
--- a/net/minecraft/world/entity/npc/Villager.java
|
|
+++ b/net/minecraft/world/entity/npc/Villager.java
|
|
@@ -275,9 +275,9 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.villagerMaxHealth);
|
|
- this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.villagerScale);
|
|
- this.getAttribute(Attributes.TEMPT_RANGE).setBaseValue(this.level().purpurConfig.villagerTemptRange); // Purpur - Villagers follow emerald blocks
|
|
+ this.setAttributeBaseValue(Attributes.MAX_HEALTH, this.level().purpurConfig.villagerMaxHealth);
|
|
+ this.setAttributeBaseValue(Attributes.SCALE, this.level().purpurConfig.villagerScale);
|
|
+ this.setAttributeBaseValue(Attributes.TEMPT_RANGE, this.level().purpurConfig.villagerTemptRange); // Purpur - Villagers follow emerald blocks
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|
|
diff --git a/net/minecraft/world/entity/npc/WanderingTrader.java b/net/minecraft/world/entity/npc/WanderingTrader.java
|
|
index dc6b30518270486cf3b2eaab4db13a507917f37d..3876bd5d40cd8e78408eced07040df97e649ba94 100644
|
|
--- a/net/minecraft/world/entity/npc/WanderingTrader.java
|
|
+++ b/net/minecraft/world/entity/npc/WanderingTrader.java
|
|
@@ -87,8 +87,8 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
|
|
// Purpur start - Configurable entity base attributes
|
|
@Override
|
|
public void initAttributes() {
|
|
- this.getAttribute(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.wanderingTraderMaxHealth);
|
|
- this.getAttribute(net.minecraft.world.entity.ai.attributes.Attributes.TEMPT_RANGE).setBaseValue(this.level().purpurConfig.wanderingTraderTemptRange); // Purpur - Villagers follow emerald blocks
|
|
+ this.setAttributeBaseValue(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH, this.level().purpurConfig.wanderingTraderMaxHealth);
|
|
+ this.setAttributeBaseValue(net.minecraft.world.entity.ai.attributes.Attributes.TEMPT_RANGE, this.level().purpurConfig.wanderingTraderTemptRange); // Purpur - Villagers follow emerald blocks
|
|
}
|
|
// Purpur end - Configurable entity base attributes
|
|
|