[1.7.10] Fix crash when opening replay

Looks to be two regressions, one due to login phase inclusion and one
due to simplification of InputReplayTimer.
This commit is contained in:
Jonas Herzig
2019-06-14 13:35:53 +02:00
parent 208b9c1b60
commit 898e29d7a1
3 changed files with 12 additions and 2 deletions

View File

@@ -96,7 +96,9 @@ public class InputReplayTimer extends WrappedTimer {
//#else //#else
//$$ mc.runTick(); //$$ mc.runTick();
//#endif //#endif
//$$ mc.theWorld = world; //$$ if (mc.theWorld == null) {
//$$ mc.theWorld = world;
//$$ }
//#endif //#endif
//#endif //#endif
} }

View File

@@ -67,11 +67,11 @@ import net.minecraft.network.NetworkSide;
//#else //#else
//$$ import com.mojang.authlib.GameProfile; //$$ import com.mojang.authlib.GameProfile;
//$$ import net.minecraft.client.network.NetHandlerPlayClient; //$$ import net.minecraft.client.network.NetHandlerPlayClient;
//$$ import net.minecraftforge.fml.client.FMLClientHandler;
//$$ import net.minecraftforge.fml.common.network.handshake.NetworkDispatcher; //$$ import net.minecraftforge.fml.common.network.handshake.NetworkDispatcher;
//#endif //#endif
//#endif //#endif
//#else //#else
//$$ import cpw.mods.fml.client.FMLClientHandler;
//$$ import cpw.mods.fml.common.Loader; //$$ import cpw.mods.fml.common.Loader;
//$$ import cpw.mods.fml.common.network.internal.FMLNetworkHandler; //$$ import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
//$$ import com.replaymod.replay.gui.screen.GuiOpeningReplay; //$$ import com.replaymod.replay.gui.screen.GuiOpeningReplay;
@@ -256,6 +256,7 @@ public class ReplayHandler {
//$$ } //$$ }
//$$ }; //$$ };
//$$ mc.displayGuiScreen(new GuiOpeningReplay(networkManager)); //$$ mc.displayGuiScreen(new GuiOpeningReplay(networkManager));
//$$ FMLClientHandler.instance().connectToRealmsServer(null, 0); // just to init the playClientBlock latch
//#endif //#endif
networkManager.setPacketListener(new ClientLoginNetworkHandler( networkManager.setPacketListener(new ClientLoginNetworkHandler(

View File

@@ -120,5 +120,12 @@ public abstract class MixinPlayerControllerMP {
//$$ ci.cancel(); //$$ ci.cancel();
//$$ } //$$ }
//$$ } //$$ }
//$$
//$$ @Inject(method = "resetBlockRemoving", at = @At("HEAD"), cancellable = true)
//$$ private void replayModReplay_skipWorldTick(CallbackInfo ci) {
//$$ if (this.mc.theWorld == null) {
//$$ ci.cancel();
//$$ }
//$$ }
//#endif //#endif
} }