mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 10:57:43 +01:00
clean up level/getWorld usage in various patches
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 3cc3539f0664eeb048290f4d9b229a5d674fff3c..ce86a56da5aaf65a34352eab1da20e4340175248 100644
|
||||
index 3cc3539f0664eeb048290f4d9b229a5d674fff3c..f41aadb12c2d661014c488b4fc52298668c95da0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
|
||||
@@ -79,6 +79,7 @@ public class Dolphin extends WaterAnimal {
|
||||
@@ -20,7 +20,7 @@ index 3cc3539f0664eeb048290f4d9b229a5d674fff3c..ce86a56da5aaf65a34352eab1da20e43
|
||||
public SpawnGroupData finalizeSpawn(ServerLevelAccessor world, DifficultyInstance difficulty, MobSpawnType spawnReason, @Nullable SpawnGroupData entityData, @Nullable CompoundTag entityNbt) {
|
||||
this.setAirSupply(this.getMaxAirSupply());
|
||||
this.setXRot(0.0F);
|
||||
+ this.isNaturallyAggressiveToPlayers = level.purpurConfig.dolphinNaturallyAggressiveToPlayersChance > 0.0D && random.nextDouble() <= level.purpurConfig.dolphinNaturallyAggressiveToPlayersChance; // Purpur
|
||||
+ this.isNaturallyAggressiveToPlayers = world.getLevel().purpurConfig.dolphinNaturallyAggressiveToPlayersChance > 0.0D && random.nextDouble() <= world.getLevel().purpurConfig.dolphinNaturallyAggressiveToPlayersChance; // Purpur
|
||||
return super.finalizeSpawn(world, difficulty, spawnReason, entityData, entityNbt);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user