From 3047269bfc87c1b084b6d93e8597c215a75a1492 Mon Sep 17 00:00:00 2001 From: Flemmli97 Date: Wed, 12 Jan 2022 13:15:44 +0100 Subject: [PATCH] change tameable to ownable --- .../github/flemmli97/flan/event/EntityInteractEvents.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/io/github/flemmli97/flan/event/EntityInteractEvents.java b/common/src/main/java/io/github/flemmli97/flan/event/EntityInteractEvents.java index 37ba745..69d2526 100644 --- a/common/src/main/java/io/github/flemmli97/flan/event/EntityInteractEvents.java +++ b/common/src/main/java/io/github/flemmli97/flan/event/EntityInteractEvents.java @@ -28,7 +28,7 @@ import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.entity.TamableAnimal; +import net.minecraft.world.entity.OwnableEntity; import net.minecraft.world.entity.animal.SnowGolem; import net.minecraft.world.entity.boss.wither.WitherBoss; import net.minecraft.world.entity.decoration.ArmorStand; @@ -95,8 +95,8 @@ public class EntityInteractEvents { return claim.canInteract(player, PermissionRegistry.TRADING, pos, true) ? InteractionResult.PASS : InteractionResult.FAIL; if (entity instanceof ItemFrame) return claim.canInteract(player, PermissionRegistry.ITEMFRAMEROTATE, pos, true) ? InteractionResult.PASS : InteractionResult.FAIL; - if (entity instanceof TamableAnimal tame) { - if (tame.isOwnedBy(player)) + if (entity instanceof OwnableEntity tame) { + if (tame.getOwnerUUID() != null && tame.getOwnerUUID().equals(player.getUUID())) return InteractionResult.PASS; } return claim.canInteract(player, PermissionRegistry.ANIMALINTERACT, pos, true) ? InteractionResult.PASS : InteractionResult.FAIL;