20w08b
This commit is contained in:
parent
2b582c004e
commit
9095056da2
|
@ -35,5 +35,5 @@ dependencies {
|
|||
}
|
||||
|
||||
architectury {
|
||||
common()
|
||||
common(false)
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -13,6 +13,6 @@ pluginManagement {
|
|||
|
||||
include("common")
|
||||
include("fabric")
|
||||
include("forge")
|
||||
//include("forge")
|
||||
|
||||
rootProject.name = "simpleauth"
|
Loading…
Reference in New Issue