From 8721778686eccadbfcba262aa1817a526736f4bd Mon Sep 17 00:00:00 2001 From: MidnightTale Date: Mon, 24 Apr 2023 22:14:47 +0700 Subject: [PATCH] debug --- src/main/java/xyz/hynse/foliaflow/FoliaFlow.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/xyz/hynse/foliaflow/FoliaFlow.java b/src/main/java/xyz/hynse/foliaflow/FoliaFlow.java index 3c6bde4..7b478e0 100644 --- a/src/main/java/xyz/hynse/foliaflow/FoliaFlow.java +++ b/src/main/java/xyz/hynse/foliaflow/FoliaFlow.java @@ -73,17 +73,25 @@ public class FoliaFlow extends JavaPlugin implements Listener { public void onFallingBlockToBlockTheEnd(EntityChangeBlockEvent e) { Entity entity = e.getEntity(); if (entity.getType() == EntityType.FALLING_BLOCK && entity.getWorld().getEnvironment() == World.Environment.THE_END) { + getLogger().info("found falling block main" + entity); Location centerLoc = new Location(entity.getWorld(), 100, 48.5, 0); Location loc = entity.getLocation(); if (loc.distance(centerLoc) <= 2) { // Set the initial velocity of the falling block only if it doesn't have a velocity stored if (!velocitiesMap.containsKey(entity)) { + getLogger().info("add velocity falling block" + entity); int index = counter % 4; + getLogger().info("[1]" + entity); counter++; + getLogger().info("[2]" + entity); Vector velocity = velocities[index]; + getLogger().info("[3]" + entity); entity.setVelocity(velocity); + getLogger().info("[4]" + entity); velocitiesMap.put(entity, velocity); // Store the velocity in the map + getLogger().info("[5]" + entity); movingBlocks.add(entity.getLocation()); // Add the location to the set + getLogger().info("[6]" + entity); } } }