diff --git a/common/build.gradle b/common/build.gradle index 100124e..e95bea1 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -35,5 +35,5 @@ dependencies { } architectury { - common() + common(false) } \ No newline at end of file diff --git a/common/src/main/java/org/samo_lego/simpleauth/mixin/MixinServerPlayNetworkHandler.java b/common/src/main/java/org/samo_lego/simpleauth/mixin/MixinServerPlayNetworkHandler.java index 6901442..5c7ee2a 100644 --- a/common/src/main/java/org/samo_lego/simpleauth/mixin/MixinServerPlayNetworkHandler.java +++ b/common/src/main/java/org/samo_lego/simpleauth/mixin/MixinServerPlayNetworkHandler.java @@ -3,6 +3,7 @@ package org.samo_lego.simpleauth.mixin; import net.minecraft.network.packet.c2s.play.CreativeInventoryActionC2SPacket; import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket; import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket; +import net.minecraft.server.filter.TextStream; import net.minecraft.server.network.ServerPlayNetworkHandler; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.util.ActionResult; @@ -21,7 +22,7 @@ public abstract class MixinServerPlayNetworkHandler { public ServerPlayerEntity player; @Inject( - method = "method_31286(Ljava/lang/String;)V", + method = "method_31286(Lnet/minecraft/server/filter/TextStream$Message;)V", at = @At( value = "INVOKE", target = "Lnet/minecraft/server/network/ServerPlayerEntity;updateLastActionTime()V", @@ -29,8 +30,8 @@ public abstract class MixinServerPlayNetworkHandler { ), cancellable = true ) - private void onPlayerChat(String message, CallbackInfo ci) { - ActionResult result = AuthEventHandler.onPlayerChat(this.player, message); + private void onPlayerChat(TextStream.Message message, CallbackInfo ci) { + ActionResult result = AuthEventHandler.onPlayerChat(this.player, message.getFiltered()); if (result == ActionResult.FAIL) { ci.cancel(); } diff --git a/common/src/main/java/org/samo_lego/simpleauth/mixin/MixinSlot.java b/common/src/main/java/org/samo_lego/simpleauth/mixin/MixinSlot.java index 2fad4df..a13d652 100644 --- a/common/src/main/java/org/samo_lego/simpleauth/mixin/MixinSlot.java +++ b/common/src/main/java/org/samo_lego/simpleauth/mixin/MixinSlot.java @@ -24,10 +24,10 @@ public abstract class MixinSlot { player.networkHandler.sendPacket( new ScreenHandlerSlotUpdateS2CPacket( -2, - player.inventory.selectedSlot, - player.inventory.getStack(player.inventory.selectedSlot)) + player.getInventory().selectedSlot, + player.getInventory().getStack(player.getInventory().selectedSlot)) ); - player.networkHandler.sendPacket(new ScreenHandlerSlotUpdateS2CPacket(-1, -1, player.inventory.getCursorStack())); + player.networkHandler.sendPacket(new ScreenHandlerSlotUpdateS2CPacket(-1, -1, player.getInventory().getCursorStack())); cir.setReturnValue(false); } } diff --git a/gradle.properties b/gradle.properties index d05a9f2..c9ffea8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,12 +2,12 @@ org.gradle.jvmargs=-Xmx1G # Fabric properties -minecraft_version=1.16.5 -yarn_mappings=1.16.5+build.3 -loader_version=0.11.1 +minecraft_version=21w08b +yarn_mappings=21w08b+build.18 +loader_version=0.11.2 #Fabric api -fabric_version=0.29.4+1.16 +fabric_version=0.31.2+1.17 # Forge forge_version=36.0.4 diff --git a/settings.gradle b/settings.gradle index 1c3fbe9..cb71945 100644 --- a/settings.gradle +++ b/settings.gradle @@ -13,6 +13,6 @@ pluginManagement { include("common") include("fabric") -include("forge") +//include("forge") rootProject.name = "simpleauth" \ No newline at end of file