mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-21 04:32:15 +00:00
Some import renames and compile error fixes, killed ~800.
This commit is contained in:
1 parent
1f80eb17df
commit
ac7c4d2f6c
90 files changed
+454
-441
No files matched your search
@@ -34,14 +34,14 @@ import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.client.gui.GuiUtilRenderComponents;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.texture.DynamicTexture;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.client.resources.IResourcePack;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.TextComponentString;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StringUtils;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
@@ -451,7 +451,7 @@ public class GuiModList extends GuiScreen
|
||||
{
|
||||
private ResourceLocation logoPath;
|
||||
private Dimension logoDims;
|
||||
private List<IChatComponent> lines = null;
|
||||
private List<ITextComponent> lines = null;
|
||||
|
||||
public Info(int width, List<String> lines, ResourceLocation logoPath, Dimension logoDims)
|
||||
{
|
||||
@@ -475,9 +475,9 @@ public class GuiModList extends GuiScreen
|
||||
@Override protected void drawBackground() {}
|
||||
@Override protected void drawSlot(int slotIdx, int entryRight, int slotTop, int slotBuffer, Tessellator tess) { }
|
||||
|
||||
private List<IChatComponent> resizeContent(List<String> lines)
|
||||
private List<ITextComponent> resizeContent(List<String> lines)
|
||||
{
|
||||
List<IChatComponent> ret = new ArrayList<IChatComponent>();
|
||||
List<ITextComponent> ret = new ArrayList<ITextComponent>();
|
||||
for (String line : lines)
|
||||
{
|
||||
if (line == null)
|
||||
@@ -486,7 +486,7 @@ public class GuiModList extends GuiScreen
|
||||
continue;
|
||||
}
|
||||
|
||||
IChatComponent chat = ForgeHooks.newChatWithLinks(line, false);
|
||||
ITextComponent chat = ForgeHooks.newChatWithLinks(line, false);
|
||||
ret.addAll(GuiUtilRenderComponents.func_178908_a(chat, this.listWidth-8, GuiModList.this.fontRendererObj, false, true));
|
||||
}
|
||||
return ret;
|
||||
@@ -524,7 +524,7 @@ public class GuiModList extends GuiScreen
|
||||
{
|
||||
GlStateManager.enableBlend();
|
||||
GuiModList.this.mc.renderEngine.bindTexture(logoPath);
|
||||
WorldRenderer wr = tess.getWorldRenderer();
|
||||
VertexBuffer wr = tess.getVertexBuffer();
|
||||
int offset = (this.left + this.listWidth/2) - (logoDims.width / 2);
|
||||
wr.begin(7, DefaultVertexFormats.POSITION_TEX);
|
||||
wr.pos(offset, top + logoDims.height, zLevel).tex(0, 1).endVertex();
|
||||
@@ -536,7 +536,7 @@ public class GuiModList extends GuiScreen
|
||||
top += logoDims.height + 10;
|
||||
}
|
||||
|
||||
for (IChatComponent line : lines)
|
||||
for (ITextComponent line : lines)
|
||||
{
|
||||
if (line != null)
|
||||
{
|
||||
@@ -563,14 +563,14 @@ public class GuiModList extends GuiScreen
|
||||
if (lineIdx >= lines.size())
|
||||
return;
|
||||
|
||||
IChatComponent line = lines.get(lineIdx);
|
||||
ITextComponent line = lines.get(lineIdx);
|
||||
if (line != null)
|
||||
{
|
||||
int k = -4;
|
||||
for (IChatComponent part : (Iterable<IChatComponent>)line) {
|
||||
if (!(part instanceof ChatComponentText))
|
||||
for (ITextComponent part : (Iterable<ITextComponent>)line) {
|
||||
if (!(part instanceof TextComponentString))
|
||||
continue;
|
||||
k += GuiModList.this.fontRendererObj.getStringWidth(((ChatComponentText)part).getChatComponentText_TextValue());
|
||||
k += GuiModList.this.fontRendererObj.getStringWidth(((TextComponentString)part).getTextComponentString_TextValue());
|
||||
if (k >= x)
|
||||
{
|
||||
GuiModList.this.handleComponentClick(part);
|
||||
|
||||
@@ -20,7 +20,7 @@ import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
@@ -263,7 +263,7 @@ public abstract class GuiScrollingList
|
||||
this.applyScrollLimits();
|
||||
|
||||
Tessellator tess = Tessellator.getInstance();
|
||||
WorldRenderer worldr = tess.getWorldRenderer();
|
||||
VertexBuffer worldr = tess.getVertexBuffer();
|
||||
|
||||
ScaledResolution res = new ScaledResolution(client);
|
||||
double scaleW = client.displayWidth / res.getScaledWidth_double();
|
||||
@@ -390,12 +390,12 @@ public abstract class GuiScrollingList
|
||||
GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
GlStateManager.shadeModel(GL11.GL_SMOOTH);
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_COLOR);
|
||||
worldrenderer.pos(right, top, 0.0D).color(r1, g1, b1, a1).endVertex();
|
||||
worldrenderer.pos(left, top, 0.0D).color(r1, g1, b1, a1).endVertex();
|
||||
worldrenderer.pos(left, bottom, 0.0D).color(r2, g2, b2, a2).endVertex();
|
||||
worldrenderer.pos(right, bottom, 0.0D).color(r2, g2, b2, a2).endVertex();
|
||||
VertexBuffer VertexBuffer = tessellator.getVertexBuffer();
|
||||
VertexBuffer.begin(7, DefaultVertexFormats.POSITION_COLOR);
|
||||
VertexBuffer.pos(right, top, 0.0D).color(r1, g1, b1, a1).endVertex();
|
||||
VertexBuffer.pos(left, top, 0.0D).color(r1, g1, b1, a1).endVertex();
|
||||
VertexBuffer.pos(left, bottom, 0.0D).color(r2, g2, b2, a2).endVertex();
|
||||
VertexBuffer.pos(right, bottom, 0.0D).color(r2, g2, b2, a2).endVertex();
|
||||
tessellator.draw();
|
||||
GlStateManager.shadeModel(GL11.GL_FLAT);
|
||||
GlStateManager.disableBlend();
|
||||
|
||||
@@ -23,7 +23,7 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.TextComponentString;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.client.config.GuiConfigEntries.IConfigEntry;
|
||||
import net.minecraftforge.fml.client.event.ConfigChangedEvent;
|
||||
@@ -247,7 +247,7 @@ public class GuiConfig extends GuiScreen
|
||||
{
|
||||
flag = false;
|
||||
mc.displayGuiScreen(new GuiMessageDialog(parentScreen, "fml.configgui.gameRestartTitle",
|
||||
new ChatComponentText(I18n.format("fml.configgui.gameRestartRequired")), "fml.configgui.confirmRestartMessage"));
|
||||
new TextComponentString(I18n.format("fml.configgui.gameRestartRequired")), "fml.configgui.confirmRestartMessage"));
|
||||
}
|
||||
|
||||
if (this.parentScreen instanceof GuiConfig)
|
||||
|
||||
@@ -4,13 +4,13 @@ import net.minecraft.client.gui.GuiDisconnected;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
public class GuiMessageDialog extends GuiDisconnected
|
||||
{
|
||||
protected String buttonText;
|
||||
|
||||
public GuiMessageDialog(GuiScreen nextScreen, String title, IChatComponent message, String buttonText)
|
||||
public GuiMessageDialog(GuiScreen nextScreen, String title, ITextComponent message, String buttonText)
|
||||
{
|
||||
super(nextScreen, title, message);
|
||||
this.buttonText = buttonText;
|
||||
|
||||
@@ -15,7 +15,7 @@ package net.minecraftforge.fml.client.config;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@@ -184,7 +184,7 @@ public class GuiUtils
|
||||
float uScale = 1f / 0x100;
|
||||
float vScale = 1f / 0x100;
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
WorldRenderer wr = tessellator.getWorldRenderer();
|
||||
VertexBuffer wr = tessellator.getVertexBuffer();
|
||||
wr.begin(7, DefaultVertexFormats.POSITION_TEX);
|
||||
wr.pos(x , y + height, zLevel).tex( u * uScale, ((v + height) * vScale)).endVertex();
|
||||
wr.pos(x + width, y + height, zLevel).tex((u + width) * uScale, ((v + height) * vScale)).endVertex();
|
||||
|
||||
Reference in new issue
Block a user