1.19.1-rc2
This commit is contained in:
1 parent
86ac49c0ae
commit
6d3c4fa508
7 files changed
+16
-14
No files matched your search
@@ -3,6 +3,7 @@ package carpet.mixins;
|
||||
import carpet.CarpetServer;
|
||||
import carpet.CarpetSettings;
|
||||
import com.mojang.brigadier.CommandDispatcher;
|
||||
import com.mojang.brigadier.ParseResults;
|
||||
import net.minecraft.commands.CommandBuildContext;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.commands.Commands;
|
||||
@@ -31,14 +32,14 @@ public abstract class Commands_customCommandsMixin
|
||||
}
|
||||
|
||||
@Inject(method = "performCommand", at = @At("HEAD"))
|
||||
private void onExecuteBegin(CommandSourceStack serverCommandSource_1, String string_1, CallbackInfoReturnable<Integer> cir)
|
||||
private void onExecuteBegin(ParseResults<CommandSourceStack> parseResults, String string, CallbackInfoReturnable<Integer> cir)
|
||||
{
|
||||
if (!CarpetSettings.fillUpdates)
|
||||
CarpetSettings.impendingFillSkipUpdates.set(true);
|
||||
}
|
||||
|
||||
@Inject(method = "performCommand", at = @At("RETURN"))
|
||||
private void onExecuteEnd(CommandSourceStack serverCommandSource_1, String string_1, CallbackInfoReturnable<Integer> cir)
|
||||
private void onExecuteEnd(ParseResults<CommandSourceStack> parseResults, String string, CallbackInfoReturnable<Integer> cir)
|
||||
{
|
||||
CarpetSettings.impendingFillSkipUpdates.set(false);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.protocol.game.ServerboundChatPacket;
|
||||
import net.minecraft.server.network.FilteredText;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
@@ -282,13 +282,13 @@ public class ServerGamePacketListenerImpl_scarpetEventsMixin
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "handleChat(Lnet/minecraft/network/protocol/game/ServerboundChatPacket;Lnet/minecraft/server/network/FilteredText;)V",
|
||||
at = @At(value = "INVOKE", target = "Lnet/minecraft/network/protocol/game/ServerboundChatPacket;signedPreview()Z")
|
||||
@Inject(method = "handleChat(Lnet/minecraft/network/protocol/game/ServerboundChatPacket;)V",
|
||||
at = @At(value = "HEAD")
|
||||
)
|
||||
private void onChatMessage(ServerboundChatPacket serverboundChatPacket, FilteredText<String> filteredText, CallbackInfo ci) {
|
||||
private void onChatMessage(ServerboundChatPacket serverboundChatPacket, CallbackInfo ci) {
|
||||
if (PLAYER_MESSAGE.isNeeded())
|
||||
{
|
||||
PLAYER_MESSAGE.onPlayerMessage(player, filteredText.raw());
|
||||
PLAYER_MESSAGE.onPlayerMessage(player, serverboundChatPacket.message());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user