From f563da152e35ec08a23946df28c372b4ec4f74de Mon Sep 17 00:00:00 2001 From: Nicholas Ignoffo Date: Sun, 13 May 2018 22:20:33 -0700 Subject: [PATCH] Fix Teleposer swapping blocks even if the event is cancelled (#1303) --- src/main/java/WayofTime/bloodmagic/tile/TileTeleposer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/WayofTime/bloodmagic/tile/TileTeleposer.java b/src/main/java/WayofTime/bloodmagic/tile/TileTeleposer.java index 416c37f7..9a4e955e 100644 --- a/src/main/java/WayofTime/bloodmagic/tile/TileTeleposer.java +++ b/src/main/java/WayofTime/bloodmagic/tile/TileTeleposer.java @@ -82,7 +82,7 @@ public class TileTeleposer extends TileInventory implements ITickable { for (int j = 0; j <= (focusLevel * 2 - 2); j++) { for (int k = -(focusLevel - 1); k <= (focusLevel - 1); k++) { TeleposeEvent event = new TeleposeEvent(getWorld(), pos.add(i, 1 + j, k), focusWorld, focusPos.add(i, 1 + j, k)); - if (Utils.swapLocations(event.initalWorld, event.initialBlockPos, event.finalWorld, event.finalBlockPos) && !MinecraftForge.EVENT_BUS.post(event)) { + if (!MinecraftForge.EVENT_BUS.post(event) && Utils.swapLocations(event.initalWorld, event.initialBlockPos, event.finalWorld, event.finalBlockPos)) { blocksTransported++; } }