mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-27 23:45:44 +00:00
Merge branch 'master' of https://github.com/MinecraftForge/FML
Conflicts: src/main/java/cpw/mods/fml/client/FMLClientHandler.java src/main/java/cpw/mods/fml/client/GuiModItemsMissing.java src/main/java/cpw/mods/fml/common/FMLContainer.java src/main/java/cpw/mods/fml/common/registry/FMLControlledNamespacedRegistry.java src/main/java/cpw/mods/fml/common/registry/GameData.java
This commit is contained in:
commit
038fa17ad3
57 files changed
+562
-556
No files matched your search
@@ -175,7 +175,7 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
this.resourcePackList = resourcePackList;
|
||||
this.resourceManager = resourceManager;
|
||||
this.resourcePackMap = Maps.newHashMap();
|
||||
if (minecraft.func_71355_q())
|
||||
if (minecraft.isDemo())
|
||||
{
|
||||
FMLLog.severe("DEMO MODE DETECTED, FML will not work. Finishing now.");
|
||||
haltGame("FML will not run in demo mode", new RuntimeException());
|
||||
@@ -247,7 +247,7 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
@Override
|
||||
public void haltGame(String message, Throwable t)
|
||||
{
|
||||
client.func_71377_b(new CrashReport(message, t));
|
||||
client.displayCrashReport(new CrashReport(message, t));
|
||||
throw Throwables.propagate(t);
|
||||
}
|
||||
/**
|
||||
@@ -279,8 +279,8 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
}
|
||||
|
||||
// Reload resources
|
||||
client.func_110436_a();
|
||||
RenderingRegistry.instance().loadEntityRenderers((Map<Class<? extends Entity>, Render>)RenderManager.field_78727_a.field_78729_o);
|
||||
client.refreshResources();
|
||||
RenderingRegistry.instance().loadEntityRenderers((Map<Class<? extends Entity>, Render>)RenderManager.instance.entityRenderMap);
|
||||
guiFactories = HashBiMap.create();
|
||||
for (ModContainer mc : Loader.instance().getActiveModList())
|
||||
{
|
||||
@@ -302,7 +302,7 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
}
|
||||
}
|
||||
loading = false;
|
||||
client.field_71474_y.func_74300_a(); //Reload options to load any mod added keybindings.
|
||||
client.gameSettings.loadOptions(); //Reload options to load any mod added keybindings.
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@@ -380,8 +380,8 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
*/
|
||||
public void displayGuiScreen(EntityPlayer player, GuiScreen gui)
|
||||
{
|
||||
if (client.field_71439_g==player && gui != null) {
|
||||
client.func_147108_a(gui);
|
||||
if (client.thePlayer==player && gui != null) {
|
||||
client.displayGuiScreen(gui);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -421,17 +421,17 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
public void showGuiScreen(Object clientGuiElement)
|
||||
{
|
||||
GuiScreen gui = (GuiScreen) clientGuiElement;
|
||||
client.func_147108_a(gui);
|
||||
client.displayGuiScreen(gui);
|
||||
}
|
||||
|
||||
public WorldClient getWorldClient()
|
||||
{
|
||||
return client.field_71441_e;
|
||||
return client.theWorld;
|
||||
}
|
||||
|
||||
public EntityClientPlayerMP getClientPlayerEntity()
|
||||
{
|
||||
return client.field_71439_g;
|
||||
return client.thePlayer;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -450,7 +450,7 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
@Override
|
||||
public MinecraftServer getServer()
|
||||
{
|
||||
return client.func_71401_C();
|
||||
return client.getIntegratedServer();
|
||||
}
|
||||
|
||||
public void displayMissingMods(Object modMissingPacket)
|
||||
@@ -480,7 +480,7 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
*/
|
||||
public boolean isGUIOpen(Class<? extends GuiScreen> gui)
|
||||
{
|
||||
return client.field_71462_r != null && client.field_71462_r.getClass().equals(gui);
|
||||
return client.currentScreen != null && client.currentScreen.getClass().equals(gui);
|
||||
}
|
||||
|
||||
|
||||
@@ -513,7 +513,7 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
@Override
|
||||
public void updateResourcePackList()
|
||||
{
|
||||
client.func_110436_a();
|
||||
client.refreshResources();
|
||||
}
|
||||
|
||||
public IResourcePack getResourcePackFor(String modId)
|
||||
@@ -524,7 +524,7 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
@Override
|
||||
public String getCurrentLanguage()
|
||||
{
|
||||
return client.func_135016_M().func_135041_c().func_135034_a();
|
||||
return client.getLanguageManager().getCurrentLanguage().getLanguageCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -533,7 +533,7 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
// If the server crashes during startup, it might hang the client- reset the client so it can abend properly.
|
||||
MinecraftServer server = getServer();
|
||||
|
||||
if (server != null && !server.func_71200_ad())
|
||||
if (server != null && !server.serverIsInRunLoop())
|
||||
{
|
||||
ObfuscationReflectionHelper.setPrivateValue(MinecraftServer.class, server, true, "field_71296"+"_Q","serverIs"+"Running");
|
||||
}
|
||||
@@ -547,14 +547,14 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
@Override
|
||||
public NetworkManager getClientToServerNetworkManager()
|
||||
{
|
||||
return this.client.func_147114_u()!=null ? this.client.func_147114_u().func_147298_b() : null;
|
||||
return this.client.getNetHandler()!=null ? this.client.getNetHandler().getNetworkManager() : null;
|
||||
}
|
||||
|
||||
public void handleClientWorldClosing(WorldClient world)
|
||||
{
|
||||
NetworkManager client = getClientToServerNetworkManager();
|
||||
// ONLY revert a non-local connection
|
||||
if (client != null && !client.func_150731_c())
|
||||
if (client != null && !client.isLocalChannel())
|
||||
{
|
||||
GameData.revertToFrozen();
|
||||
}
|
||||
@@ -567,7 +567,7 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
|
||||
public File getSavesDir()
|
||||
{
|
||||
return new File(client.field_71412_D, "saves");
|
||||
return new File(client.mcDataDir, "saves");
|
||||
}
|
||||
public void tryLoadExistingWorld(GuiSelectWorld selectWorldGUI, String dirName, String saveName)
|
||||
{
|
||||
@@ -575,13 +575,13 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
NBTTagCompound leveldat;
|
||||
try
|
||||
{
|
||||
leveldat = CompressedStreamTools.func_74796_a(new FileInputStream(new File(dir, "level.dat")));
|
||||
leveldat = CompressedStreamTools.readCompressed(new FileInputStream(new File(dir, "level.dat")));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
try
|
||||
{
|
||||
leveldat = CompressedStreamTools.func_74796_a(new FileInputStream(new File(dir, "level.dat_old")));
|
||||
leveldat = CompressedStreamTools.readCompressed(new FileInputStream(new File(dir, "level.dat_old")));
|
||||
}
|
||||
catch (Exception e1)
|
||||
{
|
||||
@@ -589,8 +589,8 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
return;
|
||||
}
|
||||
}
|
||||
NBTTagCompound fmlData = leveldat.func_74775_l("FML");
|
||||
if (fmlData.func_74764_b("ModItemData"))
|
||||
NBTTagCompound fmlData = leveldat.getCompoundTag("FML");
|
||||
if (fmlData.hasKey("ModItemData"))
|
||||
{
|
||||
showGuiScreen(new GuiOldSaveLoadConfirm(dirName, saveName, selectWorldGUI));
|
||||
}
|
||||
@@ -614,7 +614,7 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
Thread.interrupted();
|
||||
gameReleaseLatch = new CountDownLatch(1);
|
||||
clientWaiter = Thread.currentThread();
|
||||
client.func_71371_a(dirName, saveName, (WorldSettings)null);
|
||||
client.launchIntegratedServer(dirName, saveName, (WorldSettings)null);
|
||||
System.out.printf("POKEE %b\n", Thread.currentThread().isInterrupted());
|
||||
gameReleaseLatch.await();
|
||||
}
|
||||
@@ -626,7 +626,7 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
}
|
||||
catch (GameRegistryException gre)
|
||||
{
|
||||
client.func_71403_a(null);
|
||||
client.loadWorld(null);
|
||||
showGuiScreen(new GuiModItemsMissing(gre.getItems()));
|
||||
}
|
||||
Thread.interrupted();
|
||||
@@ -676,7 +676,7 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
}
|
||||
else
|
||||
{
|
||||
String serverDescription = data.field_78843_d;
|
||||
String serverDescription = data.serverMOTD;
|
||||
boolean moddedClientAllowed = true;
|
||||
if (!Strings.isNullOrEmpty(serverDescription))
|
||||
{
|
||||
@@ -729,7 +729,7 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
{
|
||||
return null;
|
||||
}
|
||||
this.client.func_110434_K().func_110577_a(iconSheet);
|
||||
this.client.getTextureManager().bindTexture(iconSheet);
|
||||
Gui.func_146110_a(x + width - 18, y + 10, 0, (float)idx, 16, 16, 256.0f, 256.0f);
|
||||
if (blocked)
|
||||
{
|
||||
@@ -874,7 +874,7 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
|
||||
public boolean handlingCrash(CrashReport report)
|
||||
{
|
||||
return report.func_71505_b() instanceof GameRegistryException;
|
||||
return report.getCrashCause() instanceof GameRegistryException;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,26 +20,26 @@ public class FMLConfigGuiFactory implements IModGuiFactory {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void func_73866_w_()
|
||||
public void initGui()
|
||||
{
|
||||
this.field_146292_n.add(new GuiButton(1, this.field_146294_l / 2 - 75, this.field_146295_m - 38, I18n.func_135052_a("gui.done")));
|
||||
this.buttonList.add(new GuiButton(1, this.width / 2 - 75, this.height - 38, I18n.format("gui.done")));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void func_146284_a(GuiButton p_73875_1_)
|
||||
protected void actionPerformed(GuiButton p_73875_1_)
|
||||
{
|
||||
if (p_73875_1_.field_146124_l && p_73875_1_.field_146127_k == 1)
|
||||
if (p_73875_1_.enabled && p_73875_1_.id == 1)
|
||||
{
|
||||
FMLClientHandler.instance().showGuiScreen(parent);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
{
|
||||
this.func_146276_q_();
|
||||
this.func_73732_a(this.field_146289_q, "Forge Mod Loader test config screen", this.field_146294_l / 2, 40, 0xFFFFFF);
|
||||
super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_);
|
||||
this.drawDefaultBackground();
|
||||
this.drawCenteredString(this.fontRendererObj, "Forge Mod Loader test config screen", this.width / 2, 40, 0xFFFFFF);
|
||||
super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,16 +26,16 @@ public class FMLFileResourcePack extends FileResourcePack {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String func_130077_b()
|
||||
public String getPackName()
|
||||
{
|
||||
return "FMLFileResourcePack:"+container.getName();
|
||||
}
|
||||
@Override
|
||||
protected InputStream func_110591_a(String resourceName) throws IOException
|
||||
protected InputStream getInputStreamByName(String resourceName) throws IOException
|
||||
{
|
||||
try
|
||||
{
|
||||
return super.func_110591_a(resourceName);
|
||||
return super.getInputStreamByName(resourceName);
|
||||
}
|
||||
catch (IOException ioe)
|
||||
{
|
||||
@@ -54,8 +54,8 @@ public class FMLFileResourcePack extends FileResourcePack {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BufferedImage func_110586_a() throws IOException
|
||||
public BufferedImage getPackImage() throws IOException
|
||||
{
|
||||
return ImageIO.read(func_110591_a(container.getMetadata().logoFile));
|
||||
return ImageIO.read(getInputStreamByName(container.getMetadata().logoFile));
|
||||
}
|
||||
}
|
||||
@@ -26,21 +26,21 @@ public class FMLFolderResourcePack extends FolderResourcePack {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean func_110593_b(String p_110593_1_)
|
||||
protected boolean hasResourceName(String p_110593_1_)
|
||||
{
|
||||
return super.func_110593_b(p_110593_1_);
|
||||
return super.hasResourceName(p_110593_1_);
|
||||
}
|
||||
@Override
|
||||
public String func_130077_b()
|
||||
public String getPackName()
|
||||
{
|
||||
return "FMLFileResourcePack:"+container.getName();
|
||||
}
|
||||
@Override
|
||||
protected InputStream func_110591_a(String resourceName) throws IOException
|
||||
protected InputStream getInputStreamByName(String resourceName) throws IOException
|
||||
{
|
||||
try
|
||||
{
|
||||
return super.func_110591_a(resourceName);
|
||||
return super.getInputStreamByName(resourceName);
|
||||
}
|
||||
catch (IOException ioe)
|
||||
{
|
||||
@@ -59,9 +59,9 @@ public class FMLFolderResourcePack extends FolderResourcePack {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BufferedImage func_110586_a() throws IOException
|
||||
public BufferedImage getPackImage() throws IOException
|
||||
{
|
||||
return ImageIO.read(func_110591_a(container.getMetadata().logoFile));
|
||||
return ImageIO.read(getInputStreamByName(container.getMetadata().logoFile));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -29,27 +29,27 @@ public class GuiAccessDenied extends GuiScreen
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void func_73866_w_()
|
||||
public void initGui()
|
||||
{
|
||||
this.field_146292_n.add(new GuiButton(1, this.field_146294_l / 2 - 75, this.field_146295_m - 38, I18n.func_135052_a("gui.done")));
|
||||
this.buttonList.add(new GuiButton(1, this.width / 2 - 75, this.height - 38, I18n.format("gui.done")));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void func_146284_a(GuiButton p_73875_1_)
|
||||
protected void actionPerformed(GuiButton p_73875_1_)
|
||||
{
|
||||
if (p_73875_1_.field_146124_l && p_73875_1_.field_146127_k == 1)
|
||||
if (p_73875_1_.enabled && p_73875_1_.id == 1)
|
||||
{
|
||||
FMLClientHandler.instance().showGuiScreen(parent);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
{
|
||||
this.func_146276_q_();
|
||||
this.drawDefaultBackground();
|
||||
int offset = Math.max(85 - 2 * 10, 10);
|
||||
this.func_73732_a(this.field_146289_q, "Forge Mod Loader could not connect to this server", this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, "Forge Mod Loader could not connect to this server", this.width / 2, offset, 0xFFFFFF);
|
||||
offset += 10;
|
||||
this.func_73732_a(this.field_146289_q, String.format("The server %s has forbidden modded access", data.field_78847_a), this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_);
|
||||
this.drawCenteredString(this.fontRendererObj, String.format("The server %s has forbidden modded access", data.serverName), this.width / 2, offset, 0xFFFFFF);
|
||||
super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_);
|
||||
}
|
||||
}
|
||||
@@ -29,27 +29,27 @@ public class GuiBackupFailed extends GuiScreen
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void func_73866_w_()
|
||||
public void initGui()
|
||||
{
|
||||
this.field_146292_n.add(new GuiButton(1, this.field_146294_l / 2 - 75, this.field_146295_m - 38, I18n.func_135052_a("gui.done")));
|
||||
this.buttonList.add(new GuiButton(1, this.width / 2 - 75, this.height - 38, I18n.format("gui.done")));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void func_146284_a(GuiButton p_73875_1_)
|
||||
protected void actionPerformed(GuiButton p_73875_1_)
|
||||
{
|
||||
if (p_73875_1_.field_146124_l && p_73875_1_.field_146127_k == 1)
|
||||
if (p_73875_1_.enabled && p_73875_1_.id == 1)
|
||||
{
|
||||
FMLClientHandler.instance().showGuiScreen(parent);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
{
|
||||
this.func_146276_q_();
|
||||
this.drawDefaultBackground();
|
||||
int offset = Math.max(85 - 2 * 10, 10);
|
||||
this.func_73732_a(this.field_146289_q, String.format("There was an error saving the archive %s", zipName.getName()), this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, String.format("There was an error saving the archive %s", zipName.getName()), this.width / 2, offset, 0xFFFFFF);
|
||||
offset += 10;
|
||||
this.func_73732_a(this.field_146289_q, String.format("Please fix the problem and try again"), this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_);
|
||||
this.drawCenteredString(this.fontRendererObj, String.format("Please fix the problem and try again"), this.width / 2, offset, 0xFFFFFF);
|
||||
super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_);
|
||||
}
|
||||
}
|
||||
@@ -23,15 +23,15 @@ public class GuiCustomModLoadingErrorScreen extends GuiErrorScreen
|
||||
this.customException = customException;
|
||||
}
|
||||
@Override
|
||||
public void func_73866_w_()
|
||||
public void initGui()
|
||||
{
|
||||
super.func_73866_w_();
|
||||
this.customException.initGui(this, field_146289_q);
|
||||
super.initGui();
|
||||
this.customException.initGui(this, fontRendererObj);
|
||||
}
|
||||
@Override
|
||||
public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
{
|
||||
this.func_146276_q_();
|
||||
this.customException.drawScreen(this, field_146289_q, p_73863_1_, p_73863_2_, p_73863_3_);
|
||||
this.drawDefaultBackground();
|
||||
this.customException.drawScreen(this, fontRendererObj, p_73863_1_, p_73863_2_, p_73863_3_);
|
||||
}
|
||||
}
|
||||
@@ -31,25 +31,25 @@ public class GuiDupesFound extends GuiErrorScreen
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_73866_w_()
|
||||
public void initGui()
|
||||
{
|
||||
super.func_73866_w_();
|
||||
super.initGui();
|
||||
}
|
||||
@Override
|
||||
public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
{
|
||||
this.func_146276_q_();
|
||||
this.drawDefaultBackground();
|
||||
int offset = Math.max(85 - dupes.dupes.size() * 10, 10);
|
||||
this.func_73732_a(this.field_146289_q, "Forge Mod Loader has found a problem with your minecraft installation", this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, "Forge Mod Loader has found a problem with your minecraft installation", this.width / 2, offset, 0xFFFFFF);
|
||||
offset+=10;
|
||||
this.func_73732_a(this.field_146289_q, "You have mod sources that are duplicate within your system", this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, "You have mod sources that are duplicate within your system", this.width / 2, offset, 0xFFFFFF);
|
||||
offset+=10;
|
||||
this.func_73732_a(this.field_146289_q, "Mod Id : File name", this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, "Mod Id : File name", this.width / 2, offset, 0xFFFFFF);
|
||||
offset+=5;
|
||||
for (Entry<ModContainer, File> mc : dupes.dupes.entries())
|
||||
{
|
||||
offset+=10;
|
||||
this.func_73732_a(this.field_146289_q, String.format("%s : %s", mc.getKey().getModId(), mc.getValue().getName()), this.field_146294_l / 2, offset, 0xEEEEEE);
|
||||
this.drawCenteredString(this.fontRendererObj, String.format("%s : %s", mc.getKey().getModId(), mc.getValue().getName()), this.width / 2, offset, 0xEEEEEE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,38 +18,38 @@ public class GuiIngameModOptions extends GuiScreen
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void func_73866_w_()
|
||||
public void initGui()
|
||||
{
|
||||
this.optionList=new GuiModOptionList(this);
|
||||
this.optionList.registerScrollButtons(this.field_146292_n, 7, 8);
|
||||
this.field_146292_n.add(new GuiButton(200, this.field_146294_l / 2 - 100, this.field_146295_m / 6 + 168, I18n.func_135052_a("gui.done", new Object[0])));
|
||||
this.optionList.registerScrollButtons(this.buttonList, 7, 8);
|
||||
this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, I18n.format("gui.done", new Object[0])));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void func_146284_a(GuiButton p_146284_1_)
|
||||
protected void actionPerformed(GuiButton p_146284_1_)
|
||||
{
|
||||
if (p_146284_1_.field_146124_l)
|
||||
if (p_146284_1_.enabled)
|
||||
{
|
||||
if (p_146284_1_.field_146127_k == 200)
|
||||
if (p_146284_1_.id == 200)
|
||||
{
|
||||
this.field_146297_k.field_71474_y.func_74303_b();
|
||||
this.field_146297_k.func_147108_a(this.parentScreen);
|
||||
this.mc.gameSettings.saveOptions();
|
||||
this.mc.displayGuiScreen(this.parentScreen);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
{
|
||||
// force a non-transparent background
|
||||
this.func_146276_q_();
|
||||
this.drawDefaultBackground();
|
||||
this.optionList.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_);
|
||||
this.func_73732_a(this.field_146289_q, this.title, this.field_146294_l / 2, 15, 0xFFFFFF);
|
||||
super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_);
|
||||
this.drawCenteredString(this.fontRendererObj, this.title, this.width / 2, 15, 0xFFFFFF);
|
||||
super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_);
|
||||
}
|
||||
|
||||
FontRenderer getFontRenderer() {
|
||||
return field_146289_q;
|
||||
return fontRendererObj;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -30,36 +30,36 @@ public class GuiModItemsMissing extends GuiScreen
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void func_73866_w_()
|
||||
public void initGui()
|
||||
{
|
||||
this.field_146292_n.add(new GuiButton(1, this.field_146294_l / 2 - 100, this.field_146295_m - 38, I18n.func_135052_a("gui.done")));
|
||||
this.buttonList.add(new GuiButton(1, this.width / 2 - 100, this.height - 38, I18n.format("gui.done")));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void func_146284_a(GuiButton p_73875_1_)
|
||||
protected void actionPerformed(GuiButton p_73875_1_)
|
||||
{
|
||||
if (p_73875_1_.field_146124_l && p_73875_1_.field_146127_k == 1)
|
||||
if (p_73875_1_.enabled && p_73875_1_.id == 1)
|
||||
{
|
||||
FMLClientHandler.instance().showGuiScreen(null);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
{
|
||||
this.func_146276_q_();
|
||||
this.drawDefaultBackground();
|
||||
|
||||
int spaceAvailable = this.field_146295_m - 38 - 20;
|
||||
int spaceAvailable = this.height - 38 - 20;
|
||||
int spaceRequired = Math.min(spaceAvailable, 10 + 6 * 10 + missingItems.size());
|
||||
|
||||
int offset = 10 + (spaceAvailable - spaceRequired) / 2; // vertically centered
|
||||
this.func_73732_a(this.field_146289_q, "Forge Mod Loader could load this save", this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, "Forge Mod Loader could load this save", this.width / 2, offset, 0xFFFFFF);
|
||||
offset += 20;
|
||||
this.func_73732_a(this.field_146289_q, String.format("There are %d unassigned blocks and items in this save", missingItems.size()), this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, String.format("There are %d unassigned blocks and items in this save", missingItems.size()), this.width / 2, offset, 0xFFFFFF);
|
||||
offset += 10;
|
||||
this.func_73732_a(this.field_146289_q, "You will not be able to load until they are present again", this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, "You will not be able to load until they are present again", this.width / 2, offset, 0xFFFFFF);
|
||||
offset += 20;
|
||||
|
||||
this.func_73732_a(this.field_146289_q, "Missing Blocks/Items:", this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, "Missing Blocks/Items:", this.width / 2, offset, 0xFFFFFF);
|
||||
offset += 10;
|
||||
|
||||
Iterator<String> it = missingItems.iterator();
|
||||
@@ -68,7 +68,7 @@ public class GuiModItemsMissing extends GuiScreen
|
||||
{
|
||||
String item = it.next();
|
||||
|
||||
this.func_73732_a(this.field_146289_q, item, this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, item, this.width / 2, offset, 0xFFFFFF);
|
||||
offset += 10;
|
||||
|
||||
if (offset >= spaceAvailable) break;
|
||||
@@ -76,9 +76,9 @@ public class GuiModItemsMissing extends GuiScreen
|
||||
|
||||
if (it.hasNext())
|
||||
{
|
||||
this.func_73732_a(this.field_146289_q, "...", this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, "...", this.width / 2, offset, 0xFFFFFF);
|
||||
}
|
||||
|
||||
super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_);
|
||||
super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_);
|
||||
}
|
||||
}
|
||||
@@ -89,37 +89,37 @@ public class GuiModList extends GuiScreen
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void func_73866_w_()
|
||||
public void initGui()
|
||||
{
|
||||
for (ModContainer mod : mods) {
|
||||
listWidth=Math.max(listWidth,getFontRenderer().func_78256_a(mod.getName()) + 10);
|
||||
listWidth=Math.max(listWidth,getFontRenderer().func_78256_a(mod.getVersion()) + 10);
|
||||
listWidth=Math.max(listWidth,getFontRenderer().getStringWidth(mod.getName()) + 10);
|
||||
listWidth=Math.max(listWidth,getFontRenderer().getStringWidth(mod.getVersion()) + 10);
|
||||
}
|
||||
listWidth=Math.min(listWidth, 150);
|
||||
this.field_146292_n.add(new GuiButton(6, this.field_146294_l / 2 - 75, this.field_146295_m - 38, I18n.func_135052_a("gui.done")));
|
||||
configModButton = new GuiButton(20, 10, this.field_146295_m - 60, this.listWidth, 20, "Config");
|
||||
disableModButton = new GuiButton(21, 10, this.field_146295_m - 38, this.listWidth, 20, "Disable");
|
||||
this.field_146292_n.add(configModButton);
|
||||
this.field_146292_n.add(disableModButton);
|
||||
this.buttonList.add(new GuiButton(6, this.width / 2 - 75, this.height - 38, I18n.format("gui.done")));
|
||||
configModButton = new GuiButton(20, 10, this.height - 60, this.listWidth, 20, "Config");
|
||||
disableModButton = new GuiButton(21, 10, this.height - 38, this.listWidth, 20, "Disable");
|
||||
this.buttonList.add(configModButton);
|
||||
this.buttonList.add(disableModButton);
|
||||
this.modList=new GuiSlotModList(this, mods, listWidth);
|
||||
this.modList.registerScrollButtons(this.field_146292_n, 7, 8);
|
||||
this.modList.registerScrollButtons(this.buttonList, 7, 8);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void func_146284_a(GuiButton button) {
|
||||
if (button.field_146124_l)
|
||||
protected void actionPerformed(GuiButton button) {
|
||||
if (button.enabled)
|
||||
{
|
||||
switch (button.field_146127_k)
|
||||
switch (button.id)
|
||||
{
|
||||
case 6:
|
||||
this.field_146297_k.func_147108_a(this.mainMenu);
|
||||
this.mc.displayGuiScreen(this.mainMenu);
|
||||
return;
|
||||
case 20:
|
||||
try
|
||||
{
|
||||
IModGuiFactory guiFactory = FMLClientHandler.instance().getGuiFactoryFor(selectedMod);
|
||||
GuiScreen newScreen = guiFactory.mainConfigGuiClass().getConstructor(GuiScreen.class).newInstance(this);
|
||||
this.field_146297_k.func_147108_a(newScreen);
|
||||
this.mc.displayGuiScreen(newScreen);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -128,34 +128,34 @@ public class GuiModList extends GuiScreen
|
||||
return;
|
||||
}
|
||||
}
|
||||
super.func_146284_a(button);
|
||||
super.actionPerformed(button);
|
||||
}
|
||||
|
||||
public int drawLine(String line, int offset, int shifty)
|
||||
{
|
||||
this.field_146289_q.func_78276_b(line, offset, shifty, 0xd7edea);
|
||||
this.fontRendererObj.drawString(line, offset, shifty, 0xd7edea);
|
||||
return shifty + 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_73863_a(int p_571_1_, int p_571_2_, float p_571_3_)
|
||||
public void drawScreen(int p_571_1_, int p_571_2_, float p_571_3_)
|
||||
{
|
||||
this.modList.drawScreen(p_571_1_, p_571_2_, p_571_3_);
|
||||
this.func_73732_a(this.field_146289_q, "Mod List", this.field_146294_l / 2, 16, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, "Mod List", this.width / 2, 16, 0xFFFFFF);
|
||||
int offset = this.listWidth + 20;
|
||||
if (selectedMod != null) {
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
if (!selectedMod.getMetadata().autogenerated) {
|
||||
configModButton.field_146125_m = true;
|
||||
disableModButton.field_146125_m = true;
|
||||
configModButton.visible = true;
|
||||
disableModButton.visible = true;
|
||||
disableModButton.packedFGColour = 0xFF3377;
|
||||
configModButton.field_146124_l = false;
|
||||
configModButton.enabled = false;
|
||||
int shifty = 35;
|
||||
String logoFile = selectedMod.getMetadata().logoFile;
|
||||
if (!logoFile.isEmpty())
|
||||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
TextureManager tm = field_146297_k.func_110434_K();
|
||||
TextureManager tm = mc.getTextureManager();
|
||||
IResourcePack pack = FMLClientHandler.instance().getResourcePackFor(selectedMod.getModId());
|
||||
try
|
||||
{
|
||||
@@ -164,7 +164,7 @@ public class GuiModList extends GuiScreen
|
||||
BufferedImage logo = null;
|
||||
if (pack!=null)
|
||||
{
|
||||
logo = pack.func_110586_a();
|
||||
logo = pack.getPackImage();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -176,13 +176,13 @@ public class GuiModList extends GuiScreen
|
||||
}
|
||||
if (logo != null)
|
||||
{
|
||||
cachedLogo = tm.func_110578_a("modlogo", new DynamicTexture(logo));
|
||||
cachedLogo = tm.getDynamicTextureLocation("modlogo", new DynamicTexture(logo));
|
||||
cachedLogoDimensions = new Dimension(logo.getWidth(), logo.getHeight());
|
||||
}
|
||||
}
|
||||
if (cachedLogo != null)
|
||||
{
|
||||
this.field_146297_k.field_71446_o.func_110577_a(cachedLogo);
|
||||
this.mc.renderEngine.bindTexture(cachedLogo);
|
||||
double scaleX = cachedLogoDimensions.width / 200.0;
|
||||
double scaleY = cachedLogoDimensions.height / 65.0;
|
||||
double scale = 1.0;
|
||||
@@ -193,13 +193,13 @@ public class GuiModList extends GuiScreen
|
||||
cachedLogoDimensions.width *= scale;
|
||||
cachedLogoDimensions.height *= scale;
|
||||
int top = 32;
|
||||
Tessellator tess = Tessellator.field_78398_a;
|
||||
tess.func_78382_b();
|
||||
tess.func_78374_a(offset, top + cachedLogoDimensions.height, field_73735_i, 0, 1);
|
||||
tess.func_78374_a(offset + cachedLogoDimensions.width, top + cachedLogoDimensions.height, field_73735_i, 1, 1);
|
||||
tess.func_78374_a(offset + cachedLogoDimensions.width, top, field_73735_i, 1, 0);
|
||||
tess.func_78374_a(offset, top, field_73735_i, 0, 0);
|
||||
tess.func_78381_a();
|
||||
Tessellator tess = Tessellator.instance;
|
||||
tess.startDrawingQuads();
|
||||
tess.addVertexWithUV(offset, top + cachedLogoDimensions.height, zLevel, 0, 1);
|
||||
tess.addVertexWithUV(offset + cachedLogoDimensions.width, top + cachedLogoDimensions.height, zLevel, 1, 1);
|
||||
tess.addVertexWithUV(offset + cachedLogoDimensions.width, top, zLevel, 1, 0);
|
||||
tess.addVertexWithUV(offset, top, zLevel, 0, 0);
|
||||
tess.draw();
|
||||
|
||||
shifty += 65;
|
||||
}
|
||||
@@ -209,7 +209,7 @@ public class GuiModList extends GuiScreen
|
||||
;
|
||||
}
|
||||
}
|
||||
this.field_146289_q.func_78261_a(selectedMod.getMetadata().name, offset, shifty, 0xFFFFFF);
|
||||
this.fontRendererObj.drawStringWithShadow(selectedMod.getMetadata().name, offset, shifty, 0xFFFFFF);
|
||||
shifty += 12;
|
||||
|
||||
shifty = drawLine(String.format("Version: %s (%s)", selectedMod.getDisplayVersion(), selectedMod.getVersion()), offset, shifty);
|
||||
@@ -220,67 +220,67 @@ public class GuiModList extends GuiScreen
|
||||
shifty = drawLine(String.format("Authors: %s", selectedMod.getMetadata().getAuthorList()), offset, shifty);
|
||||
shifty = drawLine(String.format("URL: %s", selectedMod.getMetadata().url), offset, shifty);
|
||||
shifty = drawLine(selectedMod.getMetadata().childMods.isEmpty() ? "No child mods for this mod" : String.format("Child mods: %s", selectedMod.getMetadata().getChildModList()), offset, shifty);
|
||||
int rightSide = this.field_146294_l - offset - 20;
|
||||
int rightSide = this.width - offset - 20;
|
||||
if (rightSide > 20)
|
||||
{
|
||||
this.getFontRenderer().func_78279_b(selectedMod.getMetadata().description, offset, shifty + 10, rightSide, 0xDDDDDD);
|
||||
this.getFontRenderer().drawSplitString(selectedMod.getMetadata().description, offset, shifty + 10, rightSide, 0xDDDDDD);
|
||||
}
|
||||
Disableable disableable = selectedMod.canBeDisabled();
|
||||
if (disableable == Disableable.RESTART)
|
||||
{
|
||||
disableModButton.field_146124_l = true;
|
||||
disableModButton.field_146125_m = true;
|
||||
disableModButton.enabled = true;
|
||||
disableModButton.visible = true;
|
||||
disableModButton.packedFGColour = 0xFF3377;
|
||||
}
|
||||
else if (disableable == Disableable.YES)
|
||||
{
|
||||
disableModButton.field_146124_l = true;
|
||||
disableModButton.field_146125_m = true;
|
||||
disableModButton.enabled = true;
|
||||
disableModButton.visible = true;
|
||||
disableModButton.packedFGColour = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
disableModButton.packedFGColour = 0;
|
||||
disableModButton.field_146125_m = true;
|
||||
disableModButton.field_146124_l = false;
|
||||
disableModButton.visible = true;
|
||||
disableModButton.enabled = false;
|
||||
}
|
||||
IModGuiFactory guiFactory = FMLClientHandler.instance().getGuiFactoryFor(selectedMod);
|
||||
if (guiFactory == null || guiFactory.mainConfigGuiClass() == null)
|
||||
{
|
||||
configModButton.field_146125_m = true;
|
||||
configModButton.field_146124_l = false;
|
||||
configModButton.visible = true;
|
||||
configModButton.enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
configModButton.field_146125_m = true;
|
||||
configModButton.field_146124_l = true;
|
||||
configModButton.visible = true;
|
||||
configModButton.enabled = true;
|
||||
}
|
||||
} else {
|
||||
offset = ( this.listWidth + this.field_146294_l ) / 2;
|
||||
this.func_73732_a(this.field_146289_q, selectedMod.getName(), offset, 35, 0xFFFFFF);
|
||||
this.func_73732_a(this.field_146289_q, String.format("Version: %s",selectedMod.getVersion()), offset, 45, 0xFFFFFF);
|
||||
this.func_73732_a(this.field_146289_q, String.format("Mod State: %s",Loader.instance().getModState(selectedMod)), offset, 55, 0xFFFFFF);
|
||||
this.func_73732_a(this.field_146289_q, "No mod information found", offset, 65, 0xDDDDDD);
|
||||
this.func_73732_a(this.field_146289_q, "Ask your mod author to provide a mod mcmod.info file", offset, 75, 0xDDDDDD);
|
||||
configModButton.field_146125_m = false;
|
||||
disableModButton.field_146125_m = false;
|
||||
offset = ( this.listWidth + this.width ) / 2;
|
||||
this.drawCenteredString(this.fontRendererObj, selectedMod.getName(), offset, 35, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, String.format("Version: %s",selectedMod.getVersion()), offset, 45, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, String.format("Mod State: %s",Loader.instance().getModState(selectedMod)), offset, 55, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, "No mod information found", offset, 65, 0xDDDDDD);
|
||||
this.drawCenteredString(this.fontRendererObj, "Ask your mod author to provide a mod mcmod.info file", offset, 75, 0xDDDDDD);
|
||||
configModButton.visible = false;
|
||||
disableModButton.visible = false;
|
||||
}
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
else
|
||||
{
|
||||
configModButton.field_146125_m = false;
|
||||
disableModButton.field_146125_m = false;
|
||||
configModButton.visible = false;
|
||||
disableModButton.visible = false;
|
||||
}
|
||||
super.func_73863_a(p_571_1_, p_571_2_, p_571_3_);
|
||||
super.drawScreen(p_571_1_, p_571_2_, p_571_3_);
|
||||
}
|
||||
|
||||
Minecraft getMinecraftInstance() {
|
||||
return field_146297_k;
|
||||
return mc;
|
||||
}
|
||||
|
||||
FontRenderer getFontRenderer() {
|
||||
return field_146289_q;
|
||||
return fontRendererObj;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,7 +8,7 @@ public class GuiModOptionList extends GuiScrollingList {
|
||||
|
||||
public GuiModOptionList(GuiIngameModOptions parent)
|
||||
{
|
||||
super(parent.field_146297_k, 150, parent.field_146295_m, 32, parent.field_146295_m - 65 + 4, 10, 35);
|
||||
super(parent.mc, 150, parent.height, 32, parent.height - 65 + 4, 10, 35);
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
@@ -39,9 +39,9 @@ public class GuiModOptionList extends GuiScrollingList {
|
||||
@Override
|
||||
protected void drawSlot(int var1, int var2, int var3, int var4, Tessellator var5)
|
||||
{
|
||||
this.parent.getFontRenderer().func_78276_b(this.parent.getFontRenderer().func_78269_a("Test 1", listWidth - 10), this.left + 3 , var3 + 2, 0xFF2222);
|
||||
this.parent.getFontRenderer().func_78276_b(this.parent.getFontRenderer().func_78269_a("TEST 2", listWidth - 10), this.left + 3 , var3 + 12, 0xFF2222);
|
||||
this.parent.getFontRenderer().func_78276_b(this.parent.getFontRenderer().func_78269_a("DISABLED", listWidth - 10), this.left + 3 , var3 + 22, 0xFF2222);
|
||||
this.parent.getFontRenderer().drawString(this.parent.getFontRenderer().trimStringToWidth("Test 1", listWidth - 10), this.left + 3 , var3 + 2, 0xFF2222);
|
||||
this.parent.getFontRenderer().drawString(this.parent.getFontRenderer().trimStringToWidth("TEST 2", listWidth - 10), this.left + 3 , var3 + 12, 0xFF2222);
|
||||
this.parent.getFontRenderer().drawString(this.parent.getFontRenderer().trimStringToWidth("DISABLED", listWidth - 10), this.left + 3 , var3 + 22, 0xFF2222);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -29,18 +29,18 @@ public class GuiModsMissing extends GuiErrorScreen
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_73866_w_()
|
||||
public void initGui()
|
||||
{
|
||||
super.func_73866_w_();
|
||||
super.initGui();
|
||||
}
|
||||
@Override
|
||||
public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
{
|
||||
this.func_146276_q_();
|
||||
this.drawDefaultBackground();
|
||||
int offset = Math.max(85 - modsMissing.missingMods.size() * 10, 10);
|
||||
this.func_73732_a(this.field_146289_q, "Forge Mod Loader has found a problem with your minecraft installation", this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, "Forge Mod Loader has found a problem with your minecraft installation", this.width / 2, offset, 0xFFFFFF);
|
||||
offset+=10;
|
||||
this.func_73732_a(this.field_146289_q, "The mods and versions listed below could not be found", this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, "The mods and versions listed below could not be found", this.width / 2, offset, 0xFFFFFF);
|
||||
offset+=5;
|
||||
for (ArtifactVersion v : modsMissing.missingMods)
|
||||
{
|
||||
@@ -50,13 +50,13 @@ public class GuiModsMissing extends GuiErrorScreen
|
||||
DefaultArtifactVersion dav = (DefaultArtifactVersion)v;
|
||||
if (dav.getRange() != null && dav.getRange().isUnboundedAbove())
|
||||
{
|
||||
this.func_73732_a(this.field_146289_q, String.format("%s : minimum version required is %s", v.getLabel(), dav.getRange().getLowerBoundString()), this.field_146294_l / 2, offset, 0xEEEEEE);
|
||||
this.drawCenteredString(this.fontRendererObj, String.format("%s : minimum version required is %s", v.getLabel(), dav.getRange().getLowerBoundString()), this.width / 2, offset, 0xEEEEEE);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
this.func_73732_a(this.field_146289_q, String.format("%s : %s", v.getLabel(), v.getRangeString()), this.field_146294_l / 2, offset, 0xEEEEEE);
|
||||
this.drawCenteredString(this.fontRendererObj, String.format("%s : %s", v.getLabel(), v.getRangeString()), this.width / 2, offset, 0xEEEEEE);
|
||||
}
|
||||
offset+=20;
|
||||
this.func_73732_a(this.field_146289_q, "The file 'ForgeModLoader-client-0.log' contains more information", this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, "The file 'ForgeModLoader-client-0.log' contains more information", this.width / 2, offset, 0xFFFFFF);
|
||||
}
|
||||
}
|
||||
@@ -29,35 +29,35 @@ public class GuiModsMissingForServer extends GuiScreen
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void func_73866_w_()
|
||||
public void initGui()
|
||||
{
|
||||
this.field_146292_n.add(new GuiButton(1, this.field_146294_l / 2 - 75, this.field_146295_m - 38, I18n.func_135052_a("gui.done")));
|
||||
this.buttonList.add(new GuiButton(1, this.width / 2 - 75, this.height - 38, I18n.format("gui.done")));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void func_146284_a(GuiButton p_73875_1_)
|
||||
protected void actionPerformed(GuiButton p_73875_1_)
|
||||
{
|
||||
if (p_73875_1_.field_146124_l && p_73875_1_.field_146127_k == 1)
|
||||
if (p_73875_1_.enabled && p_73875_1_.id == 1)
|
||||
{
|
||||
FMLClientHandler.instance().showGuiScreen(null);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
{
|
||||
this.func_146276_q_();
|
||||
this.drawDefaultBackground();
|
||||
int offset = Math.max(85 - modsMissing.missingMods.size() * 10, 10);
|
||||
this.func_73732_a(this.field_146289_q, "Forge Mod Loader could not connect to this server", this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, "Forge Mod Loader could not connect to this server", this.width / 2, offset, 0xFFFFFF);
|
||||
offset += 10;
|
||||
this.func_73732_a(this.field_146289_q, "The mods and versions listed below could not be found", this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, "The mods and versions listed below could not be found", this.width / 2, offset, 0xFFFFFF);
|
||||
offset += 10;
|
||||
this.func_73732_a(this.field_146289_q, "They are required to play on this server", this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, "They are required to play on this server", this.width / 2, offset, 0xFFFFFF);
|
||||
offset += 5;
|
||||
for (ArtifactVersion v : modsMissing.missingMods)
|
||||
{
|
||||
offset += 10;
|
||||
this.func_73732_a(this.field_146289_q, String.format("%s : %s", v.getLabel(), v.getRangeString()), this.field_146294_l / 2, offset, 0xEEEEEE);
|
||||
this.drawCenteredString(this.fontRendererObj, String.format("%s : %s", v.getLabel(), v.getRangeString()), this.width / 2, offset, 0xEEEEEE);
|
||||
}
|
||||
super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_);
|
||||
super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_);
|
||||
}
|
||||
}
|
||||
@@ -22,35 +22,35 @@ public class GuiOldSaveLoadConfirm extends GuiYesNo {
|
||||
super(parent, "", "", 0);
|
||||
this.dirName = dirName;
|
||||
this.saveName = saveName;
|
||||
this.zip = new File(FMLClientHandler.instance().getClient().field_71412_D,String.format("%s-%2$td%2$tm%2$ty%2$tH%2$tM%2$tS.zip", saveName, System.currentTimeMillis()));
|
||||
this.zip = new File(FMLClientHandler.instance().getClient().mcDataDir,String.format("%s-%2$td%2$tm%2$ty%2$tH%2$tM%2$tS.zip", saveName, System.currentTimeMillis()));
|
||||
}
|
||||
@Override
|
||||
public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
{
|
||||
this.func_146276_q_();
|
||||
this.func_73732_a(this.field_146289_q, String.format("The world %s contains pre-update modding data", saveName), this.field_146294_l / 2, 50, 16777215);
|
||||
this.func_73732_a(this.field_146289_q, String.format("There may be problems updating it to this version"), this.field_146294_l / 2, 70, 16777215);
|
||||
this.func_73732_a(this.field_146289_q, String.format("FML will save a zip to %s", zip.getName()), this.field_146294_l / 2, 90, 16777215);
|
||||
this.func_73732_a(this.field_146289_q, String.format("Do you wish to continue loading?"), this.field_146294_l / 2, 110, 16777215);
|
||||
this.drawDefaultBackground();
|
||||
this.drawCenteredString(this.fontRendererObj, String.format("The world %s contains pre-update modding data", saveName), this.width / 2, 50, 16777215);
|
||||
this.drawCenteredString(this.fontRendererObj, String.format("There may be problems updating it to this version"), this.width / 2, 70, 16777215);
|
||||
this.drawCenteredString(this.fontRendererObj, String.format("FML will save a zip to %s", zip.getName()), this.width / 2, 90, 16777215);
|
||||
this.drawCenteredString(this.fontRendererObj, String.format("Do you wish to continue loading?"), this.width / 2, 110, 16777215);
|
||||
int k;
|
||||
|
||||
for (k = 0; k < this.field_146292_n.size(); ++k)
|
||||
for (k = 0; k < this.buttonList.size(); ++k)
|
||||
{
|
||||
((GuiButton)this.field_146292_n.get(k)).func_146112_a(this.field_146297_k, p_73863_1_, p_73863_2_);
|
||||
((GuiButton)this.buttonList.get(k)).drawButton(this.mc, p_73863_1_, p_73863_2_);
|
||||
}
|
||||
|
||||
for (k = 0; k < this.field_146293_o.size(); ++k)
|
||||
for (k = 0; k < this.labelList.size(); ++k)
|
||||
{
|
||||
((GuiLabel)this.field_146293_o.get(k)).func_146159_a(this.field_146297_k, p_73863_1_, p_73863_2_);
|
||||
((GuiLabel)this.labelList.get(k)).func_146159_a(this.mc, p_73863_1_, p_73863_2_);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected void func_146284_a(GuiButton p_146284_1_)
|
||||
protected void actionPerformed(GuiButton p_146284_1_)
|
||||
{
|
||||
if (p_146284_1_.field_146127_k == 1)
|
||||
if (p_146284_1_.id == 1)
|
||||
{
|
||||
ObfuscationReflectionHelper.setPrivateValue(GuiSelectWorld.class, (GuiSelectWorld)field_146355_a, false, "field_"+"146634_i");
|
||||
FMLClientHandler.instance().showGuiScreen(field_146355_a);
|
||||
ObfuscationReflectionHelper.setPrivateValue(GuiSelectWorld.class, (GuiSelectWorld)parentScreen, false, "field_"+"146634_i");
|
||||
FMLClientHandler.instance().showGuiScreen(parentScreen);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -61,7 +61,7 @@ public class GuiOldSaveLoadConfirm extends GuiYesNo {
|
||||
} catch (IOException e)
|
||||
{
|
||||
FMLLog.log(Level.WARN, e, "There was a problem saving the backup %s. Please fix and try again", zip.getName());
|
||||
FMLClientHandler.instance().showGuiScreen(new GuiBackupFailed(field_146355_a, zip));
|
||||
FMLClientHandler.instance().showGuiScreen(new GuiBackupFailed(parentScreen, zip));
|
||||
return;
|
||||
}
|
||||
FMLClientHandler.instance().showGuiScreen(null);
|
||||
|
||||
@@ -133,15 +133,15 @@ public abstract class GuiScrollingList
|
||||
|
||||
public void actionPerformed(GuiButton button)
|
||||
{
|
||||
if (button.field_146124_l)
|
||||
if (button.enabled)
|
||||
{
|
||||
if (button.field_146127_k == this.scrollUpActionId)
|
||||
if (button.id == this.scrollUpActionId)
|
||||
{
|
||||
this.scrollDistance -= (float)(this.slotHeight * 2 / 3);
|
||||
this.initialMouseClickY = -2.0F;
|
||||
this.applyScrollLimits();
|
||||
}
|
||||
else if (button.field_146127_k == this.scrollDownActionId)
|
||||
else if (button.id == this.scrollDownActionId)
|
||||
{
|
||||
this.scrollDistance += (float)(this.slotHeight * 2 / 3);
|
||||
this.initialMouseClickY = -2.0F;
|
||||
@@ -263,8 +263,8 @@ public abstract class GuiScrollingList
|
||||
}
|
||||
|
||||
this.applyScrollLimits();
|
||||
Tessellator var18 = Tessellator.field_78398_a;
|
||||
if (this.client.field_71441_e != null)
|
||||
Tessellator var18 = Tessellator.instance;
|
||||
if (this.client.theWorld != null)
|
||||
{
|
||||
this.drawGradientRect(this.left, this.top, this.right, this.bottom, -1072689136, -804253680);
|
||||
}
|
||||
@@ -272,16 +272,16 @@ public abstract class GuiScrollingList
|
||||
{
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_FOG);
|
||||
this.client.field_71446_o.func_110577_a(Gui.field_110325_k);
|
||||
this.client.renderEngine.bindTexture(Gui.optionsBackground);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
float var17 = 32.0F;
|
||||
var18.func_78382_b();
|
||||
var18.func_78378_d(2105376);
|
||||
var18.func_78374_a((double)this.left, (double)this.bottom, 0.0D, (double)((float)this.left / var17), (double)((float)(this.bottom + (int)this.scrollDistance) / var17));
|
||||
var18.func_78374_a((double)this.right, (double)this.bottom, 0.0D, (double)((float)this.right / var17), (double)((float)(this.bottom + (int)this.scrollDistance) / var17));
|
||||
var18.func_78374_a((double)this.right, (double)this.top, 0.0D, (double)((float)this.right / var17), (double)((float)(this.top + (int)this.scrollDistance) / var17));
|
||||
var18.func_78374_a((double)this.left, (double)this.top, 0.0D, (double)((float)this.left / var17), (double)((float)(this.top + (int)this.scrollDistance) / var17));
|
||||
var18.func_78381_a();
|
||||
var18.startDrawingQuads();
|
||||
var18.setColorOpaque_I(2105376);
|
||||
var18.addVertexWithUV((double)this.left, (double)this.bottom, 0.0D, (double)((float)this.left / var17), (double)((float)(this.bottom + (int)this.scrollDistance) / var17));
|
||||
var18.addVertexWithUV((double)this.right, (double)this.bottom, 0.0D, (double)((float)this.right / var17), (double)((float)(this.bottom + (int)this.scrollDistance) / var17));
|
||||
var18.addVertexWithUV((double)this.right, (double)this.top, 0.0D, (double)((float)this.right / var17), (double)((float)(this.top + (int)this.scrollDistance) / var17));
|
||||
var18.addVertexWithUV((double)this.left, (double)this.top, 0.0D, (double)((float)this.left / var17), (double)((float)(this.top + (int)this.scrollDistance) / var17));
|
||||
var18.draw();
|
||||
}
|
||||
// boxRight = this.listWidth / 2 - 92 - 16;
|
||||
var10 = this.top + 4 - (int)this.scrollDistance;
|
||||
@@ -306,18 +306,18 @@ public abstract class GuiScrollingList
|
||||
int var15 = boxRight;
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
var18.func_78382_b();
|
||||
var18.func_78378_d(8421504);
|
||||
var18.func_78374_a((double)var14, (double)(var19 + var13 + 2), 0.0D, 0.0D, 1.0D);
|
||||
var18.func_78374_a((double)var15, (double)(var19 + var13 + 2), 0.0D, 1.0D, 1.0D);
|
||||
var18.func_78374_a((double)var15, (double)(var19 - 2), 0.0D, 1.0D, 0.0D);
|
||||
var18.func_78374_a((double)var14, (double)(var19 - 2), 0.0D, 0.0D, 0.0D);
|
||||
var18.func_78378_d(0);
|
||||
var18.func_78374_a((double)(var14 + 1), (double)(var19 + var13 + 1), 0.0D, 0.0D, 1.0D);
|
||||
var18.func_78374_a((double)(var15 - 1), (double)(var19 + var13 + 1), 0.0D, 1.0D, 1.0D);
|
||||
var18.func_78374_a((double)(var15 - 1), (double)(var19 - 1), 0.0D, 1.0D, 0.0D);
|
||||
var18.func_78374_a((double)(var14 + 1), (double)(var19 - 1), 0.0D, 0.0D, 0.0D);
|
||||
var18.func_78381_a();
|
||||
var18.startDrawingQuads();
|
||||
var18.setColorOpaque_I(8421504);
|
||||
var18.addVertexWithUV((double)var14, (double)(var19 + var13 + 2), 0.0D, 0.0D, 1.0D);
|
||||
var18.addVertexWithUV((double)var15, (double)(var19 + var13 + 2), 0.0D, 1.0D, 1.0D);
|
||||
var18.addVertexWithUV((double)var15, (double)(var19 - 2), 0.0D, 1.0D, 0.0D);
|
||||
var18.addVertexWithUV((double)var14, (double)(var19 - 2), 0.0D, 0.0D, 0.0D);
|
||||
var18.setColorOpaque_I(0);
|
||||
var18.addVertexWithUV((double)(var14 + 1), (double)(var19 + var13 + 1), 0.0D, 0.0D, 1.0D);
|
||||
var18.addVertexWithUV((double)(var15 - 1), (double)(var19 + var13 + 1), 0.0D, 1.0D, 1.0D);
|
||||
var18.addVertexWithUV((double)(var15 - 1), (double)(var19 - 1), 0.0D, 1.0D, 0.0D);
|
||||
var18.addVertexWithUV((double)(var14 + 1), (double)(var19 - 1), 0.0D, 0.0D, 0.0D);
|
||||
var18.draw();
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
@@ -327,7 +327,7 @@ public abstract class GuiScrollingList
|
||||
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
byte var20 = 4;
|
||||
if (this.client.field_71441_e == null)
|
||||
if (this.client.theWorld == null)
|
||||
{
|
||||
this.overlayBackground(0, this.top, 255, 255);
|
||||
this.overlayBackground(this.bottom, this.listHeight, 255, 255);
|
||||
@@ -337,22 +337,22 @@ public abstract class GuiScrollingList
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
var18.func_78382_b();
|
||||
var18.func_78384_a(0, 0);
|
||||
var18.func_78374_a((double)this.left, (double)(this.top + var20), 0.0D, 0.0D, 1.0D);
|
||||
var18.func_78374_a((double)this.right, (double)(this.top + var20), 0.0D, 1.0D, 1.0D);
|
||||
var18.func_78384_a(0, 255);
|
||||
var18.func_78374_a((double)this.right, (double)this.top, 0.0D, 1.0D, 0.0D);
|
||||
var18.func_78374_a((double)this.left, (double)this.top, 0.0D, 0.0D, 0.0D);
|
||||
var18.func_78381_a();
|
||||
var18.func_78382_b();
|
||||
var18.func_78384_a(0, 255);
|
||||
var18.func_78374_a((double)this.left, (double)this.bottom, 0.0D, 0.0D, 1.0D);
|
||||
var18.func_78374_a((double)this.right, (double)this.bottom, 0.0D, 1.0D, 1.0D);
|
||||
var18.func_78384_a(0, 0);
|
||||
var18.func_78374_a((double)this.right, (double)(this.bottom - var20), 0.0D, 1.0D, 0.0D);
|
||||
var18.func_78374_a((double)this.left, (double)(this.bottom - var20), 0.0D, 0.0D, 0.0D);
|
||||
var18.func_78381_a();
|
||||
var18.startDrawingQuads();
|
||||
var18.setColorRGBA_I(0, 0);
|
||||
var18.addVertexWithUV((double)this.left, (double)(this.top + var20), 0.0D, 0.0D, 1.0D);
|
||||
var18.addVertexWithUV((double)this.right, (double)(this.top + var20), 0.0D, 1.0D, 1.0D);
|
||||
var18.setColorRGBA_I(0, 255);
|
||||
var18.addVertexWithUV((double)this.right, (double)this.top, 0.0D, 1.0D, 0.0D);
|
||||
var18.addVertexWithUV((double)this.left, (double)this.top, 0.0D, 0.0D, 0.0D);
|
||||
var18.draw();
|
||||
var18.startDrawingQuads();
|
||||
var18.setColorRGBA_I(0, 255);
|
||||
var18.addVertexWithUV((double)this.left, (double)this.bottom, 0.0D, 0.0D, 1.0D);
|
||||
var18.addVertexWithUV((double)this.right, (double)this.bottom, 0.0D, 1.0D, 1.0D);
|
||||
var18.setColorRGBA_I(0, 0);
|
||||
var18.addVertexWithUV((double)this.right, (double)(this.bottom - var20), 0.0D, 1.0D, 0.0D);
|
||||
var18.addVertexWithUV((double)this.left, (double)(this.bottom - var20), 0.0D, 0.0D, 0.0D);
|
||||
var18.draw();
|
||||
var19 = this.getContentHeight() - (this.bottom - this.top - 4);
|
||||
|
||||
if (var19 > 0)
|
||||
@@ -376,27 +376,27 @@ public abstract class GuiScrollingList
|
||||
var14 = this.top;
|
||||
}
|
||||
|
||||
var18.func_78382_b();
|
||||
var18.func_78384_a(0, 255);
|
||||
var18.func_78374_a((double)scrollBarXStart, (double)this.bottom, 0.0D, 0.0D, 1.0D);
|
||||
var18.func_78374_a((double)scrollBarXEnd, (double)this.bottom, 0.0D, 1.0D, 1.0D);
|
||||
var18.func_78374_a((double)scrollBarXEnd, (double)this.top, 0.0D, 1.0D, 0.0D);
|
||||
var18.func_78374_a((double)scrollBarXStart, (double)this.top, 0.0D, 0.0D, 0.0D);
|
||||
var18.func_78381_a();
|
||||
var18.func_78382_b();
|
||||
var18.func_78384_a(8421504, 255);
|
||||
var18.func_78374_a((double)scrollBarXStart, (double)(var14 + var13), 0.0D, 0.0D, 1.0D);
|
||||
var18.func_78374_a((double)scrollBarXEnd, (double)(var14 + var13), 0.0D, 1.0D, 1.0D);
|
||||
var18.func_78374_a((double)scrollBarXEnd, (double)var14, 0.0D, 1.0D, 0.0D);
|
||||
var18.func_78374_a((double)scrollBarXStart, (double)var14, 0.0D, 0.0D, 0.0D);
|
||||
var18.func_78381_a();
|
||||
var18.func_78382_b();
|
||||
var18.func_78384_a(12632256, 255);
|
||||
var18.func_78374_a((double)scrollBarXStart, (double)(var14 + var13 - 1), 0.0D, 0.0D, 1.0D);
|
||||
var18.func_78374_a((double)(scrollBarXEnd - 1), (double)(var14 + var13 - 1), 0.0D, 1.0D, 1.0D);
|
||||
var18.func_78374_a((double)(scrollBarXEnd - 1), (double)var14, 0.0D, 1.0D, 0.0D);
|
||||
var18.func_78374_a((double)scrollBarXStart, (double)var14, 0.0D, 0.0D, 0.0D);
|
||||
var18.func_78381_a();
|
||||
var18.startDrawingQuads();
|
||||
var18.setColorRGBA_I(0, 255);
|
||||
var18.addVertexWithUV((double)scrollBarXStart, (double)this.bottom, 0.0D, 0.0D, 1.0D);
|
||||
var18.addVertexWithUV((double)scrollBarXEnd, (double)this.bottom, 0.0D, 1.0D, 1.0D);
|
||||
var18.addVertexWithUV((double)scrollBarXEnd, (double)this.top, 0.0D, 1.0D, 0.0D);
|
||||
var18.addVertexWithUV((double)scrollBarXStart, (double)this.top, 0.0D, 0.0D, 0.0D);
|
||||
var18.draw();
|
||||
var18.startDrawingQuads();
|
||||
var18.setColorRGBA_I(8421504, 255);
|
||||
var18.addVertexWithUV((double)scrollBarXStart, (double)(var14 + var13), 0.0D, 0.0D, 1.0D);
|
||||
var18.addVertexWithUV((double)scrollBarXEnd, (double)(var14 + var13), 0.0D, 1.0D, 1.0D);
|
||||
var18.addVertexWithUV((double)scrollBarXEnd, (double)var14, 0.0D, 1.0D, 0.0D);
|
||||
var18.addVertexWithUV((double)scrollBarXStart, (double)var14, 0.0D, 0.0D, 0.0D);
|
||||
var18.draw();
|
||||
var18.startDrawingQuads();
|
||||
var18.setColorRGBA_I(12632256, 255);
|
||||
var18.addVertexWithUV((double)scrollBarXStart, (double)(var14 + var13 - 1), 0.0D, 0.0D, 1.0D);
|
||||
var18.addVertexWithUV((double)(scrollBarXEnd - 1), (double)(var14 + var13 - 1), 0.0D, 1.0D, 1.0D);
|
||||
var18.addVertexWithUV((double)(scrollBarXEnd - 1), (double)var14, 0.0D, 1.0D, 0.0D);
|
||||
var18.addVertexWithUV((double)scrollBarXStart, (double)var14, 0.0D, 0.0D, 0.0D);
|
||||
var18.draw();
|
||||
}
|
||||
|
||||
this.func_27257_b(mouseX, mouseY);
|
||||
@@ -408,18 +408,18 @@ public abstract class GuiScrollingList
|
||||
|
||||
private void overlayBackground(int p_22239_1_, int p_22239_2_, int p_22239_3_, int p_22239_4_)
|
||||
{
|
||||
Tessellator var5 = Tessellator.field_78398_a;
|
||||
this.client.field_71446_o.func_110577_a(Gui.field_110325_k);
|
||||
Tessellator var5 = Tessellator.instance;
|
||||
this.client.renderEngine.bindTexture(Gui.optionsBackground);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
float var6 = 32.0F;
|
||||
var5.func_78382_b();
|
||||
var5.func_78384_a(4210752, p_22239_4_);
|
||||
var5.func_78374_a(0.0D, (double)p_22239_2_, 0.0D, 0.0D, (double)((float)p_22239_2_ / var6));
|
||||
var5.func_78374_a((double)this.listWidth + 30, (double)p_22239_2_, 0.0D, (double)((float)(this.listWidth + 30) / var6), (double)((float)p_22239_2_ / var6));
|
||||
var5.func_78384_a(4210752, p_22239_3_);
|
||||
var5.func_78374_a((double)this.listWidth + 30, (double)p_22239_1_, 0.0D, (double)((float)(this.listWidth + 30) / var6), (double)((float)p_22239_1_ / var6));
|
||||
var5.func_78374_a(0.0D, (double)p_22239_1_, 0.0D, 0.0D, (double)((float)p_22239_1_ / var6));
|
||||
var5.func_78381_a();
|
||||
var5.startDrawingQuads();
|
||||
var5.setColorRGBA_I(4210752, p_22239_4_);
|
||||
var5.addVertexWithUV(0.0D, (double)p_22239_2_, 0.0D, 0.0D, (double)((float)p_22239_2_ / var6));
|
||||
var5.addVertexWithUV((double)this.listWidth + 30, (double)p_22239_2_, 0.0D, (double)((float)(this.listWidth + 30) / var6), (double)((float)p_22239_2_ / var6));
|
||||
var5.setColorRGBA_I(4210752, p_22239_3_);
|
||||
var5.addVertexWithUV((double)this.listWidth + 30, (double)p_22239_1_, 0.0D, (double)((float)(this.listWidth + 30) / var6), (double)((float)p_22239_1_ / var6));
|
||||
var5.addVertexWithUV(0.0D, (double)p_22239_1_, 0.0D, 0.0D, (double)((float)p_22239_1_ / var6));
|
||||
var5.draw();
|
||||
}
|
||||
|
||||
protected void drawGradientRect(int par1, int par2, int par3, int par4, int par5, int par6)
|
||||
@@ -435,17 +435,17 @@ public abstract class GuiScrollingList
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
OpenGlHelper.func_148821_a(770, 771, 1, 0);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Tessellator tessellator = Tessellator.field_78398_a;
|
||||
tessellator.func_78382_b();
|
||||
tessellator.func_78369_a(f1, f2, f3, f);
|
||||
tessellator.func_78377_a((double)par3, (double)par2, 0.0D);
|
||||
tessellator.func_78377_a((double)par1, (double)par2, 0.0D);
|
||||
tessellator.func_78369_a(f5, f6, f7, f4);
|
||||
tessellator.func_78377_a((double)par1, (double)par4, 0.0D);
|
||||
tessellator.func_78377_a((double)par3, (double)par4, 0.0D);
|
||||
tessellator.func_78381_a();
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA_F(f1, f2, f3, f);
|
||||
tessellator.addVertex((double)par3, (double)par2, 0.0D);
|
||||
tessellator.addVertex((double)par1, (double)par2, 0.0D);
|
||||
tessellator.setColorRGBA_F(f5, f6, f7, f4);
|
||||
tessellator.addVertex((double)par1, (double)par4, 0.0D);
|
||||
tessellator.addVertex((double)par3, (double)par4, 0.0D);
|
||||
tessellator.draw();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
|
||||
@@ -31,7 +31,7 @@ public class GuiSlotModList extends GuiScrollingList
|
||||
|
||||
public GuiSlotModList(GuiModList parent, ArrayList<ModContainer> mods, int listWidth)
|
||||
{
|
||||
super(parent.getMinecraftInstance(), listWidth, parent.field_146295_m, 32, parent.field_146295_m - 66 + 4, 10, 35);
|
||||
super(parent.getMinecraftInstance(), listWidth, parent.height, 32, parent.height - 66 + 4, 10, 35);
|
||||
this.parent=parent;
|
||||
this.mods=mods;
|
||||
}
|
||||
@@ -57,7 +57,7 @@ public class GuiSlotModList extends GuiScrollingList
|
||||
@Override
|
||||
protected void drawBackground()
|
||||
{
|
||||
this.parent.func_146276_q_();
|
||||
this.parent.drawDefaultBackground();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -72,15 +72,15 @@ public class GuiSlotModList extends GuiScrollingList
|
||||
ModContainer mc=mods.get(listIndex);
|
||||
if (Loader.instance().getModState(mc)==ModState.DISABLED)
|
||||
{
|
||||
this.parent.getFontRenderer().func_78276_b(this.parent.getFontRenderer().func_78269_a(mc.getName(), listWidth - 10), this.left + 3 , var3 + 2, 0xFF2222);
|
||||
this.parent.getFontRenderer().func_78276_b(this.parent.getFontRenderer().func_78269_a(mc.getDisplayVersion(), listWidth - 10), this.left + 3 , var3 + 12, 0xFF2222);
|
||||
this.parent.getFontRenderer().func_78276_b(this.parent.getFontRenderer().func_78269_a("DISABLED", listWidth - 10), this.left + 3 , var3 + 22, 0xFF2222);
|
||||
this.parent.getFontRenderer().drawString(this.parent.getFontRenderer().trimStringToWidth(mc.getName(), listWidth - 10), this.left + 3 , var3 + 2, 0xFF2222);
|
||||
this.parent.getFontRenderer().drawString(this.parent.getFontRenderer().trimStringToWidth(mc.getDisplayVersion(), listWidth - 10), this.left + 3 , var3 + 12, 0xFF2222);
|
||||
this.parent.getFontRenderer().drawString(this.parent.getFontRenderer().trimStringToWidth("DISABLED", listWidth - 10), this.left + 3 , var3 + 22, 0xFF2222);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.parent.getFontRenderer().func_78276_b(this.parent.getFontRenderer().func_78269_a(mc.getName(), listWidth - 10), this.left + 3 , var3 + 2, 0xFFFFFF);
|
||||
this.parent.getFontRenderer().func_78276_b(this.parent.getFontRenderer().func_78269_a(mc.getDisplayVersion(), listWidth - 10), this.left + 3 , var3 + 12, 0xCCCCCC);
|
||||
this.parent.getFontRenderer().func_78276_b(this.parent.getFontRenderer().func_78269_a(mc.getMetadata() !=null ? mc.getMetadata().getChildModCountString() : "Metadata not found", listWidth - 10), this.left + 3 , var3 + 22, 0xCCCCCC);
|
||||
this.parent.getFontRenderer().drawString(this.parent.getFontRenderer().trimStringToWidth(mc.getName(), listWidth - 10), this.left + 3 , var3 + 2, 0xFFFFFF);
|
||||
this.parent.getFontRenderer().drawString(this.parent.getFontRenderer().trimStringToWidth(mc.getDisplayVersion(), listWidth - 10), this.left + 3 , var3 + 12, 0xCCCCCC);
|
||||
this.parent.getFontRenderer().drawString(this.parent.getFontRenderer().trimStringToWidth(mc.getMetadata() !=null ? mc.getMetadata().getChildModCountString() : "Metadata not found", listWidth - 10), this.left + 3 , var3 + 22, 0xCCCCCC);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,31 +14,31 @@ public class GuiSortingProblem extends GuiScreen {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_73866_w_()
|
||||
public void initGui()
|
||||
{
|
||||
super.func_73866_w_();
|
||||
super.initGui();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
{
|
||||
this.func_146276_q_();
|
||||
this.drawDefaultBackground();
|
||||
int offset = Math.max(85 - (failedList.getVisitedNodes().size() + 3) * 10, 10);
|
||||
this.func_73732_a(this.field_146289_q, "Forge Mod Loader has found a problem with your minecraft installation", this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, "Forge Mod Loader has found a problem with your minecraft installation", this.width / 2, offset, 0xFFFFFF);
|
||||
offset+=10;
|
||||
this.func_73732_a(this.field_146289_q, "A mod sorting cycle was detected and loading cannot continue", this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, "A mod sorting cycle was detected and loading cannot continue", this.width / 2, offset, 0xFFFFFF);
|
||||
offset+=10;
|
||||
this.func_73732_a(this.field_146289_q, String.format("The first mod in the cycle is %s", failedList.getFirstBadNode()), this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, String.format("The first mod in the cycle is %s", failedList.getFirstBadNode()), this.width / 2, offset, 0xFFFFFF);
|
||||
offset+=10;
|
||||
this.func_73732_a(this.field_146289_q, "The remainder of the cycle involves these mods", this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, "The remainder of the cycle involves these mods", this.width / 2, offset, 0xFFFFFF);
|
||||
offset+=5;
|
||||
for (ModContainer mc : failedList.getVisitedNodes())
|
||||
{
|
||||
offset+=10;
|
||||
this.func_73732_a(this.field_146289_q, String.format("%s : before: %s, after: %s", mc.toString(), mc.getDependants(), mc.getDependencies()), this.field_146294_l / 2, offset, 0xEEEEEE);
|
||||
this.drawCenteredString(this.fontRendererObj, String.format("%s : before: %s, after: %s", mc.toString(), mc.getDependants(), mc.getDependencies()), this.width / 2, offset, 0xEEEEEE);
|
||||
}
|
||||
offset+=20;
|
||||
this.func_73732_a(this.field_146289_q, "The file 'ForgeModLoader-client-0.log' contains more information", this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, "The file 'ForgeModLoader-client-0.log' contains more information", this.width / 2, offset, 0xFFFFFF);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -25,22 +25,22 @@ public class GuiWrongMinecraft extends GuiErrorScreen
|
||||
this.wrongMC = wrongMC;
|
||||
}
|
||||
@Override
|
||||
public void func_73866_w_()
|
||||
public void initGui()
|
||||
{
|
||||
super.func_73866_w_();
|
||||
super.initGui();
|
||||
}
|
||||
@Override
|
||||
public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
{
|
||||
this.func_146276_q_();
|
||||
this.drawDefaultBackground();
|
||||
int offset = 75;
|
||||
this.func_73732_a(this.field_146289_q, "Forge Mod Loader has found a problem with your minecraft installation", this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, "Forge Mod Loader has found a problem with your minecraft installation", this.width / 2, offset, 0xFFFFFF);
|
||||
offset+=10;
|
||||
this.func_73732_a(this.field_146289_q, String.format("The mod listed below does not want to run in Minecraft version %s", Loader.instance().getMinecraftModContainer().getVersion()), this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, String.format("The mod listed below does not want to run in Minecraft version %s", Loader.instance().getMinecraftModContainer().getVersion()), this.width / 2, offset, 0xFFFFFF);
|
||||
offset+=5;
|
||||
offset+=10;
|
||||
this.func_73732_a(this.field_146289_q, String.format("%s (%s) wants Minecraft %s", wrongMC.mod.getName(), wrongMC.mod.getModId(), wrongMC.mod.acceptableMinecraftVersionRange()), this.field_146294_l / 2, offset, 0xEEEEEE);
|
||||
this.drawCenteredString(this.fontRendererObj, String.format("%s (%s) wants Minecraft %s", wrongMC.mod.getName(), wrongMC.mod.getModId(), wrongMC.mod.acceptableMinecraftVersionRange()), this.width / 2, offset, 0xEEEEEE);
|
||||
offset+=20;
|
||||
this.func_73732_a(this.field_146289_q, "The file 'ForgeModLoader-client-0.log' contains more information", this.field_146294_l / 2, offset, 0xFFFFFF);
|
||||
this.drawCenteredString(this.fontRendererObj, "The file 'ForgeModLoader-client-0.log' contains more information", this.width / 2, offset, 0xFFFFFF);
|
||||
}
|
||||
}
|
||||
@@ -40,12 +40,12 @@ public class ClientRegistry
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void bindTileEntitySpecialRenderer(Class <? extends TileEntity> tileEntityClass, TileEntitySpecialRenderer specialRenderer)
|
||||
{
|
||||
TileEntityRendererDispatcher.field_147556_a.field_147559_m.put(tileEntityClass, specialRenderer);
|
||||
specialRenderer.func_147497_a(TileEntityRendererDispatcher.field_147556_a);
|
||||
TileEntityRendererDispatcher.instance.mapSpecialRenderers.put(tileEntityClass, specialRenderer);
|
||||
specialRenderer.func_147497_a(TileEntityRendererDispatcher.instance);
|
||||
}
|
||||
|
||||
public static void registerKeyBinding(KeyBinding key)
|
||||
{
|
||||
Minecraft.func_71410_x().field_71474_y.field_74324_K = ArrayUtils.add(Minecraft.func_71410_x().field_71474_y.field_74324_K, key);
|
||||
Minecraft.getMinecraft().gameSettings.keyBindings = ArrayUtils.add(Minecraft.getMinecraft().gameSettings.keyBindings, key);
|
||||
}
|
||||
}
|
||||
@@ -48,8 +48,8 @@ public class RenderingRegistry
|
||||
*/
|
||||
public static int addNewArmourRendererPrefix(String armor)
|
||||
{
|
||||
RenderBiped.field_82424_k = ObjectArrays.concat(RenderBiped.field_82424_k, armor);
|
||||
return RenderBiped.field_82424_k.length - 1;
|
||||
RenderBiped.bipedArmorFilenamePrefix = ObjectArrays.concat(RenderBiped.bipedArmorFilenamePrefix, armor);
|
||||
return RenderBiped.bipedArmorFilenamePrefix.length - 1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -136,7 +136,7 @@ public class RenderingRegistry
|
||||
for (EntityRendererInfo info : entityRenderers)
|
||||
{
|
||||
rendererMap.put(info.target, info.renderer);
|
||||
info.renderer.func_76976_a(RenderManager.field_78727_a);
|
||||
info.renderer.setRenderManager(RenderManager.instance);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user