22w16b with massive Component changes
This commit is contained in:
1 parent
8101abb431
commit
746c8548e9
31 files changed
+153
-162
No files matched your search
@@ -6,7 +6,7 @@ import carpet.logging.LoggerRegistry;
|
||||
import carpet.utils.Messenger;
|
||||
import net.minecraft.ReportedException;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.network.chat.BaseComponent;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
@@ -45,7 +45,7 @@ public class MinecraftServer_updateSuppressionCrashFixMixin {
|
||||
private void logUpdateSuppression(BlockPos pos) {
|
||||
if(LoggerRegistry.__updateSuppressedCrashes) {
|
||||
LoggerRegistry.getLogger("updateSuppressedCrashes").log(() -> {
|
||||
return new BaseComponent[]{Messenger.c(
|
||||
return new Component[]{Messenger.c(
|
||||
"w Server crash prevented in: ",
|
||||
"m world tick ",
|
||||
"w - at: ",
|
||||
|
||||
@@ -20,6 +20,6 @@ public class ServerGamePacketListenerImpl_coreMixin {
|
||||
@Inject(method = "onDisconnect", at = @At("HEAD"))
|
||||
private void onPlayerDisconnect(Component reason, CallbackInfo ci) {
|
||||
CarpetServer.onPlayerLoggedOut(this.player);
|
||||
if (PLAYER_DISCONNECTS.isNeeded()) PLAYER_DISCONNECTS.onPlayerMessage(player, reason.getContents());
|
||||
if (PLAYER_DISCONNECTS.isNeeded()) PLAYER_DISCONNECTS.onPlayerMessage(player, reason.getContents().toString());
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import carpet.utils.Messenger;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import net.minecraft.ReportedException;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.network.chat.BaseComponent;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.level.Level;
|
||||
@@ -49,7 +49,7 @@ public abstract class ServerPlayer_updateSuppressionCrashFixMixin extends Player
|
||||
private void logUpdateSuppressionPlayer(BlockPos pos) {
|
||||
if(LoggerRegistry.__updateSuppressedCrashes) {
|
||||
LoggerRegistry.getLogger("updateSuppressedCrashes").log(() -> {
|
||||
return new BaseComponent[]{Messenger.c(
|
||||
return new Component[]{Messenger.c(
|
||||
"w Server crash prevented in: ",
|
||||
"m player tick ",
|
||||
"w - at: ",
|
||||
|
||||
@@ -2,7 +2,6 @@ package carpet.mixins;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.TextComponent;
|
||||
import net.minecraft.network.protocol.status.ServerStatus;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
@@ -17,7 +16,7 @@ public class ServerStatus_motdMixin
|
||||
{
|
||||
if (!CarpetSettings.customMOTD.equals("_"))
|
||||
{
|
||||
cir.setReturnValue(new TextComponent(CarpetSettings.customMOTD));
|
||||
cir.setReturnValue(Component.literal(CarpetSettings.customMOTD));
|
||||
cir.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user