Switch core to 1.14 (generated via ./gradlew :1.14:setCoreVersion)
This commit is contained in:
@@ -21,11 +21,11 @@ import de.johni0702.minecraft.gui.popup.GuiFileChooserPopup;
|
||||
import de.johni0702.minecraft.gui.utils.lwjgl.ReadableDimension;
|
||||
import joptsimple.internal.Strings;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.client.resource.language.I18n;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
|
||||
//#if MC>=11300
|
||||
import net.minecraft.util.Util;
|
||||
import net.minecraft.util.SystemUtil;
|
||||
//#else
|
||||
//$$ import org.lwjgl.Sys;
|
||||
//#endif
|
||||
@@ -83,7 +83,7 @@ public class GuiYoutubeUpload extends GuiScreen {
|
||||
public final GuiTextArea descriptionField = new GuiTextArea().setMaxCharCount(Integer.MAX_VALUE)
|
||||
.setMaxTextWidth(Integer.MAX_VALUE).setMaxTextHeight(Integer.MAX_VALUE);
|
||||
{
|
||||
descriptionField.setText(new String[]{I18n.format("replaymod.gui.videodescription")});
|
||||
descriptionField.setText(new String[]{I18n.translate("replaymod.gui.videodescription")});
|
||||
}
|
||||
|
||||
public final GuiTextField tagsField = new GuiTextField().setI18nHint("replaymod.gui.videotags");
|
||||
@@ -219,17 +219,17 @@ public class GuiYoutubeUpload extends GuiScreen {
|
||||
Desktop.getDesktop().browse(new URL(url).toURI());
|
||||
} catch(Throwable throwable) {
|
||||
//#if MC>=11400
|
||||
//$$ SystemUtil.getOperatingSystem().open(url);
|
||||
SystemUtil.getOperatingSystem().open(url);
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
Util.getOSType().openURI(url);
|
||||
//$$ Util.getOSType().openURI(url);
|
||||
//#else
|
||||
//$$ Sys.openURL(url);
|
||||
//#endif
|
||||
//#endif
|
||||
}
|
||||
upload = null;
|
||||
progressBar.setLabel(I18n.format("replaymod.gui.ytuploadprogress.done", url));
|
||||
progressBar.setLabel(I18n.translate("replaymod.gui.ytuploadprogress.done", url));
|
||||
setState(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package com.replaymod.extras.youtube;
|
||||
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.client.resource.language.I18n;
|
||||
|
||||
public enum VideoVisibility {
|
||||
PUBLIC, UNLISTED, PRIVATE;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return I18n.format("replaymod.gui.videovisibility." + name().toLowerCase());
|
||||
return I18n.translate("replaymod.gui.videovisibility." + name().toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,11 +8,11 @@ import de.johni0702.minecraft.gui.element.GuiButton;
|
||||
import de.johni0702.minecraft.gui.utils.EventRegistrations;
|
||||
|
||||
//#if MC>=11400
|
||||
//$$ import de.johni0702.minecraft.gui.versions.callbacks.OpenGuiScreenCallback;
|
||||
//$$ import net.minecraft.client.gui.Screen;
|
||||
import de.johni0702.minecraft.gui.versions.callbacks.OpenGuiScreenCallback;
|
||||
import net.minecraft.client.gui.Screen;
|
||||
//#else
|
||||
import net.minecraftforge.client.event.GuiScreenEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
//$$ import net.minecraftforge.client.event.GuiScreenEvent;
|
||||
//$$ import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
//#endif
|
||||
|
||||
import static com.replaymod.core.versions.MCVer.*;
|
||||
@@ -24,12 +24,12 @@ public class YoutubeUpload extends EventRegistrations implements Extra {
|
||||
}
|
||||
|
||||
//#if MC>=11400
|
||||
//$$ { on(OpenGuiScreenCallback.EVENT, this::onGuiOpen); }
|
||||
//$$ private void onGuiOpen(Screen vanillaGui) {
|
||||
{ on(OpenGuiScreenCallback.EVENT, this::onGuiOpen); }
|
||||
private void onGuiOpen(Screen vanillaGui) {
|
||||
//#else
|
||||
@SubscribeEvent
|
||||
public void onGuiOpen(GuiScreenEvent.InitGuiEvent.Post event) {
|
||||
net.minecraft.client.gui.GuiScreen vanillaGui = getGui(event);
|
||||
//$$ @SubscribeEvent
|
||||
//$$ public void onGuiOpen(GuiScreenEvent.InitGuiEvent.Post event) {
|
||||
//$$ net.minecraft.client.gui.GuiScreen vanillaGui = getGui(event);
|
||||
//#endif
|
||||
if (GuiScreen.from(vanillaGui) instanceof GuiRenderingDone) {
|
||||
GuiRenderingDone gui = (GuiRenderingDone) GuiScreen.from(vanillaGui);
|
||||
|
||||
@@ -28,7 +28,7 @@ import com.replaymod.render.RenderSettings;
|
||||
import com.replaymod.render.metadata.MetadataInjector;
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import org.apache.commons.exec.CommandLine;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
@@ -66,7 +66,7 @@ public class YoutubeUploader {
|
||||
@Getter
|
||||
private volatile boolean cancelled;
|
||||
|
||||
public YoutubeUploader(Minecraft minecraft, File videoFile, int videoFrames,
|
||||
public YoutubeUploader(MinecraftClient minecraft, File videoFile, int videoFrames,
|
||||
String thumbnailFormat, byte[] thumbnailImage,
|
||||
RenderSettings settings, VideoVisibility videoVisibility, VideoSnippet videoSnippet)
|
||||
throws GeneralSecurityException, IOException {
|
||||
@@ -78,7 +78,7 @@ public class YoutubeUploader {
|
||||
this.videoVisibility = videoVisibility;
|
||||
this.videoSnippet = videoSnippet;
|
||||
this.httpTransport = GoogleNetHttpTransport.newTrustedTransport();
|
||||
this.dataStoreFactory = new FileDataStoreFactory(minecraft.gameDir);
|
||||
this.dataStoreFactory = new FileDataStoreFactory(minecraft.runDirectory);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user