Combine all versions into a single tree

This commit is contained in:
Jonas Herzig
2018-02-10 23:35:57 +01:00
parent ec50efec10
commit 748b9da443
95 changed files with 2731 additions and 644 deletions

View File

@@ -9,6 +9,8 @@ import net.minecraftforge.client.event.GuiScreenEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import static com.replaymod.core.versions.MCVer.*;
public class YoutubeUpload implements Extra {
@Override
public void register(ReplayMod mod) throws Exception {
@@ -17,8 +19,8 @@ public class YoutubeUpload implements Extra {
@SubscribeEvent
public void onGuiOpen(GuiScreenEvent.InitGuiEvent.Post event) {
if (GuiScreen.from(event.getGui()) instanceof GuiRenderingDone) {
GuiRenderingDone gui = (GuiRenderingDone) GuiScreen.from(event.getGui());
if (GuiScreen.from(getGui(event)) instanceof GuiRenderingDone) {
GuiRenderingDone gui = (GuiRenderingDone) GuiScreen.from(getGui(event));
// Check if there already is a youtube button
if (gui.actionsPanel.getChildren().stream().anyMatch(it -> it instanceof YoutubeButton)) {
return; // Button already added