configurable mob size attribute (#1538)

This commit is contained in:
granny
2024-06-21 04:11:09 -07:00
committed by GitHub
parent c0f5e78dc2
commit b82f6939fe
234 changed files with 2140 additions and 1855 deletions

View File

@@ -32,10 +32,10 @@ index 6b76ca326d08853a8a508ec22d7bc6cf370223dd..07068e5f93289534f10c0b876dbf884a
// Purpur start
if (entity instanceof LivingEntity entityliving) {
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 2721414186082d357f58fa3779333e09c85ac092..961488a258103ddb77c5773bf7dbb66d9d97cbb7 100644
index 97f3ce2c92caa52a0cf113080a260295f8a15687..870d394b388d82547662db833a806c071b6c2889 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1383,6 +1383,7 @@ public class PurpurWorldConfig {
@@ -1411,6 +1411,7 @@ public class PurpurWorldConfig {
public boolean creeperExplodeWhenKilled = false;
public boolean creeperHealthRadius = false;
public boolean creeperAlwaysDropExp = false;
@@ -43,7 +43,7 @@ index 2721414186082d357f58fa3779333e09c85ac092..961488a258103ddb77c5773bf7dbb66d
private void creeperSettings() {
creeperRidable = getBoolean("mobs.creeper.ridable", creeperRidable);
creeperRidableInWater = getBoolean("mobs.creeper.ridable-in-water", creeperRidableInWater);
@@ -1400,6 +1401,7 @@ public class PurpurWorldConfig {
@@ -1429,6 +1430,7 @@ public class PurpurWorldConfig {
creeperExplodeWhenKilled = getBoolean("mobs.creeper.explode-when-killed", creeperExplodeWhenKilled);
creeperHealthRadius = getBoolean("mobs.creeper.health-impacts-explosion", creeperHealthRadius);
creeperAlwaysDropExp = getBoolean("mobs.creeper.always-drop-exp", creeperAlwaysDropExp);
@@ -51,7 +51,7 @@ index 2721414186082d357f58fa3779333e09c85ac092..961488a258103ddb77c5773bf7dbb66d
}
public boolean dolphinRidable = false;
@@ -2186,6 +2188,7 @@ public class PurpurWorldConfig {
@@ -2258,6 +2260,7 @@ public class PurpurWorldConfig {
public boolean piglinTakeDamageFromWater = false;
public int piglinPortalSpawnModifier = 2000;
public boolean piglinAlwaysDropExp = false;
@@ -59,7 +59,7 @@ index 2721414186082d357f58fa3779333e09c85ac092..961488a258103ddb77c5773bf7dbb66d
private void piglinSettings() {
piglinRidable = getBoolean("mobs.piglin.ridable", piglinRidable);
piglinRidableInWater = getBoolean("mobs.piglin.ridable-in-water", piglinRidableInWater);
@@ -2200,6 +2203,7 @@ public class PurpurWorldConfig {
@@ -2273,6 +2276,7 @@ public class PurpurWorldConfig {
piglinTakeDamageFromWater = getBoolean("mobs.piglin.takes-damage-from-water", piglinTakeDamageFromWater);
piglinPortalSpawnModifier = getInt("mobs.piglin.portal-spawn-modifier", piglinPortalSpawnModifier);
piglinAlwaysDropExp = getBoolean("mobs.piglin.always-drop-exp", piglinAlwaysDropExp);
@@ -67,23 +67,23 @@ index 2721414186082d357f58fa3779333e09c85ac092..961488a258103ddb77c5773bf7dbb66d
}
public boolean piglinBruteRidable = false;
@@ -2463,6 +2467,7 @@ public class PurpurWorldConfig {
public double skeletonMaxHealth = 20.0D;
@@ -2557,6 +2561,7 @@ public class PurpurWorldConfig {
public double skeletonScale = 1.0D;
public boolean skeletonTakeDamageFromWater = false;
public boolean skeletonAlwaysDropExp = false;
+ public double skeletonHeadVisibilityPercent = 0.5D;
private void skeletonSettings() {
skeletonRidable = getBoolean("mobs.skeleton.ridable", skeletonRidable);
skeletonRidableInWater = getBoolean("mobs.skeleton.ridable-in-water", skeletonRidableInWater);
@@ -2475,6 +2480,7 @@ public class PurpurWorldConfig {
skeletonMaxHealth = getDouble("mobs.skeleton.attributes.max_health", skeletonMaxHealth);
@@ -2570,6 +2575,7 @@ public class PurpurWorldConfig {
skeletonScale = Mth.clamp(getDouble("mobs.skeleton.attributes.scale", skeletonScale), 0.0625D, 16.0D);
skeletonTakeDamageFromWater = getBoolean("mobs.skeleton.takes-damage-from-water", skeletonTakeDamageFromWater);
skeletonAlwaysDropExp = getBoolean("mobs.skeleton.always-drop-exp", skeletonAlwaysDropExp);
+ skeletonHeadVisibilityPercent = getDouble("mobs.skeleton.head-visibility-percent", skeletonHeadVisibilityPercent);
}
public boolean skeletonHorseRidable = false;
@@ -3009,6 +3015,7 @@ public class PurpurWorldConfig {
@@ -3139,6 +3145,7 @@ public class PurpurWorldConfig {
public boolean zombieBypassMobGriefing = false;
public boolean zombieTakeDamageFromWater = false;
public boolean zombieAlwaysDropExp = false;
@@ -91,7 +91,7 @@ index 2721414186082d357f58fa3779333e09c85ac092..961488a258103ddb77c5773bf7dbb66d
private void zombieSettings() {
zombieRidable = getBoolean("mobs.zombie.ridable", zombieRidable);
zombieRidableInWater = getBoolean("mobs.zombie.ridable-in-water", zombieRidableInWater);
@@ -3027,6 +3034,7 @@ public class PurpurWorldConfig {
@@ -3158,6 +3165,7 @@ public class PurpurWorldConfig {
zombieBypassMobGriefing = getBoolean("mobs.zombie.bypass-mob-griefing", zombieBypassMobGriefing);
zombieTakeDamageFromWater = getBoolean("mobs.zombie.takes-damage-from-water", zombieTakeDamageFromWater);
zombieAlwaysDropExp = getBoolean("mobs.zombie.always-drop-exp", zombieAlwaysDropExp);