summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/EntityOcelot.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityOcelot.java')
-rw-r--r--src/main/java/net/minecraft/server/EntityOcelot.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/net/minecraft/server/EntityOcelot.java b/src/main/java/net/minecraft/server/EntityOcelot.java
index e75de9c0..7f78fa0a 100644
--- a/src/main/java/net/minecraft/server/EntityOcelot.java
+++ b/src/main/java/net/minecraft/server/EntityOcelot.java
@@ -114,7 +114,7 @@ public class EntityOcelot extends EntityTameableAnimal {
ItemStack itemstack = entityhuman.inventory.getItemInHand();
if (this.isTamed()) {
- if (entityhuman.getName().equalsIgnoreCase(this.getOwnerName()) && !this.world.isStatic && !this.c(itemstack)) {
+ if (this.e(entityhuman) && !this.world.isStatic && !this.c(itemstack)) {
this.bp.setSitting(!this.isSitting());
}
} else if (this.bq.f() && itemstack != null && itemstack.getItem() == Items.RAW_FISH && entityhuman.f(this) < 9.0D) {
@@ -131,7 +131,7 @@ public class EntityOcelot extends EntityTameableAnimal {
if (this.random.nextInt(3) == 0 && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this, entityhuman).isCancelled()) {
this.setTamed(true);
this.setCatType(1 + this.world.random.nextInt(3));
- this.setOwnerName(entityhuman.getName());
+ this.setOwnerUUID(entityhuman.getUniqueID().toString());
this.i(true);
this.bp.setSitting(true);
this.world.broadcastEntityEffect(this, (byte) 7);
@@ -151,7 +151,7 @@ public class EntityOcelot extends EntityTameableAnimal {
EntityOcelot entityocelot = new EntityOcelot(this.world);
if (this.isTamed()) {
- entityocelot.setOwnerName(this.getOwnerName());
+ entityocelot.setOwnerUUID(this.getOwnerUUID());
entityocelot.setTamed(true);
entityocelot.setCatType(this.getCatType());
}