mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
Fix MC-167561 All players can make a dog stand up or sit down
This commit is contained in:
@@ -0,0 +1,38 @@
|
|||||||
|
From 75194dba0e395c1afad5dac303ea0a6fe16f4f63 Mon Sep 17 00:00:00 2001
|
||||||
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||||
|
Date: Thu, 30 Jan 2020 01:21:22 -0600
|
||||||
|
Subject: [PATCH] Fix MC-167561 All players can make a dog stand up or sit down
|
||||||
|
|
||||||
|
---
|
||||||
|
src/main/java/net/minecraft/server/EntityTameableAnimal.java | 1 +
|
||||||
|
src/main/java/net/minecraft/server/EntityWolf.java | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/EntityTameableAnimal.java b/src/main/java/net/minecraft/server/EntityTameableAnimal.java
|
||||||
|
index 4ac12ebe2c..3f7dde981d 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/EntityTameableAnimal.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/EntityTameableAnimal.java
|
||||||
|
@@ -141,6 +141,7 @@ public abstract class EntityTameableAnimal extends EntityAnimal {
|
||||||
|
return this.i(entityliving) ? false : super.c(entityliving);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ public boolean isOwner(EntityLiving entityliving) { return i(entityliving); } // Purpur - OBFHELPER
|
||||||
|
public boolean i(EntityLiving entityliving) {
|
||||||
|
return entityliving == this.getOwner();
|
||||||
|
}
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/EntityWolf.java b/src/main/java/net/minecraft/server/EntityWolf.java
|
||||||
|
index 738a9e1dbc..92a56527a4 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/EntityWolf.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/EntityWolf.java
|
||||||
|
@@ -294,7 +294,7 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (!(item instanceof ItemDye)) {
|
||||||
|
+ if (!(item instanceof ItemDye) && isOwner(entityhuman)) { // Purpur - Fix MC-167561
|
||||||
|
boolean flag = super.a(entityhuman, enumhand);
|
||||||
|
|
||||||
|
if (!flag || this.isBaby()) {
|
||||||
|
--
|
||||||
|
2.24.0
|
||||||
|
|
||||||
Reference in New Issue
Block a user