Skip to content

Commit

Permalink
1.0.0
Browse files Browse the repository at this point in the history
Fixed:
- Fixed entity detection range

Bump to 1.0.0
  • Loading branch information
Jakllp committed Apr 18, 2022
1 parent c4d67c2 commit deb58dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,5 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<version>1.18-0.1.0</version>
<version>1.18-1.0.0</version>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -196,15 +196,15 @@ 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;
}
}
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;
}
Expand Down

0 comments on commit deb58dd

Please # to comment.