Clean up a bunch of compiler warnings.
This commit is contained in:
parent
5643237fb9
commit
0de92f4db7
|
@ -30,6 +30,7 @@ public class FMLConfigGuiFactory implements IModGuiFactory
|
|||
super(parent, getConfigElements(), "FML", false, false, I18n.format("fml.config.sample.title"));
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
private static List<IConfigElement> getConfigElements()
|
||||
{
|
||||
List<IConfigElement> list = new ArrayList<IConfigElement>();
|
||||
|
@ -86,11 +87,9 @@ public class FMLConfigGuiFactory implements IModGuiFactory
|
|||
}
|
||||
}
|
||||
|
||||
private Minecraft minecraft;
|
||||
@Override
|
||||
public void initialize(Minecraft minecraftInstance)
|
||||
{
|
||||
this.minecraft = minecraftInstance;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -49,7 +49,9 @@ public class DummyConfigElement<T> implements IConfigElement<T>
|
|||
protected boolean requiresMcRestart = false;
|
||||
protected boolean isListFixedLength = false;
|
||||
protected int maxListLength = -1;
|
||||
@SuppressWarnings("rawtypes")
|
||||
protected List<IConfigElement> childElements;
|
||||
@SuppressWarnings("rawtypes")
|
||||
protected Class<? extends IConfigEntry> configEntryClass;
|
||||
protected Class<? extends IArrayEntry> arrayEntryClass;
|
||||
|
||||
|
@ -59,16 +61,19 @@ public class DummyConfigElement<T> implements IConfigElement<T>
|
|||
*/
|
||||
public static class DummyCategoryElement<T> extends DummyConfigElement<T>
|
||||
{
|
||||
@SuppressWarnings("rawtypes")
|
||||
public DummyCategoryElement(String name, String langKey, List<IConfigElement> childElements)
|
||||
{
|
||||
this(name, langKey, childElements, (Class) null);
|
||||
this(name, langKey, childElements, (Class<? extends IConfigEntry>) null);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public DummyCategoryElement(String name, String langKey, Class<? extends IConfigEntry> customListEntryClass)
|
||||
{
|
||||
this(name, langKey, new ArrayList<IConfigElement>(), customListEntryClass);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public DummyCategoryElement(String name, String langKey, List<IConfigElement> childElements, Class<? extends IConfigEntry> customListEntryClass)
|
||||
{
|
||||
super(name, (T) null, ConfigGuiType.CONFIG_CATEGORY, langKey);
|
||||
|
@ -144,6 +149,7 @@ public class DummyConfigElement<T> implements IConfigElement<T>
|
|||
this(name, defaultValues, type, langKey, false, maxListLength, validStringPattern, (T) null, (T) null);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public DummyListElement setCustomEditListEntryClass(Class<? extends IArrayEntry> clazz)
|
||||
{
|
||||
this.arrayEntryClass = clazz;
|
||||
|
@ -157,6 +163,7 @@ public class DummyConfigElement<T> implements IConfigElement<T>
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public DummyConfigElement(String name, T defaultValue, ConfigGuiType type, String langKey, String[] validValues, Pattern validStringPattern, T minValue, T maxValue)
|
||||
{
|
||||
this.name = name;
|
||||
|
@ -206,6 +213,7 @@ public class DummyConfigElement<T> implements IConfigElement<T>
|
|||
this(name, defaultValue, type, langKey, (String[]) null, (Pattern) null, minValue, maxValue);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public DummyConfigElement setCustomListEntryClass(Class<? extends IConfigEntry> clazz)
|
||||
{
|
||||
this.configEntryClass = clazz;
|
||||
|
@ -218,18 +226,21 @@ public class DummyConfigElement<T> implements IConfigElement<T>
|
|||
return isProperty;
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public IConfigElement setConfigEntryClass(Class<? extends IConfigEntry> clazz)
|
||||
{
|
||||
this.configEntryClass = clazz;
|
||||
return this;
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public Class<? extends IConfigEntry> getConfigEntryClass()
|
||||
{
|
||||
return configEntryClass;
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public IConfigElement setArrayEntryClass(Class<? extends IArrayEntry> clazz)
|
||||
{
|
||||
this.arrayEntryClass = clazz;
|
||||
|
@ -266,6 +277,7 @@ public class DummyConfigElement<T> implements IConfigElement<T>
|
|||
return I18n.format(langKey + ".tooltip");
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public List<IConfigElement> getChildElements()
|
||||
{
|
||||
|
|
|
@ -15,8 +15,6 @@ package cpw.mods.fml.client.config;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
/**
|
||||
* This class provides a button that fixes several bugs present in the vanilla GuiButton drawing code.
|
||||
* The gist of it is that it allows buttons of any size without gaps in the graphics and with the
|
||||
|
|
|
@ -12,25 +12,20 @@
|
|||
|
||||
package cpw.mods.fml.client.config;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import static cpw.mods.fml.client.config.GuiUtils.RESET_CHAR;
|
||||
import static cpw.mods.fml.client.config.GuiUtils.UNDO_CHAR;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiMainMenu;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.GuiYesNo;
|
||||
import net.minecraft.client.multiplayer.WorldClient;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import static cpw.mods.fml.client.config.GuiUtils.RESET_CHAR;
|
||||
import static cpw.mods.fml.client.config.GuiUtils.UNDO_CHAR;
|
||||
|
||||
import cpw.mods.fml.client.config.GuiConfigEntries.IConfigEntry;
|
||||
import cpw.mods.fml.client.event.ConfigChangedEvent;
|
||||
import cpw.mods.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent;
|
||||
|
@ -53,7 +48,9 @@ public class GuiConfig extends GuiScreen
|
|||
public final GuiScreen parentScreen;
|
||||
public String title = "Config GUI";
|
||||
public String titleLine2;
|
||||
@SuppressWarnings("rawtypes")
|
||||
public final List<IConfigElement> configElements;
|
||||
@SuppressWarnings("rawtypes")
|
||||
public final List<IConfigEntry> initEntries;
|
||||
public GuiConfigEntries entryList;
|
||||
private GuiButtonExt btnDefaultAll;
|
||||
|
@ -90,6 +87,7 @@ public class GuiConfig extends GuiScreen
|
|||
* @param title the desired title for this screen. For consistency it is recommended that you pass the path of the config file being
|
||||
* edited.
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public GuiConfig(GuiScreen parentScreen, List<IConfigElement> configElements, String modID, String configID,
|
||||
boolean allRequireWorldRestart, boolean allRequireMcRestart, String title)
|
||||
{
|
||||
|
@ -108,6 +106,7 @@ public class GuiConfig extends GuiScreen
|
|||
* @param title the desired title for this screen. For consistency it is recommended that you pass the path of the config file being
|
||||
* edited.
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public GuiConfig(GuiScreen parentScreen, List<IConfigElement> configElements, String modID,
|
||||
boolean allRequireWorldRestart, boolean allRequireMcRestart, String title)
|
||||
{
|
||||
|
@ -128,6 +127,7 @@ public class GuiConfig extends GuiScreen
|
|||
* @param titleLine2 the desired title second line for this screen. Typically this is used to send the category name of the category
|
||||
* currently being edited.
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public GuiConfig(GuiScreen parentScreen, List<IConfigElement> configElements, String modID,
|
||||
boolean allRequireWorldRestart, boolean allRequireMcRestart, String title, String titleLine2)
|
||||
{
|
||||
|
@ -151,6 +151,7 @@ public class GuiConfig extends GuiScreen
|
|||
* @param titleLine2 the desired title second line for this screen. Typically this is used to send the category name of the category
|
||||
* currently being edited.
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public GuiConfig(GuiScreen parentScreen, List<IConfigElement> configElements, String modID, String configID,
|
||||
boolean allRequireWorldRestart, boolean allRequireMcRestart, String title, String titleLine2)
|
||||
{
|
||||
|
@ -180,6 +181,7 @@ public class GuiConfig extends GuiScreen
|
|||
return path.replace("\\", "/").replace(mc.mcDataDir.getAbsolutePath().replace("\\", "/"), "/.minecraft");
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui()
|
||||
{
|
||||
|
@ -342,6 +344,7 @@ public class GuiConfig extends GuiScreen
|
|||
this.drawToolTip(this.mc.fontRenderer.listFormattedStringToWidth(I18n.format("fml.configgui.tooltip.applyGlobally"), 300), mouseX, mouseY);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void drawToolTip(List stringList, int x, int y)
|
||||
{
|
||||
this.func_146283_a(stringList, x, y);
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
*/
|
||||
package cpw.mods.fml.client.config;
|
||||
|
||||
import static cpw.mods.fml.client.config.GuiUtils.RESET_CHAR;
|
||||
import static cpw.mods.fml.client.config.GuiUtils.UNDO_CHAR;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -18,10 +21,8 @@ import java.util.Map;
|
|||
import java.util.TreeMap;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiListExtended;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.GuiSlot;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
|
@ -29,9 +30,6 @@ import net.minecraft.util.EnumChatFormatting;
|
|||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import static cpw.mods.fml.client.config.GuiUtils.RESET_CHAR;
|
||||
import static cpw.mods.fml.client.config.GuiUtils.UNDO_CHAR;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.ModContainer;
|
||||
|
@ -46,6 +44,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
{
|
||||
public final GuiConfig owningScreen;
|
||||
public final Minecraft mc;
|
||||
@SuppressWarnings("rawtypes")
|
||||
public List<IConfigEntry> listEntries;
|
||||
/**
|
||||
* The max width of the label of all IConfigEntry objects.
|
||||
|
@ -76,6 +75,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
*/
|
||||
public int scrollBarX;
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
public GuiConfigEntries(GuiConfig parent, Minecraft mc)
|
||||
{
|
||||
super(mc, parent.width, parent.height, parent.titleLine2 != null ? 33 : 23, parent.height - 32, 20);
|
||||
|
@ -83,8 +83,8 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
this.setShowSelectionBox(false);
|
||||
this.mc = mc;
|
||||
this.listEntries = new ArrayList<IConfigEntry>();
|
||||
int i = 0;
|
||||
String s = null;
|
||||
// int i = 0;
|
||||
// String s = null;
|
||||
|
||||
for (IConfigElement configElement : parent.configElements)
|
||||
{
|
||||
|
@ -168,6 +168,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
protected void initGui()
|
||||
{
|
||||
this.width = owningScreen.width;
|
||||
|
@ -205,6 +206,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
/**
|
||||
* Gets the IGuiListEntry object for the given index
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public IConfigEntry getListEntry(int index)
|
||||
{
|
||||
|
@ -229,6 +231,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
/**
|
||||
* This method is a pass-through for IConfigEntry objects that require keystrokes. Called from the parent GuiConfig screen.
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void keyTyped(char eventChar, int eventKey)
|
||||
{
|
||||
for (IConfigEntry entry : this.listEntries)
|
||||
|
@ -239,6 +242,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
* This method is a pass-through for IConfigEntry objects that contain GuiTextField elements. Called from the parent GuiConfig
|
||||
* screen.
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void updateScreen()
|
||||
{
|
||||
for (IConfigEntry entry : this.listEntries)
|
||||
|
@ -249,6 +253,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
* This method is a pass-through for IConfigEntry objects that contain GuiTextField elements. Called from the parent GuiConfig
|
||||
* screen.
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void mouseClicked(int mouseX, int mouseY, int mouseEvent)
|
||||
{
|
||||
for (IConfigEntry entry : this.listEntries)
|
||||
|
@ -258,6 +263,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
/**
|
||||
* This method is a pass-through for IConfigListEntry objects that need to perform actions when the containing GUI is closed.
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void onGuiClosed()
|
||||
{
|
||||
for (IConfigEntry entry : this.listEntries)
|
||||
|
@ -268,6 +274,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
* Saves all properties on this screen / child screens. This method returns true if any elements were changed that require
|
||||
* a restart for proper handling.
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public boolean saveConfigElements()
|
||||
{
|
||||
boolean requiresRestart = false;
|
||||
|
@ -282,6 +289,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
* Returns true if all IConfigEntry objects on this screen are set to default. If includeChildren is true sub-category
|
||||
* objects are checked as well.
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public boolean areAllEntriesDefault(boolean includeChildren)
|
||||
{
|
||||
for (IConfigEntry entry : this.listEntries)
|
||||
|
@ -295,6 +303,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
* Sets all IConfigEntry objects on this screen to default. If includeChildren is true sub-category objects are set as
|
||||
* well.
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void setAllToDefault(boolean includeChildren)
|
||||
{
|
||||
for (IConfigEntry entry : this.listEntries)
|
||||
|
@ -306,6 +315,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
* Returns true if any IConfigEntry objects on this screen are changed. If includeChildren is true sub-category objects
|
||||
* are checked as well.
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public boolean hasChangedEntry(boolean includeChildren)
|
||||
{
|
||||
for (IConfigEntry entry : this.listEntries)
|
||||
|
@ -319,6 +329,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
* Returns true if any IConfigEntry objects on this screen are enabled. If includeChildren is true sub-category objects
|
||||
* are checked as well.
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public boolean areAnyEntriesEnabled(boolean includeChildren)
|
||||
{
|
||||
for (IConfigEntry entry : this.listEntries)
|
||||
|
@ -332,6 +343,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
* Reverts changes to all IConfigEntry objects on this screen. If includeChildren is true sub-category objects are
|
||||
* reverted as well.
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void undoAllChanges(boolean includeChildren)
|
||||
{
|
||||
for (IConfigEntry entry : this.listEntries)
|
||||
|
@ -343,6 +355,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
* Calls the drawToolTip() method for all IConfigEntry objects on this screen. This is called from the parent GuiConfig screen
|
||||
* after drawing all other elements.
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void drawScreenPost(int mouseX, int mouseY, float partialTicks)
|
||||
{
|
||||
for (IConfigEntry entry : this.listEntries)
|
||||
|
@ -414,6 +427,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public boolean saveConfigElement()
|
||||
{
|
||||
|
@ -521,6 +535,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public boolean saveConfigElement()
|
||||
{
|
||||
|
@ -654,6 +669,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public boolean saveConfigElement()
|
||||
{
|
||||
|
@ -689,6 +705,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
protected final Object[] beforeValues;
|
||||
protected Object[] currentValues;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public ArrayEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)
|
||||
{
|
||||
super(owningScreen, owningEntryList, configElement);
|
||||
|
@ -754,6 +771,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public boolean saveConfigElement()
|
||||
{
|
||||
|
@ -846,6 +864,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public boolean saveConfigElement()
|
||||
{
|
||||
|
@ -967,6 +986,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
{
|
||||
protected final int beforeValue;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public IntegerEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)
|
||||
{
|
||||
super(owningScreen, owningEntryList, configElement);
|
||||
|
@ -1026,6 +1046,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
this.textFieldValue.setText(String.valueOf(beforeValue));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public boolean saveConfigElement()
|
||||
{
|
||||
|
@ -1072,6 +1093,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
{
|
||||
protected final double beforeValue;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public DoubleEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)
|
||||
{
|
||||
super(owningScreen, owningEntryList, configElement);
|
||||
|
@ -1132,6 +1154,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
this.textFieldValue.setText(String.valueOf(beforeValue));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public boolean saveConfigElement()
|
||||
{
|
||||
|
@ -1257,6 +1280,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
this.textFieldValue.setText(beforeValue);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public boolean saveConfigElement()
|
||||
{
|
||||
|
@ -1300,6 +1324,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
protected GuiScreen childScreen;
|
||||
protected final GuiButtonExt btnSelectCategory;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public CategoryEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)
|
||||
{
|
||||
super(owningScreen, owningEntryList, configElement);
|
||||
|
@ -1315,6 +1340,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
/**
|
||||
* This method is called in the constructor and is used to set the childScreen field.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected GuiScreen buildChildScreen()
|
||||
{
|
||||
return new GuiConfig(this.owningScreen, this.configElement.getChildElements(), this.owningScreen.modID,
|
||||
|
@ -1460,6 +1486,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
*
|
||||
* Provides a base entry for others to extend. Handles drawing the prop label (if drawLabel == true) and the Undo/Default buttons.
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public static abstract class ListEntryBase implements IConfigEntry
|
||||
{
|
||||
protected final GuiConfig owningScreen;
|
||||
|
@ -1478,6 +1505,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
protected HoverChecker defaultHoverChecker;
|
||||
protected boolean drawLabel;
|
||||
|
||||
@SuppressWarnings({ "unchecked" })
|
||||
public ListEntryBase(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)
|
||||
{
|
||||
this.owningScreen = owningScreen;
|
||||
|
@ -1673,6 +1701,7 @@ public class GuiConfigEntries extends GuiListExtended
|
|||
* Gets the IConfigElement object owned by this entry.
|
||||
* @return
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public IConfigElement getConfigElement();
|
||||
|
||||
/**
|
||||
|
|
|
@ -36,6 +36,7 @@ import org.lwjgl.input.Keyboard;
|
|||
public class GuiEditArray extends GuiScreen
|
||||
{
|
||||
protected GuiScreen parentScreen;
|
||||
@SuppressWarnings("rawtypes")
|
||||
protected IConfigElement configElement;
|
||||
private GuiEditArrayEntries entryList;
|
||||
private GuiButtonExt btnUndoChanges, btnDefault, btnDone;
|
||||
|
@ -46,9 +47,11 @@ public class GuiEditArray extends GuiScreen
|
|||
private final Object[] beforeValues;
|
||||
private Object[] currentValues;
|
||||
private HoverChecker tooltipHoverChecker;
|
||||
@SuppressWarnings("rawtypes")
|
||||
private List toolTip;
|
||||
protected boolean enabled;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public GuiEditArray(GuiScreen parentScreen, IConfigElement configElement, int slotIndex, Object[] currentValues, boolean enabled)
|
||||
{
|
||||
this.mc = Minecraft.getMinecraft();
|
||||
|
@ -94,6 +97,7 @@ public class GuiEditArray extends GuiScreen
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui()
|
||||
{
|
||||
|
@ -197,6 +201,7 @@ public class GuiEditArray extends GuiScreen
|
|||
drawToolTip(this.toolTip, par1, par2);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void drawToolTip(List stringList, int x, int y)
|
||||
{
|
||||
this.func_146283_a(stringList, x, y);
|
||||
|
|
|
@ -37,6 +37,7 @@ import cpw.mods.fml.common.FMLLog;
|
|||
*
|
||||
* @author bspkrs
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public class GuiEditArrayEntries extends GuiListExtended
|
||||
{
|
||||
private GuiEditArray owningGui;
|
||||
|
@ -50,6 +51,7 @@ public class GuiEditArrayEntries extends GuiListExtended
|
|||
public final Object[] beforeValues;
|
||||
public Object[] currentValues;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public GuiEditArrayEntries(GuiEditArray parent, Minecraft mc, IConfigElement configElement, Object[] beforeValues, Object[] currentValues)
|
||||
{
|
||||
super(mc, parent.width, parent.height, parent.titleLine2 != null ? (parent.titleLine3 != null ? 43 : 33) : 23, parent.height - 32, 20);
|
||||
|
@ -219,6 +221,7 @@ public class GuiEditArrayEntries extends GuiListExtended
|
|||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void saveListChanges()
|
||||
{
|
||||
int listLength = configElement.isListLengthFixed() ? listEntries.size() : listEntries.size() - 1;
|
||||
|
@ -540,6 +543,7 @@ public class GuiEditArrayEntries extends GuiListExtended
|
|||
protected boolean isValidValue = true;
|
||||
protected boolean isValidated = false;
|
||||
|
||||
@SuppressWarnings({ "unchecked" })
|
||||
public BaseEntry(GuiEditArray owningScreen, GuiEditArrayEntries owningEntryList, IConfigElement configElement)
|
||||
{
|
||||
this.owningScreen = owningScreen;
|
||||
|
|
|
@ -33,6 +33,7 @@ import static cpw.mods.fml.client.config.GuiUtils.UNDO_CHAR;
|
|||
public class GuiSelectString extends GuiScreen
|
||||
{
|
||||
protected GuiScreen parentScreen;
|
||||
@SuppressWarnings("rawtypes")
|
||||
protected IConfigElement configElement;
|
||||
private GuiSelectStringEntries entriesList;
|
||||
private GuiButtonExt btnUndoChanges, btnDefault, btnDone;
|
||||
|
@ -44,9 +45,11 @@ public class GuiSelectString extends GuiScreen
|
|||
public final Object beforeValue;
|
||||
public Object currentValue;
|
||||
private HoverChecker tooltipHoverChecker;
|
||||
@SuppressWarnings("rawtypes")
|
||||
private List toolTip;
|
||||
protected boolean enabled;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public GuiSelectString(GuiScreen parentScreen, IConfigElement configElement, int slotIndex, Map<Object, String> selectableValues, Object currentValue, boolean enabled)
|
||||
{
|
||||
this.mc = Minecraft.getMinecraft();
|
||||
|
@ -89,6 +92,7 @@ public class GuiSelectString extends GuiScreen
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui()
|
||||
{
|
||||
|
@ -165,6 +169,7 @@ public class GuiSelectString extends GuiScreen
|
|||
drawToolTip(this.toolTip, par1, par2);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void drawToolTip(List stringList, int x, int y)
|
||||
{
|
||||
this.func_146283_a(stringList, x, y);
|
||||
|
|
|
@ -34,12 +34,14 @@ public class GuiSelectStringEntries extends GuiListExtended
|
|||
{
|
||||
public GuiSelectString owningScreen;
|
||||
public Minecraft mc;
|
||||
@SuppressWarnings("rawtypes")
|
||||
public IConfigElement configElement;
|
||||
public List<IGuiSelectStringListEntry> listEntries;
|
||||
public final Map<Object, String> selectableValues;
|
||||
public int selectedIndex = -1;
|
||||
public int maxEntryWidth = 0;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public GuiSelectStringEntries(GuiSelectString owningScreen, Minecraft mc, IConfigElement configElement, Map<Object, String> selectableValues)
|
||||
{
|
||||
super(mc, owningScreen.width, owningScreen.height, owningScreen.titleLine2 != null ? (owningScreen.titleLine3 != null ? 43 : 33) : 23,
|
||||
|
@ -141,6 +143,7 @@ public class GuiSelectStringEntries extends GuiListExtended
|
|||
return owningScreen.currentValue != null ? owningScreen.currentValue.equals(configElement.getDefault()) : configElement.getDefault() == null;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void saveChanges()
|
||||
{
|
||||
if (owningScreen.slotIndex != -1 && owningScreen.parentScreen != null
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package cpw.mods.fml.client.config;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ public interface IConfigElement<T>
|
|||
* This method returns a class that implements {@code IConfigEntry} or null. This class MUST
|
||||
* provide a constructor with the following parameter types: {@code GuiConfig}, {@code GuiConfigEntries}, {@code IConfigElement}
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public Class<? extends IConfigEntry> getConfigEntryClass();
|
||||
|
||||
/**
|
||||
|
@ -67,6 +68,7 @@ public interface IConfigElement<T>
|
|||
/**
|
||||
* [Category] Gets this category's child categories/properties.
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public List<IConfigElement> getChildElements();
|
||||
|
||||
/**
|
||||
|
|
|
@ -27,14 +27,10 @@ import java.io.FileInputStream;
|
|||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.jar.Manifest;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipInputStream;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
@ -55,7 +51,6 @@ import com.google.common.collect.ArrayListMultimap;
|
|||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.google.common.io.ByteSource;
|
||||
import com.google.common.io.CharSource;
|
||||
import com.google.common.io.LineProcessor;
|
||||
import com.google.common.io.Resources;
|
||||
|
|
|
@ -15,6 +15,7 @@ import cpw.mods.fml.relauncher.FMLRelaunchLog;
|
|||
|
||||
public class ModAccessTransformer extends AccessTransformer {
|
||||
private static Map<String, String> embedded = Maps.newHashMap(); //Needs to be primitive so that both classloaders get the same class.
|
||||
@SuppressWarnings("unchecked")
|
||||
public ModAccessTransformer() throws Exception
|
||||
{
|
||||
super(ModAccessTransformer.class);
|
||||
|
|
|
@ -1,26 +1,15 @@
|
|||
package cpw.mods.fml.common.launcher;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.Proxy;
|
||||
import java.net.URL;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
import com.google.common.base.Throwables;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.mojang.authlib.Agent;
|
||||
import com.mojang.authlib.exceptions.*;
|
||||
import com.mojang.authlib.yggdrasil.*;
|
||||
import com.mojang.authlib.exceptions.AuthenticationException;
|
||||
import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
|
||||
import com.mojang.authlib.yggdrasil.YggdrasilUserAuthentication;
|
||||
|
||||
/**
|
||||
* Basic implementation of Mojang's 'Yggdrasil' login system, purely intended as a dev time bare bones login.
|
||||
|
|
Loading…
Reference in New Issue