From 0fd7d30f2a9027c2bd9df3215759c6d91d110acc Mon Sep 17 00:00:00 2001 From: Luck Date: Tue, 23 Mar 2021 00:52:44 +0000 Subject: Refactor and tidy up, more consistent code style --- .../src/main/java/me/lucko/spark/forge/ForgeCommandSender.java | 1 + .../src/main/java/me/lucko/spark/forge/ForgePlatformInfo.java | 1 + spark-forge/src/main/java/me/lucko/spark/forge/ForgeSparkMod.java | 2 ++ spark-forge/src/main/java/me/lucko/spark/forge/ForgeTickHook.java | 5 +++-- .../src/main/java/me/lucko/spark/forge/ForgeTickReporter.java | 5 +++-- .../java/me/lucko/spark/forge/plugin/ForgeClientSparkPlugin.java | 7 ++++--- .../java/me/lucko/spark/forge/plugin/ForgeServerSparkPlugin.java | 6 ++++-- .../main/java/me/lucko/spark/forge/plugin/ForgeSparkPlugin.java | 2 ++ 8 files changed, 20 insertions(+), 9 deletions(-) (limited to 'spark-forge/src/main/java/me') diff --git a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandSender.java b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandSender.java index b5afd32..9470e65 100644 --- a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandSender.java +++ b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandSender.java @@ -22,6 +22,7 @@ package me.lucko.spark.forge; import me.lucko.spark.common.command.sender.AbstractCommandSender; import me.lucko.spark.forge.plugin.ForgeSparkPlugin; + import net.kyori.adventure.text.Component; import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer; import net.minecraft.command.ICommandSource; diff --git a/spark-forge/src/main/java/me/lucko/spark/forge/ForgePlatformInfo.java b/spark-forge/src/main/java/me/lucko/spark/forge/ForgePlatformInfo.java index 344882b..fbe99ce 100644 --- a/spark-forge/src/main/java/me/lucko/spark/forge/ForgePlatformInfo.java +++ b/spark-forge/src/main/java/me/lucko/spark/forge/ForgePlatformInfo.java @@ -21,6 +21,7 @@ package me.lucko.spark.forge; import me.lucko.spark.common.platform.AbstractPlatformInfo; + import net.minecraftforge.versions.forge.ForgeVersion; import net.minecraftforge.versions.mcp.MCPVersion; diff --git a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeSparkMod.java b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeSparkMod.java index e4e7c49..3d6b071 100644 --- a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeSparkMod.java +++ b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeSparkMod.java @@ -22,6 +22,7 @@ package me.lucko.spark.forge; import me.lucko.spark.forge.plugin.ForgeClientSparkPlugin; import me.lucko.spark.forge.plugin.ForgeServerSparkPlugin; + import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.RegisterCommandsEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -34,6 +35,7 @@ import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import net.minecraftforge.fml.loading.FMLPaths; import net.minecraftforge.fml.network.FMLNetworkConstants; + import org.apache.commons.lang3.tuple.Pair; import java.nio.file.Path; diff --git a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeTickHook.java b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeTickHook.java index 910b5b5..36e70b0 100644 --- a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeTickHook.java +++ b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeTickHook.java @@ -20,8 +20,9 @@ package me.lucko.spark.forge; -import me.lucko.spark.common.sampler.tick.AbstractTickHook; -import me.lucko.spark.common.sampler.tick.TickHook; +import me.lucko.spark.common.tick.AbstractTickHook; +import me.lucko.spark.common.tick.TickHook; + import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; diff --git a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeTickReporter.java b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeTickReporter.java index 8e0b36f..d03b2d6 100644 --- a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeTickReporter.java +++ b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeTickReporter.java @@ -20,8 +20,9 @@ package me.lucko.spark.forge; -import me.lucko.spark.common.sampler.tick.AbstractTickReporter; -import me.lucko.spark.common.sampler.tick.TickReporter; +import me.lucko.spark.common.tick.AbstractTickReporter; +import me.lucko.spark.common.tick.TickReporter; + import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; diff --git a/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeClientSparkPlugin.java b/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeClientSparkPlugin.java index a47b170..681035b 100644 --- a/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeClientSparkPlugin.java +++ b/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeClientSparkPlugin.java @@ -27,17 +27,18 @@ import com.mojang.brigadier.exceptions.CommandSyntaxException; import com.mojang.brigadier.suggestion.SuggestionProvider; import com.mojang.brigadier.suggestion.Suggestions; import com.mojang.brigadier.suggestion.SuggestionsBuilder; + import me.lucko.spark.common.platform.PlatformInfo; -import me.lucko.spark.common.sampler.tick.TickHook; -import me.lucko.spark.common.sampler.tick.TickReporter; +import me.lucko.spark.common.tick.TickHook; +import me.lucko.spark.common.tick.TickReporter; import me.lucko.spark.forge.ForgeCommandSender; import me.lucko.spark.forge.ForgePlatformInfo; import me.lucko.spark.forge.ForgeSparkMod; import me.lucko.spark.forge.ForgeTickHook; import me.lucko.spark.forge.ForgeTickReporter; + import net.minecraft.client.Minecraft; import net.minecraft.client.network.play.ClientPlayNetHandler; -import net.minecraft.command.CommandSource; import net.minecraft.command.ICommandSource; import net.minecraft.command.ISuggestionProvider; import net.minecraftforge.client.event.ClientChatEvent; diff --git a/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeServerSparkPlugin.java b/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeServerSparkPlugin.java index 4d49b21..25c34ec 100644 --- a/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeServerSparkPlugin.java +++ b/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeServerSparkPlugin.java @@ -27,14 +27,16 @@ import com.mojang.brigadier.exceptions.CommandSyntaxException; import com.mojang.brigadier.suggestion.SuggestionProvider; import com.mojang.brigadier.suggestion.Suggestions; import com.mojang.brigadier.suggestion.SuggestionsBuilder; + import me.lucko.spark.common.platform.PlatformInfo; -import me.lucko.spark.common.sampler.tick.TickHook; -import me.lucko.spark.common.sampler.tick.TickReporter; +import me.lucko.spark.common.tick.TickHook; +import me.lucko.spark.common.tick.TickReporter; import me.lucko.spark.forge.ForgeCommandSender; import me.lucko.spark.forge.ForgePlatformInfo; import me.lucko.spark.forge.ForgeSparkMod; import me.lucko.spark.forge.ForgeTickHook; import me.lucko.spark.forge.ForgeTickReporter; + import net.minecraft.command.CommandSource; import net.minecraft.command.ICommandSource; import net.minecraft.entity.player.PlayerEntity; diff --git a/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeSparkPlugin.java b/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeSparkPlugin.java index 17bc3e1..c739102 100644 --- a/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeSparkPlugin.java +++ b/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeSparkPlugin.java @@ -27,10 +27,12 @@ import com.mojang.brigadier.builder.LiteralArgumentBuilder; import com.mojang.brigadier.builder.RequiredArgumentBuilder; import com.mojang.brigadier.suggestion.SuggestionProvider; import com.mojang.brigadier.tree.LiteralCommandNode; + import me.lucko.spark.common.SparkPlatform; import me.lucko.spark.common.SparkPlugin; import me.lucko.spark.common.sampler.ThreadDumper; import me.lucko.spark.forge.ForgeSparkMod; + import net.minecraft.command.ICommandSource; import java.nio.file.Path; -- cgit