Adapted new API System with search API call
Implemented raw Pagination support to Replay Center Fixed awkward time jumps caused by MCTimerHandler Fixed Java 1.6 incompatibility with List.sort Method in GuiSpectateSelection Fixed a LOT of compatibility issues with the Shader Mod
This commit is contained in:
@@ -13,6 +13,7 @@ import net.minecraft.client.gui.GuiMainMenu;
|
||||
import net.minecraft.client.gui.GuiOptions;
|
||||
import net.minecraft.client.gui.GuiVideoSettings;
|
||||
import net.minecraft.client.gui.inventory.GuiInventory;
|
||||
import net.minecraft.client.multiplayer.WorldClient;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.client.settings.GameSettings.Options;
|
||||
import net.minecraftforge.client.event.GuiOpenEvent;
|
||||
@@ -56,9 +57,9 @@ public class GuiEventHandler {
|
||||
event.gui = null;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if(!(event.gui instanceof GuiReplayManager || event.gui instanceof GuiUploadFile)) ResourceHelper.freeAllResources();
|
||||
|
||||
|
||||
if(event.gui instanceof GuiMainMenu) {
|
||||
if(ReplayMod.firstMainMenu) {
|
||||
ReplayMod.firstMainMenu = false;
|
||||
@@ -162,20 +163,20 @@ public class GuiEventHandler {
|
||||
|
||||
if(ReplayHandler.replayActive() && event.gui instanceof GuiIngameMenu && event.button.id == 1) {
|
||||
event.button.enabled = false;
|
||||
Thread t = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
ReplayHandler.endReplay();
|
||||
|
||||
mc.gameSettings.setOptionFloatValue(Options.GAMMA, ReplayHandler.getInitialGamma());
|
||||
|
||||
mc.gameSettings.setOptionFloatValue(Options.GAMMA, ReplayHandler.getInitialGamma());
|
||||
ReplayHandler.lastExit = System.currentTimeMillis();
|
||||
|
||||
ReplayHandler.lastExit = System.currentTimeMillis();
|
||||
mc.theWorld.sendQuittingDisconnectingPacket();
|
||||
/* This is already being executed by the default Exit action handling (vanilla code)
|
||||
mc.theWorld.sendQuittingDisconnectingPacket();
|
||||
mc.loadWorld((WorldClient)null);
|
||||
mc.displayGuiScreen(new GuiMainMenu());
|
||||
*/
|
||||
|
||||
ReplayHandler.endReplay();
|
||||
|
||||
ReplayGuiRegistry.show();
|
||||
}
|
||||
});
|
||||
t.start();
|
||||
ReplayGuiRegistry.show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ public class GuiReplayOverlay extends Gui {
|
||||
|
||||
private static boolean requestScreenshot = false;
|
||||
|
||||
private Field drawBlockOutline;
|
||||
//private Field drawBlockOutline;
|
||||
|
||||
public static void requestScreenshot() {
|
||||
requestScreenshot = true;
|
||||
@@ -98,13 +98,13 @@ public class GuiReplayOverlay extends Gui {
|
||||
|
||||
public GuiReplayOverlay() {
|
||||
try {
|
||||
drawBlockOutline = EntityRenderer.class.getDeclaredField(MCPNames.field("field_175073_D"));
|
||||
drawBlockOutline.setAccessible(true);
|
||||
drawBlockOutline.set(Minecraft.getMinecraft().entityRenderer, false);
|
||||
// drawBlockOutline = EntityRenderer.class.getDeclaredField(MCPNames.field("field_175073_D"));
|
||||
// drawBlockOutline.setAccessible(true);
|
||||
// drawBlockOutline.set(Minecraft.getMinecraft().entityRenderer, false);
|
||||
} catch(Exception e) {}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
//@SubscribeEvent TODO
|
||||
public void renderHand(RenderHandEvent event) {
|
||||
if(ReplayHandler.replayActive()) {
|
||||
event.setCanceled(true);
|
||||
@@ -135,7 +135,8 @@ public class GuiReplayOverlay extends Gui {
|
||||
if(mc != null && mc.thePlayer != null)
|
||||
MinecraftTicker.runMouseKeyboardTick(mc);
|
||||
}
|
||||
if(mc.getRenderViewEntity() == mc.thePlayer || !mc.getRenderViewEntity().isEntityAlive()) {
|
||||
if(mc.getRenderViewEntity() == mc.thePlayer || !mc.getRenderViewEntity().isEntityAlive()
|
||||
&& ReplayHandler.getCameraEntity() != null) {
|
||||
ReplayHandler.spectateCamera();
|
||||
ReplayHandler.getCameraEntity().movePath(new Position(lastX, lastY, lastZ, lastPitch, lastYaw));
|
||||
} else if(!ReplayHandler.isCamera()) {
|
||||
@@ -169,6 +170,7 @@ public class GuiReplayOverlay extends Gui {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onRenderGui(RenderGameOverlayEvent.Post event) throws IllegalArgumentException, IllegalAccessException {
|
||||
|
||||
if(!ReplayHandler.replayActive() || FMLClientHandler.instance().isGUIOpen(GuiSpectateSelection.class) || VideoWriter.isRecording()) {
|
||||
return;
|
||||
}
|
||||
@@ -185,7 +187,7 @@ public class GuiReplayOverlay extends Gui {
|
||||
}
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
drawBlockOutline.set(Minecraft.getMinecraft().entityRenderer, false);
|
||||
// drawBlockOutline.set(Minecraft.getMinecraft().entityRenderer, false);
|
||||
|
||||
if(!ReplayHandler.replayActive()) {
|
||||
return;
|
||||
@@ -750,7 +752,7 @@ public class GuiReplayOverlay extends Gui {
|
||||
}
|
||||
|
||||
private void addPlaceKeyframe() {
|
||||
CameraEntity cam = ReplayHandler.getCameraEntity();
|
||||
Entity cam = mc.getRenderViewEntity();
|
||||
if(cam == null) return;
|
||||
ReplayHandler.addKeyframe(new PositionKeyframe(ReplayHandler.getRealTimelineCursor(), new Position(cam.posX, cam.posY, cam.posZ, cam.rotationPitch, cam.rotationYaw)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user