Update FML to 304:

Client side only classes are properly annotated, and denied loading on server side
Added missing client side only ModLoader.getContainerGUI function
Guis work for FML mods now.
Fixed MLProp handeling of null info
Fix up dispenser handling, add in new params for the dispenser: breaks IDispenseHandler, sorry
This commit is contained in:
LexManos 2012-08-21 12:46:35 -07:00
parent d5610afdff
commit dd5543b90d
27 changed files with 162 additions and 160 deletions

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/client/ClientBrandRetriever.java --- ../src_base/minecraft/net/minecraft/client/ClientBrandRetriever.java
+++ ../src_work/minecraft/net/minecraft/client/ClientBrandRetriever.java +++ ../src_work/minecraft/net/minecraft/client/ClientBrandRetriever.java
@@ -4,6 +4,6 @@ @@ -8,6 +8,6 @@
{ {
public static String getClientModName() public static String getClientModName()
{ {

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/client/Minecraft.java --- ../src_base/minecraft/net/minecraft/client/Minecraft.java
+++ ../src_work/minecraft/net/minecraft/client/Minecraft.java +++ ../src_work/minecraft/net/minecraft/client/Minecraft.java
@@ -116,6 +116,7 @@ @@ -118,6 +118,7 @@
import net.minecraft.src.WorldInfo; import net.minecraft.src.WorldInfo;
import net.minecraft.src.WorldRenderer; import net.minecraft.src.WorldRenderer;
import net.minecraft.src.WorldSettings; import net.minecraft.src.WorldSettings;
@ -8,7 +8,7 @@
import org.lwjgl.LWJGLException; import org.lwjgl.LWJGLException;
import org.lwjgl.Sys; import org.lwjgl.Sys;
@@ -2209,80 +2210,12 @@ @@ -2212,80 +2213,12 @@
if (this.objectMouseOver != null) if (this.objectMouseOver != null)
{ {
boolean var1 = this.thePlayer.capabilities.isCreativeMode; boolean var1 = this.thePlayer.capabilities.isCreativeMode;

View file

@ -1,8 +1,8 @@
--- ../src_base/minecraft/net/minecraft/src/EffectRenderer.java --- ../src_base/minecraft/net/minecraft/src/EffectRenderer.java
+++ ../src_work/minecraft/net/minecraft/src/EffectRenderer.java +++ ../src_work/minecraft/net/minecraft/src/EffectRenderer.java
@@ -1,9 +1,19 @@ @@ -3,9 +3,19 @@
package net.minecraft.src; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import java.util.ArrayList; import java.util.ArrayList;
+import java.util.Hashtable; +import java.util.Hashtable;
+import java.util.Iterator; +import java.util.Iterator;
@ -18,9 +18,9 @@
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
+ +
@SideOnly(Side.CLIENT)
public class EffectRenderer public class EffectRenderer
{ @@ -18,6 +28,8 @@
@@ -15,6 +25,8 @@
/** RNG. */ /** RNG. */
private Random rand = new Random(); private Random rand = new Random();
@ -29,7 +29,7 @@
public EffectRenderer(World par1World, RenderEngine par2RenderEngine) public EffectRenderer(World par1World, RenderEngine par2RenderEngine)
{ {
if (par1World != null) if (par1World != null)
@@ -55,6 +67,17 @@ @@ -58,6 +70,17 @@
{ {
this.fxLayers[var1].remove(var2--); this.fxLayers[var1].remove(var2--);
} }
@ -47,7 +47,7 @@
} }
} }
} }
@@ -109,6 +132,26 @@ @@ -112,6 +135,26 @@
var10.draw(); var10.draw();
} }
} }
@ -74,7 +74,7 @@
} }
public void func_78872_b(Entity par1Entity, float par2) public void func_78872_b(Entity par1Entity, float par2)
@@ -141,6 +184,8 @@ @@ -144,6 +187,8 @@
{ {
this.fxLayers[var2].clear(); this.fxLayers[var2].clear();
} }
@ -83,7 +83,7 @@
} }
public void addBlockDestroyEffects(int par1, int par2, int par3, int par4, int par5) public void addBlockDestroyEffects(int par1, int par2, int par3, int par4, int par5)
@@ -160,7 +205,7 @@ @@ -163,7 +208,7 @@
double var13 = (double)par2 + ((double)var9 + 0.5D) / (double)var7; double var13 = (double)par2 + ((double)var9 + 0.5D) / (double)var7;
double var15 = (double)par3 + ((double)var10 + 0.5D) / (double)var7; double var15 = (double)par3 + ((double)var10 + 0.5D) / (double)var7;
int var17 = this.rand.nextInt(6); int var17 = this.rand.nextInt(6);
@ -92,7 +92,7 @@
} }
} }
} }
@@ -212,12 +257,51 @@ @@ -215,12 +260,51 @@
var8 = (double)par1 + var6.maxX + (double)var7; var8 = (double)par1 + var6.maxX + (double)var7;
} }

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/src/EntityRenderer.java --- ../src_base/minecraft/net/minecraft/src/EntityRenderer.java
+++ ../src_work/minecraft/net/minecraft/src/EntityRenderer.java +++ ../src_work/minecraft/net/minecraft/src/EntityRenderer.java
@@ -6,6 +6,11 @@ @@ -8,6 +8,11 @@
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
@ -12,7 +12,7 @@
import org.lwjgl.input.Mouse; import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.Display; import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
@@ -289,8 +294,15 @@ @@ -292,8 +297,15 @@
*/ */
private void updateFovModifierHand() private void updateFovModifierHand()
{ {
@ -30,7 +30,7 @@
this.fovModifierHandPrev = this.fovModifierHand; this.fovModifierHandPrev = this.fovModifierHand;
this.fovModifierHand += (this.fovMultiplierTemp - this.fovModifierHand) * 0.5F; this.fovModifierHand += (this.fovMultiplierTemp - this.fovModifierHand) * 0.5F;
} }
@@ -306,7 +318,7 @@ @@ -309,7 +321,7 @@
} }
else else
{ {
@ -39,7 +39,7 @@
float var4 = 70.0F; float var4 = 70.0F;
if (par2) if (par2)
@@ -394,11 +406,14 @@ @@ -397,11 +409,14 @@
if (!this.mc.gameSettings.debugCamEnable) if (!this.mc.gameSettings.debugCamEnable)
{ {
int var10 = this.mc.theWorld.getBlockId(MathHelper.floor_double(var2.posX), MathHelper.floor_double(var2.posY), MathHelper.floor_double(var2.posZ)); int var10 = this.mc.theWorld.getBlockId(MathHelper.floor_double(var2.posX), MathHelper.floor_double(var2.posY), MathHelper.floor_double(var2.posZ));
@ -59,7 +59,7 @@
GL11.glRotatef((float)(var12 * 90), 0.0F, 1.0F, 0.0F); GL11.glRotatef((float)(var12 * 90), 0.0F, 1.0F, 0.0F);
} }
@@ -1034,8 +1049,11 @@ @@ -1037,8 +1052,11 @@
var17 = (EntityPlayer)var4; var17 = (EntityPlayer)var4;
GL11.glDisable(GL11.GL_ALPHA_TEST); GL11.glDisable(GL11.GL_ALPHA_TEST);
this.mc.mcProfiler.endStartSection("outline"); this.mc.mcProfiler.endStartSection("outline");
@ -73,7 +73,7 @@
GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glEnable(GL11.GL_ALPHA_TEST);
} }
} }
@@ -1099,8 +1117,11 @@ @@ -1102,8 +1120,11 @@
var17 = (EntityPlayer)var4; var17 = (EntityPlayer)var4;
GL11.glDisable(GL11.GL_ALPHA_TEST); GL11.glDisable(GL11.GL_ALPHA_TEST);
this.mc.mcProfiler.endStartSection("outline"); this.mc.mcProfiler.endStartSection("outline");
@ -87,7 +87,7 @@
GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glEnable(GL11.GL_ALPHA_TEST);
} }
@@ -1124,6 +1145,9 @@ @@ -1127,6 +1148,9 @@
this.setupFog(1, par1); this.setupFog(1, par1);
GL11.glPopMatrix(); GL11.glPopMatrix();
} }

View file

