diff options
Diffstat (limited to 'spark-forge/src/main/java')
-rw-r--r-- | spark-forge/src/main/java/me/lucko/spark/forge/ForgeSparkPlatform.java | 5 | ||||
-rw-r--r-- | spark-forge/src/main/java/me/lucko/spark/forge/ForgeTickCounter.java | 9 |
2 files changed, 6 insertions, 8 deletions
diff --git a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeSparkPlatform.java b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeSparkPlatform.java index 5b62f3f..f5a2c9e 100644 --- a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeSparkPlatform.java +++ b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeSparkPlatform.java @@ -27,7 +27,6 @@ import me.lucko.spark.sampler.ThreadDumper; import net.kyori.text.TextComponent; import net.kyori.text.serializer.ComponentSerializers; -import net.minecraft.command.CommandException; import net.minecraft.command.ICommand; import net.minecraft.command.ICommandSender; import net.minecraft.server.MinecraftServer; @@ -90,7 +89,7 @@ public abstract class ForgeSparkPlatform extends SparkPlatform<ICommandSender> i @Override public void runAsync(Runnable r) { - worker.execute(r); + this.worker.execute(r); } @Override @@ -106,7 +105,7 @@ public abstract class ForgeSparkPlatform extends SparkPlatform<ICommandSender> i } @Override - public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException { + public void execute(MinecraftServer server, ICommandSender sender, String[] args) { if (!checkPermission(server, sender)) { TextComponentString msg = new TextComponentString("You do not have permission to use this command."); Style style = msg.getStyle(); diff --git a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeTickCounter.java b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeTickCounter.java index 97903ac..17f595b 100644 --- a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeTickCounter.java +++ b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeTickCounter.java @@ -28,13 +28,12 @@ import net.minecraftforge.fml.common.gameevent.TickEvent; import java.util.HashSet; import java.util.Set; -import java.util.concurrent.atomic.LongAdder; public class ForgeTickCounter implements TickCounter { private final TickEvent.Type type; private final Set<Runnable> tasks = new HashSet<>(); - private final LongAdder tick = new LongAdder(); + private int tick = 0; public ForgeTickCounter(TickEvent.Type type) { this.type = type; @@ -53,7 +52,7 @@ public class ForgeTickCounter implements TickCounter { for (Runnable r : this.tasks){ r.run(); } - this.tick.increment(); + this.tick++; } @Override @@ -67,8 +66,8 @@ public class ForgeTickCounter implements TickCounter { } @Override - public long getCurrentTick() { - return this.tick.longValue(); + public int getCurrentTick() { + return this.tick; } @Override |