Make use of the source remapping feature of The Preprocessor plugin
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package com.replaymod.extras;
|
||||
|
||||
import com.replaymod.core.ReplayMod;
|
||||
import com.replaymod.core.versions.MCVer;
|
||||
import de.johni0702.minecraft.gui.container.AbstractGuiScreen;
|
||||
import de.johni0702.minecraft.gui.container.GuiContainer;
|
||||
import de.johni0702.minecraft.gui.container.GuiPanel;
|
||||
@@ -100,7 +99,7 @@ public class OpenEyeExtra implements Extra {
|
||||
GuiPopup popup = new GuiPopup(OfferGui.this);
|
||||
new Thread(() -> {
|
||||
try {
|
||||
File targetFile = new File(MCVer.mcDataDir(mod.getMinecraft()), "mods/" + ReplayMod.getMinecraftVersion() + "/OpenEye.jar");
|
||||
File targetFile = new File(mod.getMinecraft().gameDir, "mods/" + ReplayMod.getMinecraftVersion() + "/OpenEye.jar");
|
||||
FileUtils.forceMkdir(targetFile.getParentFile());
|
||||
|
||||
HttpsURLConnection connection = (HttpsURLConnection) new URL(DOWNLOAD_URL).openConnection();
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.replaymod.extras.advancedscreenshots;
|
||||
|
||||
import com.replaymod.core.ReplayMod;
|
||||
import com.replaymod.core.versions.MCVer;
|
||||
import com.replaymod.render.RenderSettings;
|
||||
import com.replaymod.render.gui.GuiRenderSettings;
|
||||
import com.replaymod.replay.ReplayModReplay;
|
||||
@@ -82,12 +81,12 @@ public class GuiCreateScreenshot extends GuiRenderSettings implements Loadable {
|
||||
|
||||
@Override
|
||||
protected File generateOutputFile(RenderSettings.EncodingPreset encodingPreset) {
|
||||
File screenshotFolder = new File(MCVer.mcDataDir(getMinecraft()), "screenshots");
|
||||
File screenshotFolder = new File(getMinecraft().gameDir, "screenshots");
|
||||
return ScreenShotHelper.getTimestampedPNGFileForDirectory(screenshotFolder);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Path getSettingsPath() {
|
||||
return MCVer.mcDataDir(getMinecraft()).toPath().resolve("config/replaymod-screenshotsettings.json");
|
||||
return getMinecraft().gameDir.toPath().resolve("config/replaymod-screenshotsettings.json");
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,6 @@ import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.replaymod.core.versions.MCVer.*;
|
||||
|
||||
@@ -52,7 +51,7 @@ public class PlayerOverview implements Extra {
|
||||
if (module.getReplayHandler() != null) {
|
||||
@SuppressWarnings("unchecked")
|
||||
//#if MC>=10800
|
||||
List<EntityPlayer> players = world(mod.getMinecraft()).getPlayers(EntityPlayer.class, new Predicate() {
|
||||
List<EntityPlayer> players = mod.getMinecraft().world.getPlayers(EntityPlayer.class, new Predicate() {
|
||||
@Override
|
||||
public boolean apply(Object input) {
|
||||
return !(input instanceof CameraEntity); // Exclude the camera entity
|
||||
|
||||
@@ -24,7 +24,6 @@ import com.google.common.base.Suppliers;
|
||||
import com.google.common.io.Files;
|
||||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
import com.google.common.util.concurrent.SettableFuture;
|
||||
import com.replaymod.core.versions.MCVer;
|
||||
import com.replaymod.render.RenderSettings;
|
||||
import com.replaymod.render.metadata.MetadataInjector;
|
||||
import lombok.Getter;
|
||||
@@ -79,7 +78,7 @@ public class YoutubeUploader {
|
||||
this.videoVisibility = videoVisibility;
|
||||
this.videoSnippet = videoSnippet;
|
||||
this.httpTransport = GoogleNetHttpTransport.newTrustedTransport();
|
||||
this.dataStoreFactory = new FileDataStoreFactory(MCVer.mcDataDir(minecraft));
|
||||
this.dataStoreFactory = new FileDataStoreFactory(minecraft.gameDir);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user