mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 03:49:14 +00:00
Update mappings to 09/21 snapshots.
Conflict with getMatrix in ITransformation, so renamed to getMatrixVec.
This commit is contained in:
1 parent
5ed03945a0
commit
94e1a8e0a4
210 files changed
+1052
-978
No files matched your search
@@ -86,10 +86,10 @@ public final class FMLWorldPersistenceHook implements WorldPersistenceHooks.Worl
|
||||
{
|
||||
if (tag.hasKey("LoadingModList"))
|
||||
{
|
||||
NBTTagList modList = tag.getTagList("LoadingModList", (byte)10);
|
||||
NBTTagList modList = tag.getList("LoadingModList", (byte)10);
|
||||
for (int i = 0; i < modList.size(); i++)
|
||||
{
|
||||
NBTTagCompound mod = modList.getCompoundTagAt(i);
|
||||
NBTTagCompound mod = modList.getCompound(i);
|
||||
String modId = mod.getString("ModId");
|
||||
String modVersion = mod.getString("ModVersion");
|
||||
Optional<? extends ModContainer> container = ModList.get().getModContainerById(modId);
|
||||
@@ -115,10 +115,10 @@ public final class FMLWorldPersistenceHook implements WorldPersistenceHooks.Worl
|
||||
else if (tag.hasKey("Registries")) // 1.8, genericed out the 'registries' list
|
||||
{
|
||||
Map<ResourceLocation, ForgeRegistry.Snapshot> snapshot = new HashMap<>();
|
||||
NBTTagCompound regs = tag.getCompoundTag("Registries");
|
||||
for (String key : regs.getKeySet())
|
||||
NBTTagCompound regs = tag.getCompound("Registries");
|
||||
for (String key : regs.keySet())
|
||||
{
|
||||
snapshot.put(new ResourceLocation(key), ForgeRegistry.Snapshot.read(regs.getCompoundTag(key)));
|
||||
snapshot.put(new ResourceLocation(key), ForgeRegistry.Snapshot.read(regs.getCompound(key)));
|
||||
}
|
||||
failedElements = GameData.injectSnapshot(snapshot, true, true);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ import java.util.function.Supplier;
|
||||
public enum SidedProvider
|
||||
{
|
||||
// All of these need to be careful not to directly dereference the client and server elements in their signatures
|
||||
DATAFIXER(c->c.get().getDataFixer(), s->s.get().func_195563_aC()),
|
||||
DATAFIXER(c->c.get().getDataFixer(), s->s.get().getDataFixer()),
|
||||
SIDEDINIT((Function<Supplier<Minecraft>, Function<ModContainer, Event>>)c-> mc->new FMLClientInitEvent(c, mc),
|
||||
(Function<Supplier<DedicatedServer>, Function<ModContainer, Event>>)s-> mc->new FMLServerInitEvent(s, mc)),
|
||||
STRIPCHARS((Function<Supplier<Minecraft>, Function<String, String>>)c-> ClientHooks::stripSpecialChars,
|
||||
@@ -76,4 +76,4 @@ public enum SidedProvider
|
||||
throw new IllegalArgumentException("THREE SIDES? WUT?");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,7 @@ public class WorldPersistenceHooks
|
||||
{
|
||||
if (EffectiveSide.get() == LogicalSide.SERVER)
|
||||
{
|
||||
worldPersistenceHooks.forEach(wac->wac.readData(handler, worldInfo, tagCompound.getCompoundTag(wac.getModId())));
|
||||
worldPersistenceHooks.forEach(wac->wac.readData(handler, worldInfo, tagCompound.getCompound(wac.getModId())));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ public class ClientHooks
|
||||
{
|
||||
return null;
|
||||
}
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(iconSheet);
|
||||
Minecraft.getInstance().getTextureManager().bindTexture(iconSheet);
|
||||
Gui.drawModalRectWithCustomSizedTexture(x + width - 18, y + 10, 0, (float)idx, 16, 16, 256.0f, 256.0f);
|
||||
if (blocked)
|
||||
{
|
||||
@@ -172,14 +172,14 @@ public class ClientHooks
|
||||
|
||||
static File getSavesDir()
|
||||
{
|
||||
return new File(Minecraft.getMinecraft().gameDir, "saves");
|
||||
return new File(Minecraft.getInstance().gameDir, "saves");
|
||||
}
|
||||
|
||||
public static void tryLoadExistingWorld(GuiWorldSelection selectWorldGUI, WorldSummary comparator)
|
||||
{
|
||||
try
|
||||
{
|
||||
Minecraft.getMinecraft().launchIntegratedServer(comparator.getFileName(), comparator.getDisplayName(), null);
|
||||
Minecraft.getInstance().launchIntegratedServer(comparator.getFileName(), comparator.getDisplayName(), null);
|
||||
}
|
||||
catch (StartupQuery.AbortedException e)
|
||||
{
|
||||
@@ -189,7 +189,7 @@ public class ClientHooks
|
||||
|
||||
private static NetworkManager getClientToServerNetworkManager()
|
||||
{
|
||||
return Minecraft.getMinecraft().getConnection()!=null ? Minecraft.getMinecraft().getConnection().getNetworkManager() : null;
|
||||
return Minecraft.getInstance().getConnection()!=null ? Minecraft.getInstance().getConnection().getNetworkManager() : null;
|
||||
}
|
||||
|
||||
public static void handleClientWorldClosing(WorldClient world)
|
||||
@@ -207,11 +207,11 @@ public class ClientHooks
|
||||
ExtendedServerListData extendedData = serverDataTag.get(serverEntry);
|
||||
if (extendedData != null && extendedData.isBlocked)
|
||||
{
|
||||
Minecraft.getMinecraft().displayGuiScreen(new GuiAccessDenied(guiMultiplayer, serverEntry));
|
||||
Minecraft.getInstance().displayGuiScreen(new GuiAccessDenied(guiMultiplayer, serverEntry));
|
||||
}
|
||||
else
|
||||
{
|
||||
Minecraft.getMinecraft().displayGuiScreen(new GuiConnecting(guiMultiplayer, Minecraft.getMinecraft(), serverEntry));
|
||||
Minecraft.getInstance().displayGuiScreen(new GuiConnecting(guiMultiplayer, Minecraft.getInstance(), serverEntry));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,34 +49,34 @@ public class ModFileResourcePack extends AbstractResourcePack
|
||||
}
|
||||
|
||||
@Override
|
||||
public String func_195762_a()
|
||||
public String getName()
|
||||
{
|
||||
return modFile.getFileName();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected InputStream func_195766_a(String name) throws IOException
|
||||
protected InputStream getInputStream(String name) throws IOException
|
||||
{
|
||||
return Files.newInputStream(modFile.getLocator().findPath(modFile, name));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean func_195768_c(String name)
|
||||
protected boolean resourceExists(String name)
|
||||
{
|
||||
return Files.exists(modFile.getLocator().findPath(modFile, name));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<ResourceLocation> func_195758_a(ResourcePackType p_195758_1_, String p_195758_2_, int p_195758_3_, Predicate<String> p_195758_4_)
|
||||
public Collection<ResourceLocation> getAllResourceLocations(ResourcePackType type, String pathIn, int maxDepth, Predicate<String> filter)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
return Files.walk(modFile.getLocator().findPath(modFile, p_195758_1_.func_198956_a())).
|
||||
return Files.walk(modFile.getLocator().findPath(modFile, type.getDirectoryName())).
|
||||
filter(path -> !path.toString().endsWith(".mcmeta")).
|
||||
filter(path -> path.getNameCount() > 2 && p_195758_2_.equals(path.getName(2).toString())).
|
||||
filter(path -> p_195758_4_.test(path.subpath(3, Math.min(p_195758_3_+3, path.getNameCount())).toString())).
|
||||
map(path -> new ResourceLocation(path.getName(1).toString(),path.subpath(3,Math.min(p_195758_3_+3, path.getNameCount())).toString())).
|
||||
filter(path -> path.getNameCount() > 2 && pathIn.equals(path.getName(2).toString())).
|
||||
filter(path -> filter.test(path.subpath(3, Math.min(maxDepth+3, path.getNameCount())).toString())).
|
||||
map(path -> new ResourceLocation(path.getName(1).toString(),path.subpath(3,Math.min(maxDepth+3, path.getNameCount())).toString())).
|
||||
collect(Collectors.toList());
|
||||
}
|
||||
catch (IOException e)
|
||||
@@ -86,10 +86,10 @@ public class ModFileResourcePack extends AbstractResourcePack
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> func_195759_a(ResourcePackType p_195759_1_)
|
||||
public Set<String> getResourceNamespaces(ResourcePackType type)
|
||||
{
|
||||
try {
|
||||
return Files.walk(modFile.getLocator().findPath(modFile, p_195759_1_.func_198956_a()),1).map(p->p.getFileName().toString()).collect(Collectors.toSet());
|
||||
return Files.walk(modFile.getLocator().findPath(modFile, type.getDirectoryName()),1).map(p->p.getFileName().toString()).collect(Collectors.toSet());
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
|
||||
@@ -52,7 +52,7 @@ public class ResourcePackLoader
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T extends ResourcePackInfo> T getResourcePackInfo(String modId) {
|
||||
return (T)resourcePackList.func_198981_a(modId);
|
||||
return (T)resourcePackList.getPackInfo(modId);
|
||||
}
|
||||
|
||||
public static <T extends ResourcePackInfo> void loadResourcePacks(ResourcePackList<T> resourcePacks) {
|
||||
@@ -63,13 +63,13 @@ public class ResourcePackLoader
|
||||
forgePack = Files.isDirectory(FMLLoader.getForgePath()) ?
|
||||
new FolderPack(FMLLoader.getForgePath().toFile()) :
|
||||
new FilePack(FMLLoader.getForgePath().toFile());
|
||||
resourcePacks.func_198982_a(new ModPackFinder());
|
||||
resourcePacks.addPackFinder(new ModPackFinder());
|
||||
}
|
||||
|
||||
private static class ModPackFinder implements net.minecraft.resources.IPackFinder
|
||||
{
|
||||
@Override
|
||||
public <T extends ResourcePackInfo> void func_195730_a(Map<String, T> packList, ResourcePackInfo.IFactory<T> factory)
|
||||
public <T extends ResourcePackInfo> void addPackInfosToMap(Map<String, T> packList, ResourcePackInfo.IFactory<T> factory)
|
||||
{
|
||||
packList.put("forge", ResourcePackInfo.func_195793_a("forge", true, ()->forgePack, factory, ResourcePackInfo.Priority.BOTTOM));
|
||||
}
|
||||
|
||||
@@ -982,4 +982,4 @@ public class SplashProgress
|
||||
return (int) (bytes / 1024L / 1024L);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
@@ -48,15 +48,15 @@ public class GuiButtonExt extends GuiButton
|
||||
* Draws this button to the screen.
|
||||
*/
|
||||
@Override
|
||||
public void func_194828_a(int mouseX, int mouseY, float partial)
|
||||
public void render(int mouseX, int mouseY, float partial)
|
||||
{
|
||||
if (this.visible)
|
||||
{
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
this.hovered = mouseX >= this.x && mouseY >= this.y && mouseX < this.x + this.width && mouseY < this.y + this.height;
|
||||
int k = this.getHoverState(this.hovered);
|
||||
GuiUtils.drawContinuousTexturedBox(BUTTON_TEXTURES, this.x, this.y, 0, 46 + k * 20, this.width, this.height, 200, 20, 2, 3, 2, 2, this.zLevel);
|
||||
this.mouseDragged(mc, mouseX, mouseY);
|
||||
this.renderBg(mc, mouseX, mouseY);
|
||||
int color = 14737632;
|
||||
|
||||
if (packedFGColor != 0)
|
||||
|
||||
@@ -38,18 +38,18 @@ public class GuiCheckBox extends GuiButton
|
||||
this.isChecked = isChecked;
|
||||
this.boxWidth = 11;
|
||||
this.height = 11;
|
||||
this.width = this.boxWidth + 2 + Minecraft.getMinecraft().fontRenderer.getStringWidth(displayString);
|
||||
this.width = this.boxWidth + 2 + Minecraft.getInstance().fontRenderer.getStringWidth(displayString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_194828_a(int mouseX, int mouseY, float partial)
|
||||
public void render(int mouseX, int mouseY, float partial)
|
||||
{
|
||||
if (this.visible)
|
||||
{
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
this.hovered = mouseX >= this.x && mouseY >= this.y && mouseX < this.x + this.boxWidth && mouseY < this.y + this.height;
|
||||
GuiUtils.drawContinuousTexturedBox(BUTTON_TEXTURES, this.x, this.y, 0, 46, this.boxWidth, this.height, 200, 20, 2, 3, 2, 2, this.zLevel);
|
||||
this.mouseDragged(mc, mouseX, mouseY);
|
||||
this.renderBg(mc, mouseX, mouseY);
|
||||
int color = 14737632;
|
||||
|
||||
if (packedFGColor != 0)
|
||||
@@ -69,7 +69,7 @@ public class GuiCheckBox extends GuiButton
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_194829_a(double mouseX, double mouseY)
|
||||
public void onClick(double mouseX, double mouseY)
|
||||
{
|
||||
this.isChecked = !this.isChecked;
|
||||
}
|
||||
|
||||
@@ -40,6 +40,6 @@ public class GuiMessageDialog extends GuiDisconnected
|
||||
public void initGui()
|
||||
{
|
||||
super.initGui();
|
||||
buttonList.get(0).displayString = I18n.format(buttonText);
|
||||
buttons.get(0).displayString = I18n.format(buttonText);
|
||||
}
|
||||
}
|
||||
@@ -107,7 +107,7 @@ public class GuiSlider extends GuiButtonExt
|
||||
* Fired when the mouse button is dragged. Equivalent of MouseListener.mouseDragged(MouseEvent e).
|
||||
*/
|
||||
@Override
|
||||
protected void mouseDragged(Minecraft par1Minecraft, int par2, int par3)
|
||||
protected void renderBg(Minecraft par1Minecraft, int par2, int par3)
|
||||
{
|
||||
if (this.visible)
|
||||
{
|
||||
@@ -117,7 +117,7 @@ public class GuiSlider extends GuiButtonExt
|
||||
updateSlider();
|
||||
}
|
||||
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.drawTexturedModalRect(this.x + (int)(this.sliderValue * (float)(this.width - 8)), this.y, 0, 66, 4, 20);
|
||||
this.drawTexturedModalRect(this.x + (int)(this.sliderValue * (float)(this.width - 8)) + 4, this.y, 196, 66, 4, 20);
|
||||
}
|
||||
@@ -128,7 +128,7 @@ public class GuiSlider extends GuiButtonExt
|
||||
* e).
|
||||
*/
|
||||
@Override
|
||||
public void func_194829_a(double mouseX, double mouseY)
|
||||
public void onClick(double mouseX, double mouseY)
|
||||
{
|
||||
this.sliderValue = (mouseX - (this.x + 4)) / (this.width - 8);
|
||||
updateSlider();
|
||||
@@ -190,7 +190,7 @@ public class GuiSlider extends GuiButtonExt
|
||||
* Fired when the mouse button is released. Equivalent of MouseListener.mouseReleased(MouseEvent e).
|
||||
*/
|
||||
@Override
|
||||
public void func_194831_b(double mouseX, double mouseY)
|
||||
public void onRelease(double mouseX, double mouseY)
|
||||
{
|
||||
this.dragging = false;
|
||||
}
|
||||
|
||||
@@ -41,15 +41,15 @@ public class GuiUnicodeGlyphButton extends GuiButtonExt
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_194828_a(int mouseX, int mouseY, float partial)
|
||||
public void render(int mouseX, int mouseY, float partial)
|
||||
{
|
||||
if (this.visible)
|
||||
{
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
this.hovered = mouseX >= this.x && mouseY >= this.y && mouseX < this.x + this.width && mouseY < this.y + this.height;
|
||||
int k = this.getHoverState(this.hovered);
|
||||
GuiUtils.drawContinuousTexturedBox(GuiButton.BUTTON_TEXTURES, this.x, this.y, 0, 46 + k * 20, this.width, this.height, 200, 20, 2, 3, 2, 2, this.zLevel);
|
||||
this.mouseDragged(mc, mouseX, mouseY);
|
||||
this.renderBg(mc, mouseX, mouseY);
|
||||
int color = 14737632;
|
||||
|
||||
if (packedFGColor != 0)
|
||||
@@ -78,7 +78,7 @@ public class GuiUnicodeGlyphButton extends GuiButtonExt
|
||||
totalWidth = glyphWidth + strWidth;
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(glyphScale, glyphScale, 1.0F);
|
||||
GlStateManager.scalef(glyphScale, glyphScale, 1.0F);
|
||||
this.drawCenteredString(mc.fontRenderer, glyph,
|
||||
(int) (((this.x + (this.width / 2) - (strWidth / 2)) / glyphScale) - (glyphWidth / (2 * glyphScale)) + 2),
|
||||
(int) (((this.y + ((this.height - 8) / glyphScale) / 2) - 1) / glyphScale), color);
|
||||
|
||||
@@ -125,7 +125,7 @@ public class GuiUtils
|
||||
public static void drawContinuousTexturedBox(ResourceLocation res, int x, int y, int u, int v, int width, int height, int textureWidth, int textureHeight,
|
||||
int topBorder, int bottomBorder, int leftBorder, int rightBorder, float zLevel)
|
||||
{
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(res);
|
||||
Minecraft.getInstance().getTextureManager().bindTexture(res);
|
||||
drawContinuousTexturedBox(x, y, u, v, width, height, textureWidth, textureHeight, topBorder, bottomBorder, leftBorder, rightBorder, zLevel);
|
||||
}
|
||||
|
||||
@@ -151,9 +151,9 @@ public class GuiUtils
|
||||
public static void drawContinuousTexturedBox(int x, int y, int u, int v, int width, int height, int textureWidth, int textureHeight,
|
||||
int topBorder, int bottomBorder, int leftBorder, int rightBorder, float zLevel)
|
||||
{
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
GlStateManager.blendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
|
||||
int fillerWidth = textureWidth - leftBorder - rightBorder;
|
||||
int fillerHeight = textureHeight - topBorder - bottomBorder;
|
||||
@@ -275,7 +275,7 @@ public class GuiUtils
|
||||
GlStateManager.disableRescaleNormal();
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.disableDepth();
|
||||
GlStateManager.disableDepthTest();
|
||||
int tooltipTextWidth = 0;
|
||||
|
||||
for (String textLine : textLines)
|
||||
@@ -409,7 +409,7 @@ public class GuiUtils
|
||||
MinecraftForge.EVENT_BUS.post(new RenderTooltipEvent.PostText(stack, textLines, tooltipX, tooltipTop, font, tooltipTextWidth, tooltipHeight));
|
||||
|
||||
GlStateManager.enableLighting();
|
||||
GlStateManager.enableDepth();
|
||||
GlStateManager.enableDepthTest();
|
||||
RenderHelper.enableStandardItemLighting();
|
||||
GlStateManager.enableRescaleNormal();
|
||||
}
|
||||
@@ -428,8 +428,8 @@ public class GuiUtils
|
||||
|
||||
GlStateManager.disableTexture2D();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.disableAlpha();
|
||||
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
|
||||
GlStateManager.disableAlphaTest();
|
||||
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
|
||||
GlStateManager.shadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
@@ -443,7 +443,7 @@ public class GuiUtils
|
||||
|
||||
GlStateManager.shadeModel(GL11.GL_FLAT);
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.enableAlphaTest();
|
||||
GlStateManager.enableTexture2D();
|
||||
}
|
||||
}
|
||||
@@ -32,4 +32,4 @@ public interface IArrayEntry
|
||||
boolean isValueSavable();
|
||||
|
||||
Object getValue();
|
||||
}
|
||||
}
|
||||
@@ -121,4 +121,4 @@ public interface IConfigEntry
|
||||
* This method is called when the parent GUI is closed. Most handlers won't need this; it is provided for special cases.
|
||||
*/
|
||||
void onGuiClosed();
|
||||
}
|
||||
}
|
||||
@@ -37,9 +37,9 @@ public class GuiAccessDenied extends GuiScreen
|
||||
@Override
|
||||
public void initGui()
|
||||
{
|
||||
this.buttonList.add(new GuiButton(1, this.width / 2 - 75, this.height - 38, I18n.format("gui.done"))
|
||||
this.buttons.add(new GuiButton(1, this.width / 2 - 75, this.height - 38, I18n.format("gui.done"))
|
||||
{
|
||||
public void func_194829_a(double p_194829_1_, double p_194829_3_)
|
||||
public void onClick(double mouseX, double mouseY)
|
||||
{
|
||||
GuiAccessDenied.this.mc.displayGuiScreen(parent);
|
||||
}
|
||||
@@ -47,13 +47,13 @@ public class GuiAccessDenied extends GuiScreen
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks)
|
||||
public void render(int mouseX, int mouseY, float partialTicks)
|
||||
{
|
||||
this.drawDefaultBackground();
|
||||
int offset = Math.max(85 - 2 * 10, 10);
|
||||
this.drawCenteredString(this.fontRenderer, "Forge Mod Loader could not connect to this server", this.width / 2, offset, 0xFFFFFF);
|
||||
offset += 10;
|
||||
this.drawCenteredString(this.fontRenderer, String.format("The server %s has forbidden modded access", data.serverName), this.width / 2, offset, 0xFFFFFF);
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
super.render(mouseX, mouseY, partialTicks);
|
||||
}
|
||||
}
|
||||
@@ -38,9 +38,9 @@ public class GuiBackupFailed extends GuiScreen
|
||||
@Override
|
||||
public void initGui()
|
||||
{
|
||||
this.buttonList.add(new GuiButton(1, this.width / 2 - 75, this.height - 38, I18n.format("gui.done"))
|
||||
this.buttons.add(new GuiButton(1, this.width / 2 - 75, this.height - 38, I18n.format("gui.done"))
|
||||
{
|
||||
public void func_194829_a(double p_194829_1_, double p_194829_3_)
|
||||
public void onClick(double mouseX, double mouseY)
|
||||
{
|
||||
GuiBackupFailed.this.mc.displayGuiScreen(parent);
|
||||
}
|
||||
@@ -48,13 +48,13 @@ public class GuiBackupFailed extends GuiScreen
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks)
|
||||
public void render(int mouseX, int mouseY, float partialTicks)
|
||||
{
|
||||
this.drawDefaultBackground();
|
||||
int offset = Math.max(85 - 2 * 10, 10);
|
||||
this.drawCenteredString(this.fontRenderer, String.format("There was an error saving the archive %s", zipName.getName()), this.width / 2, offset, 0xFFFFFF);
|
||||
offset += 10;
|
||||
this.drawCenteredString(this.fontRenderer, String.format("Please fix the problem and try again"), this.width / 2, offset, 0xFFFFFF);
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
super.render(mouseX, mouseY, partialTicks);
|
||||
}
|
||||
}
|
||||
@@ -32,18 +32,18 @@ public class GuiConfirmation extends GuiNotification
|
||||
@Override
|
||||
public void initGui()
|
||||
{
|
||||
this.buttonList.add(new GuiOptionButton(0, this.width / 2 - 155, this.height - 38, I18n.format("gui.yes"))
|
||||
this.buttons.add(new GuiOptionButton(0, this.width / 2 - 155, this.height - 38, I18n.format("gui.yes"))
|
||||
{
|
||||
public void func_194829_a(double p_194829_1_, double p_194829_3_)
|
||||
public void onClick(double mouseX, double mouseY)
|
||||
{
|
||||
GuiConfirmation.this.mc.displayGuiScreen(null);
|
||||
query.setResult(true);
|
||||
query.finish();
|
||||
}
|
||||
});
|
||||
this.buttonList.add(new GuiOptionButton(1, this.width / 2 - 155 + 160, this.height - 38, I18n.format("gui.no"))
|
||||
this.buttons.add(new GuiOptionButton(1, this.width / 2 - 155 + 160, this.height - 38, I18n.format("gui.no"))
|
||||
{
|
||||
public void func_194829_a(double p_194829_1_, double p_194829_3_)
|
||||
public void onClick(double mouseX, double mouseY)
|
||||
{
|
||||
GuiConfirmation.this.mc.displayGuiScreen(null);
|
||||
query.setResult(false);
|
||||
|
||||
@@ -40,10 +40,10 @@ public class GuiCustomModLoadingErrorScreen extends GuiErrorBase
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks)
|
||||
public void render(int mouseX, int mouseY, float partialTicks)
|
||||
{
|
||||
this.drawDefaultBackground();
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
super.render(mouseX, mouseY, partialTicks);
|
||||
this.customException.drawScreen(this, fontRenderer, mouseX, mouseY, partialTicks);
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ public class GuiDupesFound extends GuiErrorBase
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks)
|
||||
public void render(int mouseX, int mouseY, float partialTicks)
|
||||
{
|
||||
this.drawDefaultBackground();
|
||||
int offset = Math.max(85 - dupes.dupes.size() * 10, 10);
|
||||
@@ -53,6 +53,6 @@ public class GuiDupesFound extends GuiErrorBase
|
||||
offset += 10;
|
||||
this.drawCenteredString(this.fontRenderer, String.format("%s : %s", mc.getKey().getModId(), mc.getValue().getName()), this.width / 2, offset, 0xEEEEEE);
|
||||
}
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
super.render(mouseX, mouseY, partialTicks);
|
||||
}
|
||||
}
|
||||
@@ -52,10 +52,10 @@ public class GuiErrorBase extends GuiErrorScreen
|
||||
public void initGui()
|
||||
{
|
||||
super.initGui();
|
||||
this.buttonList.clear();
|
||||
this.buttonList.add(new GuiButton(10, 50, this.height - 38, this.width / 2 - 55, 20, translateOrDefault("fml.button.open.mods.folder", "Open Mods Folder"))
|
||||
this.buttons.clear();
|
||||
this.buttons.add(new GuiButton(10, 50, this.height - 38, this.width / 2 - 55, 20, translateOrDefault("fml.button.open.mods.folder", "Open Mods Folder"))
|
||||
{
|
||||
public void func_194829_a(double p_194829_1_, double p_194829_3_)
|
||||
public void onClick(double mouseX, double mouseY)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -69,9 +69,9 @@ public class GuiErrorBase extends GuiErrorScreen
|
||||
}
|
||||
});
|
||||
String openFileText = translateOrDefault("fml.button.open.file", "Open %s", logFile.getName());
|
||||
this.buttonList.add(new GuiButton(11, this.width / 2 + 5, this.height - 38, this.width / 2 - 55, 20, openFileText)
|
||||
this.buttons.add(new GuiButton(11, this.width / 2 + 5, this.height - 38, this.width / 2 - 55, 20, openFileText)
|
||||
{
|
||||
public void func_194829_a(double p_194829_1_, double p_194829_3_)
|
||||
public void onClick(double mouseX, double mouseY)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -86,11 +86,11 @@ public class GuiErrorBase extends GuiErrorScreen
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks)
|
||||
public void render(int mouseX, int mouseY, float partialTicks)
|
||||
{
|
||||
for (GuiButton button : buttonList)
|
||||
for (GuiButton button : buttons)
|
||||
{
|
||||
button.func_194828_a(mouseX, mouseY, partialTicks);
|
||||
button.render(mouseX, mouseY, partialTicks);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -116,7 +116,7 @@ public class GuiModList extends GuiScreen
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_194829_a(double p_194829_1_, double p_194829_3_)
|
||||
public void onClick(double mouseX, double mouseY)
|
||||
{
|
||||
GuiModList.this.sortType = this.type;
|
||||
resortMods();
|
||||
@@ -166,13 +166,13 @@ public class GuiModList extends GuiScreen
|
||||
|
||||
void setInfo(Info info)
|
||||
{
|
||||
this.func_195086_c();
|
||||
this.func_195085_a(info);
|
||||
this.clearEntries();
|
||||
this.addEntry(info);
|
||||
}
|
||||
|
||||
public void clear()
|
||||
{
|
||||
this.func_195086_c();
|
||||
this.clearEntries();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
@@ -191,22 +191,22 @@ public class GuiModList extends GuiScreen
|
||||
|
||||
this.addButton(new GuiButton(6, ((modList.right + this.width) / 2) - 100, this.height - 38, I18n.format("gui.done")){
|
||||
@Override
|
||||
public void func_194829_a(double p_194829_1_, double p_194829_3_)
|
||||
public void onClick(double mouseX, double mouseY)
|
||||
{
|
||||
GuiModList.this.mc.displayGuiScreen(GuiModList.this.mainMenu);
|
||||
}
|
||||
});
|
||||
this.addButton(this.configButton = new GuiButton(20, 10, this.height - 49, this.listWidth, 20, I18n.format("fml.menu.mods.config")){
|
||||
@Override
|
||||
public void func_194829_a(double p_194829_1_, double p_194829_3_)
|
||||
public void onClick(double mouseX, double mouseY)
|
||||
{
|
||||
GuiModList.this.displayModConfig();
|
||||
}
|
||||
});
|
||||
|
||||
search = new GuiTextField(0, getFontRenderer(), 12, modList.bottom + 17, modList.width - 4, 14);
|
||||
field_195124_j.add(search);
|
||||
field_195124_j.add(modList);
|
||||
children.add(search);
|
||||
children.add(modList);
|
||||
search.setFocused(true);
|
||||
search.setCanLoseFocus(true);
|
||||
|
||||
@@ -235,9 +235,9 @@ public class GuiModList extends GuiScreen
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateScreen()
|
||||
public void tick()
|
||||
{
|
||||
search.updateCursorCounter();
|
||||
search.tick();
|
||||
|
||||
if (!search.getText().equals(lastFilterText))
|
||||
{
|
||||
@@ -269,7 +269,7 @@ public class GuiModList extends GuiScreen
|
||||
|
||||
private void resortMods()
|
||||
{
|
||||
for (GuiButton b : buttonList)
|
||||
for (GuiButton b : buttons)
|
||||
{
|
||||
if (b instanceof SortButton) {
|
||||
b.enabled = sortType.button != b;
|
||||
@@ -279,18 +279,18 @@ public class GuiModList extends GuiScreen
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks)
|
||||
public void render(int mouseX, int mouseY, float partialTicks)
|
||||
{
|
||||
this.modList.drawScreen(mouseX, mouseY, partialTicks);
|
||||
this.modInfo.drawScreen(mouseX, mouseY, partialTicks);
|
||||
|
||||
int left = ((this.width - this.listWidth - 38) / 2) + this.listWidth + 30;
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
super.render(mouseX, mouseY, partialTicks);
|
||||
|
||||
String text = I18n.format("fml.menu.mods.search");
|
||||
int x = ((10 + modList.right) / 2) - (getFontRenderer().getStringWidth(text) / 2);
|
||||
getFontRenderer().func_211126_b(text, x, modList.bottom + 5, 0xFFFFFF);
|
||||
this.search.func_195608_a(mouseX, mouseY, partialTicks);
|
||||
getFontRenderer().drawString(text, x, modList.bottom + 5, 0xFFFFFF);
|
||||
this.search.drawTextField(mouseX, mouseY, partialTicks);
|
||||
}
|
||||
|
||||
Minecraft getMinecraftInstance()
|
||||
@@ -341,10 +341,10 @@ public class GuiModList extends GuiScreen
|
||||
NativeImage logo = null;
|
||||
InputStream logoResource = getClass().getResourceAsStream(logoFile);
|
||||
if (logoResource != null)
|
||||
logo = NativeImage.func_195713_a(logoResource);
|
||||
logo = NativeImage.read(logoResource);
|
||||
if (logo != null)
|
||||
{
|
||||
return Pair.of(tm.getDynamicTextureLocation("modlogo", new DynamicTexture(logo)), new Dimension(logo.func_195702_a(), logo.func_195714_b()));
|
||||
return Pair.of(tm.getDynamicTextureLocation("modlogo", new DynamicTexture(logo)), new Dimension(logo.getWidth(), logo.getHeight()));
|
||||
}
|
||||
}
|
||||
catch (IOException e) { }
|
||||
@@ -396,7 +396,7 @@ public class GuiModList extends GuiScreen
|
||||
|
||||
public Info(GuiListExtended<Info> parent, List<String> lines, @Nullable ResourceLocation logoPath, Dimension logoDims)
|
||||
{
|
||||
this.field_195004_a = parent;
|
||||
this.list = parent;
|
||||
this.lines = resizeContent(lines);
|
||||
this.logoPath = logoPath;
|
||||
this.logoDims = logoDims;
|
||||
@@ -415,7 +415,7 @@ public class GuiModList extends GuiScreen
|
||||
|
||||
// ITextComponent chat = ForgeHooks.newChatWithLinks(line, false);
|
||||
ITextComponent chat = new TextComponentString(line);
|
||||
int maxTextLength = this.func_195002_d() - 8;
|
||||
int maxTextLength = this.getX() - 8;
|
||||
if (maxTextLength >= 0)
|
||||
{
|
||||
ret.addAll(GuiUtilRenderComponents.splitText(chat, maxTextLength, GuiModList.this.fontRenderer, false, true));
|
||||
@@ -426,10 +426,10 @@ public class GuiModList extends GuiScreen
|
||||
|
||||
|
||||
@Override
|
||||
public void func_194999_a(int p_194999_1_, int p_194999_2_, int p_194999_3_, int p_194999_4_, boolean p_194999_5_, float p_194999_6_)
|
||||
public void drawEntry(int entryWidth, int entryHeight, int mouseX, int mouseY, boolean p_194999_5_, float partialTicks)
|
||||
{
|
||||
int top = this.func_195001_c();
|
||||
int left = this.func_195002_d();
|
||||
int top = this.getY();
|
||||
int left = this.getX();
|
||||
/*
|
||||
int top = this.
|
||||
|
||||
@@ -457,7 +457,7 @@ public class GuiModList extends GuiScreen
|
||||
{
|
||||
GlStateManager.enableBlend();
|
||||
GuiModList.this.fontRenderer.drawStringWithShadow(line.getFormattedText(), left + 4, top, 0xFFFFFF);
|
||||
GlStateManager.disableAlpha();
|
||||
GlStateManager.disableAlphaTest();
|
||||
GlStateManager.disableBlend();
|
||||
}
|
||||
top += fontRenderer.FONT_HEIGHT + 1;
|
||||
|
||||
@@ -43,7 +43,7 @@ public class GuiModsMissing extends GuiErrorBase
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks)
|
||||
public void render(int mouseX, int mouseY, float partialTicks)
|
||||
{
|
||||
this.drawDefaultBackground();
|
||||
List<MissingModsException.MissingModInfo> missingModsVersions = modsMissing.getMissingModInfos();
|
||||
@@ -89,6 +89,6 @@ public class GuiModsMissing extends GuiErrorBase
|
||||
offset += 10;
|
||||
this.drawCenteredString(this.fontRenderer, message, this.width / 2, offset, 0xEEEEEE);
|
||||
}
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
super.render(mouseX, mouseY, partialTicks);
|
||||
}
|
||||
}
|
||||
@@ -39,9 +39,9 @@ public class GuiModsMissingForServer extends GuiScreen
|
||||
@Override
|
||||
public void initGui()
|
||||
{
|
||||
this.buttonList.add(new GuiButton(1, this.width / 2 - 75, this.height - 38, I18n.format("gui.done"))
|
||||
this.buttons.add(new GuiButton(1, this.width / 2 - 75, this.height - 38, I18n.format("gui.done"))
|
||||
{
|
||||
public void func_194829_a(double p_194829_1_, double p_194829_3_)
|
||||
public void onClick(double mouseX, double mouseY)
|
||||
{
|
||||
GuiModsMissingForServer.this.mc.displayGuiScreen(null);
|
||||
}
|
||||
@@ -49,7 +49,7 @@ public class GuiModsMissingForServer extends GuiScreen
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks)
|
||||
public void render(int mouseX, int mouseY, float partialTicks)
|
||||
{
|
||||
this.drawDefaultBackground();
|
||||
List<MissingModsException.MissingModInfo> missingModsVersions = modsMissing.getMissingModInfos();
|
||||
@@ -66,6 +66,6 @@ public class GuiModsMissingForServer extends GuiScreen
|
||||
offset += 10;
|
||||
this.drawCenteredString(this.fontRenderer, String.format("%s : %s", v.getLabel(), v.getRangeString()), this.width / 2, offset, 0xEEEEEE);
|
||||
}
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
super.render(mouseX, mouseY, partialTicks);
|
||||
}
|
||||
}
|
||||
@@ -59,13 +59,13 @@ public class GuiMultipleModsErrored extends GuiErrorBase
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks)
|
||||
public void render(int mouseX, int mouseY, float partialTicks)
|
||||
{
|
||||
this.drawDefaultBackground();
|
||||
this.list.drawScreen(mouseX, mouseY, partialTicks);
|
||||
String missingMultipleModsText = I18n.format("fml.messages.mod.missing.multiple", missingModsExceptions.size());
|
||||
this.drawCenteredString(this.fontRenderer, missingMultipleModsText, this.width / 2, 10, 0xFFFFFF);
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
super.render(mouseX, mouseY, partialTicks);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -118,11 +118,11 @@ public class GuiMultipleModsErrored extends GuiErrorBase
|
||||
FontRenderer renderer = GuiMultipleModsErrored.this.fontRenderer;
|
||||
if (!missingModsExceptions.isEmpty())
|
||||
{
|
||||
renderer.func_211126_b(I18n.format("fml.messages.mod.missing.dependencies.multiple.issues"), this.left, offset, 0xFFFFFF);
|
||||
renderer.drawString(I18n.format("fml.messages.mod.missing.dependencies.multiple.issues"), this.left, offset, 0xFFFFFF);
|
||||
offset += 15;
|
||||
for (MissingModsException exception : missingModsExceptions)
|
||||
{
|
||||
renderer.func_211126_b(exception.getModName() + ":", this.left, offset, 0xFFFFFF);
|
||||
renderer.drawString(exception.getModName() + ":", this.left, offset, 0xFFFFFF);
|
||||
for (MissingModsException.MissingModInfo versionInfo : exception.getMissingModInfos())
|
||||
{
|
||||
ArtifactVersion acceptedVersion = versionInfo.getAcceptedVersion();
|
||||
@@ -159,7 +159,7 @@ public class GuiMultipleModsErrored extends GuiErrorBase
|
||||
message = I18n.format("fml.messages.mod.missing.dependencies.compatible.with", versionInfoText);
|
||||
}
|
||||
offset += 10;
|
||||
renderer.func_211126_b(message, this.left, offset, 0xEEEEEE);
|
||||
renderer.drawString(message, this.left, offset, 0xEEEEEE);
|
||||
}
|
||||
|
||||
offset += 15;
|
||||
|
||||
@@ -34,9 +34,9 @@ public class GuiNotification extends GuiScreen
|
||||
@Override
|
||||
public void initGui()
|
||||
{
|
||||
this.buttonList.add(new GuiButton(0, this.width / 2 - 100, this.height - 38, I18n.format("gui.done"))
|
||||
this.buttons.add(new GuiButton(0, this.width / 2 - 100, this.height - 38, I18n.format("gui.done"))
|
||||
{
|
||||
public void func_194829_a(double p_194829_1_, double p_194829_3_)
|
||||
public void onClick(double mouseX, double mouseY)
|
||||
{
|
||||
GuiNotification.this.mc.displayGuiScreen(null);
|
||||
query.finish();
|
||||
@@ -45,7 +45,7 @@ public class GuiNotification extends GuiScreen
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks)
|
||||
public void render(int mouseX, int mouseY, float partialTicks)
|
||||
{
|
||||
this.drawDefaultBackground();
|
||||
|
||||
@@ -70,7 +70,7 @@ public class GuiNotification extends GuiScreen
|
||||
}
|
||||
}
|
||||
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
super.render(mouseX, mouseY, partialTicks);
|
||||
}
|
||||
|
||||
protected final StartupQuery query;
|
||||
|
||||
@@ -198,8 +198,8 @@ public abstract class GuiScrollingList
|
||||
int viewHeight = this.bottom - this.top;
|
||||
int border = 4;
|
||||
|
||||
Minecraft minecraft = Minecraft.getMinecraft();
|
||||
if (minecraft.mouseHelper.func_198030_b())
|
||||
Minecraft minecraft = Minecraft.getInstance();
|
||||
if (minecraft.mouseHelper.isLeftDown())
|
||||
{
|
||||
if (this.initialMouseClickY == -1.0F)
|
||||
{
|
||||
@@ -261,11 +261,11 @@ public abstract class GuiScrollingList
|
||||
Tessellator tess = Tessellator.getInstance();
|
||||
BufferBuilder worldr = tess.getBuffer();
|
||||
|
||||
MainWindow window = client.field_195558_d;
|
||||
double scaleW = window.func_198107_o();
|
||||
double scaleH = window.func_198087_p();
|
||||
MainWindow window = client.mainWindow;
|
||||
double scaleW = window.getScaledWidth();
|
||||
double scaleH = window.getScaledHeight();
|
||||
GL11.glEnable(GL11.GL_SCISSOR_TEST);
|
||||
GL11.glScissor((int) (left * scaleW), (int) (window.func_198107_o() - (bottom * scaleH)),
|
||||
GL11.glScissor((int) (left * scaleW), (int) (window.getScaledWidth() - (bottom * scaleH)),
|
||||
(int) (listWidth * scaleW), (int) (viewHeight * scaleH));
|
||||
|
||||
if (this.client.world != null)
|
||||
@@ -276,8 +276,8 @@ public abstract class GuiScrollingList
|
||||
{
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.disableFog();
|
||||
this.client.renderEngine.bindTexture(Gui.OPTIONS_BACKGROUND);
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.client.textureManager.bindTexture(Gui.OPTIONS_BACKGROUND);
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
final float scale = 32.0F;
|
||||
worldr.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||
worldr.pos(this.left, this.bottom, 0.0D).tex(this.left / scale, (this.bottom + (int) this.scrollDistance) / scale).color(0x20, 0x20, 0x20, 0xFF).endVertex();
|
||||
@@ -305,7 +305,7 @@ public abstract class GuiScrollingList
|
||||
{
|
||||
int min = this.left;
|
||||
int max = entryRight;
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.disableTexture2D();
|
||||
worldr.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||
worldr.pos(min, slotTop + slotBuffer + 2, 0).tex(0, 1).color(0x80, 0x80, 0x80, 0xFF).endVertex();
|
||||
@@ -324,7 +324,7 @@ public abstract class GuiScrollingList
|
||||
}
|
||||
}
|
||||
|
||||
GlStateManager.disableDepth();
|
||||
GlStateManager.disableDepthTest();
|
||||
|
||||
int extraHeight = (this.getContentHeight() + border) - viewHeight;
|
||||
if (extraHeight > 0)
|
||||
@@ -366,7 +366,7 @@ public abstract class GuiScrollingList
|
||||
this.drawScreen(mouseX, mouseY);
|
||||
GlStateManager.enableTexture2D();
|
||||
GlStateManager.shadeModel(GL11.GL_FLAT);
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.enableAlphaTest();
|
||||
GlStateManager.disableBlend();
|
||||
GL11.glDisable(GL11.GL_SCISSOR_TEST);
|
||||
}
|
||||
|
||||
@@ -66,8 +66,8 @@ public class GuiSlotModList extends GuiListExtended<GuiSlotModList.ModEntry>
|
||||
}
|
||||
|
||||
void refreshList() {
|
||||
this.func_195086_c();
|
||||
parent.buildModList(this::func_195085_a, mod->new ModEntry(mod, this.parent));
|
||||
this.clearEntries();
|
||||
parent.buildModList(this::addEntry, mod->new ModEntry(mod, this.parent));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -92,21 +92,21 @@ public class GuiSlotModList extends GuiListExtended<GuiSlotModList.ModEntry>
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_194999_a(int p_194999_1_, int p_194999_2_, int p_194999_3_, int p_194999_4_, boolean p_194999_5_, float p_194999_6_)
|
||||
public void drawEntry(int entryWidth, int entryHeight, int mouseX, int mouseY, boolean p_194999_5_, float partialTicks)
|
||||
{
|
||||
int top = this.func_195001_c();
|
||||
int left = this.func_195002_d();
|
||||
int top = this.getY();
|
||||
int left = this.getX();
|
||||
String name = stripControlCodes(modInfo.getDisplayName());
|
||||
String version = stripControlCodes(modInfo.getVersion().getVersionString());
|
||||
VersionChecker.CheckResult vercheck = VersionChecker.getResult(modInfo);
|
||||
FontRenderer font = this.parent.getFontRenderer();
|
||||
font.func_211126_b(font.trimStringToWidth(name, listWidth),left + 3, top + 2, 0xFFFFFF);
|
||||
font.func_211126_b(font.trimStringToWidth(version, listWidth), left + 3 , top + 2 + font.FONT_HEIGHT, 0xCCCCCC);
|
||||
font.drawString(font.trimStringToWidth(name, listWidth),left + 3, top + 2, 0xFFFFFF);
|
||||
font.drawString(font.trimStringToWidth(version, listWidth), left + 3 , top + 2 + font.FONT_HEIGHT, 0xCCCCCC);
|
||||
if (vercheck.status.shouldDraw())
|
||||
{
|
||||
//TODO: Consider adding more icons for visualization
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(VERSION_CHECK_ICONS);
|
||||
GlStateManager.color(1, 1, 1, 1);
|
||||
Minecraft.getInstance().getTextureManager().bindTexture(VERSION_CHECK_ICONS);
|
||||
GlStateManager.color4f(1, 1, 1, 1);
|
||||
GlStateManager.pushMatrix();
|
||||
Gui.drawModalRectWithCustomSizedTexture(right - (height / 2 + 4), GuiSlotModList.this.top + (height / 2 - 4), vercheck.status.getSheetOffset() * 8, (vercheck.status.isAnimated() && ((System.currentTimeMillis() / 800 & 1)) == 1) ? 8 : 0, 8, 8, 64, 16);
|
||||
GlStateManager.popMatrix();
|
||||
@@ -116,7 +116,7 @@ public class GuiSlotModList extends GuiListExtended<GuiSlotModList.ModEntry>
|
||||
@Override
|
||||
public boolean mouseClicked(double p_mouseClicked_1_, double p_mouseClicked_3_, int p_mouseClicked_5_)
|
||||
{
|
||||
parent.selectModIndex(this.func_195003_b());
|
||||
parent.selectModIndex(this.getIndex());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public class GuiSortingProblem extends GuiScreen {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks)
|
||||
public void render(int mouseX, int mouseY, float partialTicks)
|
||||
{
|
||||
this.drawDefaultBackground();
|
||||
int offset = Math.max(85 - (failedList.getVisitedNodes().size() + 3) * 10, 10);
|
||||
|
||||
@@ -59,7 +59,7 @@ public class ClientRegistry
|
||||
|
||||
public static void registerKeyBinding(KeyBinding key)
|
||||
{
|
||||
Minecraft.getMinecraft().gameSettings.keyBindings = ArrayUtils.add(Minecraft.getMinecraft().gameSettings.keyBindings, key);
|
||||
Minecraft.getInstance().gameSettings.keyBindings = ArrayUtils.add(Minecraft.getInstance().gameSettings.keyBindings, key);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.common;
|
||||
import net.minecraftforge.fml.common.EnhancedRuntimeException.WrappedPrintStream;
|
||||
|
||||
|
||||
public class LoaderException extends EnhancedRuntimeException
|
||||
{
|
||||
|
||||
@@ -34,6 +34,8 @@ import net.minecraftforge.fml.client.gui.GuiModsMissing;
|
||||
import net.minecraftforge.fml.client.IDisplayableError;
|
||||
import net.minecraftforge.fml.common.versioning.ArtifactVersion;
|
||||
|
||||
import net.minecraftforge.fml.common.EnhancedRuntimeException.WrappedPrintStream;
|
||||
|
||||
public class MissingModsException extends EnhancedRuntimeException implements IDisplayableError
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -27,6 +27,8 @@ import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.fml.client.IDisplayableError;
|
||||
import net.minecraftforge.fml.client.gui.GuiMultipleModsErrored;
|
||||
|
||||
import net.minecraftforge.fml.common.EnhancedRuntimeException.WrappedPrintStream;
|
||||
|
||||
public class MultipleModsErrored extends EnhancedRuntimeException implements IDisplayableError
|
||||
{
|
||||
public final List<MissingModsException> missingModsExceptions;
|
||||
|
||||
@@ -159,4 +159,4 @@ public class ProgressManager
|
||||
this.timeEachStep = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -167,4 +167,4 @@ public class SoundEngineFixTransformer implements IClassTransformer
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
*/
|
||||
@@ -38,6 +38,6 @@ public class FMLServerStartingEvent extends ServerLifecycleEvent
|
||||
}
|
||||
|
||||
public CommandDispatcher<CommandSource> getCommandDispatcher() {
|
||||
return server.func_195571_aL().func_197054_a();
|
||||
return server.getCommandManager().getDispatcher();
|
||||
}
|
||||
}
|
||||
@@ -320,7 +320,7 @@ public class VillagerRegistry
|
||||
|
||||
public static void setRandomProfession(EntityVillager entity, Random rand)
|
||||
{
|
||||
entity.setProfession(INSTANCE.REGISTRY.getRandomObject(rand));
|
||||
entity.setProfession(INSTANCE.REGISTRY.getRandom(rand));
|
||||
}
|
||||
|
||||
|
||||
@@ -333,8 +333,8 @@ public class VillagerRegistry
|
||||
//Below this is INTERNAL USE ONLY DO NOT USE MODDERS
|
||||
public static void onSetProfession(EntityVillager entity, int network)
|
||||
{
|
||||
VillagerProfession prof = INSTANCE.REGISTRY.getObjectById(network);
|
||||
if (prof == null || INSTANCE.REGISTRY.getIDForObject(prof) != network)
|
||||
VillagerProfession prof = INSTANCE.REGISTRY.get(network);
|
||||
if (prof == null || INSTANCE.REGISTRY.getId(prof) != network)
|
||||
{
|
||||
throw new RuntimeException("Attempted to set villager profession to unregistered profession: " + network + " " + prof);
|
||||
}
|
||||
@@ -345,8 +345,8 @@ public class VillagerRegistry
|
||||
|
||||
public static void onSetProfession(EntityZombieVillager entity, int network)
|
||||
{
|
||||
VillagerProfession prof = INSTANCE.REGISTRY.getObjectById(network);
|
||||
if (prof == null && network != -1 || INSTANCE.REGISTRY.getIDForObject(prof) != network)
|
||||
VillagerProfession prof = INSTANCE.REGISTRY.get(network);
|
||||
if (prof == null && network != -1 || INSTANCE.REGISTRY.getId(prof) != network)
|
||||
{
|
||||
throw new RuntimeException("Attempted to set villager profession to unregistered profession: " + network + " " + prof);
|
||||
}
|
||||
@@ -355,8 +355,8 @@ public class VillagerRegistry
|
||||
entity.setForgeProfession(prof);
|
||||
}
|
||||
|
||||
@Deprecated public static VillagerProfession getById(int network){ return INSTANCE.REGISTRY.getObjectById(network); }
|
||||
@Deprecated public static int getId(@Nullable VillagerProfession prof){ return INSTANCE.REGISTRY.getIDForObject(prof); }
|
||||
@Deprecated public static VillagerProfession getById(int network){ return INSTANCE.REGISTRY.get(network); }
|
||||
@Deprecated public static int getId(@Nullable VillagerProfession prof){ return INSTANCE.REGISTRY.getId(prof); }
|
||||
|
||||
//TODO: Figure out a good generic system for this. Put on hold for Patches.
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@ import net.minecraftforge.fml.client.IDisplayableError;
|
||||
import net.minecraftforge.fml.client.gui.GuiSortingProblem;
|
||||
import net.minecraftforge.fml.common.EnhancedRuntimeException;
|
||||
|
||||
import net.minecraftforge.fml.common.EnhancedRuntimeException.WrappedPrintStream;
|
||||
|
||||
public class ModSortingException extends EnhancedRuntimeException implements IDisplayableError
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -33,6 +33,8 @@ import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
|
||||
/**
|
||||
* Construct a version range from a specification.
|
||||
*
|
||||
|
||||
@@ -61,4 +61,4 @@ public class DefaultModInfos
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -37,6 +37,8 @@ import java.util.function.BiFunction;
|
||||
|
||||
import static net.minecraftforge.fml.Logging.CORE;
|
||||
|
||||
import cpw.mods.modlauncher.api.ITransformationService.OptionResult;
|
||||
|
||||
public class FMLServiceProvider implements ITransformationService
|
||||
{
|
||||
|
||||
|
||||
@@ -79,4 +79,4 @@ public class ModFileParser {
|
||||
map(e -> new CoreModFile(e.getKey(), modFile.getLocator().findPath(modFile, e.getValue()),modFile)).
|
||||
collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,8 @@ import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import net.minecraftforge.fml.language.IModInfo.ModVersion;
|
||||
|
||||
public class ModInfo implements IModInfo
|
||||
{
|
||||
private static final DefaultArtifactVersion DEFAULT_VERSION = new DefaultArtifactVersion("1");
|
||||
|
||||
@@ -59,7 +59,7 @@ import java.util.function.Supplier;
|
||||
*
|
||||
* <p>The collected {@link net.minecraftforge.fml.network.NetworkRegistry.LoginPayload} are sent, one per tick, via
|
||||
* the {@link FMLLoginWrapper#wrapPacket(ResourceLocation, PacketBuffer)} mechanism to the incoming client connection. Each
|
||||
* packet is indexed via {@link net.minecraft.network.login.client.CPacketCustomPayloadLogin#field_209922_a}, which is
|
||||
* packet is indexed via {@link net.minecraft.network.login.client.CPacketCustomPayloadLogin#transaction}, which is
|
||||
* the only mechanism available for tracking request/response pairs.
|
||||
*
|
||||
* <p>Each packet sent from the server should be replied by the client, though not necessarily in sent order. The reply
|
||||
|
||||
@@ -60,8 +60,8 @@ public class FMLHandshakeMessages
|
||||
|
||||
S2CModList(NBTTagCompound nbtTagCompound)
|
||||
{
|
||||
this.modList = nbtTagCompound.getTagList("modlist", 8).stream().map(INBTBase::getString).collect(Collectors.toList());
|
||||
this.channels = nbtTagCompound.getTagList("channels", 10);
|
||||
this.modList = nbtTagCompound.getList("modlist", 8).stream().map(INBTBase::getString).collect(Collectors.toList());
|
||||
this.channels = nbtTagCompound.getList("channels", 10);
|
||||
}
|
||||
|
||||
public static S2CModList decode(PacketBuffer packetBuffer)
|
||||
|
||||
@@ -47,4 +47,4 @@ public class EventNetworkChannel
|
||||
{
|
||||
instance.unregisterObject(object);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -78,7 +78,7 @@ public class SimpleChannel
|
||||
|
||||
public <MSG> void sendToServer(MSG message)
|
||||
{
|
||||
sendTo(message, Minecraft.getMinecraft().getConnection().getNetworkManager(), NetworkDirection.PLAY_TO_SERVER);
|
||||
sendTo(message, Minecraft.getInstance().getConnection().getNetworkManager(), NetworkDirection.PLAY_TO_SERVER);
|
||||
}
|
||||
|
||||
public <MSG> void sendTo(MSG message, NetworkManager manager, NetworkDirection direction)
|
||||
|
||||
Reference in new issue
Block a user