From 40ec7fd6fcf9eed00335e67de1a347b22e4fa135 Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 15 Feb 2023 08:57:06 -0500 Subject: [PATCH] Less Core.app.post for build events --- core/src/mindustry/entities/comp/BuilderComp.java | 2 +- core/src/mindustry/world/Build.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/mindustry/entities/comp/BuilderComp.java b/core/src/mindustry/entities/comp/BuilderComp.java index c0132b569d..89249cf507 100644 --- a/core/src/mindustry/entities/comp/BuilderComp.java +++ b/core/src/mindustry/entities/comp/BuilderComp.java @@ -144,7 +144,7 @@ abstract class BuilderComp implements Posc, Statusc, Teamc, Rotc{ } if(tile.build instanceof ConstructBuild && !current.initialized){ - Core.app.post(() -> Events.fire(new BuildSelectEvent(tile, team, self(), current.breaking))); + Events.fire(new BuildSelectEvent(tile, team, self(), current.breaking)); current.initialized = true; } diff --git a/core/src/mindustry/world/Build.java b/core/src/mindustry/world/Build.java index bca5d1a26f..fc6cd5f466 100644 --- a/core/src/mindustry/world/Build.java +++ b/core/src/mindustry/world/Build.java @@ -59,7 +59,7 @@ public class Build{ tile.build.lastAccessed = unit.getControllerName(); } - Core.app.post(() -> Events.fire(new BlockBuildBeginEvent(tile, team, unit, true))); + Events.fire(new BlockBuildBeginEvent(tile, team, unit, true)); } /** Places a ConstructBlock at this location. */ @@ -115,7 +115,7 @@ public class Build{ result.placeBegan(tile, previous); - Core.app.post(() -> Events.fire(new BlockBuildBeginEvent(tile, team, unit, false))); + Events.fire(new BlockBuildBeginEvent(tile, team, unit, false)); } /** Returns whether a tile can be placed at this location by this team. */