Make use of the source remapping feature of The Preprocessor plugin
This commit is contained in:
@@ -4,6 +4,7 @@ import com.replaymod.core.KeyBindingRegistry;
|
||||
import com.replaymod.core.Module;
|
||||
import com.replaymod.core.ReplayMod;
|
||||
import com.replaymod.core.events.SettingsChangedEvent;
|
||||
import com.replaymod.core.versions.MCVer.Keyboard;
|
||||
import com.replaymod.replay.ReplayModReplay;
|
||||
import com.replaymod.replay.events.ReplayCloseEvent;
|
||||
import com.replaymod.replay.events.ReplayOpenEvent;
|
||||
@@ -19,20 +20,11 @@ import com.replaymod.simplepathing.gui.GuiPathing;
|
||||
import com.replaymod.simplepathing.preview.PathPreview;
|
||||
import lombok.Getter;
|
||||
import net.minecraft.crash.CrashReport;
|
||||
import net.minecraft.crash.ReportedException;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
//#if MC>=11300
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
//#else
|
||||
//$$ import org.lwjgl.input.Keyboard;
|
||||
//#if MC>=10800
|
||||
//$$ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
//#else
|
||||
//$$ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
//#endif
|
||||
//#endif
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
@@ -41,7 +33,7 @@ import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import static com.replaymod.core.versions.MCVer.*;
|
||||
import static com.replaymod.core.versions.MCVer.FML_BUS;
|
||||
|
||||
public class ReplayModSimplePathing implements Module {
|
||||
{ instance = this; }
|
||||
@@ -96,7 +88,7 @@ public class ReplayModSimplePathing implements Module {
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw newReportedException(CrashReport.makeCrashReport(e, "Reading timeline"));
|
||||
throw new ReportedException(CrashReport.makeCrashReport(e, "Reading timeline"));
|
||||
}
|
||||
|
||||
guiPathing = new GuiPathing(core, this, event.getReplayHandler());
|
||||
@@ -222,7 +214,7 @@ public class ReplayModSimplePathing implements Module {
|
||||
timeline = serialization.deserialize(serialized).get("");
|
||||
} catch (Throwable t) {
|
||||
CrashReport report = CrashReport.makeCrashReport(t, "Cloning timeline");
|
||||
throw newReportedException(report);
|
||||
throw new ReportedException(report);
|
||||
}
|
||||
|
||||
int id = lastSaveId.incrementAndGet();
|
||||
|
||||
@@ -31,6 +31,7 @@ import com.replaymod.simplepathing.properties.ExplicitInterpolationProperty;
|
||||
import lombok.Getter;
|
||||
import net.minecraft.crash.CrashReport;
|
||||
import net.minecraft.crash.CrashReportCategory;
|
||||
import net.minecraft.crash.ReportedException;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.apache.commons.lang3.tuple.Triple;
|
||||
@@ -659,7 +660,7 @@ public class SPTimeline implements PathingRegistry {
|
||||
CrashReport crash = CrashReport.makeCrashReport(e, "Serializing interpolator");
|
||||
CrashReportCategory category = crash.makeCategory("Serializing interpolator");
|
||||
addDetail(category, "Interpolator", interpolator::toString);
|
||||
throw newReportedException(crash);
|
||||
throw new ReportedException(crash);
|
||||
}
|
||||
|
||||
return baos.toString();
|
||||
@@ -674,7 +675,7 @@ public class SPTimeline implements PathingRegistry {
|
||||
CrashReport crash = CrashReport.makeCrashReport(e, "De-serializing interpolator");
|
||||
CrashReportCategory category = crash.makeCategory("De-serializing interpolator");
|
||||
addDetail(category, "Interpolator", json::toString);
|
||||
throw newReportedException(crash);
|
||||
throw new ReportedException(crash);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user