BUMP Minecraft version to 1.19.2

BUMP Fabric API to v2
This commit is contained in:
Hiajen Hiajen 2022-09-21 14:39:09 +02:00
parent 30b5888657
commit a31b01aa03
13 changed files with 52 additions and 53 deletions

View file

@ -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 {

View file

@ -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) {

View file

@ -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;