fabric-1.19: update to 1.19-pre3

This commit is contained in:
Kosma Moczek 2022-05-29 14:44:11 +02:00
parent f02a73bb0d
commit 24ecd0f72c
4 changed files with 13 additions and 13 deletions

View File

@ -1,4 +1,4 @@
minecraft_version=1.19-pre1
yarn_mappings=1.19-pre1+build.1
loader_version=0.14.5
fabric_version=0.52.4+1.19
minecraft_version=1.19-pre3
yarn_mappings=1.19-pre3+build.4
loader_version=0.14.6
fabric_version=0.53.4+1.19

View File

@ -2,7 +2,7 @@ package org.dynmap.fabric_1_19;
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import net.fabricmc.fabric.api.command.v1.CommandRegistrationCallback;
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerChunkEvents;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents;
@ -96,7 +96,7 @@ public class DynmapPlugin {
plugin = this;
// Fabric events persist between server instances
ServerLifecycleEvents.SERVER_STARTING.register(this::serverStart);
CommandRegistrationCallback.EVENT.register((dispatcher, dedicated) -> registerCommands(dispatcher));
CommandRegistrationCallback.EVENT.register((dispatcher, registryAccess, environment) -> registerCommands(dispatcher));
CustomServerLifecycleEvents.SERVER_STARTED_PRE_WORLD_LOAD.register(this::serverStarted);
ServerLifecycleEvents.SERVER_STOPPING.register(this::serverStop);
}

View File

@ -6,7 +6,7 @@ import net.minecraft.block.entity.SignBlockEntity;
import net.minecraft.network.MessageType;
import net.minecraft.network.encryption.SignedChatMessage;
import net.minecraft.network.packet.c2s.play.UpdateSignC2SPacket;
import net.minecraft.server.filter.Message;
import net.minecraft.server.filter.FilteredMessage;
import net.minecraft.server.filter.TextStream;
import net.minecraft.server.network.ServerPlayNetworkHandler;
import net.minecraft.server.network.ServerPlayerEntity;
@ -33,14 +33,14 @@ public abstract class ServerPlayNetworkHandlerMixin {
public ServerPlayerEntity player;
@Inject(
method = "method_44155",
method = "handleDecoratedMessage",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/server/PlayerManager;broadcast(Lnet/minecraft/server/filter/Message;Lnet/minecraft/server/network/ServerPlayerEntity;Lnet/minecraft/util/registry/RegistryKey;)V",
target = "Lnet/minecraft/server/PlayerManager;broadcast(Lnet/minecraft/server/filter/FilteredMessage;Lnet/minecraft/server/network/ServerPlayerEntity;Lnet/minecraft/util/registry/RegistryKey;)V",
shift = At.Shift.BEFORE
)
)
public void onGameMessage(Message<SignedChatMessage> message, CallbackInfo ci) {
public void onGameMessage(FilteredMessage<SignedChatMessage> message, CallbackInfo ci) {
ServerChatEvents.EVENT.invoker().onChatMessage(player, message.raw().getContent().getString());
}
@ -53,7 +53,7 @@ public abstract class ServerPlayNetworkHandlerMixin {
),
locals = LocalCapture.CAPTURE_FAILHARD
)
public void onSignUpdate(UpdateSignC2SPacket packet, List<Message<String>> signText, CallbackInfo info,
public void onSignUpdate(UpdateSignC2SPacket packet, List<FilteredMessage<String>> signText, CallbackInfo info,
ServerWorld serverWorld, BlockPos blockPos, BlockState blockState, BlockEntity blockEntity, SignBlockEntity signBlockEntity)
{
// Pull the raw text from the input.

View File

@ -26,8 +26,8 @@
],
"depends": {
"fabricloader": ">=0.13.3",
"fabric": ">=0.47.8",
"fabricloader": ">=0.14.6",
"fabric": ">=0.53.4",
"minecraft": "1.19.x"
}
}