Skip to content

Commit

Permalink
sa
Browse files Browse the repository at this point in the history
  • Loading branch information
Dream-Master committed Oct 13, 2023
1 parent c8ec78d commit c2c3248
Show file tree
Hide file tree
Showing 16 changed files with 62 additions and 69 deletions.
7 changes: 3 additions & 4 deletions src/main/java/lumien/custommainmenu/CustomMainMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

import java.io.File;

import lumien.custommainmenu.configuration.Config;
import lumien.custommainmenu.configuration.ConfigurationLoader;
import lumien.custommainmenu.handler.CMMEventHandler;

import net.minecraft.client.Minecraft;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ResourceLocation;
Expand All @@ -19,6 +15,9 @@
import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import lumien.custommainmenu.configuration.Config;
import lumien.custommainmenu.configuration.ConfigurationLoader;
import lumien.custommainmenu.handler.CMMEventHandler;

@Mod(modid = CustomMainMenu.MOD_ID, name = CustomMainMenu.MOD_NAME, version = CustomMainMenu.MOD_VERSION)
public class CustomMainMenu {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
import java.io.OutputStream;
import java.io.Reader;

import lumien.custommainmenu.CustomMainMenu;
import lumien.custommainmenu.gui.GuiCustom;

import org.apache.commons.io.IOUtils;

import com.google.common.io.ByteStreams;
Expand All @@ -20,6 +17,9 @@
import com.google.gson.JsonParser;
import com.google.gson.stream.JsonReader;

import lumien.custommainmenu.CustomMainMenu;
import lumien.custommainmenu.gui.GuiCustom;

public class ConfigurationLoader {

Config config;
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/lumien/custommainmenu/configuration/GuiConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
import java.util.Random;
import java.util.Set;

import org.apache.logging.log4j.Level;

import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;

import lumien.custommainmenu.CustomMainMenu;
import lumien.custommainmenu.configuration.elements.Background;
import lumien.custommainmenu.configuration.elements.Button;
Expand All @@ -31,12 +37,6 @@
import lumien.custommainmenu.lib.textures.TextureResourceLocation;
import lumien.custommainmenu.lib.textures.TextureURL;

import org.apache.logging.log4j.Level;

import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;

public class GuiConfig {

public String name;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package lumien.custommainmenu.configuration;

import lumien.custommainmenu.gui.GuiCustom;

import net.minecraft.client.Minecraft;

import lumien.custommainmenu.gui.GuiCustom;

public class GuiEntry {

GuiCustom standard;
Expand Down
29 changes: 14 additions & 15 deletions src/main/java/lumien/custommainmenu/gui/GuiCustom.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,6 @@
import java.util.List;
import java.util.Random;

import lumien.custommainmenu.CustomMainMenu;
import lumien.custommainmenu.configuration.Alignment;
import lumien.custommainmenu.configuration.Config;
import lumien.custommainmenu.configuration.GuiConfig;
import lumien.custommainmenu.configuration.elements.Background;
import lumien.custommainmenu.configuration.elements.Button;
import lumien.custommainmenu.configuration.elements.Image;
import lumien.custommainmenu.configuration.elements.Panorama;
import lumien.custommainmenu.configuration.elements.SplashText;
import lumien.custommainmenu.configuration.elements.Text;
import lumien.custommainmenu.lib.actions.ActionOpenLink;
import lumien.custommainmenu.lib.textures.ITexture;
import lumien.custommainmenu.util.GlStateManager;
import lumien.custommainmenu.util.RenderUtil;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.GuiButton;
Expand All @@ -43,6 +28,20 @@
import cpw.mods.fml.common.eventhandler.Event;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import lumien.custommainmenu.CustomMainMenu;
import lumien.custommainmenu.configuration.Alignment;
import lumien.custommainmenu.configuration.Config;
import lumien.custommainmenu.configuration.GuiConfig;
import lumien.custommainmenu.configuration.elements.Background;
import lumien.custommainmenu.configuration.elements.Button;
import lumien.custommainmenu.configuration.elements.Image;
import lumien.custommainmenu.configuration.elements.Panorama;
import lumien.custommainmenu.configuration.elements.SplashText;
import lumien.custommainmenu.configuration.elements.Text;
import lumien.custommainmenu.lib.actions.ActionOpenLink;
import lumien.custommainmenu.lib.textures.ITexture;
import lumien.custommainmenu.util.GlStateManager;
import lumien.custommainmenu.util.RenderUtil;

@SideOnly(value = Side.CLIENT)
public class GuiCustom extends GuiScreen implements GuiYesNoCallback {
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/lumien/custommainmenu/gui/GuiCustomButton.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@

import java.util.List;

import lumien.custommainmenu.configuration.elements.Button;
import lumien.custommainmenu.lib.StringReplacer;
import lumien.custommainmenu.lib.textures.ITexture;
import lumien.custommainmenu.util.GlStateManager;
import lumien.custommainmenu.util.LogicUtil;
import lumien.custommainmenu.util.RenderUtil;

import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.ISound;
import net.minecraft.client.audio.PositionedSoundRecord;
Expand All @@ -18,6 +11,13 @@
import net.minecraft.client.resources.I18n;
import net.minecraft.util.ResourceLocation;

import lumien.custommainmenu.configuration.elements.Button;
import lumien.custommainmenu.lib.StringReplacer;
import lumien.custommainmenu.lib.textures.ITexture;
import lumien.custommainmenu.util.GlStateManager;
import lumien.custommainmenu.util.LogicUtil;
import lumien.custommainmenu.util.RenderUtil;

public class GuiCustomButton extends GuiButton {

public Button b;
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/lumien/custommainmenu/gui/GuiCustomLabel.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
import java.text.SimpleDateFormat;
import java.util.List;

import lumien.custommainmenu.configuration.elements.Text;
import lumien.custommainmenu.lib.StringReplacer;
import lumien.custommainmenu.lib.texts.TextString;
import lumien.custommainmenu.util.GlStateManager;

import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.ISound;
import net.minecraft.client.audio.PositionedSoundRecord;
Expand All @@ -21,6 +16,10 @@

import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Loader;
import lumien.custommainmenu.configuration.elements.Text;
import lumien.custommainmenu.lib.StringReplacer;
import lumien.custommainmenu.lib.texts.TextString;
import lumien.custommainmenu.util.GlStateManager;

public class GuiCustomLabel extends Gui {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package lumien.custommainmenu.gui;

import lumien.custommainmenu.configuration.elements.Button;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;

import lumien.custommainmenu.configuration.elements.Button;

public class GuiCustomWrappedButton extends GuiCustomButton {

GuiButton wrappedButton;
Expand Down
11 changes: 5 additions & 6 deletions src/main/java/lumien/custommainmenu/handler/CMMEventHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@
import java.util.HashMap;
import java.util.Iterator;

import lumien.custommainmenu.CustomMainMenu;
import lumien.custommainmenu.gui.GuiCustom;
import lumien.custommainmenu.gui.GuiCustomButton;
import lumien.custommainmenu.gui.GuiCustomWrappedButton;
import lumien.custommainmenu.gui.GuiFakeMain;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiMainMenu;
Expand All @@ -22,6 +16,11 @@
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import lumien.custommainmenu.CustomMainMenu;
import lumien.custommainmenu.gui.GuiCustom;
import lumien.custommainmenu.gui.GuiCustomButton;
import lumien.custommainmenu.gui.GuiCustomWrappedButton;
import lumien.custommainmenu.gui.GuiFakeMain;

public class CMMEventHandler {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package lumien.custommainmenu.lib.actions;

import lumien.custommainmenu.gui.GuiCustom;

import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.multiplayer.ServerData;

import cpw.mods.fml.client.FMLClientHandler;
import lumien.custommainmenu.gui.GuiCustom;

public class ActionConnectToServer implements IAction {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import java.io.FileInputStream;
import java.io.InputStream;

import lumien.custommainmenu.gui.GuiCustom;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.nbt.CompressedStreamTools;
Expand All @@ -16,6 +14,7 @@
import cpw.mods.fml.client.GuiOldSaveLoadConfirm;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.StartupQuery;
import lumien.custommainmenu.gui.GuiCustom;

public class ActionLoadWorld implements IAction {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import java.io.File;
import java.io.IOException;

import lumien.custommainmenu.gui.GuiCustom;

import net.minecraft.client.Minecraft;

import lumien.custommainmenu.gui.GuiCustom;

public class ActionOpenFolder implements IAction {

String folderName;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package lumien.custommainmenu.lib.actions;

import lumien.custommainmenu.CustomMainMenu;
import lumien.custommainmenu.gui.GuiCustom;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiControls;
import net.minecraft.client.gui.GuiCreateWorld;
Expand All @@ -22,6 +19,8 @@
import net.minecraft.client.stream.IStream;

import cpw.mods.fml.client.GuiModList;
import lumien.custommainmenu.CustomMainMenu;
import lumien.custommainmenu.gui.GuiCustom;

public class ActionOpenGUI implements IAction {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package lumien.custommainmenu.lib.actions;

import lumien.custommainmenu.gui.GuiCustom;
import lumien.custommainmenu.gui.GuiCustomConfirmOpenLink;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;

import lumien.custommainmenu.gui.GuiCustom;
import lumien.custommainmenu.gui.GuiCustomConfirmOpenLink;

public class ActionOpenLink implements IAction {

String link;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package lumien.custommainmenu.lib.actions;

import lumien.custommainmenu.CustomMainMenu;
import lumien.custommainmenu.gui.GuiCustom;

import net.minecraft.client.gui.GuiMainMenu;
import net.minecraft.client.gui.GuiScreen;

import org.lwjgl.input.Keyboard;

import lumien.custommainmenu.CustomMainMenu;
import lumien.custommainmenu.gui.GuiCustom;

public class ActionRefresh implements IAction {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@

import javax.imageio.ImageIO;

import lumien.custommainmenu.CustomMainMenu;
import lumien.custommainmenu.handler.LoadTextureURL;
import lumien.custommainmenu.util.GlStateManager;

import net.minecraft.client.renderer.texture.TextureUtil;

import org.apache.commons.io.IOUtils;
import org.apache.logging.log4j.Level;
import org.lwjgl.opengl.GL11;

import lumien.custommainmenu.CustomMainMenu;
import lumien.custommainmenu.handler.LoadTextureURL;
import lumien.custommainmenu.util.GlStateManager;

public class TextureURL implements ITexture {

URL url;
Expand Down

0 comments on commit c2c3248

Please sign in to comment.