Update to 1.16-pre2 (#23)

This commit is contained in:
Alexander 2020-06-06 11:16:09 +03:00 committed by GitHub
parent 35b9d8b07c
commit 14ccf796d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View File

@ -51,11 +51,11 @@ dependencies {
// Use 1.16 snapshot, probably intermediary will make it work on further versions
// https://modmuss50.me/fabric.html?&version=20w18a
minecraft("com.mojang:minecraft:20w18a")
mappings("net.fabricmc:yarn:20w18a+build.1:v2")
modImplementation("net.fabricmc:fabric-loader:0.8.2+build.194")
minecraft("com.mojang:minecraft:1.16-pre2")
mappings("net.fabricmc:yarn:1.16-pre2+build.2:v2")
modImplementation("net.fabricmc:fabric-loader:0.8.7+build.201")
modImplementation("net.fabricmc.fabric-api:fabric-api:0.7.1+build.331-1.16")
modImplementation("net.fabricmc.fabric-api:fabric-api:0.11.7+build.356-1.16")
modImplementation("io.github.cottonmc:cotton-client-commands:1.0.0+1.15.2")
include("io.github.cottonmc:cotton-client-commands:1.0.0+1.15.2")

View File

@ -44,6 +44,7 @@ import net.minecraft.network.packet.s2c.play.GameMessageS2CPacket;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.text.Text;
import net.minecraft.util.Util;
import us.myles.ViaVersion.api.Via;
import us.myles.ViaVersion.api.ViaAPI;
import us.myles.ViaVersion.api.ViaVersionConfig;
@ -227,7 +228,7 @@ public class VRPlatform implements ViaPlatform<UUID> {
runServerSync(() -> {
ServerPlayerEntity player = server.getPlayerManager().getPlayer(uuid);
if (player == null) return;
player.sendMessage(Text.Serializer.fromJson(ChatRewriter.legacyTextToJson(s)), MessageType.SYSTEM);
player.sendMessage(Text.Serializer.fromJson(ChatRewriter.legacyTextToJson(s)), false);
});
}
@ -237,7 +238,7 @@ public class VRPlatform implements ViaPlatform<UUID> {
if (handler != null) {
try {
handler.onGameMessage(new GameMessageS2CPacket(
Text.Serializer.fromJson(ChatRewriter.legacyTextToJson(s))
Text.Serializer.fromJson(ChatRewriter.legacyTextToJson(s)), MessageType.SYSTEM, Util.NIL_UUID
));
} catch (OffThreadException ignored) {
}