22w18a
This commit is contained in:
1 parent
544c1a8327
commit
217567c037
8 files changed
+40
-29
No files matched your search
@@ -1,5 +1,7 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import net.minecraft.network.chat.MessageSignature;
|
||||
import net.minecraft.network.chat.SignedMessage;
|
||||
import net.minecraft.network.protocol.game.ServerboundChatPacket;
|
||||
import net.minecraft.server.network.TextFilter;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
@@ -284,13 +286,13 @@ public class ServerGamePacketListenerImpl_scarpetEventsMixin
|
||||
}
|
||||
|
||||
@Inject(method = "handleChat(Lnet/minecraft/network/protocol/game/ServerboundChatPacket;Lnet/minecraft/server/network/TextFilter$FilteredText;)V",
|
||||
at = @At(value = "INVOKE", target = "Ljava/lang/String;startsWith(Ljava/lang/String;)Z"),
|
||||
at = @At(value = "INVOKE", target = "Lnet/minecraft/server/players/PlayerList;broadcastChatMessage(Lnet/minecraft/network/chat/SignedMessage;Lnet/minecraft/server/network/TextFilter$FilteredText;Lnet/minecraft/server/level/ServerPlayer;Lnet/minecraft/resources/ResourceKey;)V"),
|
||||
locals = LocalCapture.CAPTURE_FAILHARD
|
||||
)
|
||||
private void onChatMessage(ServerboundChatPacket serverboundChatPacket, TextFilter.FilteredText filteredText, CallbackInfo ci, String string) {
|
||||
private void onChatMessage(ServerboundChatPacket serverboundChatPacket, TextFilter.FilteredText filteredText, CallbackInfo ci, MessageSignature messageSignature, SignedMessage signedMessage) {
|
||||
if (PLAYER_MESSAGE.isNeeded())
|
||||
{
|
||||
PLAYER_MESSAGE.onPlayerMessage(player,string);
|
||||
PLAYER_MESSAGE.onPlayerMessage(player, filteredText.getRaw());
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
-6
@@ -7,6 +7,7 @@ import com.mojang.authlib.GameProfile;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.entity.player.ProfilePublicKey;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Unique;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
@@ -14,7 +15,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(ServerPlayer.class)
|
||||
public abstract class ServerPlayerMixin implements ServerPlayerEntityInterface
|
||||
public abstract class ServerPlayer_actionPackMixin implements ServerPlayerEntityInterface
|
||||
{
|
||||
@Unique
|
||||
public EntityPlayerActionPack actionPack;
|
||||
@@ -25,11 +26,7 @@ public abstract class ServerPlayerMixin implements ServerPlayerEntityInterface
|
||||
}
|
||||
|
||||
@Inject(method = "<init>", at = @At(value = "RETURN"))
|
||||
private void onServerPlayerEntityContructor(
|
||||
MinecraftServer minecraftServer_1,
|
||||
ServerLevel serverWorld_1,
|
||||
GameProfile gameProfile_1,
|
||||
CallbackInfo ci)
|
||||
private void onServerPlayerEntityContructor(MinecraftServer foo, ServerLevel bar, GameProfile baz, ProfilePublicKey qux, CallbackInfo ci)
|
||||
{
|
||||
this.actionPack = new EntityPlayerActionPack((ServerPlayer) (Object) this);
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.damagesource.DamageSource;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.player.ProfilePublicKey;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
@@ -38,9 +39,8 @@ public abstract class ServerPlayer_scarpetEventMixin extends Player implements S
|
||||
@Unique
|
||||
private boolean isInvalidReference = false;
|
||||
|
||||
public ServerPlayer_scarpetEventMixin(Level world, BlockPos blockPos, float f, GameProfile gameProfile)
|
||||
{
|
||||
super(world, blockPos, f, gameProfile);
|
||||
public ServerPlayer_scarpetEventMixin(Level level, BlockPos blockPos, float f, GameProfile gameProfile, ProfilePublicKey profilePublicKey) {
|
||||
super(level, blockPos, f, gameProfile, profilePublicKey);
|
||||
}
|
||||
|
||||
@Shadow protected abstract void completeUsingItem();
|
||||
|
||||
@@ -10,6 +10,7 @@ import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.player.ProfilePublicKey;
|
||||
import net.minecraft.world.level.Level;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
@@ -18,8 +19,8 @@ import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
@Mixin(ServerPlayer.class)
|
||||
public abstract class ServerPlayer_updateSuppressionCrashFixMixin extends Player {
|
||||
|
||||
public ServerPlayer_updateSuppressionCrashFixMixin(Level world, BlockPos pos, float yaw, GameProfile profile) {
|
||||
super(world, pos, yaw, profile);
|
||||
public ServerPlayer_updateSuppressionCrashFixMixin(Level level, BlockPos blockPos, float f, GameProfile gameProfile, ProfilePublicKey profilePublicKey) {
|
||||
super(level, blockPos, f, gameProfile, profilePublicKey);
|
||||
}
|
||||
|
||||
@Redirect(
|
||||
|
||||
Reference in new issue
Block a user