From deb58dd98b672ef5ed8a58393093da392d514c86 Mon Sep 17 00:00:00 2001 From: Jakllp <57708725+Jakllp@users.noreply.github.com> Date: Mon, 18 Apr 2022 23:26:35 +0200 Subject: [PATCH] 1.0.0 Fixed: - Fixed entity detection range Bump to 1.0.0 --- pom.xml | 2 +- .../de/jakllp/jaklutils/leashing/LeashController.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 3ebb397..87532af 100644 --- a/pom.xml +++ b/pom.xml @@ -119,5 +119,5 @@ UTF-8 - 1.18-0.1.0 + 1.18-1.0.0 diff --git a/src/main/java/de/jakllp/jaklutils/leashing/LeashController.java b/src/main/java/de/jakllp/jaklutils/leashing/LeashController.java index fd2bf9a..9809d84 100644 --- a/src/main/java/de/jakllp/jaklutils/leashing/LeashController.java +++ b/src/main/java/de/jakllp/jaklutils/leashing/LeashController.java @@ -110,7 +110,7 @@ public static boolean createHitch(Block block) { if(!block.getType().name().toLowerCase().contains("fence")) { return false; } - for(Entity entity: block.getWorld().getNearbyEntities(block.getLocation(),1,1,1)) { + for(Entity entity: block.getWorld().getNearbyEntities(block.getLocation(),0.5,0.5,0.5)) { if(entity instanceof LeashHitch) { return true; } @@ -150,7 +150,7 @@ public static void abortLeashing(Player player) { } public static void removeLeash(LeashHitch hitchy) { - for(Entity ent:hitchy.getNearbyEntities(1,1,1)) { + for(Entity ent:hitchy.getNearbyEntities(0.5,0.5,0.5)) { BatContainer leBatContainer = batMap.get(ent.getUniqueId()); if(leBatContainer != null && leBatContainer.isFirst()) { removeLeash((Bat) ((Bat)ent).getLeashHolder(), (Bat) ent, false, true); @@ -196,7 +196,7 @@ private static void deleteHitch(LeashHitch leHitch) { } private static LeashHitch getHitch(Bat bat) { - for(Entity ent:bat.getNearbyEntities(1,1,1)) { + for(Entity ent:bat.getNearbyEntities(0.5,0.5,0.5)) { if(ent.hasMetadata("jaklHitch") && ent instanceof LeashHitch) { return (LeashHitch) ent; } @@ -204,7 +204,7 @@ private static LeashHitch getHitch(Bat bat) { return null; } private static boolean canDeleteHitch(LeashHitch hitch) { - for(Entity ent:hitch.getNearbyEntities(1,1,1)) { + for(Entity ent:hitch.getNearbyEntities(0.5,0.5,0.5)) { if(isInBatMap(ent.getUniqueId())) { return false; }