Skip to content

Commit

Permalink
Fix selection particle outline
Browse files Browse the repository at this point in the history
  • Loading branch information
T14D3 committed Jan 17, 2025
1 parent dc96983 commit 24715be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private void onPlayerInteract(PlayerInteractEvent event) {

plugin.selection.put(playerUUID, Pair.of(min, max));
if (min != null && max != null) {
plugin.particles.put(playerUUID, BoundingBox.of(min.toBlockLocation().add(1, 1, 1), max.toBlockLocation()));
plugin.particles.put(playerUUID, BoundingBox.of(min.toBlockLocation(), max.toBlockLocation()));
}
return;
}
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/de/t14d3/zones/utils/ParticleHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@ static void spawnParticleOutline(Particle primary, Particle secondary, Player pl
double x1 = min.getX();
double y1 = min.getY();
double z1 = min.getZ();
double x2 = max.getX();
double y2 = max.getY();
double z2 = max.getZ();
double x2 = max.getX() + 1;
double y2 = max.getY() + 1;
double z2 = max.getZ() + 1;

// Create a list of locations for the outline
List<Location> outlineLocations = new ArrayList<>();

// Add corners to the outline
outlineLocations.add(new Location(player.getWorld(), x1, y1, z1));
outlineLocations.add(new Location(player.getWorld(), x2, y1, z1));
outlineLocations.add(new Location(player.getWorld(), x1, y2, z1));
outlineLocations.add(new Location(player.getWorld(), x2, y2, z1));
outlineLocations.add(new Location(player.getWorld(), x2, y1, z2));
outlineLocations.add(new Location(player.getWorld(), x1, y1, z2));

Expand Down

0 comments on commit 24715be

Please sign in to comment.