mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 02:17:42 +01:00
clean up level/getWorld usage in various patches
This commit is contained in:
@@ -7,7 +7,7 @@ Configurable chance to spawn a wolf that is rabid.
|
||||
Rabid wolves attack all players, mobs, and animals.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Wolf.java b/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||
index ed6a552fab01b1391cf98fdbb51f7f47f72de932..cbd5f90f5005187c61e47e6f6fa74fb19d67a4d4 100644
|
||||
index ed6a552fab01b1391cf98fdbb51f7f47f72de932..ae2ee87ccf3bf547750e8ed7c98029ed9de4806d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||
@@ -11,15 +11,19 @@ import net.minecraft.network.syncher.EntityDataAccessor;
|
||||
@@ -123,7 +123,7 @@ index ed6a552fab01b1391cf98fdbb51f7f47f72de932..cbd5f90f5005187c61e47e6f6fa74fb1
|
||||
+
|
||||
+ @Override
|
||||
+ public SpawnGroupData finalizeSpawn(ServerLevelAccessor world, DifficultyInstance difficulty, MobSpawnType type, @Nullable SpawnGroupData data, @Nullable CompoundTag nbt) {
|
||||
+ this.isRabid = level.purpurConfig.wolfNaturalRabid > 0.0D && random.nextDouble() <= level.purpurConfig.wolfNaturalRabid;
|
||||
+ this.isRabid = world.getLevel().purpurConfig.wolfNaturalRabid > 0.0D && random.nextDouble() <= world.getLevel().purpurConfig.wolfNaturalRabid;
|
||||
+ this.updatePathfinders(false);
|
||||
+ return super.finalizeSpawn(world, difficulty, type, data, nbt);
|
||||
+ }
|
||||
|
||||
Reference in New Issue
Block a user