@@ -5,7 +5,7 @@ Subject: [PATCH] Configurable entity base attributes
55
66
77diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
8- index 5263f97db83626096b1c4fef415a2fbf41bc9ce7..0360d3a4e7f291e3528a0debe4909e774e8c8b91 100644
8+ index 697c8c8fd0cdca4bb8bc3db62f7de8999785ec1e..90a51b05c80d079af07133a3e509aada57927a26 100644
99--- a/src/main/java/net/minecraft/world/entity/Entity.java
1010+++ b/src/main/java/net/minecraft/world/entity/Entity.java
1111@@ -177,7 +177,7 @@ import org.bukkit.plugin.PluginManager;
@@ -34,7 +34,7 @@ index 7c11b5e73d4f3c0be7c467f7522c2d974ab330f3..27aee968718af1ae78e2076ddc890114
3434 protected ParticleOptions getInkParticle() {
3535 return ParticleTypes.GLOW_SQUID_INK;
3636diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
37- index b8303404f8a81e2b446a9a40861787ca786aad47..5eb5976a0fbe1959f9015734cc0b31503604649d 100644
37+ index b027633d6c854f481fbd4a2e4b89ace4b9d7a398..f4cc9ff863079f5546cce1bfa0f1dcab022bb293 100644
3838--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
3939+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
4040@@ -326,6 +326,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -214,7 +214,7 @@ index 9d82fec6f5969816095dbd5a11325c79002dbb61..500109364b4741fc310eb22c151754a1
214214
215215 @Override
216216diff --git a/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java b/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java
217- index d554c62b89f382018c5be872077cccf1425c8e35..358f8d6650ed9820e7378d29f993b71504e779f3 100644
217+ index ba8d47111cf80c8e9a0b47793f125ca91f5f906e..0005cd7156e46ae790d629d7a985cdace1cc5577 100644
218218--- a/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java
219219+++ b/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java
220220@@ -82,6 +82,11 @@ public class MushroomCow extends Cow implements Shearable, VariantHolder<Mushroo
@@ -377,7 +377,7 @@ index 18e5d9787590dbb2c78087326652558565a6b1f4..9ec3479b0db1f42493db127081e341fa
377377 public int getMaxSchoolSize() {
378378 return 5;
379379diff --git a/src/main/java/net/minecraft/world/entity/animal/Sheep.java b/src/main/java/net/minecraft/world/entity/animal/Sheep.java
380- index b5f559181f82a7afeb035ea3cbd539dd5aa4d1c8..bc975266fbf0348723dc04e29fd6bf8231b9cb87 100644
380+ index e19a0f7b805b6292c2b4c68981b3484645129dba..38799a817742b1bbaf921f1e24cf2fc44ab52050 100644
381381--- a/src/main/java/net/minecraft/world/entity/animal/Sheep.java
382382+++ b/src/main/java/net/minecraft/world/entity/animal/Sheep.java
383383@@ -108,6 +108,12 @@ public class Sheep extends Animal implements Shearable {
@@ -461,7 +461,7 @@ index a9aae028195c0646d1692f55d2ebfe58747c37b6..500676a78aedc525aca989ccd0380cd2
461461 this.entityData.set(Turtle.HOME_POS, pos);
462462 }
463463diff --git a/src/main/java/net/minecraft/world/entity/animal/Wolf.java b/src/main/java/net/minecraft/world/entity/animal/Wolf.java
464- index 6eadd5064148a7b75a1946274c25ff90fa49096a..d082ca3ed17e8bbb27c1a971259720d43246b47f 100644
464+ index 04b6cb63bac767b386b8f67cf80a4d75df9d7fe5..40a766e20d1a2111d561cc05aa49e2ac50187d19 100644
465465--- a/src/main/java/net/minecraft/world/entity/animal/Wolf.java
466466+++ b/src/main/java/net/minecraft/world/entity/animal/Wolf.java
467467@@ -146,6 +146,12 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder<Hol
@@ -881,7 +881,7 @@ index 86c56940e0bbd3a9bfdd9d7617f27bbc4b0841f4..e719859160c35fcdffeff7c2a1d6aa2d
881881 protected void registerGoals() {
882882 this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
883883diff --git a/src/main/java/net/minecraft/world/entity/monster/Bogged.java b/src/main/java/net/minecraft/world/entity/monster/Bogged.java
884- index 4e3d535d7c6facb5e5544545343973173ed90d45..52993da6868161105450491a81f5c32356fa17aa 100644
884+ index d96f6eb4fc881bf0cb2e7fdb46805f169297d923..ca63ab37bc6b5b4cb5abf2848dae476b5d937f2a 100644
885885--- a/src/main/java/net/minecraft/world/entity/monster/Bogged.java
886886+++ b/src/main/java/net/minecraft/world/entity/monster/Bogged.java
887887@@ -59,6 +59,12 @@ public class Bogged extends AbstractSkeleton implements Shearable {
@@ -1550,6 +1550,25 @@ index aa4160892b9ba2486806b5a54bc1465a4e273370..ba1ce7e0ed888bd47312e9d7da5426f5
15501550 }
15511551
15521552 @Nullable
1553+ diff --git a/src/main/java/net/minecraft/world/entity/monster/creaking/Creaking.java b/src/main/java/net/minecraft/world/entity/monster/creaking/Creaking.java
1554+ index f935d475fd1aca407bde420e9ba8002002ea55f6..9bf251915c8a126ba480f44ea203f1a48e1ecde3 100644
1555+ --- a/src/main/java/net/minecraft/world/entity/monster/creaking/Creaking.java
1556+ +++ b/src/main/java/net/minecraft/world/entity/monster/creaking/Creaking.java
1557+ @@ -208,6 +208,14 @@ public class Creaking extends Monster {
1558+ return this.isActive() ? null : SoundEvents.CREAKING_AMBIENT;
1559+ }
1560+
1561+ + // Purpur start
1562+ + @Override
1563+ + public void initAttributes() {
1564+ + this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.creakingMaxHealth);
1565+ + this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.creakingScale);
1566+ + }
1567+ + // Purpur end
1568+ +
1569+ @Override
1570+ protected SoundEvent getHurtSound(DamageSource source) {
1571+ return SoundEvents.CREAKING_SWAY;
15531572diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
15541573index b92c65703dfc4ed95de97534b1e8195c627aa212..08c4a32b1195820eb574cdf4a499107565a551d6 100644
15551574--- a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
@@ -1635,10 +1654,10 @@ index f39a69294317e90c8198efc0680f451a8add7908..f741aca818bc983b034b3ac9864c1d71
16351654 protected void registerGoals() {
16361655 this.goalSelector.addGoal(0, new FloatGoal(this));
16371656diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
1638- index 2e35e494134e5294fd67a0bf9abbe3f68d5faea5..65cbd35892ab48fccda9bccf2b4dd66be5c84a0d 100644
1657+ index 5004e86747306cc8d4bbed6f10d3a6e9047cb5f4..ee9bcb7d011f20575cbbbe2e0ded1e53087aba7a 100644
16391658--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
16401659+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
1641- @@ -105,125 +105,248 @@ public class PurpurWorldConfig {
1660+ @@ -105,134 +105,261 @@ public class PurpurWorldConfig {
16421661 public boolean allayRidable = false;
16431662 public boolean allayRidableInWater = true;
16441663 public boolean allayControllable = true;
@@ -1868,6 +1887,19 @@ index 2e35e494134e5294fd67a0bf9abbe3f68d5faea5..65cbd35892ab48fccda9bccf2b4dd66b
18681887+ cowScale = Mth.clamp(getDouble("mobs.cow.attributes.scale", cowScale), 0.0625D, 16.0D);
18691888 }
18701889
1890+ public boolean creakingRidable = false;
1891+ public boolean creakingRidableInWater = true;
1892+ public boolean creakingControllable = true;
1893+ + public double creakingMaxHealth = 1.0D;
1894+ + public double creakingScale = 1.0D;
1895+ private void creakingSettings() {
1896+ creakingRidable = getBoolean("mobs.creaking.ridable", creakingRidable);
1897+ creakingRidableInWater = getBoolean("mobs.creaking.ridable-in-water", creakingRidableInWater);
1898+ creakingControllable = getBoolean("mobs.creaking.controllable", creakingControllable);
1899+ + creakingMaxHealth = getDouble("mobs.creaking.attributes.max_health", creakingMaxHealth);
1900+ + creakingScale = Mth.clamp(getDouble("mobs.creaking.attributes.scale", creakingScale), 0.0625D, 16.0D);
1901+ }
1902+
18711903 public boolean creeperRidable = false;
18721904 public boolean creeperRidableInWater = true;
18731905 public boolean creeperControllable = true;
@@ -1887,7 +1919,7 @@ index 2e35e494134e5294fd67a0bf9abbe3f68d5faea5..65cbd35892ab48fccda9bccf2b4dd66b
18871919 }
18881920
18891921 public boolean dolphinRidable = false;
1890- @@ -231 ,80 +354 ,175 @@ public class PurpurWorldConfig {
1922+ @@ -240 ,80 +367 ,175 @@ public class PurpurWorldConfig {
18911923 public int dolphinSpitCooldown = 20;
18921924 public float dolphinSpitSpeed = 1.0F;
18931925 public float dolphinSpitDamage = 2.0F;
@@ -2063,7 +2095,7 @@ index 2e35e494134e5294fd67a0bf9abbe3f68d5faea5..65cbd35892ab48fccda9bccf2b4dd66b
20632095 }
20642096
20652097 public boolean frogRidable = false;
2066- @@ -322 ,147 +540 ,342 @@ public class PurpurWorldConfig {
2098+ @@ -331 ,147 +553 ,342 @@ public class PurpurWorldConfig {
20672099 public boolean ghastRidableInWater = true;
20682100 public boolean ghastControllable = true;
20692101 public double ghastMaxY = 320D;
@@ -2406,7 +2438,7 @@ index 2e35e494134e5294fd67a0bf9abbe3f68d5faea5..65cbd35892ab48fccda9bccf2b4dd66b
24062438 }
24072439
24082440 public boolean phantomRidable = false;
2409- @@ -472 ,6 +885 ,10 @@ public class PurpurWorldConfig {
2441+ @@ -481 ,6 +898 ,10 @@ public class PurpurWorldConfig {
24102442 public float phantomFlameDamage = 1.0F;
24112443 public int phantomFlameFireTime = 8;
24122444 public boolean phantomAllowGriefing = false;
@@ -2417,7 +2449,7 @@ index 2e35e494134e5294fd67a0bf9abbe3f68d5faea5..65cbd35892ab48fccda9bccf2b4dd66b
24172449 private void phantomSettings() {
24182450 phantomRidable = getBoolean("mobs.phantom.ridable", phantomRidable);
24192451 phantomRidableInWater = getBoolean("mobs.phantom.ridable-in-water", phantomRidableInWater);
2420- @@ -480 ,191 +897 ,405 @@ public class PurpurWorldConfig {
2452+ @@ -489 ,191 +910 ,405 @@ public class PurpurWorldConfig {
24212453 phantomFlameDamage = (float) getDouble("mobs.phantom.flames.damage", phantomFlameDamage);
24222454 phantomFlameFireTime = getInt("mobs.phantom.flames.fire-time", phantomFlameFireTime);
24232455 phantomAllowGriefing = getBoolean("mobs.phantom.allow-griefing", phantomAllowGriefing);
@@ -2823,7 +2855,7 @@ index 2e35e494134e5294fd67a0bf9abbe3f68d5faea5..65cbd35892ab48fccda9bccf2b4dd66b
28232855 }
28242856
28252857 public boolean tadpoleRidable = false;
2826- @@ -679 ,64 +1310 ,137 @@ public class PurpurWorldConfig {
2858+ @@ -688 ,64 +1323 ,137 @@ public class PurpurWorldConfig {
28272859 public boolean traderLlamaRidable = false;
28282860 public boolean traderLlamaRidableInWater = false;
28292861 public boolean traderLlamaControllable = true;
@@ -2961,7 +2993,7 @@ index 2e35e494134e5294fd67a0bf9abbe3f68d5faea5..65cbd35892ab48fccda9bccf2b4dd66b
29612993 }
29622994
29632995 public boolean wardenRidable = false;
2964- @@ -751 ,83 +1455 ,183 @@ public class PurpurWorldConfig {
2996+ @@ -760 ,83 +1468 ,183 @@ public class PurpurWorldConfig {
29652997 public boolean witchRidable = false;
29662998 public boolean witchRidableInWater = true;
29672999 public boolean witchControllable = true;
0 commit comments