9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-28 19:29:09 +00:00
Files
DivineMC/patches/unapplied/server/0014-Fix-MC-93018.patch
2024-06-17 15:03:30 +03:00

35 lines
1.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
Date: Sun, 16 Jul 2023 13:51:26 +0300
Subject: [PATCH] Fix MC-93018
Original post on Mojira: https://bugs.mojang.com/browse/MC-93018
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 a8193ef23763a11016b9ac8c7dd55b9e240d6039..21bcf7c271c1ebae39bcfa9ca5f72eb7dbfc0567 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Wolf.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Wolf.java
@@ -770,14 +770,17 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder<Hol
public boolean canMate(Animal other) {
if (other == this) {
return false;
- } else if (!this.isTame()) {
- return false;
} else if (!(other instanceof Wolf)) {
return false;
} else {
- Wolf entitywolf = (Wolf) other;
-
- return !entitywolf.isTame() ? false : (entitywolf.isInSittingPose() ? false : this.isInLove() && entitywolf.isInLove());
+ // DivineMC start - Fix MC-93018
+ Wolf wolf = (Wolf) other;
+ if (wolf.isInSittingPose()) {
+ return false;
+ } else {
+ return this.isInLove() && wolf.isInLove();
+ }
+ // DivineMC end
}
}