BUMP Minecraft version to 1.19.2
BUMP Fabric API to v2
This commit is contained in:
parent
30b5888657
commit
a31b01aa03
13 changed files with 52 additions and 53 deletions
|
@ -2,14 +2,14 @@ package net.saltymc.eaa.commands;
|
|||
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
import com.mojang.brigadier.context.CommandContext;
|
||||
import net.fabricmc.fabric.api.client.command.v1.FabricClientCommandSource;
|
||||
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
|
||||
import net.saltymc.eaa.function.LobbyFunction;
|
||||
import net.saltymc.eaa.util.database.DB_Tag;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
import static net.fabricmc.fabric.api.client.command.v1.ClientCommandManager.literal;
|
||||
import static net.fabricmc.fabric.api.client.command.v2.ClientCommandManager.literal;
|
||||
|
||||
public class CheckLobbyCommand extends EaaModCommand{
|
||||
|
||||
|
|
|
@ -3,12 +3,12 @@ package net.saltymc.eaa.commands;
|
|||
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
import com.mojang.brigadier.context.CommandContext;
|
||||
import net.fabricmc.fabric.api.client.command.v1.FabricClientCommandSource;
|
||||
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
|
||||
import net.minecraft.command.argument.EntityArgumentType;
|
||||
import net.saltymc.eaa.function.CheckFunction;
|
||||
|
||||
import static net.fabricmc.fabric.api.client.command.v1.ClientCommandManager.argument;
|
||||
import static net.fabricmc.fabric.api.client.command.v1.ClientCommandManager.literal;
|
||||
import static net.fabricmc.fabric.api.client.command.v2.ClientCommandManager.argument;
|
||||
import static net.fabricmc.fabric.api.client.command.v2.ClientCommandManager.literal;
|
||||
|
||||
public class CheckPlayerCommand extends EaaModCommand{
|
||||
|
||||
|
|
|
@ -3,13 +3,13 @@ package net.saltymc.eaa.commands;
|
|||
import com.mojang.brigadier.Command;
|
||||
import com.mojang.brigadier.CommandDispatcher;
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
import net.fabricmc.fabric.api.client.command.v1.ClientCommandManager;
|
||||
import net.fabricmc.fabric.api.client.command.v1.FabricClientCommandSource;
|
||||
import net.fabricmc.fabric.api.client.command.v2.ClientCommandManager;
|
||||
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
|
||||
|
||||
public abstract class EaaModCommand implements Command<FabricClientCommandSource> {
|
||||
|
||||
public EaaModCommand() {
|
||||
this(ClientCommandManager.DISPATCHER);
|
||||
this(ClientCommandManager.getActiveDispatcher());
|
||||
}
|
||||
|
||||
public EaaModCommand(CommandDispatcher<FabricClientCommandSource> dispatcher) {
|
||||
|
|
|
@ -3,14 +3,13 @@ package net.saltymc.eaa.commands;
|
|||
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
import com.mojang.brigadier.context.CommandContext;
|
||||
import net.fabricmc.fabric.api.client.command.v1.FabricClientCommandSource;
|
||||
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
|
||||
import net.minecraft.client.toast.*;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Formatting;
|
||||
|
||||
import static net.fabricmc.fabric.api.client.command.v1.ClientCommandManager.argument;
|
||||
import static net.fabricmc.fabric.api.client.command.v1.ClientCommandManager.literal;
|
||||
import static net.fabricmc.fabric.api.client.command.v2.ClientCommandManager.argument;
|
||||
import static net.fabricmc.fabric.api.client.command.v2.ClientCommandManager.literal;
|
||||
|
||||
public class EchoCommand extends EaaModCommand{
|
||||
|
||||
|
@ -22,9 +21,9 @@ public class EchoCommand extends EaaModCommand{
|
|||
SystemToast.add(source.getClient().getToastManager(), SystemToast.Type.TUTORIAL_HINT, Text.of("ECHO"), Text.of(nachricht));
|
||||
|
||||
source.sendFeedback(
|
||||
new LiteralText("You said: ")
|
||||
Text.literal("You said: ")
|
||||
.formatted(Formatting.RED)
|
||||
.append(new LiteralText(nachricht + ""))
|
||||
.append(Text.literal(nachricht + ""))
|
||||
);
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -2,12 +2,12 @@ package net.saltymc.eaa.commands;
|
|||
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
import com.mojang.brigadier.context.CommandContext;
|
||||
import net.fabricmc.fabric.api.client.command.v1.FabricClientCommandSource;
|
||||
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
|
||||
import net.minecraft.text.Text;
|
||||
import net.saltymc.eaa.function.TagFunction;
|
||||
|
||||
|
||||
import static net.fabricmc.fabric.api.client.command.v1.ClientCommandManager.literal;
|
||||
import static net.fabricmc.fabric.api.client.command.v2.ClientCommandManager.literal;
|
||||
|
||||
public class ReloadCommand extends EaaModCommand{
|
||||
|
||||
|
|
|
@ -4,16 +4,16 @@ import com.mojang.brigadier.arguments.IntegerArgumentType;
|
|||
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
import com.mojang.brigadier.context.CommandContext;
|
||||
import net.fabricmc.fabric.api.client.command.v1.FabricClientCommandSource;
|
||||
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
|
||||
import net.minecraft.command.argument.EntityArgumentType;
|
||||
|
||||
import net.saltymc.eaa.function.TagFunction;
|
||||
import net.saltymc.eaa.util.database.DB_Tag;
|
||||
|
||||
import static net.fabricmc.fabric.api.client.command.v1.ClientCommandManager.argument;
|
||||
import static net.fabricmc.fabric.api.client.command.v1.ClientCommandManager.literal;
|
||||
import static net.fabricmc.fabric.api.client.command.v2.ClientCommandManager.argument;
|
||||
import static net.fabricmc.fabric.api.client.command.v2.ClientCommandManager.literal;
|
||||
|
||||
public class TagCommand extends EaaModCommand{
|
||||
public class TagCommand extends EaaModCommand {
|
||||
|
||||
@Override
|
||||
public int run(CommandContext<FabricClientCommandSource> context) {
|
||||
|
|
|
@ -136,8 +136,9 @@ public final class CustomPlayerListHud {
|
|||
int aa = s + y * r + y * 5;
|
||||
int ab = t + ai * 9;
|
||||
DrawableHelper.fill(stack, aa, ab, aa + r, ab + 8, w);
|
||||
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderSystem.enableAlphaTest();
|
||||
//RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderSystem.clearColor(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
//RenderSystem.enableAlphaTest();
|
||||
RenderSystem.enableBlend();
|
||||
RenderSystem.defaultBlendFunc();
|
||||
if (x < playerList.size()) {
|
||||
|
@ -220,7 +221,8 @@ public final class CustomPlayerListHud {
|
|||
} else {
|
||||
// If we don't render ping bars, we need to reset the render system color so the rest
|
||||
// of the player list renders properly
|
||||
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
// RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderSystem.clearColor(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
package net.saltymc.eaa.function;
|
||||
|
||||
import net.fabricmc.fabric.api.client.command.v1.FabricClientCommandSource;
|
||||
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.toast.SystemToast;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.text.Style;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.text.TextColor;
|
||||
|
@ -57,10 +56,10 @@ public class CheckFunction {
|
|||
while (it.hasPrevious()) {
|
||||
DB_Tag curr = it.previous();
|
||||
|
||||
source.sendFeedback(new LiteralText(dateformat.format(curr.getTagDate())).formatted(Formatting.GRAY)
|
||||
.append(new LiteralText(" | "))
|
||||
.append(new LiteralText(curr.getType().getTag()).setStyle(Style.EMPTY.withColor(TextColor.fromRgb(curr.getType().getColor()))))
|
||||
.append(new LiteralText(" (" + curr.getGrade() + ") ").formatted(getScaleFormat(curr.getGrade())))
|
||||
source.sendFeedback(Text.literal(dateformat.format(curr.getTagDate())).formatted(Formatting.GRAY)
|
||||
.append(Text.literal(" | "))
|
||||
.append(Text.literal(curr.getType().getTag()).setStyle(Style.EMPTY.withColor(TextColor.fromRgb(curr.getType().getColor()))))
|
||||
.append(Text.literal(" (" + curr.getGrade() + ") ").formatted(getScaleFormat(curr.getGrade())))
|
||||
);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package net.saltymc.eaa.function;
|
||||
|
||||
import net.fabricmc.fabric.api.client.command.v1.FabricClientCommandSource;
|
||||
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.toast.SystemToast;
|
||||
import net.minecraft.text.Text;
|
||||
|
@ -44,15 +44,13 @@ public class LobbyFunction {
|
|||
}
|
||||
}
|
||||
|
||||
switch (dangerLvl){
|
||||
case 0:
|
||||
SystemToast.add(source.getClient().getToastManager(), SystemToast.Type.WORLD_BACKUP, Text.of("OKAY!"), Text.of("No Hackers found"));
|
||||
break;
|
||||
case 1:
|
||||
SystemToast.add(source.getClient().getToastManager(), SystemToast.Type.TUTORIAL_HINT, Text.of("MEH!"), Text.of("There is an Idiot or Noob!"));
|
||||
break;
|
||||
case 2:
|
||||
SystemToast.add(source.getClient().getToastManager(), SystemToast.Type.WORLD_ACCESS_FAILURE, Text.of("ALARM!"), Text.of("There is a Hacker!"));
|
||||
switch (dangerLvl) {
|
||||
case 0 ->
|
||||
SystemToast.add(source.getClient().getToastManager(), SystemToast.Type.WORLD_BACKUP, Text.of("OKAY!"), Text.of("No Hackers found"));
|
||||
case 1 ->
|
||||
SystemToast.add(source.getClient().getToastManager(), SystemToast.Type.TUTORIAL_HINT, Text.of("MEH!"), Text.of("There is an Idiot or Noob!"));
|
||||
case 2 ->
|
||||
SystemToast.add(source.getClient().getToastManager(), SystemToast.Type.WORLD_ACCESS_FAILURE, Text.of("ALARM!"), Text.of("There is a Hacker!"));
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package net.saltymc.eaa.function;
|
||||
|
||||
import net.fabricmc.fabric.api.client.command.v1.FabricClientCommandSource;
|
||||
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
|
||||
import net.minecraft.client.toast.SystemToast;
|
||||
import net.minecraft.text.Text;
|
||||
import net.saltymc.eaa.custom.ping.TagDTO;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue