mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 09:57:43 +01:00
configurable mob size attribute (#1538)
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] Giants AI settings
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Giant.java b/src/main/java/net/minecraft/world/entity/monster/Giant.java
|
||||
index 9602e59cbebeedc85ea75d2a41d3e74f0ff45b46..0d211d4c120186667682dbb5f320ec45ef6c235d 100644
|
||||
index 48035556b0743f7641d77ec3a42c860f1e1ee6c3..39367523621c330eda59905d1f2c129288a1026c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Giant.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Giant.java
|
||||
@@ -30,8 +30,23 @@ public class Giant extends Monster {
|
||||
@@ -34,7 +34,7 @@ index 9602e59cbebeedc85ea75d2a41d3e74f0ff45b46..0d211d4c120186667682dbb5f320ec45
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -47,8 +62,34 @@ public class Giant extends Monster {
|
||||
@@ -48,8 +63,34 @@ public class Giant extends Monster {
|
||||
return Monster.createMonsterAttributes().add(Attributes.MAX_HEALTH, 100.0).add(Attributes.MOVEMENT_SPEED, 0.5).add(Attributes.ATTACK_DAMAGE, 50.0);
|
||||
}
|
||||
|
||||
@@ -71,13 +71,13 @@ index 9602e59cbebeedc85ea75d2a41d3e74f0ff45b46..0d211d4c120186667682dbb5f320ec45
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 9c0362396ae2646ee9caf6756ecdef3a605328a7..d60746b2a05a93683be845bdf36131c71091ed9b 100644
|
||||
index cdef3af8a48d640a8180b5a5658b0ef46087095f..22248cd0752812739df8e7ab911ef04b3d2ed458 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -576,6 +576,10 @@ public class PurpurWorldConfig {
|
||||
public double giantMovementSpeed = 0.5D;
|
||||
@@ -622,6 +622,10 @@ public class PurpurWorldConfig {
|
||||
public double giantAttackDamage = 50.0D;
|
||||
public double giantMaxHealth = 100.0D;
|
||||
public double giantScale = 1.0D;
|
||||
+ public float giantStepHeight = 2.0F;
|
||||
+ public float giantJumpHeight = 1.0F;
|
||||
+ public boolean giantHaveAI = false;
|
||||
@@ -85,10 +85,10 @@ index 9c0362396ae2646ee9caf6756ecdef3a605328a7..d60746b2a05a93683be845bdf36131c7
|
||||
private void giantSettings() {
|
||||
giantRidable = getBoolean("mobs.giant.ridable", giantRidable);
|
||||
giantRidableInWater = getBoolean("mobs.giant.ridable-in-water", giantRidableInWater);
|
||||
@@ -592,6 +596,10 @@ public class PurpurWorldConfig {
|
||||
set("mobs.giant.attributes.max_health", oldValue);
|
||||
@@ -639,6 +643,10 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
giantMaxHealth = getDouble("mobs.giant.attributes.max_health", giantMaxHealth);
|
||||
giantScale = Mth.clamp(getDouble("mobs.giant.attributes.scale", giantScale), 0.0625D, 16.0D);
|
||||
+ giantStepHeight = (float) getDouble("mobs.giant.step-height", giantStepHeight);
|
||||
+ giantJumpHeight = (float) getDouble("mobs.giant.jump-height", giantJumpHeight);
|
||||
+ giantHaveAI = getBoolean("mobs.giant.have-ai", giantHaveAI);
|
||||
|
||||
Reference in New Issue
Block a user