mirror of
https://github.com/BX-Team/DivineMC.git
synced 2026-01-04 15:31:43 +00:00
Upstream has released updates that appear to apply and compile correctly Purpur Changes: PurpurMC/Purpur@998a4e6 [ci skip] add a good chunk of patch identifying comments PurpurMC/Purpur@e440784 [ci skip] a couple more patch identifying comments PurpurMC/Purpur@c33391b Updated Upstream (Paper) PurpurMC/Purpur@8d7fab1 [ci skip] small patch comment cleanup
33 lines
1.7 KiB
Diff
33 lines
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
|
Date: Sat, 10 Jun 2023 12:44:58 +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 8df1682dca61b0f771a1c08f5bcd797506badf19..389950c97eb94fbbc730fbff51fedcc3217be22a 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
|
@@ -51,6 +51,8 @@ public abstract class Animal extends AgeableMob {
|
|
public ItemStack breedItem; // CraftBukkit - Add breedItem variable
|
|
public abstract int getPurpurBreedTime(); // Purpur - Make entity breeding times configurable
|
|
|
|
+ private Object level;
|
|
+
|
|
protected Animal(EntityType<? extends Animal> type, Level world) {
|
|
super(type, world);
|
|
this.setPathfindingMalus(PathType.DANGER_FIRE, 16.0F);
|
|
@@ -84,7 +86,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
|
|
}
|
|
}
|
|
|