Get pathing module compiling
This commit is contained in:
@@ -38,7 +38,7 @@ public class WrappedTimer extends Timer {
|
|||||||
to.lastSyncSysClock = from.lastSyncSysClock;
|
to.lastSyncSysClock = from.lastSyncSysClock;
|
||||||
to.elapsedPartialTicks = from.elapsedPartialTicks;
|
to.elapsedPartialTicks = from.elapsedPartialTicks;
|
||||||
//#if MC>=11200
|
//#if MC>=11200
|
||||||
// FIXME (should be good to go once AT are applied) to.tickLength = from.tickLength;
|
to.tickLength = from.tickLength;
|
||||||
//#else
|
//#else
|
||||||
//$$ to.ticksPerSecond = from.ticksPerSecond;
|
//$$ to.ticksPerSecond = from.ticksPerSecond;
|
||||||
//$$ to.lastHRTime = from.lastHRTime;
|
//$$ to.lastHRTime = from.lastHRTime;
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ import de.johni0702.minecraft.gui.layout.VerticalLayout;
|
|||||||
import de.johni0702.minecraft.gui.popup.GuiYesNoPopup;
|
import de.johni0702.minecraft.gui.popup.GuiYesNoPopup;
|
||||||
import de.johni0702.minecraft.gui.utils.Colors;
|
import de.johni0702.minecraft.gui.utils.Colors;
|
||||||
import de.johni0702.minecraft.gui.utils.Consumer;
|
import de.johni0702.minecraft.gui.utils.Consumer;
|
||||||
import org.lwjgl.util.Dimension;
|
import de.johni0702.minecraft.gui.utils.lwjgl.Dimension;
|
||||||
import org.lwjgl.util.ReadableDimension;
|
import de.johni0702.minecraft.gui.utils.lwjgl.ReadableDimension;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
|
|||||||
@@ -14,7 +14,11 @@ import com.replaymod.replaystudio.pathing.path.Timeline;
|
|||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
|
||||||
//#if MC>=10800
|
//#if MC>=10800
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
//#if MC>=11300
|
||||||
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
|
//#else
|
||||||
|
//$$ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
//#endif
|
||||||
//#else
|
//#else
|
||||||
//$$ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
//$$ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||||
//#endif
|
//#endif
|
||||||
@@ -28,7 +32,7 @@ import static com.replaymod.core.versions.MCVer.*;
|
|||||||
* Plays a timeline.
|
* Plays a timeline.
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractTimelinePlayer {
|
public abstract class AbstractTimelinePlayer {
|
||||||
private final Minecraft mc = Minecraft.getMinecraft();
|
private final Minecraft mc = getMinecraft();
|
||||||
private final ReplayHandler replayHandler;
|
private final ReplayHandler replayHandler;
|
||||||
private Timeline timeline;
|
private Timeline timeline;
|
||||||
protected long startOffset;
|
protected long startOffset;
|
||||||
|
|||||||
@@ -4,7 +4,11 @@ import com.replaymod.core.utils.WrappedTimer;
|
|||||||
import net.minecraft.util.Timer;
|
import net.minecraft.util.Timer;
|
||||||
|
|
||||||
//#if MC>=10800
|
//#if MC>=10800
|
||||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
//#if MC>=11300
|
||||||
|
import net.minecraftforge.eventbus.api.Event;
|
||||||
|
//#else
|
||||||
|
//$$ import net.minecraftforge.fml.common.eventhandler.Event;
|
||||||
|
//#endif
|
||||||
//#else
|
//#else
|
||||||
//$$ import cpw.mods.fml.common.eventhandler.Event;
|
//$$ import cpw.mods.fml.common.eventhandler.Event;
|
||||||
//#endif
|
//#endif
|
||||||
@@ -15,16 +19,28 @@ import static com.replaymod.core.versions.MCVer.*;
|
|||||||
* Wrapper around the current timer that prevents the timer from advancing by itself.
|
* Wrapper around the current timer that prevents the timer from advancing by itself.
|
||||||
*/
|
*/
|
||||||
public class ReplayTimer extends WrappedTimer {
|
public class ReplayTimer extends WrappedTimer {
|
||||||
private final Timer state = new Timer(0);
|
//#if MC>=11300
|
||||||
|
private final Timer state = new Timer(0, 0);
|
||||||
|
//#else
|
||||||
|
//$$ private final Timer state = new Timer(0);
|
||||||
|
//#endif
|
||||||
|
|
||||||
public ReplayTimer(Timer wrapped) {
|
public ReplayTimer(Timer wrapped) {
|
||||||
super(wrapped);
|
super(wrapped);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateTimer() {
|
public void updateTimer(
|
||||||
|
//#if MC>=11300
|
||||||
|
long sysClock
|
||||||
|
//#endif
|
||||||
|
) {
|
||||||
copy(this, state); // Save our current state
|
copy(this, state); // Save our current state
|
||||||
super.updateTimer(); // Update current state
|
wrapped.updateTimer(
|
||||||
|
//#if MC>=11300
|
||||||
|
sysClock
|
||||||
|
//#endif
|
||||||
|
); // Update current state
|
||||||
copy(state, this); // Restore our old state
|
copy(state, this); // Restore our old state
|
||||||
FML_BUS.post(new UpdatedEvent());
|
FML_BUS.post(new UpdatedEvent());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -277,7 +277,6 @@ sourceSets {
|
|||||||
exclude 'com/replaymod/editor'
|
exclude 'com/replaymod/editor'
|
||||||
exclude 'com/replaymod/extras'
|
exclude 'com/replaymod/extras'
|
||||||
exclude 'com/replaymod/online'
|
exclude 'com/replaymod/online'
|
||||||
exclude 'com/replaymod/pathing'
|
|
||||||
exclude 'com/replaymod/render'
|
exclude 'com/replaymod/render'
|
||||||
exclude 'com/replaymod/restrictions'
|
exclude 'com/replaymod/restrictions'
|
||||||
exclude 'com/replaymod/simplepathing'
|
exclude 'com/replaymod/simplepathing'
|
||||||
|
|||||||
Reference in New Issue
Block a user