[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
//$$ mc.runTick();
//#endif
//$$ mc.theWorld = world;
//$$ if (mc.theWorld == null) {
//$$ mc.theWorld = world;
//$$ }
//#endif
//#endif
}

View File

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

View File

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