diff --git a/build.gradle b/build.gradle index e9790c6..ab98e49 100644 --- a/build.gradle +++ b/build.gradle @@ -118,6 +118,11 @@ repositories { name = "CurseMaven" url = "https://cursemaven.com" } + + maven { + name = "ZNI Creations" + url = "https://maven.zontreck.dev" + } } dependencies { @@ -129,6 +134,9 @@ dependencies { compileOnly fg.deobf("mezz.jei:jei-${mc_version}-common-api:${jei_version}") compileOnly fg.deobf("mezz.jei:jei-${mc_version}-forge-api:${jei_version}") runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}-forge:${jei_version}") + + compileOnly fg.deobf("dev.zontreck:libzontreck:1.0.0.1:dev") + runtimeOnly fg.deobf("dev.zontreck:libzontreck:1.0.0.1") // compile against the JEI API but do not include it at runtime //compileOnly fg.deobf("mezz.jei:jei-${mc_version}-forge-api:${jei_version}") // at runtime, use the full JEI jar @@ -154,7 +162,7 @@ dependencies { jar { manifest { attributes([ - "Specification-Title" : "otemod", + "Specification-Title" : project.name, "Specification-Vendor" : "Zontreck", "Specification-Version" : "${my_version}", // We are version 1 of ourselves "Implementation-Title" : project.name, diff --git a/gradle.properties b/gradle.properties index 9b9ce46..02d5a54 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx8G org.gradle.daemon=false -my_version=1.3.3.7 +my_version=1.3.4.0 mc_version=1.19.2 forge_version=43.1.32 diff --git a/src/main/java/dev/zontreck/otemod/OTEMod.java b/src/main/java/dev/zontreck/otemod/OTEMod.java index 60f8aef..4d09441 100644 --- a/src/main/java/dev/zontreck/otemod/OTEMod.java +++ b/src/main/java/dev/zontreck/otemod/OTEMod.java @@ -48,9 +48,8 @@ import net.minecraftforge.registries.ForgeRegistries; import org.slf4j.Logger; - +import dev.zontreck.libzontreck.chat.ChatColor; import dev.zontreck.otemod.blocks.ModBlocks; -import dev.zontreck.otemod.chat.ChatColor; import dev.zontreck.otemod.chat.ChatServerOverride; import dev.zontreck.otemod.commands.CommandRegistry; import dev.zontreck.otemod.commands.teleport.TeleportContainer; diff --git a/src/main/java/dev/zontreck/otemod/blocks/AuroraDoorBlock.java b/src/main/java/dev/zontreck/otemod/blocks/AuroraDoorBlock.java index 4b84170..cdccb73 100644 --- a/src/main/java/dev/zontreck/otemod/blocks/AuroraDoorBlock.java +++ b/src/main/java/dev/zontreck/otemod/blocks/AuroraDoorBlock.java @@ -1,6 +1,5 @@ package dev.zontreck.otemod.blocks; -import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.DoorBlock; public class AuroraDoorBlock extends DoorBlock diff --git a/src/main/java/dev/zontreck/otemod/blocks/ModBlocks.java b/src/main/java/dev/zontreck/otemod/blocks/ModBlocks.java index 16909c1..5e05e4e 100644 --- a/src/main/java/dev/zontreck/otemod/blocks/ModBlocks.java +++ b/src/main/java/dev/zontreck/otemod/blocks/ModBlocks.java @@ -1,13 +1,9 @@ package dev.zontreck.otemod.blocks; -import java.util.function.Supplier; - import dev.zontreck.otemod.OTEMod; -import dev.zontreck.otemod.items.ModItems; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.Item; -import net.minecraft.world.item.Item.Properties; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.DoorBlock; diff --git a/src/main/java/dev/zontreck/otemod/chat/ChatColor.java b/src/main/java/dev/zontreck/otemod/chat/ChatColor.java deleted file mode 100644 index b9ea4e2..0000000 --- a/src/main/java/dev/zontreck/otemod/chat/ChatColor.java +++ /dev/null @@ -1,161 +0,0 @@ -package dev.zontreck.otemod.chat; - -public class ChatColor { - public enum ColorOptions{ - Black, - Dark_Blue, - Dark_Green, - Dark_Aqua, - Dark_Red, - Dark_Purple, - Gold, - Gray, - Dark_Gray, - Blue, - Green, - Aqua, - Red, - Light_Purple, - Yellow, - White, - MinecoinGold, - Underline, - Bold, - Italic, - Strikethrough, - Crazy - } - public static char CODE = 'ยง'; - public static String BLACK = build("0"); - public static String DARK_BLUE = build("1"); - public static String DARK_GREEN = build("2"); - public static String DARK_AQUA = build("3"); - public static String DARK_RED = build("4"); - public static String DARK_PURPLE = build("5"); - public static String GOLD = build("6"); - public static String GRAY = build("7"); - public static String DARK_GRAY = build("8"); - public static String BLUE = build("9"); - public static String GREEN = build("a"); - public static String AQUA = build("b"); - public static String RED = build("c"); - public static String LIGHT_PURPLE = build("d"); - public static String YELLOW = build("e"); - public static String WHITE = build("f"); - public static String MINECOIN_GOLD = build("g"); - - public static String UNDERLINE = build("u"); - public static String BOLD = build("l"); - public static String ITALIC = build("o"); - public static String STRIKETHROUGH = build("m"); - public static String CRAZY = build("k"); - public static String RESET = build("r"); - - - public static String build(String c) - { - return CODE+c; - } - - public static String resetChat() - { - return RESET+WHITE; - } - - public static String from(ColorOptions nick){ - switch(nick){ - case Black: - { - return BLACK; - } - case Dark_Blue: - { - return DARK_BLUE; - } - case Dark_Green: - { - return DARK_GREEN; - } - case Dark_Aqua: - { - return DARK_AQUA; - } - case Dark_Red: - { - return DARK_RED; - } - case Dark_Purple: - { - return DARK_PURPLE; - } - case Gold: - { - return GOLD; - } - case Gray: - { - return GRAY; - } - case Dark_Gray: - { - return DARK_GRAY; - } - case Blue: - { - return BLUE; - } - case Green: - { - return GREEN; - } - case Aqua: - { - return AQUA; - } - case Red: - { - return RED; - } - case Light_Purple: - { - return LIGHT_PURPLE; - } - case Yellow: - { - return YELLOW; - } - case White: - { - return WHITE; - } - case MinecoinGold: - { - return MINECOIN_GOLD; - } - case Underline: - { - return UNDERLINE; - } - case Bold: - { - return BOLD; - } - case Italic: - { - return ITALIC; - } - case Strikethrough: - { - return STRIKETHROUGH; - } - case Crazy: - { - return CRAZY; - } - default: - { - return RESET+CRAZY; - } - } - } -} diff --git a/src/main/java/dev/zontreck/otemod/chat/ChatServerOverride.java b/src/main/java/dev/zontreck/otemod/chat/ChatServerOverride.java index d800bbe..1fc3007 100644 --- a/src/main/java/dev/zontreck/otemod/chat/ChatServerOverride.java +++ b/src/main/java/dev/zontreck/otemod/chat/ChatServerOverride.java @@ -6,22 +6,19 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.UUID; +import dev.zontreck.libzontreck.chat.ChatColor; +import dev.zontreck.libzontreck.chat.HoverTip; import dev.zontreck.otemod.OTEMod; import dev.zontreck.otemod.configs.PlayerFlyCache; import dev.zontreck.otemod.configs.Profile; -import dev.zontreck.otemod.database.Database; -import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Style; import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ServerPlayer; -import net.minecraft.server.network.ServerPlayerConnection; import net.minecraft.world.entity.player.Player; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.event.ForgeEventFactory; import net.minecraftforge.event.ServerChatEvent; -import net.minecraftforge.event.entity.EntityJoinLevelEvent; import net.minecraftforge.event.entity.player.PlayerEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @@ -118,7 +115,7 @@ public class ChatServerOverride { } String msg = ev.getMessage().getString(); - msg=doColors(msg); + msg= ChatColor.doColors(msg); String nameStr = ChatColor.resetChat() + "< "+ XD.name_color + XD.nickname + ChatColor.resetChat() + " >"; String message = ": "+XD.chat_color + msg; @@ -129,13 +126,6 @@ public class ChatServerOverride { ChatServerOverride.broadcast(Component.literal(prefixStr+nameStr+message).setStyle(hover), ev.getPlayer().server); } - public static String doColors(String msg) - { - for(ChatColor.ColorOptions color : ChatColor.ColorOptions.values()){ - msg = msg.replace("!"+color.toString()+"!", ChatColor.from(color)); - } - return msg; - } public static void broadcastAbove(Component message, MinecraftServer s) { diff --git a/src/main/java/dev/zontreck/otemod/chat/Clickable.java b/src/main/java/dev/zontreck/otemod/chat/Clickable.java deleted file mode 100644 index cdf0efd..0000000 --- a/src/main/java/dev/zontreck/otemod/chat/Clickable.java +++ /dev/null @@ -1,16 +0,0 @@ -package dev.zontreck.otemod.chat; - -import net.minecraft.network.chat.ClickEvent; -import net.minecraft.network.chat.ClickEvent.Action; - -/* - * Because of some weird behavior with java not liking that both HoverEvent and ClickEvent have an Action implementation, these must both be in a custom factory here where Action can be imported by itself in both files - */ -public class Clickable { - - public static ClickEvent command(String text) - { - return new ClickEvent(Action.RUN_COMMAND, text); - } - -} diff --git a/src/main/java/dev/zontreck/otemod/chat/HoverTip.java b/src/main/java/dev/zontreck/otemod/chat/HoverTip.java deleted file mode 100644 index 31a6dae..0000000 --- a/src/main/java/dev/zontreck/otemod/chat/HoverTip.java +++ /dev/null @@ -1,17 +0,0 @@ -package dev.zontreck.otemod.chat; - -import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.HoverEvent; -import net.minecraft.network.chat.HoverEvent.Action; - -/* - * Because of some weird behavior with java not liking that both HoverEvent and ClickEvent have an Action implementation, these must both be in a custom factory here where Action can be imported by itself in both files - */ -public class HoverTip { - - public static HoverEvent get(String text) - { - return new HoverEvent(Action.SHOW_TEXT, Component.literal(text)); - } - -} diff --git a/src/main/java/dev/zontreck/otemod/commands/FlyCommand.java b/src/main/java/dev/zontreck/otemod/commands/FlyCommand.java index 7d18896..cca64d8 100644 --- a/src/main/java/dev/zontreck/otemod/commands/FlyCommand.java +++ b/src/main/java/dev/zontreck/otemod/commands/FlyCommand.java @@ -3,7 +3,7 @@ package dev.zontreck.otemod.commands; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.context.CommandContext; -import dev.zontreck.otemod.chat.ChatColor; +import dev.zontreck.libzontreck.chat.ChatColor; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; import net.minecraft.network.chat.contents.TranslatableContents; diff --git a/src/main/java/dev/zontreck/otemod/commands/homes/DelHomeCommand.java b/src/main/java/dev/zontreck/otemod/commands/homes/DelHomeCommand.java index 18ddd46..001d5f5 100644 --- a/src/main/java/dev/zontreck/otemod/commands/homes/DelHomeCommand.java +++ b/src/main/java/dev/zontreck/otemod/commands/homes/DelHomeCommand.java @@ -1,33 +1,23 @@ package dev.zontreck.otemod.commands.homes; -import java.sql.Array; import java.sql.Connection; import java.sql.PreparedStatement; -import java.sql.ResultSet; import java.sql.SQLException; -import java.sql.Statement; -import java.util.ArrayList; -import java.util.List; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.arguments.StringArgumentType; -import com.mojang.brigadier.context.CommandContext; -import com.mojang.math.Vector3d; +import dev.zontreck.libzontreck.chat.ChatColor; import dev.zontreck.otemod.OTEMod; -import dev.zontreck.otemod.chat.ChatColor; import dev.zontreck.otemod.chat.ChatServerOverride; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; import net.minecraft.network.chat.contents.TranslatableContents; -import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.phys.Vec2; -import net.minecraft.world.phys.Vec3; -import net.minecraftforge.server.command.TextComponentHelper; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; +import net.minecraft.network.chat.Style; +import net.minecraft.network.chat.TextColor; public class DelHomeCommand { public static void register(CommandDispatcher dispatcher) @@ -50,8 +40,10 @@ public class DelHomeCommand { if(! ctx.isPlayer()) { + Style s = Style.EMPTY.withColor(TextColor.parseColor(ChatColor.DARK_RED)).withFont(Style.DEFAULT_FONT); - ChatServerOverride.broadcastTo(ctx.getPlayer().getUUID(), Component.literal(ChatColor.DARK_RED).append(Component.translatable("dev.zontreck.otemod.msgs.only_player")), ctx.getServer()); + + ChatServerOverride.broadcastTo(ctx.getPlayer().getUUID(), Component.translatable("dev.zontreck.otemod.msgs.only_player").withStyle(s), ctx.getServer()); return 1; } ServerPlayer p = ctx.getPlayer(); diff --git a/src/main/java/dev/zontreck/otemod/commands/homes/HomeCommand.java b/src/main/java/dev/zontreck/otemod/commands/homes/HomeCommand.java index 4be6b21..c345668 100644 --- a/src/main/java/dev/zontreck/otemod/commands/homes/HomeCommand.java +++ b/src/main/java/dev/zontreck/otemod/commands/homes/HomeCommand.java @@ -10,8 +10,8 @@ import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.arguments.StringArgumentType; import com.mojang.brigadier.exceptions.CommandSyntaxException; +import dev.zontreck.libzontreck.chat.ChatColor; import dev.zontreck.otemod.OTEMod; -import dev.zontreck.otemod.chat.ChatColor; import dev.zontreck.otemod.chat.ChatServerOverride; import dev.zontreck.otemod.commands.teleport.TeleportActioner; import dev.zontreck.otemod.commands.teleport.TeleportContainer; @@ -20,14 +20,14 @@ import dev.zontreck.otemod.exceptions.InvalidDeserialization; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; import net.minecraft.nbt.NbtUtils; -import net.minecraft.network.chat.contents.TranslatableContents; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.phys.Vec2; import net.minecraft.world.phys.Vec3; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.MutableComponent; +import net.minecraft.network.chat.Style; +import net.minecraft.network.chat.TextColor; public class HomeCommand { public static void register(CommandDispatcher dispatcher) @@ -122,7 +122,9 @@ public class HomeCommand { if(!has_home)throw new SQLException("NO HOME"); - ctx.sendSuccess(MutableComponent.create(new TranslatableContents("dev.zontreck.otemod.msgs.homes.goto.success")), true); + Style sxx = Style.EMPTY.withColor(TextColor.parseColor(ChatColor.DARK_GREEN)).withFont(Style.DEFAULT_FONT); + + ctx.sendSuccess(Component.translatable("dev.zontreck.otemod.msgs.homes.goto.success").withStyle(sxx), true); con.endRequest(); } catch (SQLException e) { // TODO Auto-generated catch block diff --git a/src/main/java/dev/zontreck/otemod/commands/homes/HomesCommand.java b/src/main/java/dev/zontreck/otemod/commands/homes/HomesCommand.java index 8361c7e..fb0db3d 100644 --- a/src/main/java/dev/zontreck/otemod/commands/homes/HomesCommand.java +++ b/src/main/java/dev/zontreck/otemod/commands/homes/HomesCommand.java @@ -1,6 +1,5 @@ package dev.zontreck.otemod.commands.homes; -import java.sql.Array; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; @@ -11,26 +10,18 @@ import java.util.List; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.context.CommandContext; +import dev.zontreck.libzontreck.chat.ChatColor; +import dev.zontreck.libzontreck.chat.Clickable; +import dev.zontreck.libzontreck.chat.HoverTip; import dev.zontreck.otemod.OTEMod; -import dev.zontreck.otemod.chat.ChatColor; import dev.zontreck.otemod.chat.ChatServerOverride; -import dev.zontreck.otemod.chat.Clickable; -import dev.zontreck.otemod.chat.HoverTip; -import net.minecraft.ChatFormatting; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; import net.minecraft.network.chat.contents.TranslatableContents; import net.minecraft.server.level.ServerPlayer; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.WrittenBookItem; -import net.minecraft.world.item.Item.Properties; -import net.minecraftforge.server.command.TextComponentHelper; -import net.minecraft.network.chat.ClickEvent; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.HoverEvent; import net.minecraft.network.chat.MutableComponent; import net.minecraft.network.chat.Style; -import net.minecraft.network.chat.TextColor; public class HomesCommand { public static void register(CommandDispatcher dispatcher) diff --git a/src/main/java/dev/zontreck/otemod/commands/homes/SetHomeCommand.java b/src/main/java/dev/zontreck/otemod/commands/homes/SetHomeCommand.java index 7423a9a..43ec7ee 100644 --- a/src/main/java/dev/zontreck/otemod/commands/homes/SetHomeCommand.java +++ b/src/main/java/dev/zontreck/otemod/commands/homes/SetHomeCommand.java @@ -1,36 +1,24 @@ package dev.zontreck.otemod.commands.homes; -import java.sql.Array; import java.sql.Connection; import java.sql.PreparedStatement; -import java.sql.ResultSet; import java.sql.SQLException; -import java.sql.Statement; -import java.util.ArrayList; -import java.util.List; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.arguments.StringArgumentType; -import com.mojang.brigadier.context.CommandContext; -import com.mojang.math.Vector3d; +import dev.zontreck.libzontreck.chat.ChatColor; import dev.zontreck.otemod.OTEMod; -import dev.zontreck.otemod.chat.ChatColor; import dev.zontreck.otemod.chat.ChatServerOverride; import dev.zontreck.otemod.containers.Vector2; import dev.zontreck.otemod.containers.Vector3; import dev.zontreck.otemod.database.TeleportDestination; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; -import net.minecraft.network.chat.contents.TranslatableContents; -import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; -import net.minecraft.world.entity.player.Player; import net.minecraft.world.phys.Vec2; import net.minecraft.world.phys.Vec3; -import net.minecraftforge.server.command.TextComponentHelper; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.MutableComponent; public class SetHomeCommand { public static void register(CommandDispatcher dispatcher) diff --git a/src/main/java/dev/zontreck/otemod/commands/profilecmds/ChatColorCommand.java b/src/main/java/dev/zontreck/otemod/commands/profilecmds/ChatColorCommand.java index 8b77dfa..0d92f92 100644 --- a/src/main/java/dev/zontreck/otemod/commands/profilecmds/ChatColorCommand.java +++ b/src/main/java/dev/zontreck/otemod/commands/profilecmds/ChatColorCommand.java @@ -2,10 +2,10 @@ package dev.zontreck.otemod.commands.profilecmds; import com.mojang.brigadier.CommandDispatcher; +import dev.zontreck.libzontreck.chat.ChatColor; +import dev.zontreck.libzontreck.chat.ChatColor.ColorOptions; import dev.zontreck.otemod.OTEMod; -import dev.zontreck.otemod.chat.ChatColor; import dev.zontreck.otemod.chat.ChatServerOverride; -import dev.zontreck.otemod.chat.ChatColor.ColorOptions; import dev.zontreck.otemod.configs.Profile; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; diff --git a/src/main/java/dev/zontreck/otemod/commands/profilecmds/NameColorCommand.java b/src/main/java/dev/zontreck/otemod/commands/profilecmds/NameColorCommand.java index 1107d49..d82bb1b 100644 --- a/src/main/java/dev/zontreck/otemod/commands/profilecmds/NameColorCommand.java +++ b/src/main/java/dev/zontreck/otemod/commands/profilecmds/NameColorCommand.java @@ -2,9 +2,9 @@ package dev.zontreck.otemod.commands.profilecmds; import com.mojang.brigadier.CommandDispatcher; +import dev.zontreck.libzontreck.chat.ChatColor; +import dev.zontreck.libzontreck.chat.ChatColor.ColorOptions; import dev.zontreck.otemod.OTEMod; -import dev.zontreck.otemod.chat.ChatColor; -import dev.zontreck.otemod.chat.ChatColor.ColorOptions; import dev.zontreck.otemod.configs.Profile; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; diff --git a/src/main/java/dev/zontreck/otemod/commands/profilecmds/NickCommand.java b/src/main/java/dev/zontreck/otemod/commands/profilecmds/NickCommand.java index a285194..b224493 100644 --- a/src/main/java/dev/zontreck/otemod/commands/profilecmds/NickCommand.java +++ b/src/main/java/dev/zontreck/otemod/commands/profilecmds/NickCommand.java @@ -3,9 +3,8 @@ package dev.zontreck.otemod.commands.profilecmds; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.arguments.StringArgumentType; +import dev.zontreck.libzontreck.chat.ChatColor; import dev.zontreck.otemod.OTEMod; -import dev.zontreck.otemod.chat.ChatColor; -import dev.zontreck.otemod.chat.ChatColor.ColorOptions; import dev.zontreck.otemod.configs.Profile; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; diff --git a/src/main/java/dev/zontreck/otemod/commands/profilecmds/PrefixColorCommand.java b/src/main/java/dev/zontreck/otemod/commands/profilecmds/PrefixColorCommand.java index 36bd5a9..9226b36 100644 --- a/src/main/java/dev/zontreck/otemod/commands/profilecmds/PrefixColorCommand.java +++ b/src/main/java/dev/zontreck/otemod/commands/profilecmds/PrefixColorCommand.java @@ -2,9 +2,9 @@ package dev.zontreck.otemod.commands.profilecmds; import com.mojang.brigadier.CommandDispatcher; +import dev.zontreck.libzontreck.chat.ChatColor; +import dev.zontreck.libzontreck.chat.ChatColor.ColorOptions; import dev.zontreck.otemod.OTEMod; -import dev.zontreck.otemod.chat.ChatColor; -import dev.zontreck.otemod.chat.ChatColor.ColorOptions; import dev.zontreck.otemod.configs.Profile; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; diff --git a/src/main/java/dev/zontreck/otemod/commands/profilecmds/PrefixCommand.java b/src/main/java/dev/zontreck/otemod/commands/profilecmds/PrefixCommand.java index 3582d12..a49311d 100644 --- a/src/main/java/dev/zontreck/otemod/commands/profilecmds/PrefixCommand.java +++ b/src/main/java/dev/zontreck/otemod/commands/profilecmds/PrefixCommand.java @@ -3,14 +3,12 @@ package dev.zontreck.otemod.commands.profilecmds; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.arguments.StringArgumentType; +import dev.zontreck.libzontreck.chat.ChatColor; import dev.zontreck.otemod.OTEMod; -import dev.zontreck.otemod.chat.ChatColor; -import dev.zontreck.otemod.chat.ChatColor.ColorOptions; import dev.zontreck.otemod.configs.Profile; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; import net.minecraft.network.chat.Component; -import net.minecraftforge.server.command.EnumArgument; public class PrefixCommand { diff --git a/src/main/java/dev/zontreck/otemod/commands/teleport/RTPCommand.java b/src/main/java/dev/zontreck/otemod/commands/teleport/RTPCommand.java index 8e0893b..e472a9b 100644 --- a/src/main/java/dev/zontreck/otemod/commands/teleport/RTPCommand.java +++ b/src/main/java/dev/zontreck/otemod/commands/teleport/RTPCommand.java @@ -8,12 +8,10 @@ import java.util.UUID; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.arguments.BoolArgumentType; -import com.mojang.brigadier.arguments.StringArgumentType; +import dev.zontreck.libzontreck.chat.ChatColor; import dev.zontreck.otemod.OTEMod; -import dev.zontreck.otemod.chat.ChatColor; import dev.zontreck.otemod.chat.ChatServerOverride; -import dev.zontreck.otemod.commands.CommandRegistry; import dev.zontreck.otemod.containers.Vector3; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; @@ -23,7 +21,6 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.level.block.DoubleBlockCombiner.BlockType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.Vec3; diff --git a/src/main/java/dev/zontreck/otemod/commands/teleport/TPACommand.java b/src/main/java/dev/zontreck/otemod/commands/teleport/TPACommand.java index cbb4b9c..d0bdeee 100644 --- a/src/main/java/dev/zontreck/otemod/commands/teleport/TPACommand.java +++ b/src/main/java/dev/zontreck/otemod/commands/teleport/TPACommand.java @@ -1,14 +1,12 @@ package dev.zontreck.otemod.commands.teleport; import com.mojang.brigadier.CommandDispatcher; -import com.mojang.brigadier.arguments.ArgumentType; -import com.mojang.brigadier.arguments.StringArgumentType; +import dev.zontreck.libzontreck.chat.ChatColor; +import dev.zontreck.libzontreck.chat.Clickable; +import dev.zontreck.libzontreck.chat.HoverTip; import dev.zontreck.otemod.OTEMod; -import dev.zontreck.otemod.chat.ChatColor; import dev.zontreck.otemod.chat.ChatServerOverride; -import dev.zontreck.otemod.chat.Clickable; -import dev.zontreck.otemod.chat.HoverTip; import dev.zontreck.otemod.configs.Profile; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; diff --git a/src/main/java/dev/zontreck/otemod/commands/teleport/TPAHereCommand.java b/src/main/java/dev/zontreck/otemod/commands/teleport/TPAHereCommand.java index d4570f2..6ba6708 100644 --- a/src/main/java/dev/zontreck/otemod/commands/teleport/TPAHereCommand.java +++ b/src/main/java/dev/zontreck/otemod/commands/teleport/TPAHereCommand.java @@ -1,14 +1,12 @@ package dev.zontreck.otemod.commands.teleport; import com.mojang.brigadier.CommandDispatcher; -import com.mojang.brigadier.arguments.ArgumentType; -import com.mojang.brigadier.arguments.StringArgumentType; +import dev.zontreck.libzontreck.chat.ChatColor; +import dev.zontreck.libzontreck.chat.Clickable; +import dev.zontreck.libzontreck.chat.HoverTip; import dev.zontreck.otemod.OTEMod; -import dev.zontreck.otemod.chat.ChatColor; import dev.zontreck.otemod.chat.ChatServerOverride; -import dev.zontreck.otemod.chat.Clickable; -import dev.zontreck.otemod.chat.HoverTip; import dev.zontreck.otemod.configs.Profile; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; diff --git a/src/main/java/dev/zontreck/otemod/commands/teleport/TPAcceptCommand.java b/src/main/java/dev/zontreck/otemod/commands/teleport/TPAcceptCommand.java index 75c6414..ea3534d 100644 --- a/src/main/java/dev/zontreck/otemod/commands/teleport/TPAcceptCommand.java +++ b/src/main/java/dev/zontreck/otemod/commands/teleport/TPAcceptCommand.java @@ -5,8 +5,8 @@ import java.util.UUID; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.arguments.StringArgumentType; +import dev.zontreck.libzontreck.chat.ChatColor; import dev.zontreck.otemod.OTEMod; -import dev.zontreck.otemod.chat.ChatColor; import dev.zontreck.otemod.chat.ChatServerOverride; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; diff --git a/src/main/java/dev/zontreck/otemod/commands/teleport/TPCancelCommand.java b/src/main/java/dev/zontreck/otemod/commands/teleport/TPCancelCommand.java index d6b2ae9..cd13081 100644 --- a/src/main/java/dev/zontreck/otemod/commands/teleport/TPCancelCommand.java +++ b/src/main/java/dev/zontreck/otemod/commands/teleport/TPCancelCommand.java @@ -5,8 +5,8 @@ import java.util.UUID; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.arguments.StringArgumentType; +import dev.zontreck.libzontreck.chat.ChatColor; import dev.zontreck.otemod.OTEMod; -import dev.zontreck.otemod.chat.ChatColor; import dev.zontreck.otemod.chat.ChatServerOverride; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; diff --git a/src/main/java/dev/zontreck/otemod/commands/teleport/TPDenyCommand.java b/src/main/java/dev/zontreck/otemod/commands/teleport/TPDenyCommand.java index bc076c8..9baf8fe 100644 --- a/src/main/java/dev/zontreck/otemod/commands/teleport/TPDenyCommand.java +++ b/src/main/java/dev/zontreck/otemod/commands/teleport/TPDenyCommand.java @@ -5,8 +5,8 @@ import java.util.UUID; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.arguments.StringArgumentType; +import dev.zontreck.libzontreck.chat.ChatColor; import dev.zontreck.otemod.OTEMod; -import dev.zontreck.otemod.chat.ChatColor; import dev.zontreck.otemod.chat.ChatServerOverride; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; diff --git a/src/main/java/dev/zontreck/otemod/commands/vaults/TrashCommand.java b/src/main/java/dev/zontreck/otemod/commands/vaults/TrashCommand.java index 2e63b8f..8f4a4bf 100644 --- a/src/main/java/dev/zontreck/otemod/commands/vaults/TrashCommand.java +++ b/src/main/java/dev/zontreck/otemod/commands/vaults/TrashCommand.java @@ -1,11 +1,6 @@ package dev.zontreck.otemod.commands.vaults; -import java.util.UUID; - -import javax.annotation.Nullable; - import com.mojang.brigadier.CommandDispatcher; -import com.mojang.brigadier.arguments.IntegerArgumentType; import dev.zontreck.otemod.implementation.VaultContainer; import net.minecraft.commands.CommandSourceStack; diff --git a/src/main/java/dev/zontreck/otemod/commands/vaults/VaultCommand.java b/src/main/java/dev/zontreck/otemod/commands/vaults/VaultCommand.java index 0a2f32a..ffc349c 100644 --- a/src/main/java/dev/zontreck/otemod/commands/vaults/VaultCommand.java +++ b/src/main/java/dev/zontreck/otemod/commands/vaults/VaultCommand.java @@ -1,9 +1,5 @@ package dev.zontreck.otemod.commands.vaults; -import java.util.UUID; - -import javax.annotation.Nullable; - import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.arguments.IntegerArgumentType; diff --git a/src/main/java/dev/zontreck/otemod/commands/warps/DelWarpCommand.java b/src/main/java/dev/zontreck/otemod/commands/warps/DelWarpCommand.java index 424ed5b..dda1408 100644 --- a/src/main/java/dev/zontreck/otemod/commands/warps/DelWarpCommand.java +++ b/src/main/java/dev/zontreck/otemod/commands/warps/DelWarpCommand.java @@ -3,13 +3,12 @@ package dev.zontreck.otemod.commands.warps; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; -import java.sql.Statement; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.arguments.StringArgumentType; +import dev.zontreck.libzontreck.chat.ChatColor; import dev.zontreck.otemod.OTEMod; -import dev.zontreck.otemod.chat.ChatColor; import dev.zontreck.otemod.chat.ChatServerOverride; import dev.zontreck.otemod.containers.Vector2; import dev.zontreck.otemod.containers.Vector3; @@ -17,8 +16,6 @@ import dev.zontreck.otemod.database.TeleportDestination; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.MutableComponent; -import net.minecraft.network.chat.contents.TranslatableContents; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.phys.Vec2; import net.minecraft.world.phys.Vec3; diff --git a/src/main/java/dev/zontreck/otemod/commands/warps/RTPWarpCommand.java b/src/main/java/dev/zontreck/otemod/commands/warps/RTPWarpCommand.java index b47c227..f2f0946 100644 --- a/src/main/java/dev/zontreck/otemod/commands/warps/RTPWarpCommand.java +++ b/src/main/java/dev/zontreck/otemod/commands/warps/RTPWarpCommand.java @@ -3,13 +3,12 @@ package dev.zontreck.otemod.commands.warps; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; -import java.sql.Statement; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.arguments.StringArgumentType; +import dev.zontreck.libzontreck.chat.ChatColor; import dev.zontreck.otemod.OTEMod; -import dev.zontreck.otemod.chat.ChatColor; import dev.zontreck.otemod.chat.ChatServerOverride; import dev.zontreck.otemod.containers.Vector2; import dev.zontreck.otemod.containers.Vector3; @@ -17,8 +16,6 @@ import dev.zontreck.otemod.database.TeleportDestination; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.MutableComponent; -import net.minecraft.network.chat.contents.TranslatableContents; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.phys.Vec2; import net.minecraft.world.phys.Vec3; diff --git a/src/main/java/dev/zontreck/otemod/commands/warps/SetWarpCommand.java b/src/main/java/dev/zontreck/otemod/commands/warps/SetWarpCommand.java index 97f2e01..df39d8e 100644 --- a/src/main/java/dev/zontreck/otemod/commands/warps/SetWarpCommand.java +++ b/src/main/java/dev/zontreck/otemod/commands/warps/SetWarpCommand.java @@ -3,13 +3,12 @@ package dev.zontreck.otemod.commands.warps; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; -import java.sql.Statement; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.arguments.StringArgumentType; +import dev.zontreck.libzontreck.chat.ChatColor; import dev.zontreck.otemod.OTEMod; -import dev.zontreck.otemod.chat.ChatColor; import dev.zontreck.otemod.chat.ChatServerOverride; import dev.zontreck.otemod.containers.Vector2; import dev.zontreck.otemod.containers.Vector3; @@ -17,8 +16,6 @@ import dev.zontreck.otemod.database.TeleportDestination; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.MutableComponent; -import net.minecraft.network.chat.contents.TranslatableContents; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.phys.Vec2; import net.minecraft.world.phys.Vec3; diff --git a/src/main/java/dev/zontreck/otemod/commands/warps/WarpCommand.java b/src/main/java/dev/zontreck/otemod/commands/warps/WarpCommand.java index 5bff4a2..c4061ad 100644 --- a/src/main/java/dev/zontreck/otemod/commands/warps/WarpCommand.java +++ b/src/main/java/dev/zontreck/otemod/commands/warps/WarpCommand.java @@ -7,10 +7,10 @@ import java.sql.ResultSet; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.arguments.StringArgumentType; +import dev.zontreck.libzontreck.chat.ChatColor; +import dev.zontreck.libzontreck.chat.Clickable; import dev.zontreck.otemod.OTEMod; -import dev.zontreck.otemod.chat.ChatColor; import dev.zontreck.otemod.chat.ChatServerOverride; -import dev.zontreck.otemod.chat.Clickable; import dev.zontreck.otemod.commands.teleport.RTPCommand; import dev.zontreck.otemod.commands.teleport.TeleportActioner; import dev.zontreck.otemod.commands.teleport.TeleportContainer; diff --git a/src/main/java/dev/zontreck/otemod/commands/warps/WarpsCommand.java b/src/main/java/dev/zontreck/otemod/commands/warps/WarpsCommand.java index 0a5dec3..a9b5dd1 100644 --- a/src/main/java/dev/zontreck/otemod/commands/warps/WarpsCommand.java +++ b/src/main/java/dev/zontreck/otemod/commands/warps/WarpsCommand.java @@ -7,11 +7,11 @@ import java.sql.SQLException; import com.mojang.brigadier.CommandDispatcher; +import dev.zontreck.libzontreck.chat.ChatColor; +import dev.zontreck.libzontreck.chat.Clickable; +import dev.zontreck.libzontreck.chat.HoverTip; import dev.zontreck.otemod.OTEMod; -import dev.zontreck.otemod.chat.ChatColor; import dev.zontreck.otemod.chat.ChatServerOverride; -import dev.zontreck.otemod.chat.Clickable; -import dev.zontreck.otemod.chat.HoverTip; import dev.zontreck.otemod.configs.Profile; import dev.zontreck.otemod.containers.Vector2; import dev.zontreck.otemod.containers.Vector3; diff --git a/src/main/java/dev/zontreck/otemod/configs/Profile.java b/src/main/java/dev/zontreck/otemod/configs/Profile.java index bf6952b..b54f8bb 100644 --- a/src/main/java/dev/zontreck/otemod/configs/Profile.java +++ b/src/main/java/dev/zontreck/otemod/configs/Profile.java @@ -4,8 +4,8 @@ import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; +import dev.zontreck.libzontreck.chat.ChatColor; import dev.zontreck.otemod.OTEMod; -import dev.zontreck.otemod.chat.ChatColor; import net.minecraft.server.level.ServerPlayer; public class Profile { diff --git a/src/main/java/dev/zontreck/otemod/implementation/VaultContainer.java b/src/main/java/dev/zontreck/otemod/implementation/VaultContainer.java index f6c351f..62333e2 100644 --- a/src/main/java/dev/zontreck/otemod/implementation/VaultContainer.java +++ b/src/main/java/dev/zontreck/otemod/implementation/VaultContainer.java @@ -12,8 +12,8 @@ import org.mariadb.jdbc.export.Prepare; import com.mojang.brigadier.exceptions.CommandSyntaxException; +import dev.zontreck.libzontreck.chat.ChatColor; import dev.zontreck.otemod.OTEMod; -import dev.zontreck.otemod.chat.ChatColor; import dev.zontreck.otemod.chat.ChatServerOverride; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; diff --git a/src/main/java/dev/zontreck/otemod/implementation/VaultMenu.java b/src/main/java/dev/zontreck/otemod/implementation/VaultMenu.java index ecc4e59..f1fdf62 100644 --- a/src/main/java/dev/zontreck/otemod/implementation/VaultMenu.java +++ b/src/main/java/dev/zontreck/otemod/implementation/VaultMenu.java @@ -3,15 +3,11 @@ package dev.zontreck.otemod.implementation; import java.util.Map; import java.util.UUID; -import dev.zontreck.otemod.chat.HoverTip; import dev.zontreck.otemod.implementation.inits.MenuInitializer; import net.minecraft.core.BlockPos; -import net.minecraft.world.Container; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; -import net.minecraft.world.inventory.ClickType; -import net.minecraft.world.inventory.ContainerLevelAccess; import net.minecraft.world.inventory.MenuConstructor; import net.minecraft.world.inventory.Slot; import net.minecraft.world.item.ItemStack; diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index c670511..c208edd 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -19,7 +19,7 @@ modId="otemod" #mandatory # The version number of the mod - there's a few well known ${} variables useable here or just hardcode it # ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata # see the associated build.gradle script for how to populate this completely automatically during a build -version="1.3.3.7" #mandatory +version="1.3.4.0" #mandatory # A display name for the mod displayName="OTEMod Resources" #mandatory # A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/