@ -1,19 +1,20 @@
--- ../src_base/minecraft/net/minecraft/src/GuiAchievements.java --- ../src_base/minecraft/net/minecraft/src/GuiAchievements.java
+++ ../src_work/minecraft/net/minecraft/src/GuiAchievements.java +++ ../src_work/minecraft/net/minecraft/src/GuiAchievements.java
@@ -1,7 +1,12 @@ @@ -2,8 +2,13 @@
package net.minecraft.src;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
+
+import java.util.LinkedList; +import java.util.LinkedList;
+import java.util.List; +import java.util.List;
import java.util.Random; import java.util.Random;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
+import net.minecraftforge.common.AchievementPage; +import net.minecraftforge.common.AchievementPage;
+import net.minecraftforge.common.MinecraftForge;
+ +
import org.lwjgl.input.Mouse; import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12; import org.lwjgl.opengl.GL12;
@@ -41,6 +46,10 @@ @@ -44,6 +49,10 @@
/** Whether the Mouse Button is down or not */ /** Whether the Mouse Button is down or not */
private int isMouseButtonDown = 0; private int isMouseButtonDown = 0;
private StatFileWriter statFileWriter; private StatFileWriter statFileWriter;
@ -24,7 +25,7 @@
public GuiAchievements(StatFileWriter par1StatFileWriter) public GuiAchievements(StatFileWriter par1StatFileWriter)
{ {
@@ -49,6 +58,14 @@ @@ -52,6 +61,14 @@
short var3 = 141; short var3 = 141;
this.field_74117_m = this.guiMapX = this.field_74124_q = (double)(AchievementList.openInventory.displayColumn * 24 - var2 / 2 - 12); this.field_74117_m = this.guiMapX = this.field_74124_q = (double)(AchievementList.openInventory.displayColumn * 24 - var2 / 2 - 12);
this.field_74115_n = this.guiMapY = this.field_74123_r = (double)(AchievementList.openInventory.displayRow * 24 - var3 / 2); this.field_74115_n = this.guiMapY = this.field_74123_r = (double)(AchievementList.openInventory.displayRow * 24 - var3 / 2);
@ -39,7 +40,7 @@
} }
/** /**
@@ -58,6 +75,7 @@ @@ -61,6 +78,7 @@
{ {
this.controlList.clear(); this.controlList.clear();
this.controlList.add(new GuiSmallButton(1, this.width / 2 + 24, this.height / 2 + 74, 80, 20, StatCollector.translateToLocal("gui.done"))); this.controlList.add(new GuiSmallButton(1, this.width / 2 + 24, this.height / 2 + 74, 80, 20, StatCollector.translateToLocal("gui.done")));
@ -47,7 +48,7 @@
} }
/** /**
@@ -69,6 +87,16 @@ @@ -72,6 +90,16 @@
{ {
this.mc.displayGuiScreen((GuiScreen)null); this.mc.displayGuiScreen((GuiScreen)null);
this.mc.setIngameFocus(); this.mc.setIngameFocus();
@ -64,7 +65,7 @@
} }
super.actionPerformed(par1GuiButton); super.actionPerformed(par1GuiButton);
@@ -293,11 +321,12 @@ @@ -296,11 +324,12 @@
int var27; int var27;
int var30; int var30;
@ -82,7 +83,7 @@
{ {
var24 = var33.displayColumn * 24 - var4 + 11 + var10; var24 = var33.displayColumn * 24 - var4 + 11 + var10;
var25 = var33.displayRow * 24 - var5 + 11 + var11; var25 = var33.displayRow * 24 - var5 + 11 + var11;
@@ -331,9 +360,9 @@ @@ -334,9 +363,9 @@
int var42; int var42;
int var41; int var41;

View file

@ -5,9 +5,9 @@
+ +
+import net.minecraftforge.client.GuiControlsScrollPanel; +import net.minecraftforge.client.GuiControlsScrollPanel;
public class GuiControls extends GuiScreen import cpw.mods.fml.common.Side;
{ import cpw.mods.fml.common.asm.SideOnly;
@@ -16,6 +18,8 @@ @@ -20,6 +22,8 @@
/** The ID of the button that has been pressed. */ /** The ID of the button that has been pressed. */
private int buttonId = -1; private int buttonId = -1;
@ -16,7 +16,7 @@
public GuiControls(GuiScreen par1GuiScreen, GameSettings par2GameSettings) public GuiControls(GuiScreen par1GuiScreen, GameSettings par2GameSettings)
{ {
this.parentScreen = par1GuiScreen; this.parentScreen = par1GuiScreen;
@@ -32,15 +36,12 @@ @@ -36,15 +40,12 @@
*/ */
public void initGui() public void initGui()
{ {
@ -35,7 +35,7 @@
this.screenTitle = var1.translateKey("controls.title"); this.screenTitle = var1.translateKey("controls.title");
} }
@@ -49,19 +50,9 @@ @@ -53,19 +54,9 @@
*/ */
protected void actionPerformed(GuiButton par1GuiButton) protected void actionPerformed(GuiButton par1GuiButton)
{ {
@ -55,7 +55,7 @@
} }
} }
@@ -70,17 +61,7 @@ @@ -74,17 +65,7 @@
*/ */
protected void mouseClicked(int par1, int par2, int par3) protected void mouseClicked(int par1, int par2, int par3)
{ {
@ -74,7 +74,7 @@
} }
/** /**
@@ -88,14 +69,7 @@ @@ -92,14 +73,7 @@
*/ */
protected void keyTyped(char par1, int par2) protected void keyTyped(char par1, int par2)
{ {
@ -90,7 +90,7 @@
{ {
super.keyTyped(par1, par2); super.keyTyped(par1, par2);
} }
@@ -107,47 +81,8 @@ @@ -111,47 +85,8 @@
public void drawScreen(int par1, int par2, float par3) public void drawScreen(int par1, int par2, float par3)
{ {
this.drawDefaultBackground(); this.drawDefaultBackground();

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/src/GuiIngame.java --- ../src_base/minecraft/net/minecraft/src/GuiIngame.java
+++ ../src_work/minecraft/net/minecraft/src/GuiIngame.java +++ ../src_work/minecraft/net/minecraft/src/GuiIngame.java
@@ -4,6 +4,8 @@ @@ -6,6 +6,8 @@
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
@ -9,7 +9,7 @@
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12; import org.lwjgl.opengl.GL12;
@@ -136,7 +138,7 @@ @@ -139,7 +141,7 @@
var47 = var7 - 39; var47 = var7 - 39;
var22 = var47 - 10; var22 = var47 - 10;

View file

@ -1,14 +1,14 @@
--- ../src_base/minecraft/net/minecraft/src/IntegratedServer.java --- ../src_base/minecraft/net/minecraft/src/IntegratedServer.java
+++ ../src_work/minecraft/net/minecraft/src/IntegratedServer.java +++ ../src_work/minecraft/net/minecraft/src/IntegratedServer.java
@@ -6,6 +6,7 @@ @@ -8,6 +8,7 @@
import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.FMLCommonHandler;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.server.MinecraftServer; import net.minecraft.server.MinecraftServer;
+import net.minecraftforge.common.DimensionManager; +import net.minecraftforge.common.DimensionManager;
@SideOnly(Side.CLIENT)
public class IntegratedServer extends MinecraftServer public class IntegratedServer extends MinecraftServer
{ @@ -46,44 +47,20 @@
@@ -43,44 +44,20 @@
protected void loadAllDimensions(String par1Str, String par2Str, long par3, WorldType par5WorldType) protected void loadAllDimensions(String par1Str, String par2Str, long par3, WorldType par5WorldType)
{ {
this.convertMapIfNeeded(par1Str); this.convertMapIfNeeded(par1Str);
@ -63,7 +63,7 @@
this.setDifficultyForAllDimensions(this.getDifficulty()); this.setDifficultyForAllDimensions(this.getDifficulty());
this.initialWorldChunkLoad(); this.initialWorldChunkLoad();
} }
@@ -101,6 +78,7 @@ @@ -104,6 +81,7 @@
this.loadAllDimensions(this.getFolderName(), this.getWorldName(), this.field_71350_m.getSeed(), this.field_71350_m.getTerrainType()); this.loadAllDimensions(this.getFolderName(), this.getWorldName(), this.field_71350_m.getSeed(), this.field_71350_m.getTerrainType());
this.setMOTD(this.getServerOwner() + " - " + this.theWorldServer[0].getWorldInfo().getWorldName()); this.setMOTD(this.getServerOwner() + " - " + this.theWorldServer[0].getWorldInfo().getWorldName());
FMLCommonHandler.instance().handleServerStarting(this); FMLCommonHandler.instance().handleServerStarting(this);

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/src/ItemRenderer.java --- ../src_base/minecraft/net/minecraft/src/ItemRenderer.java
+++ ../src_work/minecraft/net/minecraft/src/ItemRenderer.java +++ ../src_work/minecraft/net/minecraft/src/ItemRenderer.java
@@ -3,6 +3,12 @@ @@ -5,6 +5,12 @@
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12; import org.lwjgl.opengl.GL12;
@ -11,9 +11,9 @@
+import static net.minecraftforge.client.IItemRenderer.ItemRenderType.*; +import static net.minecraftforge.client.IItemRenderer.ItemRenderType.*;
+import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.*; +import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.*;
@SideOnly(Side.CLIENT)
public class ItemRenderer public class ItemRenderer
{ @@ -38,23 +44,21 @@
@@ -35,23 +41,21 @@
public void renderItem(EntityLiving par1EntityLiving, ItemStack par2ItemStack, int par3) public void renderItem(EntityLiving par1EntityLiving, ItemStack par2ItemStack, int par3)
{ {
GL11.glPushMatrix(); GL11.glPushMatrix();
@ -49,7 +49,7 @@
Tessellator var5 = Tessellator.instance; Tessellator var5 = Tessellator.instance;
int var6 = par1EntityLiving.getItemIcon(par2ItemStack, par3); int var6 = par1EntityLiving.getItemIcon(par2ItemStack, par3);
@@ -250,8 +254,9 @@ @@ -253,8 +257,9 @@
Render var24; Render var24;
RenderPlayer var26; RenderPlayer var26;
@ -61,7 +61,7 @@
GL11.glPushMatrix(); GL11.glPushMatrix();
var7 = 0.8F; var7 = 0.8F;
var20 = var3.getSwingProgress(par1); var20 = var3.getSwingProgress(par1);
@@ -317,8 +322,15 @@ @@ -320,8 +325,15 @@
var28.addVertexWithUV((double)(128 + var27), (double)(0 - var27), 0.0D, 1.0D, 0.0D); var28.addVertexWithUV((double)(128 + var27), (double)(0 - var27), 0.0D, 1.0D, 0.0D);
var28.addVertexWithUV((double)(0 - var27), (double)(0 - var27), 0.0D, 0.0D, 0.0D); var28.addVertexWithUV((double)(0 - var27), (double)(0 - var27), 0.0D, 0.0D, 0.0D);
var28.draw(); var28.draw();
@ -79,7 +79,7 @@
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
else if (var17 != null) else if (var17 != null)
@@ -419,12 +431,15 @@ @@ -422,12 +434,15 @@
if (var17.getItem().requiresMultipleRenderPasses()) if (var17.getItem().requiresMultipleRenderPasses())
{ {
this.renderItem(var3, var17, 0); this.renderItem(var3, var17, 0);

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/src/NetClientHandler.java --- ../src_base/minecraft/net/minecraft/src/NetClientHandler.java
+++ ../src_work/minecraft/net/minecraft/src/NetClientHandler.java +++ ../src_work/minecraft/net/minecraft/src/NetClientHandler.java
@@ -18,6 +18,11 @@ @@ -22,6 +22,11 @@
import java.util.Random; import java.util.Random;
import javax.crypto.SecretKey; import javax.crypto.SecretKey;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
@ -11,8 +11,8 @@
+ +
import org.lwjgl.input.Keyboard; import org.lwjgl.input.Keyboard;
import cpw.mods.fml.common.LoaderException; @SideOnly(Side.CLIENT)
@@ -589,7 +594,7 @@ @@ -591,7 +596,7 @@
public void handleKickDisconnect(Packet255KickDisconnect par1Packet255KickDisconnect) public void handleKickDisconnect(Packet255KickDisconnect par1Packet255KickDisconnect)
{ {
@ -21,7 +21,7 @@
this.field_72554_f = true; this.field_72554_f = true;
this.mc.loadWorld((WorldClient)null); this.mc.loadWorld((WorldClient)null);
this.mc.displayGuiScreen(new GuiDisconnected("disconnect.disconnected", "disconnect.genericReason", new Object[] {par1Packet255KickDisconnect.reason})); this.mc.displayGuiScreen(new GuiDisconnected("disconnect.disconnected", "disconnect.genericReason", new Object[] {par1Packet255KickDisconnect.reason}));
@@ -653,7 +658,11 @@ @@ -655,7 +660,11 @@
public void handleChat(Packet3Chat par1Packet3Chat) public void handleChat(Packet3Chat par1Packet3Chat)
{ {
@ -34,7 +34,7 @@
} }
public void handleAnimation(Packet18Animation par1Packet18Animation) public void handleAnimation(Packet18Animation par1Packet18Animation)
@@ -1008,6 +1017,19 @@ @@ -1010,6 +1019,19 @@
{ {
((TileEntityMobSpawner)var2).readFromNBT(par1Packet132TileEntityData.customParam1); ((TileEntityMobSpawner)var2).readFromNBT(par1Packet132TileEntityData.customParam1);
} }

View file

@ -1,16 +1,16 @@
--- ../src_base/minecraft/net/minecraft/src/PlayerControllerMP.java --- ../src_base/minecraft/net/minecraft/src/PlayerControllerMP.java
+++ ../src_work/minecraft/net/minecraft/src/PlayerControllerMP.java +++ ../src_work/minecraft/net/minecraft/src/PlayerControllerMP.java
@@ -1,6 +1,9 @@ @@ -3,6 +3,9 @@
package net.minecraft.src; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
+import net.minecraftforge.common.ForgeHooks; +import net.minecraftforge.common.ForgeHooks;
+import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent; +import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent;
@SideOnly(Side.CLIENT)
public class PlayerControllerMP public class PlayerControllerMP
{ @@ -98,6 +101,11 @@
@@ -95,6 +98,11 @@
*/ */
public boolean onPlayerDestroyBlock(int par1, int par2, int par3, int par4) public boolean onPlayerDestroyBlock(int par1, int par2, int par3, int par4)
{ {
@ -22,7 +22,7 @@
if (this.currentGameType.isAdventure()) if (this.currentGameType.isAdventure())
{ {
return false; return false;
@@ -112,7 +120,7 @@ @@ -115,7 +123,7 @@
{ {
var5.playAuxSFX(2001, par1, par2, par3, var6.blockID + (var5.getBlockMetadata(par1, par2, par3) << 12)); var5.playAuxSFX(2001, par1, par2, par3, var6.blockID + (var5.getBlockMetadata(par1, par2, par3) << 12));
int var7 = var5.getBlockMetadata(par1, par2, par3); int var7 = var5.getBlockMetadata(par1, par2, par3);
@ -31,7 +31,7 @@
if (var8) if (var8)
{ {
@@ -295,6 +303,12 @@ @@ -298,6 +306,12 @@
float var11 = (float)par8Vec3.zCoord - (float)par6; float var11 = (float)par8Vec3.zCoord - (float)par6;
boolean var12 = false; boolean var12 = false;
int var13 = par2World.getBlockId(par4, par5, par6); int var13 = par2World.getBlockId(par4, par5, par6);
@ -44,7 +44,7 @@
if (var13 > 0 && Block.blocksList[var13].onBlockActivated(par2World, par4, par5, par6, par1EntityPlayer, par7, var9, var10, var11)) if (var13 > 0 && Block.blocksList[var13].onBlockActivated(par2World, par4, par5, par6, par1EntityPlayer, par7, var9, var10, var11))
{ {
@@ -332,7 +346,15 @@ @@ -335,7 +349,15 @@
} }
else else
{ {
@ -61,7 +61,7 @@
} }
} }
@@ -354,9 +376,10 @@ @@ -357,9 +379,10 @@
{ {
par1EntityPlayer.inventory.mainInventory[par1EntityPlayer.inventory.currentItem] = var5; par1EntityPlayer.inventory.mainInventory[par1EntityPlayer.inventory.currentItem] = var5;

View file

@ -1,17 +1,17 @@
--- ../src_base/minecraft/net/minecraft/src/RenderBiped.java --- ../src_base/minecraft/net/minecraft/src/RenderBiped.java
+++ ../src_work/minecraft/net/minecraft/src/RenderBiped.java +++ ../src_work/minecraft/net/minecraft/src/RenderBiped.java
@@ -1,6 +1,10 @@ @@ -3,6 +3,10 @@
package net.minecraft.src; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
+import static net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED; +import static net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED;
+import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.BLOCK_3D; +import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.BLOCK_3D;
+import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.client.IItemRenderer;
+import net.minecraftforge.client.MinecraftForgeClient; +import net.minecraftforge.client.MinecraftForgeClient;
@SideOnly(Side.CLIENT)
public class RenderBiped extends RenderLiving public class RenderBiped extends RenderLiving
{ @@ -35,7 +39,10 @@
@@ -32,7 +36,10 @@
GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F); GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F);
float var4; float var4;
@ -23,7 +23,7 @@
{ {
var4 = 0.5F; var4 = 0.5F;
GL11.glTranslatef(0.0F, 0.1875F, -0.3125F); GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
@@ -72,7 +79,10 @@ @@ -75,7 +82,10 @@
if (var3.getItem().requiresMultipleRenderPasses()) if (var3.getItem().requiresMultipleRenderPasses())
{ {

View file

@ -1,15 +1,15 @@
--- ../src_base/minecraft/net/minecraft/src/RenderBlocks.java --- ../src_base/minecraft/net/minecraft/src/RenderBlocks.java
+++ ../src_work/minecraft/net/minecraft/src/RenderBlocks.java +++ ../src_work/minecraft/net/minecraft/src/RenderBlocks.java
@@ -1,6 +1,8 @@ @@ -3,6 +3,8 @@
package net.minecraft.src; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
+import static net.minecraftforge.common.ForgeDirection.*; +import static net.minecraftforge.common.ForgeDirection.*;
+ +
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12; import org.lwjgl.opengl.GL12;
@@ -489,9 +491,8 @@ @@ -492,9 +494,8 @@
public boolean renderBlockBed(Block par1Block, int par2, int par3, int par4) public boolean renderBlockBed(Block par1Block, int par2, int par3, int par4)
{ {
Tessellator var5 = Tessellator.instance; Tessellator var5 = Tessellator.instance;
@ -21,7 +21,7 @@
float var9 = 0.5F; float var9 = 0.5F;
float var10 = 1.0F; float var10 = 1.0F;
float var11 = 0.8F; float var11 = 0.8F;
@@ -1956,7 +1957,7 @@ @@ -1959,7 +1960,7 @@
double var30; double var30;
double var32; double var32;
@ -30,7 +30,7 @@
{ {
float var36 = 0.2F; float var36 = 0.2F;
float var19 = 0.0625F; float var19 = 0.0625F;
@@ -1976,7 +1977,7 @@ @@ -1979,7 +1980,7 @@
var9 = var20; var9 = var20;
} }
@ -39,7 +39,7 @@
{ {
var5.addVertexWithUV((double)((float)par2 + var36), (double)((float)par3 + var17 + var19), (double)(par4 + 1), var11, var13); var5.addVertexWithUV((double)((float)par2 + var36), (double)((float)par3 + var17 + var19), (double)(par4 + 1), var11, var13);
var5.addVertexWithUV((double)(par2 + 0), (double)((float)(par3 + 0) + var19), (double)(par4 + 1), var11, var15); var5.addVertexWithUV((double)(par2 + 0), (double)((float)(par3 + 0) + var19), (double)(par4 + 1), var11, var15);
@@ -1988,7 +1989,7 @@ @@ -1991,7 +1992,7 @@
var5.addVertexWithUV((double)((float)par2 + var36), (double)((float)par3 + var17 + var19), (double)(par4 + 1), var11, var13); var5.addVertexWithUV((double)((float)par2 + var36), (double)((float)par3 + var17 + var19), (double)(par4 + 1), var11, var13);
} }
@ -48,7 +48,7 @@
{ {
var5.addVertexWithUV((double)((float)(par2 + 1) - var36), (double)((float)par3 + var17 + var19), (double)(par4 + 0), var9, var13); var5.addVertexWithUV((double)((float)(par2 + 1) - var36), (double)((float)par3 + var17 + var19), (double)(par4 + 0), var9, var13);
var5.addVertexWithUV((double)(par2 + 1 - 0), (double)((float)(par3 + 0) + var19), (double)(par4 + 0), var9, var15); var5.addVertexWithUV((double)(par2 + 1 - 0), (double)((float)(par3 + 0) + var19), (double)(par4 + 0), var9, var15);
@@ -2000,7 +2001,7 @@ @@ -2003,7 +2004,7 @@
var5.addVertexWithUV((double)((float)(par2 + 1) - var36), (double)((float)par3 + var17 + var19), (double)(par4 + 0), var9, var13); var5.addVertexWithUV((double)((float)(par2 + 1) - var36), (double)((float)par3 + var17 + var19), (double)(par4 + 0), var9, var13);
} }
@ -57,7 +57,7 @@
{ {
var5.addVertexWithUV((double)(par2 + 0), (double)((float)par3 + var17 + var19), (double)((float)par4 + var36), var11, var13); var5.addVertexWithUV((double)(par2 + 0), (double)((float)par3 + var17 + var19), (double)((float)par4 + var36), var11, var13);
var5.addVertexWithUV((double)(par2 + 0), (double)((float)(par3 + 0) + var19), (double)(par4 + 0), var11, var15); var5.addVertexWithUV((double)(par2 + 0), (double)((float)(par3 + 0) + var19), (double)(par4 + 0), var11, var15);
@@ -2012,7 +2013,7 @@ @@ -2015,7 +2016,7 @@
var5.addVertexWithUV((double)(par2 + 0), (double)((float)par3 + var17 + var19), (double)((float)par4 + var36), var11, var13); var5.addVertexWithUV((double)(par2 + 0), (double)((float)par3 + var17 + var19), (double)((float)par4 + var36), var11, var13);
} }
@ -66,7 +66,7 @@
{ {
var5.addVertexWithUV((double)(par2 + 1), (double)((float)par3 + var17 + var19), (double)((float)(par4 + 1) - var36), var9, var13); var5.addVertexWithUV((double)(par2 + 1), (double)((float)par3 + var17 + var19), (double)((float)(par4 + 1) - var36), var9, var13);
var5.addVertexWithUV((double)(par2 + 1), (double)((float)(par3 + 0) + var19), (double)(par4 + 1 - 0), var9, var15); var5.addVertexWithUV((double)(par2 + 1), (double)((float)(par3 + 0) + var19), (double)(par4 + 1 - 0), var9, var15);
@@ -2024,7 +2025,7 @@ @@ -2027,7 +2028,7 @@
var5.addVertexWithUV((double)(par2 + 1), (double)((float)par3 + var17 + var19), (double)((float)(par4 + 1) - var36), var9, var13); var5.addVertexWithUV((double)(par2 + 1), (double)((float)par3 + var17 + var19), (double)((float)(par4 + 1) - var36), var9, var13);
} }
@ -75,7 +75,7 @@
{ {
var20 = (double)par2 + 0.5D + 0.5D; var20 = (double)par2 + 0.5D + 0.5D;
var22 = (double)par2 + 0.5D - 0.5D; var22 = (double)par2 + 0.5D - 0.5D;
@@ -4208,7 +4209,7 @@ @@ -4211,7 +4212,7 @@
var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 2); var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 2);
this.renderEastFace(par1Block, (double)par2, (double)par3, (double)par4, var27); this.renderEastFace(par1Block, (double)par2, (double)par3, (double)par4, var27);
@ -84,7 +84,7 @@
{ {
this.colorRedTopLeft *= par5; this.colorRedTopLeft *= par5;
this.colorRedBottomLeft *= par5; this.colorRedBottomLeft *= par5;
@@ -4331,7 +4332,7 @@ @@ -4334,7 +4335,7 @@
var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 3); var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 3);
this.renderWestFace(par1Block, (double)par2, (double)par3, (double)par4, par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 3)); this.renderWestFace(par1Block, (double)par2, (double)par3, (double)par4, par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 3));
@ -93,7 +93,7 @@
{ {
this.colorRedTopLeft *= par5; this.colorRedTopLeft *= par5;
this.colorRedBottomLeft *= par5; this.colorRedBottomLeft *= par5;
@@ -4454,7 +4455,7 @@ @@ -4457,7 +4458,7 @@
var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 4); var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 4);
this.renderNorthFace(par1Block, (double)par2, (double)par3, (double)par4, var27); this.renderNorthFace(par1Block, (double)par2, (double)par3, (double)par4, var27);
@ -102,7 +102,7 @@
{ {
this.colorRedTopLeft *= par5; this.colorRedTopLeft *= par5;
this.colorRedBottomLeft *= par5; this.colorRedBottomLeft *= par5;
@@ -4577,7 +4578,7 @@ @@ -4580,7 +4581,7 @@
var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 5); var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 5);
this.renderSouthFace(par1Block, (double)par2, (double)par3, (double)par4, var27); this.renderSouthFace(par1Block, (double)par2, (double)par3, (double)par4, var27);
@ -111,7 +111,7 @@
{ {
this.colorRedTopLeft *= par5; this.colorRedTopLeft *= par5;
this.colorRedBottomLeft *= par5; this.colorRedBottomLeft *= par5;
@@ -4689,7 +4690,7 @@ @@ -4692,7 +4693,7 @@
var28 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 2); var28 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 2);
this.renderEastFace(par1Block, (double)par2, (double)par3, (double)par4, var28); this.renderEastFace(par1Block, (double)par2, (double)par3, (double)par4, var28);
@ -120,7 +120,7 @@
{ {
var8.setColorOpaque_F(var18 * par5, var21 * par6, var24 * par7); var8.setColorOpaque_F(var18 * par5, var21 * par6, var24 * par7);
this.renderEastFace(par1Block, (double)par2, (double)par3, (double)par4, 38); this.renderEastFace(par1Block, (double)par2, (double)par3, (double)par4, 38);
@@ -4705,7 +4706,7 @@ @@ -4708,7 +4709,7 @@
var28 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 3); var28 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 3);
this.renderWestFace(par1Block, (double)par2, (double)par3, (double)par4, var28); this.renderWestFace(par1Block, (double)par2, (double)par3, (double)par4, var28);
@ -129,7 +129,7 @@
{ {
var8.setColorOpaque_F(var18 * par5, var21 * par6, var24 * par7); var8.setColorOpaque_F(var18 * par5, var21 * par6, var24 * par7);
this.renderWestFace(par1Block, (double)par2, (double)par3, (double)par4, 38); this.renderWestFace(par1Block, (double)par2, (double)par3, (double)par4, 38);
@@ -4721,7 +4722,7 @@ @@ -4724,7 +4725,7 @@
var28 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 4); var28 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 4);
this.renderNorthFace(par1Block, (double)par2, (double)par3, (double)par4, var28); this.renderNorthFace(par1Block, (double)par2, (double)par3, (double)par4, var28);
@ -138,7 +138,7 @@
{ {
var8.setColorOpaque_F(var19 * par5, var22 * par6, var25 * par7); var8.setColorOpaque_F(var19 * par5, var22 * par6, var25 * par7);
this.renderNorthFace(par1Block, (double)par2, (double)par3, (double)par4, 38); this.renderNorthFace(par1Block, (double)par2, (double)par3, (double)par4, 38);
@@ -4737,7 +4738,7 @@ @@ -4740,7 +4741,7 @@
var28 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 5); var28 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 5);
this.renderSouthFace(par1Block, (double)par2, (double)par3, (double)par4, var28); this.renderSouthFace(par1Block, (double)par2, (double)par3, (double)par4, var28);

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/src/RenderEngine.java --- ../src_base/minecraft/net/minecraft/src/RenderEngine.java
+++ ../src_work/minecraft/net/minecraft/src/RenderEngine.java +++ ../src_work/minecraft/net/minecraft/src/RenderEngine.java
@@ -18,6 +18,9 @@ @@ -20,6 +20,9 @@
import java.util.logging.Logger; import java.util.logging.Logger;
import javax.imageio.ImageIO; import javax.imageio.ImageIO;
@ -10,7 +10,7 @@
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import cpw.mods.fml.client.TextureFXManager; import cpw.mods.fml.client.TextureFXManager;
@@ -164,6 +167,7 @@ @@ -167,6 +170,7 @@
try try
{ {
@ -18,7 +18,7 @@
this.singleIntBuffer.clear(); this.singleIntBuffer.clear();
GLAllocation.generateTextureNames(this.singleIntBuffer); GLAllocation.generateTextureNames(this.singleIntBuffer);
int var3 = this.singleIntBuffer.get(0); int var3 = this.singleIntBuffer.get(0);
@@ -207,6 +211,7 @@ @@ -210,6 +214,7 @@
} }
this.textureMap.put(par1Str, Integer.valueOf(var3)); this.textureMap.put(par1Str, Integer.valueOf(var3));

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/src/RenderGlobal.java --- ../src_base/minecraft/net/minecraft/src/RenderGlobal.java
+++ ../src_work/minecraft/net/minecraft/src/RenderGlobal.java +++ ../src_work/minecraft/net/minecraft/src/RenderGlobal.java
@@ -9,7 +9,10 @@ @@ -11,7 +11,10 @@
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Random; import java.util.Random;
@ -11,7 +11,7 @@
import org.lwjgl.opengl.ARBOcclusionQuery; import org.lwjgl.opengl.ARBOcclusionQuery;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
@@ -867,6 +870,12 @@ @@ -870,6 +873,12 @@
*/ */
public void renderSky(float par1) public void renderSky(float par1)
{ {
@ -24,7 +24,7 @@
if (this.mc.theWorld.provider.worldType == 1) if (this.mc.theWorld.provider.worldType == 1)
{ {
GL11.glDisable(GL11.GL_FOG); GL11.glDisable(GL11.GL_FOG);
@@ -1787,6 +1796,7 @@ @@ -1790,6 +1799,7 @@
double var17 = this.mc.renderViewEntity.posY - par4; double var17 = this.mc.renderViewEntity.posY - par4;
double var19 = this.mc.renderViewEntity.posZ - par6; double var19 = this.mc.renderViewEntity.posZ - par6;
EntityFX var21 = null; EntityFX var21 = null;
@ -32,7 +32,7 @@
if (par1Str.equals("hugeexplosion")) if (par1Str.equals("hugeexplosion"))
{ {
@@ -1906,6 +1916,7 @@ @@ -1909,6 +1919,7 @@
else if (par1Str.equals("snowballpoof")) else if (par1Str.equals("snowballpoof"))
{ {
var21 = new EntityBreakingFX(this.theWorld, par2, par4, par6, Item.snowball); var21 = new EntityBreakingFX(this.theWorld, par2, par4, par6, Item.snowball);
@ -40,7 +40,7 @@
} }
else if (par1Str.equals("dripWater")) else if (par1Str.equals("dripWater"))
{ {
@@ -1922,6 +1933,7 @@ @@ -1925,6 +1936,7 @@
else if (par1Str.equals("slime")) else if (par1Str.equals("slime"))
{ {
var21 = new EntityBreakingFX(this.theWorld, par2, par4, par6, Item.slimeBall); var21 = new EntityBreakingFX(this.theWorld, par2, par4, par6, Item.slimeBall);
@ -48,7 +48,7 @@
} }
else if (par1Str.equals("heart")) else if (par1Str.equals("heart"))
{ {
@@ -1935,17 +1947,19 @@ @@ -1938,17 +1950,19 @@
{ {
var24 = Integer.parseInt(par1Str.substring(par1Str.indexOf("_") + 1)); var24 = Integer.parseInt(par1Str.substring(par1Str.indexOf("_") + 1));
var21 = new EntityBreakingFX(this.theWorld, par2, par4, par6, par8, par10, par12, Item.itemsList[var24]); var21 = new EntityBreakingFX(this.theWorld, par2, par4, par6, par8, par10, par12, Item.itemsList[var24]);

View file

@ -1,7 +1,7 @@
--- ../src_base/minecraft/net/minecraft/src/RenderItem.java --- ../src_base/minecraft/net/minecraft/src/RenderItem.java
+++ ../src_work/minecraft/net/minecraft/src/RenderItem.java +++ ../src_work/minecraft/net/minecraft/src/RenderItem.java
@@ -2,6 +2,8 @@ @@ -4,6 +4,8 @@
import cpw.mods.fml.common.asm.SideOnly;
import java.util.Random; import java.util.Random;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
+import net.minecraftforge.client.ForgeHooksClient; +import net.minecraftforge.client.ForgeHooksClient;
@ -9,7 +9,7 @@
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12; import org.lwjgl.opengl.GL12;
@@ -51,18 +53,21 @@ @@ -54,18 +56,21 @@
GL11.glTranslatef((float)par2, (float)par4 + var11, (float)par6); GL11.glTranslatef((float)par2, (float)par4 + var11, (float)par6);
GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glEnable(GL12.GL_RESCALE_NORMAL);
@ -35,7 +35,7 @@
if (var16 == 1 || var16 == 19 || var16 == 12 || var16 == 2) if (var16 == 1 || var16 == 19 || var16 == 12 || var16 == 2)
{ {
@@ -84,7 +89,7 @@ @@ -87,7 +92,7 @@
} }
var24 = 1.0F; var24 = 1.0F;
@ -44,7 +44,7 @@
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
} }
@@ -96,10 +101,11 @@ @@ -99,10 +104,11 @@
if (var10.getItem().requiresMultipleRenderPasses()) if (var10.getItem().requiresMultipleRenderPasses())
{ {
GL11.glScalef(0.5F, 0.5F, 0.5F); GL11.glScalef(0.5F, 0.5F, 0.5F);
@ -59,7 +59,7 @@
var16 = var10.getItem().getIconFromDamageForRenderPass(var10.getItemDamage(), var15); var16 = var10.getItem().getIconFromDamageForRenderPass(var10.getItemDamage(), var15);
var17 = 1.0F; var17 = 1.0F;
@@ -120,14 +126,7 @@ @@ -123,14 +129,7 @@
GL11.glScalef(0.5F, 0.5F, 0.5F); GL11.glScalef(0.5F, 0.5F, 0.5F);
var15 = var10.getIconIndex(); var15 = var10.getIconIndex();
@ -75,7 +75,7 @@
if (this.field_77024_a) if (this.field_77024_a)
{ {
@@ -189,9 +188,9 @@ @@ -192,9 +191,9 @@
float var12; float var12;
float var16; float var16;
@ -88,7 +88,7 @@
Block var15 = Block.blocksList[par3]; Block var15 = Block.blocksList[par3];
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef((float)(par6 - 2), (float)(par7 + 3), -3.0F + this.zLevel); GL11.glTranslatef((float)(par6 - 2), (float)(par7 + 3), -3.0F + this.zLevel);
@@ -223,9 +222,9 @@ @@ -226,9 +225,9 @@
if (Item.itemsList[par3].requiresMultipleRenderPasses()) if (Item.itemsList[par3].requiresMultipleRenderPasses())
{ {
GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_LIGHTING);
@ -101,7 +101,7 @@
{ {
var9 = Item.itemsList[par3].getIconFromDamageForRenderPass(par4, var8); var9 = Item.itemsList[par3].getIconFromDamageForRenderPass(par4, var8);
int var10 = Item.itemsList[par3].getColorFromDamage(par4, var8); int var10 = Item.itemsList[par3].getColorFromDamage(par4, var8);
@@ -247,14 +246,7 @@ @@ -250,14 +249,7 @@
{ {
GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_LIGHTING);
@ -117,7 +117,7 @@
var8 = Item.itemsList[par3].getColorFromDamage(par4, 0); var8 = Item.itemsList[par3].getColorFromDamage(par4, 0);
float var14 = (float)(var8 >> 16 & 255) / 255.0F; float var14 = (float)(var8 >> 16 & 255) / 255.0F;
@@ -281,7 +273,10 @@ @@ -284,7 +276,10 @@
{ {
if (par3ItemStack != null) if (par3ItemStack != null)
{ {

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/src/RenderManager.java --- ../src_base/minecraft/net/minecraft/src/RenderManager.java
+++ ../src_work/minecraft/net/minecraft/src/RenderManager.java +++ ../src_work/minecraft/net/minecraft/src/RenderManager.java
@@ -124,12 +124,14 @@ @@ -127,12 +127,14 @@
if (par4EntityLiving.isPlayerSleeping()) if (par4EntityLiving.isPlayerSleeping())
{ {

View file

@ -1,8 +1,8 @@
--- ../src_base/minecraft/net/minecraft/src/RenderPlayer.java --- ../src_base/minecraft/net/minecraft/src/RenderPlayer.java
+++ ../src_work/minecraft/net/minecraft/src/RenderPlayer.java +++ ../src_work/minecraft/net/minecraft/src/RenderPlayer.java
@@ -1,6 +1,12 @@ @@ -3,6 +3,12 @@
package net.minecraft.src; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
+import static net.minecraftforge.client.IItemRenderer.ItemRenderType.*; +import static net.minecraftforge.client.IItemRenderer.ItemRenderType.*;
+import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.*; +import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.*;
@ -12,8 +12,8 @@
+ +
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
public class RenderPlayer extends RenderLiving @SideOnly(Side.CLIENT)
@@ -32,7 +38,7 @@ @@ -35,7 +41,7 @@
if (var5 instanceof ItemArmor) if (var5 instanceof ItemArmor)
{ {
ItemArmor var6 = (ItemArmor)var5; ItemArmor var6 = (ItemArmor)var5;
@ -22,7 +22,7 @@
ModelBiped var7 = par2 == 2 ? this.modelArmor : this.modelArmorChestplate; ModelBiped var7 = par2 == 2 ? this.modelArmor : this.modelArmorChestplate;
var7.bipedHead.showModel = par2 == 0; var7.bipedHead.showModel = par2 == 0;
var7.bipedHeadwear.showModel = par2 == 0; var7.bipedHeadwear.showModel = par2 == 0;
@@ -156,12 +162,14 @@ @@ -159,12 +165,14 @@
super.renderEquippedItems(par1EntityPlayer, par2); super.renderEquippedItems(par1EntityPlayer, par2);
ItemStack var3 = par1EntityPlayer.inventory.armorItemInSlot(3); ItemStack var3 = par1EntityPlayer.inventory.armorItemInSlot(3);
@ -40,7 +40,7 @@
{ {
float var4 = 0.625F; float var4 = 0.625F;
GL11.glTranslatef(0.0F, -0.25F, 0.0F); GL11.glTranslatef(0.0F, -0.25F, 0.0F);
@@ -263,7 +271,10 @@ @@ -266,7 +274,10 @@
var20 = var21.getItemUseAction(); var20 = var21.getItemUseAction();
} }
@ -52,7 +52,7 @@
{ {
var6 = 0.5F; var6 = 0.5F;
GL11.glTranslatef(0.0F, 0.1875F, -0.3125F); GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
@@ -316,7 +327,7 @@ @@ -319,7 +330,7 @@
if (var21.getItem().requiresMultipleRenderPasses()) if (var21.getItem().requiresMultipleRenderPasses())
{ {

View file

@ -8,9 +8,9 @@
+import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.*; +import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.*;
+import net.minecraftforge.client.MinecraftForgeClient; +import net.minecraftforge.client.MinecraftForgeClient;
import org.lwjgl.opengl.GL11; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
@@ -19,12 +24,15 @@ @@ -22,12 +27,15 @@
super.renderEquippedItems(par1EntitySnowman, par2); super.renderEquippedItems(par1EntitySnowman, par2);
ItemStack var3 = new ItemStack(Block.pumpkin, 1); ItemStack var3 = new ItemStack(Block.pumpkin, 1);

View file

@ -1,7 +1,7 @@
--- ../src_base/minecraft/net/minecraft/src/SoundManager.java --- ../src_base/minecraft/net/minecraft/src/SoundManager.java
+++ ../src_work/minecraft/net/minecraft/src/SoundManager.java +++ ../src_work/minecraft/net/minecraft/src/SoundManager.java
@@ -2,6 +2,21 @@ @@ -4,6 +4,21 @@
import cpw.mods.fml.common.asm.SideOnly;
import java.io.File; import java.io.File;
import java.util.Random; import java.util.Random;
+ +
@ -22,7 +22,7 @@
import paulscode.sound.SoundSystem; import paulscode.sound.SoundSystem;
import paulscode.sound.SoundSystemConfig; import paulscode.sound.SoundSystemConfig;
import paulscode.sound.codecs.CodecJOrbis; import paulscode.sound.codecs.CodecJOrbis;
@@ -37,9 +52,11 @@ @@ -40,9 +55,11 @@
private Random rand = new Random(); private Random rand = new Random();
private int ticksBeforeMusic; private int ticksBeforeMusic;
@ -35,7 +35,7 @@
} }
/** /**
@@ -54,6 +71,8 @@ @@ -57,6 +74,8 @@
{ {
this.tryToSetLibraryAndCodecs(); this.tryToSetLibraryAndCodecs();
} }
@ -44,7 +44,7 @@
} }
/** /**
@@ -73,6 +92,8 @@ @@ -76,6 +95,8 @@
SoundSystemConfig.setCodec("ogg", CodecJOrbis.class); SoundSystemConfig.setCodec("ogg", CodecJOrbis.class);
SoundSystemConfig.setCodec("mus", CodecMus.class); SoundSystemConfig.setCodec("mus", CodecMus.class);
SoundSystemConfig.setCodec("wav", CodecWav.class); SoundSystemConfig.setCodec("wav", CodecWav.class);
@ -53,7 +53,7 @@
sndSystem = new SoundSystem(); sndSystem = new SoundSystem();
this.options.soundVolume = var1; this.options.soundVolume = var1;
this.options.musicVolume = var2; this.options.musicVolume = var2;
@@ -161,10 +182,12 @@ @@ -164,10 +185,12 @@
} }
SoundPoolEntry var1 = this.soundPoolMusic.getRandomSound(); SoundPoolEntry var1 = this.soundPoolMusic.getRandomSound();
@ -67,7 +67,7 @@
sndSystem.backgroundMusic("BgMusic", var1.soundUrl, var1.soundName, false); sndSystem.backgroundMusic("BgMusic", var1.soundUrl, var1.soundName, false);
sndSystem.setVolume("BgMusic", this.options.musicVolume); sndSystem.setVolume("BgMusic", this.options.musicVolume);
sndSystem.play("BgMusic"); sndSystem.play("BgMusic");
@@ -214,6 +237,7 @@ @@ -217,6 +240,7 @@
if (par1Str != null) if (par1Str != null)
{ {
SoundPoolEntry var8 = this.soundPoolStreaming.getRandomSoundFromSoundPool(par1Str); SoundPoolEntry var8 = this.soundPoolStreaming.getRandomSoundFromSoundPool(par1Str);
@ -75,7 +75,7 @@
if (var8 != null && par5 > 0.0F) if (var8 != null && par5 > 0.0F)
{ {
@@ -225,6 +249,7 @@ @@ -228,6 +252,7 @@
float var9 = 16.0F; float var9 = 16.0F;
sndSystem.newStreamingSource(true, var7, var8.soundUrl, var8.soundName, false, par2, par3, par4, 2, var9 * 4.0F); sndSystem.newStreamingSource(true, var7, var8.soundUrl, var8.soundName, false, par2, par3, par4, 2, var9 * 4.0F);
sndSystem.setVolume(var7, 0.5F * this.options.soundVolume); sndSystem.setVolume(var7, 0.5F * this.options.soundVolume);
@ -83,7 +83,7 @@
sndSystem.play(var7); sndSystem.play(var7);
} }
} }
@@ -239,6 +264,7 @@ @@ -242,6 +267,7 @@
if (loaded && this.options.soundVolume != 0.0F) if (loaded && this.options.soundVolume != 0.0F)
{ {
SoundPoolEntry var7 = this.soundPoolSounds.getRandomSoundFromSoundPool(par1Str); SoundPoolEntry var7 = this.soundPoolSounds.getRandomSoundFromSoundPool(par1Str);
@ -91,7 +91,7 @@
if (var7 != null && par5 > 0.0F) if (var7 != null && par5 > 0.0F)
{ {
@@ -260,6 +286,7 @@ @@ -263,6 +289,7 @@
} }
sndSystem.setVolume(var8, par5 * this.options.soundVolume); sndSystem.setVolume(var8, par5 * this.options.soundVolume);
@ -99,7 +99,7 @@
sndSystem.play(var8); sndSystem.play(var8);
} }
} }
@@ -274,6 +301,7 @@ @@ -277,6 +304,7 @@
if (loaded && this.options.soundVolume != 0.0F) if (loaded && this.options.soundVolume != 0.0F)
{ {
SoundPoolEntry var4 = this.soundPoolSounds.getRandomSoundFromSoundPool(par1Str); SoundPoolEntry var4 = this.soundPoolSounds.getRandomSoundFromSoundPool(par1Str);
@ -107,7 +107,7 @@
if (var4 != null) if (var4 != null)
{ {
@@ -289,6 +317,7 @@ @@ -292,6 +320,7 @@
par2 *= 0.25F; par2 *= 0.25F;
sndSystem.setPitch(var5, par3); sndSystem.setPitch(var5, par3);
sndSystem.setVolume(var5, par2 * this.options.soundVolume); sndSystem.setVolume(var5, par2 * this.options.soundVolume);

View file

@ -1,14 +1,14 @@
--- ../src_base/minecraft/net/minecraft/src/SoundPool.java --- ../src_base/minecraft/net/minecraft/src/SoundPool.java
+++ ../src_work/minecraft/net/minecraft/src/SoundPool.java +++ ../src_work/minecraft/net/minecraft/src/SoundPool.java
@@ -2,6 +2,7 @@ @@ -4,6 +4,7 @@
import cpw.mods.fml.common.asm.SideOnly;
import java.io.File; import java.io.File;
import java.net.MalformedURLException; import java.net.MalformedURLException;
+import java.net.URL; +import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@@ -33,6 +34,26 @@ @@ -36,6 +37,26 @@
*/ */
public SoundPoolEntry addSound(String par1Str, File par2File) public SoundPoolEntry addSound(String par1Str, File par2File)
{ {
@ -35,7 +35,7 @@
try try
{ {
String var3 = par1Str; String var3 = par1Str;
@@ -53,13 +74,13 @@ @@ -56,13 +77,13 @@
this.nameToSoundPoolEntriesMapping.put(par1Str, new ArrayList()); this.nameToSoundPoolEntriesMapping.put(par1Str, new ArrayList());
} }

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/src/Tessellator.java --- ../src_base/minecraft/net/minecraft/src/Tessellator.java
+++ ../src_work/minecraft/net/minecraft/src/Tessellator.java +++ ../src_work/minecraft/net/minecraft/src/Tessellator.java
@@ -5,12 +5,20 @@ @@ -7,6 +7,8 @@
import java.nio.FloatBuffer; import java.nio.FloatBuffer;
import java.nio.IntBuffer; import java.nio.IntBuffer;
import java.nio.ShortBuffer; import java.nio.ShortBuffer;
@ -9,7 +9,8 @@
import org.lwjgl.opengl.ARBVertexBufferObject; import org.lwjgl.opengl.ARBVertexBufferObject;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GLContext; import org.lwjgl.opengl.GLContext;
@@ -14,6 +16,12 @@
@SideOnly(Side.CLIENT)
public class Tessellator public class Tessellator
{ {
+ private static int nativeBufferSize = 0x200000; + private static int nativeBufferSize = 0x200000;
@ -21,7 +22,7 @@
/** /**
* Boolean used to check whether quads should be drawn as four triangles. Initialized to true and never changed. * Boolean used to check whether quads should be drawn as four triangles. Initialized to true and never changed.
*/ */
@@ -22,16 +30,16 @@ @@ -25,16 +33,16 @@
private static boolean tryVBO = false; private static boolean tryVBO = false;
/** The byte buffer used for GL allocation. */ /** The byte buffer used for GL allocation. */
@ -42,7 +43,7 @@
/** Raw integer array. */ /** Raw integer array. */
private int[] rawBuffer; private int[] rawBuffer;
@@ -107,10 +115,10 @@ @@ -110,10 +118,10 @@
public boolean isDrawing = false; public boolean isDrawing = false;
/** Whether we are currently using VBO or not. */ /** Whether we are currently using VBO or not. */
@ -55,7 +56,7 @@
/** /**
* The index of the last VBO used. This is used in round-robin fashion, sequentially, through the vboCount vertex * The index of the last VBO used. This is used in round-robin fashion, sequentially, through the vboCount vertex
@@ -119,25 +127,28 @@ @@ -122,25 +130,28 @@
private int vboIndex = 0; private int vboIndex = 0;
/** Number of vertex buffer objects allocated for use. */ /** Number of vertex buffer objects allocated for use. */
@ -97,7 +98,7 @@
} }
} }
@@ -154,12 +165,23 @@ @@ -157,12 +168,23 @@
{ {
this.isDrawing = false; this.isDrawing = false;
@ -125,7 +126,7 @@
if (this.useVBO) if (this.useVBO)
{ {
@@ -245,11 +267,11 @@ @@ -248,11 +270,11 @@
if (this.drawMode == 7 && convertQuadsToTriangles) if (this.drawMode == 7 && convertQuadsToTriangles)
{ {
@ -139,7 +140,7 @@
} }
GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY); GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY);
@@ -275,6 +297,12 @@ @@ -278,6 +300,12 @@
{ {
GL11.glDisableClientState(GL11.GL_NORMAL_ARRAY); GL11.glDisableClientState(GL11.GL_NORMAL_ARRAY);
} }
@ -152,7 +153,7 @@
} }
int var1 = this.rawBufferIndex * 4; int var1 = this.rawBufferIndex * 4;
@@ -439,6 +467,19 @@ @@ -442,6 +470,19 @@
*/ */
public void addVertex(double par1, double par3, double par5) public void addVertex(double par1, double par3, double par5)
{ {
@ -172,7 +173,7 @@
++this.addedVertices; ++this.addedVertices;
if (this.drawMode == 7 && convertQuadsToTriangles && this.addedVertices % 4 == 0) if (this.drawMode == 7 && convertQuadsToTriangles && this.addedVertices % 4 == 0)
@@ -497,12 +538,6 @@ @@ -500,12 +541,6 @@
this.rawBuffer[this.rawBufferIndex + 2] = Float.floatToRawIntBits((float)(par5 + this.zOffset)); this.rawBuffer[this.rawBufferIndex + 2] = Float.floatToRawIntBits((float)(par5 + this.zOffset));
this.rawBufferIndex += 8; this.rawBufferIndex += 8;
++this.vertexCount; ++this.vertexCount;

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/src/ThreadDownloadResources.java --- ../src_base/minecraft/net/minecraft/src/ThreadDownloadResources.java
+++ ../src_work/minecraft/net/minecraft/src/ThreadDownloadResources.java +++ ../src_work/minecraft/net/minecraft/src/ThreadDownloadResources.java
@@ -6,6 +6,8 @@ @@ -8,6 +8,8 @@
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.net.URL; import java.net.URL;
@ -9,7 +9,7 @@
import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilderFactory;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
@@ -45,7 +47,11 @@ @@ -48,7 +50,11 @@
URL var1 = new URL("http://s3.amazonaws.com/MinecraftResources/"); URL var1 = new URL("http://s3.amazonaws.com/MinecraftResources/");
DocumentBuilderFactory var2 = DocumentBuilderFactory.newInstance(); DocumentBuilderFactory var2 = DocumentBuilderFactory.newInstance();
DocumentBuilder var3 = var2.newDocumentBuilder(); DocumentBuilder var3 = var2.newDocumentBuilder();
@ -22,7 +22,7 @@
NodeList var5 = var4.getElementsByTagName("Contents"); NodeList var5 = var4.getElementsByTagName("Contents");
for (int var6 = 0; var6 < 2; ++var6) for (int var6 = 0; var6 < 2; ++var6)
@@ -169,7 +175,11 @@ @@ -172,7 +178,11 @@
private void downloadResource(URL par1URL, File par2File, long par3) throws IOException private void downloadResource(URL par1URL, File par2File, long par3) throws IOException
{ {
byte[] var5 = new byte[4096]; byte[] var5 = new byte[4096];

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/src/TileEntityRenderer.java --- ../src_base/minecraft/net/minecraft/src/TileEntityRenderer.java
+++ ../src_work/minecraft/net/minecraft/src/TileEntityRenderer.java +++ ../src_work/minecraft/net/minecraft/src/TileEntityRenderer.java
@@ -123,7 +123,9 @@ @@ -126,7 +126,9 @@
*/ */
public void renderTileEntity(TileEntity par1TileEntity, float par2) public void renderTileEntity(TileEntity par1TileEntity, float par2)
{ {

View file

@ -1,15 +1,15 @@
--- ../src_base/minecraft/net/minecraft/src/TileEntityRendererPiston.java --- ../src_base/minecraft/net/minecraft/src/TileEntityRendererPiston.java
+++ ../src_work/minecraft/net/minecraft/src/TileEntityRendererPiston.java +++ ../src_work/minecraft/net/minecraft/src/TileEntityRendererPiston.java
@@ -1,6 +1,8 @@ @@ -3,6 +3,8 @@
package net.minecraft.src; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
+import net.minecraftforge.client.ForgeHooksClient; +import net.minecraftforge.client.ForgeHooksClient;
+ +
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
public class TileEntityRendererPiston extends TileEntitySpecialRenderer @SideOnly(Side.CLIENT)
@@ -30,6 +32,7 @@ @@ -33,6 +35,7 @@
GL11.glShadeModel(GL11.GL_FLAT); GL11.glShadeModel(GL11.GL_FLAT);
} }
@ -17,7 +17,7 @@
var10.startDrawingQuads(); var10.startDrawingQuads();
var10.setTranslation((double)((float)par2 - (float)par1TileEntityPiston.xCoord + par1TileEntityPiston.getOffsetX(par8)), (double)((float)par4 - (float)par1TileEntityPiston.yCoord + par1TileEntityPiston.getOffsetY(par8)), (double)((float)par6 - (float)par1TileEntityPiston.zCoord + par1TileEntityPiston.getOffsetZ(par8))); var10.setTranslation((double)((float)par2 - (float)par1TileEntityPiston.xCoord + par1TileEntityPiston.getOffsetX(par8)), (double)((float)par4 - (float)par1TileEntityPiston.yCoord + par1TileEntityPiston.getOffsetY(par8)), (double)((float)par6 - (float)par1TileEntityPiston.zCoord + par1TileEntityPiston.getOffsetZ(par8)));
var10.setColorOpaque(1, 1, 1); var10.setColorOpaque(1, 1, 1);
@@ -53,6 +56,7 @@ @@ -56,6 +59,7 @@
var10.setTranslation(0.0D, 0.0D, 0.0D); var10.setTranslation(0.0D, 0.0D, 0.0D);
var10.draw(); var10.draw();

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/src/WorldRenderer.java --- ../src_base/minecraft/net/minecraft/src/WorldRenderer.java
+++ ../src_work/minecraft/net/minecraft/src/WorldRenderer.java +++ ../src_work/minecraft/net/minecraft/src/WorldRenderer.java
@@ -3,6 +3,9 @@ @@ -5,6 +5,9 @@
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
@ -9,8 +9,8 @@
+ +
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
public class WorldRenderer @SideOnly(Side.CLIENT)
@@ -10,7 +13,7 @@ @@ -13,7 +16,7 @@
/** Reference to the World object. */ /** Reference to the World object. */
public World worldObj; public World worldObj;
private int glRenderList = -1; private int glRenderList = -1;
@ -19,7 +19,7 @@
public static int chunksUpdated = 0; public static int chunksUpdated = 0;
public int posX; public int posX;
public int posY; public int posY;
@@ -179,15 +182,16 @@ @@ -182,15 +185,16 @@
GL11.glTranslatef(-8.0F, -8.0F, -8.0F); GL11.glTranslatef(-8.0F, -8.0F, -8.0F);
GL11.glScalef(var19, var19, var19); GL11.glScalef(var19, var19, var19);
GL11.glTranslatef(8.0F, 8.0F, 8.0F); GL11.glTranslatef(8.0F, 8.0F, 8.0F);
@ -39,7 +39,7 @@
{ {
TileEntity var20 = var9.getBlockTileEntity(var17, var15, var16); TileEntity var20 = var9.getBlockTileEntity(var17, var15, var16);
@@ -199,14 +203,17 @@ @@ -202,14 +206,17 @@
int var24 = var23.getRenderBlockPass(); int var24 = var23.getRenderBlockPass();
@ -60,7 +60,7 @@
} }
} }
} }
@@ -215,10 +222,11 @@ @@ -218,10 +225,11 @@
if (var14) if (var14)
{ {