mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 19:07:44 +01:00
Add water damage to all mobs (#703)
Co-authored-by: SPh <sph@sphnet.in>
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] Dolphins naturally aggressive to players chance
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
|
||||
index 2aead13e8f879b614445715fb1912a20b9abf4b9..a33724bee284c3f05b1807d6564ddf1564278167 100644
|
||||
index cff66ff55b5741d58cecf331444fac87798de4c9..b7cb3db55ddfa5a56c9cd3fa050adfb7832082c5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
|
||||
@@ -85,6 +85,7 @@ public class Dolphin extends WaterAnimal {
|
||||
@@ -16,7 +16,7 @@ index 2aead13e8f879b614445715fb1912a20b9abf4b9..a33724bee284c3f05b1807d6564ddf15
|
||||
|
||||
public Dolphin(EntityType<? extends Dolphin> type, Level world) {
|
||||
super(type, world);
|
||||
@@ -170,6 +171,7 @@ public class Dolphin extends WaterAnimal {
|
||||
@@ -175,6 +176,7 @@ public class Dolphin extends WaterAnimal {
|
||||
public SpawnGroupData finalizeSpawn(ServerLevelAccessor world, DifficultyInstance difficulty, MobSpawnType spawnReason, @Nullable SpawnGroupData entityData, @Nullable CompoundTag entityNbt) {
|
||||
this.setAirSupply(this.getMaxAirSupply());
|
||||
this.setXRot(0.0F);
|
||||
@@ -24,7 +24,7 @@ index 2aead13e8f879b614445715fb1912a20b9abf4b9..a33724bee284c3f05b1807d6564ddf15
|
||||
return super.finalizeSpawn(world, difficulty, spawnReason, entityData, entityNbt);
|
||||
}
|
||||
|
||||
@@ -240,18 +242,20 @@ public class Dolphin extends WaterAnimal {
|
||||
@@ -245,18 +247,20 @@ public class Dolphin extends WaterAnimal {
|
||||
this.goalSelector.addGoal(0, new BreathAirGoal(this));
|
||||
this.goalSelector.addGoal(0, new TryFindWaterGoal(this));
|
||||
this.goalSelector.addGoal(0, new net.pl3x.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
@@ -47,21 +47,21 @@ index 2aead13e8f879b614445715fb1912a20b9abf4b9..a33724bee284c3f05b1807d6564ddf15
|
||||
|
||||
public static AttributeSupplier.Builder createAttributes() {
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 37943d2ff3618b19bd33421cb113a8c2aad8a776..bd191d1b471a3b521129c3d7449e7b6c19a02d58 100644
|
||||
index b00a8883fa7476bbf8c6eb82e6bb7520f9f2e279..1176bf5ed5f3cd770dfaef543c045e42d16ff55d 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -1207,6 +1207,7 @@ public class PurpurWorldConfig {
|
||||
public float dolphinSpitDamage = 2.0F;
|
||||
@@ -1226,6 +1226,7 @@ public class PurpurWorldConfig {
|
||||
public double dolphinMaxHealth = 10.0D;
|
||||
public boolean dolphinDisableTreasureSearching = false;
|
||||
public boolean dolphinTakeDamageFromWater = false;
|
||||
+ public double dolphinNaturallyAggressiveToPlayersChance = 0.0D;
|
||||
private void dolphinSettings() {
|
||||
dolphinRidable = getBoolean("mobs.dolphin.ridable", dolphinRidable);
|
||||
dolphinSpitCooldown = getInt("mobs.dolphin.spit.cooldown", dolphinSpitCooldown);
|
||||
@@ -1219,6 +1220,7 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
@@ -1239,6 +1240,7 @@ public class PurpurWorldConfig {
|
||||
dolphinMaxHealth = getDouble("mobs.dolphin.attributes.max_health", dolphinMaxHealth);
|
||||
dolphinDisableTreasureSearching = getBoolean("mobs.dolphin.disable-treasure-searching", dolphinDisableTreasureSearching);
|
||||
dolphinTakeDamageFromWater = getBoolean("mobs.dolphin.takes-damage-from-water", dolphinTakeDamageFromWater);
|
||||
+ dolphinNaturallyAggressiveToPlayersChance = getDouble("mobs.dolphin.naturally-aggressive-to-players-chance", dolphinNaturallyAggressiveToPlayersChance);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user