Port to MC 1.19.3
Building against 1.19.3-rc3 for now because 1.19.3 has yet to release. ReplayStudio/ViaVersion is already targeting the release version though.
This commit is contained in:
@@ -57,7 +57,11 @@ import net.minecraft.util.math.Vec3d;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
|
||||
//#if MC>=11901
|
||||
//#if MC>=11903
|
||||
//$$ import net.minecraft.network.packet.s2c.play.ProfilelessChatMessageS2CPacket;
|
||||
//#endif
|
||||
|
||||
//#if MC==11901 || MC==11902
|
||||
//$$ import net.minecraft.network.packet.s2c.play.MessageHeaderS2CPacket;
|
||||
//#endif
|
||||
|
||||
@@ -755,7 +759,11 @@ public class FullReplaySender extends ChannelDuplexHandler implements ReplaySend
|
||||
GameMode.SPECTATOR,
|
||||
respawn.isDebugWorld(),
|
||||
respawn.isFlatWorld(),
|
||||
respawn.isWritingErrorSkippable()
|
||||
//#if MC>=11903
|
||||
//$$ (byte) 0
|
||||
//#else
|
||||
false
|
||||
//#endif
|
||||
//#else
|
||||
//$$ respawn.getGeneratorType(),
|
||||
//$$ GameMode.SPECTATOR
|
||||
@@ -868,7 +876,9 @@ public class FullReplaySender extends ChannelDuplexHandler implements ReplaySend
|
||||
}
|
||||
}
|
||||
|
||||
//#if MC>=11901
|
||||
//#if MC>=11903
|
||||
//$$ if (p instanceof GameMessageS2CPacket || p instanceof ChatMessageS2CPacket || p instanceof ProfilelessChatMessageS2CPacket) {
|
||||
//#elseif MC==11901 || MC==11902
|
||||
//$$ if (p instanceof GameMessageS2CPacket || p instanceof ChatMessageS2CPacket || p instanceof MessageHeaderS2CPacket) {
|
||||
//#elseif MC>=11900
|
||||
//$$ if (p instanceof GameMessageS2CPacket || p instanceof ChatMessageS2CPacket) {
|
||||
|
||||
@@ -295,6 +295,11 @@ public class ReplayHandler {
|
||||
networkManager,
|
||||
mc,
|
||||
null
|
||||
//#if MC>=11903
|
||||
//$$ , null
|
||||
//$$ , false
|
||||
//$$ , null
|
||||
//#endif
|
||||
//#if MC>=11400
|
||||
, it -> {}
|
||||
//#endif
|
||||
|
||||
@@ -195,7 +195,8 @@ public class GuiHandler extends EventRegistrations {
|
||||
buttons.stream()
|
||||
.filter(button -> button.x <= xEnd && button.x + button.getWidth() >= xStart)
|
||||
.filter(button -> button.y <= yEnd && button.y + button.getHeight() >= yStart)
|
||||
.forEach(button -> button.y += moveBy);
|
||||
// FIXME remap bug: needs the {} to recognize the setter (it also doesn't understand +=)
|
||||
.forEach(button -> { button.y = button.y + moveBy; });
|
||||
}
|
||||
|
||||
{ on(InitScreenCallback.EVENT, (screen, buttons) -> ensureReplayStopped(screen)); }
|
||||
@@ -417,6 +418,9 @@ public class GuiHandler extends EventRegistrations {
|
||||
//#if MC>=11400
|
||||
, self -> onClick.accept((InjectedButton) self)
|
||||
//#endif
|
||||
//#if MC>=11903
|
||||
//$$ , DEFAULT_NARRATION_SUPPLIER
|
||||
//#endif
|
||||
);
|
||||
this.guiScreen = guiScreen;
|
||||
this.id = buttonId;
|
||||
|
||||
@@ -11,11 +11,13 @@ import org.spongepowered.asm.mixin.injection.ModifyArg;
|
||||
|
||||
@Mixin(TitleScreen.class)
|
||||
public abstract class Mixin_MoveRealmsButton {
|
||||
@ModifyArg(
|
||||
method = "init",
|
||||
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;init(Lnet/minecraft/client/MinecraftClient;II)V"),
|
||||
index = 2
|
||||
)
|
||||
//#if MC>=11901
|
||||
//$$ private static final String REALMS_INIT = "Lnet/minecraft/client/realms/gui/screen/RealmsNotificationsScreen;init(Lnet/minecraft/client/MinecraftClient;II)V";
|
||||
//#else
|
||||
private static final String REALMS_INIT = "Lnet/minecraft/client/gui/screen/Screen;init(Lnet/minecraft/client/MinecraftClient;II)V";
|
||||
//#endif
|
||||
|
||||
@ModifyArg(method = "init", at = @At(value = "INVOKE", target = REALMS_INIT), index = 2)
|
||||
private int adjustRealmsButton(int height) {
|
||||
String setting = ReplayMod.instance.getSettingsRegistry().get(Setting.MAIN_MENU_BUTTON);
|
||||
if (MainMenuButtonPosition.valueOf(setting) == MainMenuButtonPosition.BIG) {
|
||||
|
||||
Reference in New Issue
Block a user