9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-20 07:19:23 +00:00
Files
DivineMC/patches/server/0007-Fix-MC-93826.patch

24 lines
1.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
Date: Fri, 31 Mar 2023 00:39:40 +0300
Subject: [PATCH] Fix MC-93826
diff --git a/src/main/java/net/minecraft/world/entity/animal/Animal.java b/src/main/java/net/minecraft/world/entity/animal/Animal.java
index 2ac88f06ebb79e515cd9934ac1e3e2c8003d9e3c..22aa2dbbd5da1b0e4c76756fe960876ec46019bf 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Animal.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Animal.java
@@ -70,7 +70,11 @@ public abstract class Animal extends AgeableMob {
double d1 = this.random.nextGaussian() * 0.02D;
double d2 = this.random.nextGaussian() * 0.02D;
- this.level.addParticle(ParticleTypes.HEART, this.getRandomX(1.0D), this.getRandomY() + 0.5D, this.getRandomZ(1.0D), d0, d1, d2);
+ // DivineMC start - Fix MC-93826
+ if (this.level instanceof ServerLevel serverLevel) {
+ serverLevel.sendParticles(ParticleTypes.HEART, this.getRandomX(1.0D), this.getRandomY() + 0.5D, this.getRandomZ(1.0D), 1, d0, d1, d2, 0);
+ }
+ // DivineMC end
}
}