From c80526eeba35c74cb7537d6b19440a5fac52b99f Mon Sep 17 00:00:00 2001 From: 70CentsApple Date: Sat, 31 Aug 2024 01:34:57 +0800 Subject: [PATCH] fix: fix up preprocess --- .../chattools/utils/CommandRegistryUtils.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/apple70cents/chattools/utils/CommandRegistryUtils.java b/src/main/java/net/apple70cents/chattools/utils/CommandRegistryUtils.java index 0d1d0e6..ea598a2 100644 --- a/src/main/java/net/apple70cents/chattools/utils/CommandRegistryUtils.java +++ b/src/main/java/net/apple70cents/chattools/utils/CommandRegistryUtils.java @@ -8,10 +8,7 @@ import net.apple70cents.chattools.config.ConfigScreenGenerator; import net.apple70cents.chattools.config.ConfigStorage; import net.apple70cents.chattools.config.SpecialUnits; -import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback; -import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource; import net.minecraft.client.MinecraftClient; -import net.minecraft.command.CommandRegistryAccess; import net.minecraft.command.argument.TextArgumentType; import net.minecraft.text.MutableText; import net.minecraft.text.Style; @@ -26,6 +23,11 @@ import static net.minecraft.server.command.CommandManager.argument; import static net.minecraft.server.command.CommandManager.literal; + +//#if MC>=11900 +import net.minecraft.command.CommandRegistryAccess; +import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback; +import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource; //#else // fabric v2 begin to work since 1.19 //$$ import net.fabricmc.fabric.api.client.command.v1.ClientCommandManager;