Now cancels current path when exiting Replay Viewer

Disabled opening the inventory while in the Replay Viewer
This commit is contained in:
Marius Metzger
2015-03-31 18:52:17 +02:00
parent 5b859340fd
commit c23d2a0d0e
5 changed files with 20 additions and 9 deletions

View File

@@ -13,6 +13,7 @@ import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiChat;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.gui.inventory.GuiInventory;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
@@ -197,7 +198,7 @@ public class GuiReplayOverlay extends Gui {
if(!ReplayGuiRegistry.hidden) ReplayGuiRegistry.hide();
if(FMLClientHandler.instance().isGUIOpen(GuiChat.class)) {
if(FMLClientHandler.instance().isGUIOpen(GuiChat.class) || FMLClientHandler.instance().isGUIOpen(GuiInventory.class)) {
mc.displayGuiScreen(new GuiMouseInput());
}
@@ -288,7 +289,8 @@ public class GuiReplayOverlay extends Gui {
ReplayHandler.setLastPosition(null);
}
ReplayHandler.setReplayTime((int)time);
if((int)time != ReplayHandler.getDesiredTimestamp())
ReplayHandler.setReplayTime((int)time);
}
}