Skip to content

Commit dab1418

Browse files
committed
Merge branch '1.19.x'
2 parents 91332cc + bdd576d commit dab1418

23 files changed

+255
-349
lines changed

.github/workflows/beta.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/workflows/buildrelease.yml

Lines changed: 0 additions & 92 deletions
This file was deleted.

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id 'fabric-loom' version '0.12-SNAPSHOT'
2+
id 'fabric-loom' version '1.0-SNAPSHOT'
33
id 'maven-publish'
44
id 'com.modrinth.minotaur' version '2.+'
55
}
@@ -107,7 +107,7 @@ modrinth {
107107
versionNumber = "v${project.version}"
108108
versionName = "Skyblocker ${project.mod_version} for ${project.suported_version}"
109109
uploadFile = remapJar
110-
gameVersions = ["1.18", "1.18.1", project.minecraft_version]
110+
gameVersions = ["1.19", "1.19.1", project.minecraft_version]
111111
loaders = ["fabric"]
112112
versionType = "release"
113113
dependencies = [ // Yet another array. Create a new `ModDependency` or `VersionDependency` with two strings - the ID and the scope

gradle.properties

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
org.gradle.jvmargs=-Xmx1G -Dfile.encoding=UTF-8 -Duser.language=en -Duser.country=US
22

33
# Fabric Properties (https://fabricmc.net/versions.html)
4-
minecraft_version=1.18.2
5-
yarn_mappings=1.18.2+build.1
6-
loader_version=0.13.3
4+
minecraft_version=1.19.2
5+
yarn_mappings=1.19.2+build.1
6+
loader_version=0.14.8
77

88
#Fabric api
9-
fabric_version=0.47.9+1.18.2
9+
fabric_version=0.58.6+1.19.2
1010

1111
# Dependencies
1212
## Cloth Api (https://www.curseforge.com/minecraft/mc-mods/cloth-config/files)
13-
clothconfig_version=6.2.57
13+
clothconfig_version=7.0.65
1414
## Mod Menu (https://www.curseforge.com/minecraft/mc-mods/modmenu/files)
15-
mod_menu_version=3.1.0
15+
mod_menu_version=4.0.6
1616

1717
# Mod Properties
18-
mod_version = 1.8.1
18+
mod_version = 1.8.2
1919
maven_group = me.xmrvizzy
2020
archives_base_name = skyblocker
2121
modrinth_id=y6DuFGwJ
22-
suported_version=1.18.x
22+
suported_version=1.19.2

src/main/java/me/xmrvizzy/skyblocker/chat/filters/AutopetFilter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import me.xmrvizzy.skyblocker.chat.ChatPatternListener;
55
import me.xmrvizzy.skyblocker.config.SkyblockerConfig;
66
import net.minecraft.client.MinecraftClient;
7-
import net.minecraft.text.LiteralText;
7+
import net.minecraft.text.LiteralTextContent;
88
import net.minecraft.text.Text;
99

1010
import java.util.Objects;
@@ -19,7 +19,7 @@ public AutopetFilter() {
1919
public boolean onMatch(Text _message, Matcher matcher) {
2020
if (SkyblockerConfig.get().messages.hideAutopet == ChatFilterResult.ACTION_BAR) {
2121
Objects.requireNonNull(MinecraftClient.getInstance().player).sendMessage(
22-
new LiteralText(
22+
Text.literal(
2323
_message.getString().replace("§a§lVIEW RULE", "")
2424
), true);
2525
}

src/main/java/me/xmrvizzy/skyblocker/mixin/ChatHudListenerMixin.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
import me.xmrvizzy.skyblocker.chat.ChatMessageListener;
55
import me.xmrvizzy.skyblocker.utils.Utils;
66
import net.minecraft.client.MinecraftClient;
7-
import net.minecraft.client.gui.hud.ChatHudListener;
7+
import net.minecraft.client.gui.hud.ChatHud;
8+
import net.minecraft.client.gui.hud.MessageIndicator;
89
import net.minecraft.client.network.ClientPlayerEntity;
9-
import net.minecraft.network.MessageType;
10+
import net.minecraft.network.message.MessageSignatureData;
1011
import net.minecraft.text.Text;
1112
import org.spongepowered.asm.mixin.Final;
1213
import org.spongepowered.asm.mixin.Mixin;
@@ -15,17 +16,15 @@
1516
import org.spongepowered.asm.mixin.injection.Inject;
1617
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
1718

18-
import java.util.UUID;
19-
20-
@Mixin(ChatHudListener.class)
19+
@Mixin(ChatHud.class)
2120
public class ChatHudListenerMixin {
2221

2322
@Shadow
2423
@Final
2524
private MinecraftClient client;
2625

27-
@Inject(method = "onChatMessage", at = @At("HEAD"), cancellable = true)
28-
public void onMessage(MessageType messageType, Text message, UUID senderUuid, CallbackInfo ci) {
26+
@Inject(method = "addMessage(Lnet/minecraft/text/Text;Lnet/minecraft/network/message/MessageSignatureData;ILnet/minecraft/client/gui/hud/MessageIndicator;Z)V", at = @At("HEAD"), cancellable = true)
27+
public void onMessage(Text message, MessageSignatureData signature, int ticks, MessageIndicator indicator, boolean refresh, CallbackInfo ci) {
2928
if (!Utils.isOnSkyblock)
3029
return;
3130
String asString = message.getString();

src/main/java/me/xmrvizzy/skyblocker/mixin/ClientPlayerEntityMixin.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import net.minecraft.client.network.AbstractClientPlayerEntity;
77
import net.minecraft.client.network.ClientPlayerEntity;
88
import net.minecraft.client.world.ClientWorld;
9+
import net.minecraft.network.encryption.PlayerPublicKey;
910
import org.spongepowered.asm.mixin.Mixin;
1011
import org.spongepowered.asm.mixin.injection.At;
1112
import org.spongepowered.asm.mixin.injection.Inject;
@@ -14,8 +15,8 @@
1415
@Mixin(ClientPlayerEntity.class)
1516
public abstract class ClientPlayerEntityMixin extends AbstractClientPlayerEntity {
1617

17-
public ClientPlayerEntityMixin(ClientWorld world, GameProfile profile) {
18-
super(world, profile);
18+
public ClientPlayerEntityMixin(ClientWorld world, GameProfile profile, PlayerPublicKey publicKey) {
19+
super(world, profile, publicKey);
1920
}
2021

2122
@Inject(method = "dropSelectedItem", at = @At("HEAD"), cancellable = true)

src/main/java/me/xmrvizzy/skyblocker/skyblock/BackpackPreview.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class BackpackPreview extends DrawableHelper {
3131
private static final BackpackPreview instance = new BackpackPreview();
3232
private static final Pattern PROFILE_PATTERN = Pattern.compile("Profile: ([a-zA-Z]+)");
3333
private static final Pattern ECHEST_PATTERN = Pattern.compile("Ender Chest.*\\((\\d+)/\\d+\\)");
34-
private static final Pattern BACKPACK_PATTERN = Pattern.compile("Backpack.*\\((\\d+)/\\d+\\)");
34+
private static final Pattern BACKPACK_PATTERN = Pattern.compile("Backpack.*\\(Slot #(\\d+)\\)");
3535
private static final int STORAGE_SIZE = 27;
3636

3737
private static final Inventory[] storage = new Inventory[STORAGE_SIZE];

src/main/java/me/xmrvizzy/skyblocker/skyblock/FancyStatusBars.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import net.minecraft.client.MinecraftClient;
77
import net.minecraft.client.font.TextRenderer;
88
import net.minecraft.client.gui.DrawableHelper;
9+
import net.minecraft.client.network.ClientPlayerEntity;
910
import net.minecraft.client.util.math.MatrixStack;
1011
import net.minecraft.util.Identifier;
1112

src/main/java/me/xmrvizzy/skyblocker/skyblock/StatusBarTracker.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
import java.util.regex.Pattern;
88

99
public class StatusBarTracker {
10-
private static final Pattern STATUS_HEALTH = Pattern.compile("§[6c](\\d+)/(\\d+)❤(?:(\\+§c\\d+. *)| *)");
11-
private static final Pattern DEFENSE_STATUS = Pattern.compile("§a(\\d+)§a❈ Defense *");
12-
private static final Pattern MANA_USE = Pattern.compile("§b-\\d+ Mana \\\\S+(?:\\s\\S+)* *");
13-
private static final Pattern MANA_STATUS = Pattern.compile("§b(\\d+)/(\\d+)✎ (?:Mana|§3(\\d+)ʬ) *");
10+
private static final Pattern STATUS_HEALTH = Pattern.compile("§[6c](\\d+(,\\d\\d\\d)*)/(\\d+(,\\d\\d\\d)*)❤(?:(\\+§c(\\d+(,\\d\\d\\d)*). *)| *)");
11+
private static final Pattern DEFENSE_STATUS = Pattern.compile("§a(\\d+(,\\d\\d\\d)*)§a❈ Defense *");
12+
private static final Pattern MANA_USE = Pattern.compile("§b-(\\d+(,\\d\\d\\d)*) Mana \\\\S+(?:\\s\\S+)* *");
13+
private static final Pattern MANA_STATUS = Pattern.compile("§b(\\d+(,\\d\\d\\d)*)/(\\d+(,\\d\\d\\d)*)✎ (?:Mana|§3(\\d+(,\\d\\d\\d)*)ʬ) *");
1414

1515
private Resource health = new Resource(100, 100, 0);
1616
private Resource mana = new Resource(100, 100, 0);
@@ -29,19 +29,19 @@ public int getDefense() {
2929
}
3030

3131
private int parseInt(Matcher m, int group) {
32-
return Integer.parseInt(m.group(group));
32+
return Integer.parseInt(m.group(group).replace(",", ""));
3333
}
3434

3535
private void updateMana(Matcher m) {
3636
int value = parseInt(m, 1);
37-
int max = parseInt(m, 2);
38-
int overflow = m.group(3) == null ? 0 : parseInt(m, 3);
37+
int max = parseInt(m, 3);
38+
int overflow = m.group(5) == null ? 0 : parseInt(m, 5);
3939
this.mana = new Resource(value, max, overflow);
4040
}
4141

4242
private void updateHealth(Matcher m) {
4343
int value = parseInt(m, 1);
44-
int max = parseInt(m, 2);
44+
int max = parseInt(m, 3);
4545
int overflow = 0;
4646
ClientPlayerEntity player = null;
4747
try {
@@ -75,9 +75,9 @@ public String update(String actionBar, boolean filterManaUse) {
7575
if (!matcher.lookingAt())
7676
return actionBar;
7777
updateHealth(matcher);
78-
if (matcher.group(3) != null) {
78+
if (matcher.group(5) != null) {
7979
sb.append("§c❤");
80-
sb.append(matcher.group(3));
80+
sb.append(matcher.group(5));
8181
}
8282
actionBar = reset(actionBar, matcher);
8383
if (matcher.usePattern(MANA_STATUS).lookingAt()) {

0 commit comments

Comments
 (0)