Skip to content

Commit

Permalink
More changing back
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerS1066 committed Jun 4, 2024
1 parent 328f6d8 commit 5d5bd9b
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,15 @@ public void onBlockDispense(@NotNull BlockDispenseEvent e) {
e.setCancelled(true);
}

@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
@EventHandler(priority = EventPriority.HIGHEST)
public void onFlow(BlockFromToEvent e) {
if (Settings.DisableSpillProtection || !Tags.FLUID.contains(e.getBlock().getType()))
if (Settings.DisableSpillProtection || e.isCancelled())
return;
Block block = e.getBlock();
if (!Tags.FLUID.contains(block.getType()))
return;

MovecraftLocation loc = MathUtils.bukkit2MovecraftLoc(e.getBlock().getLocation());
MovecraftLocation loc = MathUtils.bukkit2MovecraftLoc(block.getLocation());
MovecraftLocation toLoc = MathUtils.bukkit2MovecraftLoc(e.getToBlock().getLocation());
for (Craft craft : CraftManager.getInstance().getCrafts()) {
if (craft.getWorld() != e.getBlock().getWorld() || !craft.getHitBox().contains(loc) || craft.getFluidLocations().contains(toLoc))
Expand Down

0 comments on commit 5d5bd9b

Please sign in to comment.