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

@@ -10,10 +10,10 @@ If min-shoot-interval-ticks and max-shoot-interval-ticks are both set to
0, snow golems won't shoot any snowballs.
diff --git a/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java b/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java
index 0060414b1d5afde56372ce121e9d37a1668cd03b..ee4d4a4fe314ee9bce69c96dd65d84ed1ace0543 100644
index dc5af0b71ec82a8f22e64b03950e35845110a331..5b910b4168b7f7825916c14e402f7f00b651cd60 100644
--- a/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java
+++ b/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java
@@ -77,7 +77,7 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM
@@ -78,7 +78,7 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM
@Override
protected void registerGoals() {
this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
@@ -23,12 +23,12 @@ index 0060414b1d5afde56372ce121e9d37a1668cd03b..ee4d4a4fe314ee9bce69c96dd65d84ed
this.goalSelector.addGoal(3, new LookAtPlayerGoal(this, Player.class, 6.0F));
this.goalSelector.addGoal(4, new RandomLookAroundGoal(this));
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 53fb0bd1fb6c63f0580769243e645f38786aef28..dac1d00e6c79bd2fcf57d950f9e528b7d4ff8542 100644
index fa91c4afeaf1a01d27fea3741e85cc5721d80d14..ef7ef1c1d02b6ab51b7ac1c944c18e303a39e27b 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1625,6 +1625,10 @@ public class PurpurWorldConfig {
public boolean snowGolemLeaveTrailWhenRidden = false;
@@ -1721,6 +1721,10 @@ public class PurpurWorldConfig {
public double snowGolemMaxHealth = 4.0D;
public double snowGolemScale = 1.0D;
public boolean snowGolemPutPumpkinBack = false;
+ public int snowGolemSnowBallMin = 20;
+ public int snowGolemSnowBallMax = 20;
@@ -37,9 +37,9 @@ index 53fb0bd1fb6c63f0580769243e645f38786aef28..dac1d00e6c79bd2fcf57d950f9e528b7
private void snowGolemSettings() {
snowGolemRidable = getBoolean("mobs.snow_golem.ridable", snowGolemRidable);
snowGolemRidableInWater = getBoolean("mobs.snow_golem.ridable-in-water", snowGolemRidableInWater);
@@ -1637,6 +1641,10 @@ public class PurpurWorldConfig {
}
@@ -1734,6 +1738,10 @@ public class PurpurWorldConfig {
snowGolemMaxHealth = getDouble("mobs.snow_golem.attributes.max_health", snowGolemMaxHealth);
snowGolemScale = Mth.clamp(getDouble("mobs.snow_golem.attributes.scale", snowGolemScale), 0.0625D, 16.0D);
snowGolemPutPumpkinBack = getBoolean("mobs.snow_golem.pumpkin-can-be-added-back", snowGolemPutPumpkinBack);
+ snowGolemSnowBallMin = getInt("mobs.snow_golem.min-shoot-interval-ticks", snowGolemSnowBallMin);
+ snowGolemSnowBallMax = getInt("mobs.snow_golem.max-shoot-interval-ticks", snowGolemSnowBallMax);