Update patches for repackage.

This commit is contained in:
LexManos 2012-12-12 23:45:13 -08:00
parent 45a3f771bd
commit ad42901b7e
163 changed files with 1733 additions and 1455 deletions

View file

@ -1,19 +0,0 @@
--- ../src_base/common/net/minecraft/src/BlockDoor.java
+++ ../src_work/common/net/minecraft/src/BlockDoor.java
@@ -3,6 +3,7 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import java.util.Random;
+import static net.minecraftforge.common.ForgeDirection.*;
public class BlockDoor extends Block
{
@@ -260,7 +261,7 @@
{
if (this.blockMaterial == Material.iron)
{
- return true;
+ return false; //Allow items to interact with the door
}
else
{

View file

@ -1,10 +0,0 @@
--- ../src_base/common/net/minecraft/src/CallableSuspiciousClasses.java
+++ ../src_work/common/net/minecraft/src/CallableSuspiciousClasses.java
@@ -130,6 +130,6 @@
public Object call()
{
- return "FML is installed";
+ return "FML and Forge are installed";
}
}

View file

@ -1,28 +1,51 @@
--- ../src_base/common/net/minecraft/src/Block.java --- ../src_base/minecraft/net/minecraft/block/Block.java
+++ ../src_work/common/net/minecraft/src/Block.java +++ ../src_work/minecraft/net/minecraft/block/Block.java
@@ -2,11 +2,21 @@ @@ -2,13 +2,16 @@
import cpw.mods.fml.common.Side; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly; import cpw.mods.fml.common.asm.SideOnly;
+
+import java.util.ArrayList; +import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
import net.minecraft.block.material.Material;
+import net.minecraft.client.particle.EffectRenderer;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.EnumCreatureType;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.item.EntityXPOrb;
import net.minecraft.entity.player.EntityPlayer;
@@ -24,17 +27,27 @@
import net.minecraft.item.ItemSlab;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.StatList;
+import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntitySign;
import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.StatCollector;
import net.minecraft.util.Vec3;
import net.minecraft.world.Explosion;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
+import net.minecraft.world.WorldProviderEnd;
+
+import net.minecraftforge.common.*; +import net.minecraftforge.common.*;
+import static net.minecraftforge.common.ForgeDirection.*; +import static net.minecraftforge.common.ForgeDirection.*;
+
public class Block public class Block
{ {
+ protected static int[] blockFireSpreadSpeed = new int[4096]; + protected static int[] blockFireSpreadSpeed = new int[4096];
+ protected static int[] blockFlammability = new int[4096]; + protected static int[] blockFlammability = new int[4096];
+ protected String currentTexture = "/terrain.png"; + protected String currentTexture = "/terrain.png";
+ public boolean isDefaultTexture = true; + public boolean isDefaultTexture = true;
+
/** /**
* used as foreach item, if item.tab = current tab, display it on the screen * used as foreach item, if item.tab = current tab, display it on the screen
*/ */
@@ -291,6 +301,7 @@ @@ -319,6 +332,7 @@
lightOpacity[par1] = this.isOpaqueCube() ? 255 : 0; lightOpacity[par1] = this.isOpaqueCube() ? 255 : 0;
canBlockGrass[par1] = !par2Material.getCanBlockGrass(); canBlockGrass[par1] = !par2Material.getCanBlockGrass();
} }
@ -30,7 +53,7 @@
} }
/** /**
@@ -429,9 +440,10 @@ @@ -457,9 +471,10 @@
return this.needsRandomTick; return this.needsRandomTick;
} }
@ -42,7 +65,7 @@
} }
/** /**
@@ -454,7 +466,7 @@ @@ -482,7 +497,7 @@
*/ */
public float getBlockBrightness(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) public float getBlockBrightness(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
{ {
@ -51,7 +74,7 @@
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@@ -464,7 +476,7 @@ @@ -492,7 +507,7 @@
*/ */
public int getMixedBrightnessForBlock(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) public int getMixedBrightnessForBlock(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
{ {
@ -60,7 +83,7 @@
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@@ -609,7 +621,13 @@ @@ -637,7 +652,13 @@
/** /**
* ejects contained items into the world, and notifies neighbours of an update, as appropriate * ejects contained items into the world, and notifies neighbours of an update, as appropriate
*/ */
@ -75,7 +98,7 @@
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
@@ -633,8 +651,7 @@ @@ -661,8 +682,7 @@
*/ */
public float getPlayerRelativeBlockHardness(EntityPlayer par1EntityPlayer, World par2World, int par3, int par4, int par5) public float getPlayerRelativeBlockHardness(EntityPlayer par1EntityPlayer, World par2World, int par3, int par4, int par5)
{ {
@ -85,7 +108,7 @@
} }
/** /**
@@ -652,18 +669,13 @@ @@ -680,18 +700,13 @@
{ {
if (!par1World.isRemote) if (!par1World.isRemote)
{ {
@ -108,7 +131,7 @@
} }
} }
} }
@@ -1048,7 +1060,7 @@ @@ -1076,7 +1091,7 @@
par2EntityPlayer.addStat(StatList.mineBlockStatArray[this.blockID], 1); par2EntityPlayer.addStat(StatList.mineBlockStatArray[this.blockID], 1);
par2EntityPlayer.addExhaustion(0.025F); par2EntityPlayer.addExhaustion(0.025F);
@ -117,7 +140,7 @@
{ {
ItemStack var8 = this.createStackedBlock(par6); ItemStack var8 = this.createStackedBlock(par6);
@@ -1325,4 +1337,849 @@ @@ -1353,4 +1368,849 @@
canBlockGrass[0] = true; canBlockGrass[0] = true;
StatList.initBreakableStats(); StatList.initBreakableStats();
} }

View file

@ -1,17 +1,16 @@
--- ../src_base/common/net/minecraft/src/BlockButton.java --- ../src_base/minecraft/net/minecraft/block/BlockButton.java
+++ ../src_work/common/net/minecraft/src/BlockButton.java +++ ../src_work/minecraft/net/minecraft/block/BlockButton.java
@@ -2,6 +2,10 @@ @@ -11,6 +11,9 @@
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import java.util.List;
import java.util.Random;
+
+import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.ForgeDirection;
+
+import static net.minecraftforge.common.ForgeDirection.*; +import static net.minecraftforge.common.ForgeDirection.*;
+
public class BlockButton extends Block public class BlockButton extends Block
{ {
@@ -55,7 +59,11 @@ /** Whether this button is sensible to arrows, used by wooden buttons. */
@@ -63,7 +66,11 @@
*/ */
public boolean canPlaceBlockOnSide(World par1World, int par2, int par3, int par4, int par5) public boolean canPlaceBlockOnSide(World par1World, int par2, int par3, int par4, int par5)
{ {
@ -24,7 +23,7 @@
} }
/** /**
@@ -63,7 +71,10 @@ @@ -71,7 +78,10 @@
*/ */
public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
{ {
@ -36,7 +35,7 @@
} }
public int func_85104_a(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9) public int func_85104_a(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9)
@@ -72,19 +83,22 @@ @@ -80,19 +90,22 @@
int var11 = var10 & 8; int var11 = var10 & 8;
var10 &= 7; var10 &= 7;
@ -63,7 +62,7 @@
{ {
var10 = 1; var10 = 1;
} }
@@ -101,7 +115,11 @@ @@ -109,7 +122,11 @@
*/ */
private int getOrientation(World par1World, int par2, int par3, int par4) private int getOrientation(World par1World, int par2, int par3, int par4)
{ {
@ -76,7 +75,7 @@
} }
/** /**
@@ -115,22 +133,22 @@ @@ -123,22 +140,22 @@
int var6 = par1World.getBlockMetadata(par2, par3, par4) & 7; int var6 = par1World.getBlockMetadata(par2, par3, par4) & 7;
boolean var7 = false; boolean var7 = false;

View file

@ -1,8 +1,8 @@
--- ../src_base/common/net/minecraft/src/BlockCactus.java --- ../src_base/minecraft/net/minecraft/block/BlockCactus.java
+++ ../src_work/common/net/minecraft/src/BlockCactus.java +++ ../src_work/minecraft/net/minecraft/block/BlockCactus.java
@@ -4,7 +4,11 @@ @@ -10,7 +10,11 @@
import cpw.mods.fml.common.asm.SideOnly; import net.minecraft.util.DamageSource;
import java.util.Random; import net.minecraft.world.World;
-public class BlockCactus extends Block -public class BlockCactus extends Block
+import net.minecraftforge.common.EnumPlantType; +import net.minecraftforge.common.EnumPlantType;
@ -13,7 +13,7 @@
{ {
protected BlockCactus(int par1, int par2) protected BlockCactus(int par1, int par2)
{ {
@@ -143,7 +147,7 @@ @@ -149,7 +153,7 @@
else else
{ {
int var5 = par1World.getBlockId(par2, par3 - 1, par4); int var5 = par1World.getBlockId(par2, par3 - 1, par4);
@ -22,7 +22,7 @@
} }
} }
@@ -154,4 +158,22 @@ @@ -160,4 +164,22 @@
{ {
par5Entity.attackEntityFrom(DamageSource.cactus, 1); par5Entity.attackEntityFrom(DamageSource.cactus, 1);
} }

View file

@ -1,14 +1,15 @@
--- ../src_base/common/net/minecraft/src/BlockChest.java --- ../src_base/minecraft/net/minecraft/block/BlockChest.java
+++ ../src_work/common/net/minecraft/src/BlockChest.java +++ ../src_work/minecraft/net/minecraft/block/BlockChest.java
@@ -4,6 +4,7 @@ @@ -21,6 +21,8 @@
import cpw.mods.fml.common.asm.SideOnly; import net.minecraft.world.IBlockAccess;
import java.util.Iterator; import net.minecraft.world.World;
import java.util.Random;
+import static net.minecraftforge.common.ForgeDirection.*;
+import static net.minecraftforge.common.ForgeDirection.*;
+
public class BlockChest extends BlockContainer public class BlockChest extends BlockContainer
{ {
@@ -411,7 +412,7 @@ private Random random = new Random();
@@ -427,7 +429,7 @@
{ {
return true; return true;
} }
@ -17,7 +18,7 @@
{ {
return true; return true;
} }
@@ -419,19 +420,19 @@ @@ -435,19 +437,19 @@
{ {
return true; return true;
} }

View file

@ -1,6 +1,6 @@
--- ../src_base/common/net/minecraft/src/BlockContainer.java --- ../src_base/minecraft/net/minecraft/block/BlockContainer.java
+++ ../src_work/common/net/minecraft/src/BlockContainer.java +++ ../src_work/minecraft/net/minecraft/block/BlockContainer.java
@@ -20,7 +20,7 @@ @@ -24,7 +24,7 @@
public void onBlockAdded(World par1World, int par2, int par3, int par4) public void onBlockAdded(World par1World, int par2, int par3, int par4)
{ {
super.onBlockAdded(par1World, par2, par3, par4); super.onBlockAdded(par1World, par2, par3, par4);
@ -9,7 +9,7 @@
} }
/** /**
@@ -36,6 +36,12 @@ @@ -40,6 +40,12 @@
* Returns a new instance of a block's tile entity class. Called on placing the block. * Returns a new instance of a block's tile entity class. Called on placing the block.
*/ */
public abstract TileEntity createNewTileEntity(World var1); public abstract TileEntity createNewTileEntity(World var1);

View file

@ -1,18 +1,21 @@
--- ../src_base/common/net/minecraft/src/BlockCrops.java --- ../src_base/minecraft/net/minecraft/block/BlockCrops.java
+++ ../src_work/common/net/minecraft/src/BlockCrops.java +++ ../src_work/minecraft/net/minecraft/block/BlockCrops.java
@@ -2,7 +2,11 @@ @@ -2,11 +2,14 @@
import cpw.mods.fml.common.Side; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly; import cpw.mods.fml.common.asm.SideOnly;
+
+import java.util.ArrayList; +import java.util.ArrayList;
import java.util.Random; import java.util.Random;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
+ +
+import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.ForgeDirection;
public class BlockCrops extends BlockFlower public class BlockCrops extends BlockFlower
{ {
@@ -88,11 +92,11 @@ @@ -92,11 +95,11 @@
int var19 = par1World.getBlockId(var17, par3 - 1, var18); int var19 = par1World.getBlockId(var17, par3 - 1, var18);
float var20 = 0.0F; float var20 = 0.0F;
@ -26,7 +29,7 @@
{ {
var20 = 3.0F; var20 = 3.0F;
} }
@@ -158,22 +162,25 @@ @@ -162,22 +165,25 @@
public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7) public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)
{ {
super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, 0); super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, 0);

View file

@ -0,0 +1,11 @@
--- ../src_base/minecraft/net/minecraft/block/BlockDoor.java
+++ ../src_work/minecraft/net/minecraft/block/BlockDoor.java
@@ -268,7 +268,7 @@
{
if (this.blockMaterial == Material.iron)
{
- return true;
+ return false; //Allow items to interact with the door
}
else
{

View file

@ -1,16 +1,16 @@
--- ../src_base/common/net/minecraft/src/BlockFarmland.java --- ../src_base/minecraft/net/minecraft/block/BlockFarmland.java
+++ ../src_work/common/net/minecraft/src/BlockFarmland.java +++ ../src_work/minecraft/net/minecraft/block/BlockFarmland.java
@@ -3,6 +3,9 @@ @@ -7,6 +7,9 @@
import cpw.mods.fml.common.Side; import net.minecraft.entity.Entity;
import cpw.mods.fml.common.asm.SideOnly; import net.minecraft.util.AxisAlignedBB;
import java.util.Random; import net.minecraft.world.World;
+ +
+import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.ForgeDirection;
+import net.minecraftforge.common.IPlantable; +import net.minecraftforge.common.IPlantable;
public class BlockFarmland extends Block public class BlockFarmland extends Block
{ {
@@ -97,7 +100,8 @@ @@ -101,7 +104,8 @@
{ {
int var8 = par1World.getBlockId(var6, par3 + 1, var7); int var8 = par1World.getBlockId(var6, par3 + 1, var7);

View file

@ -1,15 +1,16 @@
--- ../src_base/common/net/minecraft/src/BlockFire.java --- ../src_base/minecraft/net/minecraft/block/BlockFire.java
+++ ../src_work/common/net/minecraft/src/BlockFire.java +++ ../src_work/minecraft/net/minecraft/block/BlockFire.java
@@ -3,6 +3,8 @@ @@ -9,6 +9,9 @@
import cpw.mods.fml.common.Side; import net.minecraft.world.World;
import cpw.mods.fml.common.asm.SideOnly; import net.minecraft.world.WorldProviderEnd;
import java.util.Random;
+import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.ForgeDirection;
+import static net.minecraftforge.common.ForgeDirection.*; +import static net.minecraftforge.common.ForgeDirection.*;
+
public class BlockFire extends Block public class BlockFire extends Block
{ {
@@ -27,6 +29,8 @@ /** The chance this block will encourage nearby blocks to catch on fire */
@@ -32,6 +35,8 @@
*/ */
public void initializeBlock() public void initializeBlock()
{ {
@ -18,7 +19,7 @@
this.setBurnRate(Block.planks.blockID, 5, 20); this.setBurnRate(Block.planks.blockID, 5, 20);
this.setBurnRate(Block.woodDoubleSlab.blockID, 5, 20); this.setBurnRate(Block.woodDoubleSlab.blockID, 5, 20);
this.setBurnRate(Block.woodSingleSlab.blockID, 5, 20); this.setBurnRate(Block.woodSingleSlab.blockID, 5, 20);
@@ -51,8 +55,7 @@ @@ -56,8 +61,7 @@
*/ */
private void setBurnRate(int par1, int par2, int par3) private void setBurnRate(int par1, int par2, int par3)
{ {
@ -28,7 +29,7 @@
} }
/** /**
@@ -112,12 +115,8 @@ @@ -117,12 +121,8 @@
{ {
if (par1World.getGameRules().getGameRuleBooleanValue("doFireTick")) if (par1World.getGameRules().getGameRuleBooleanValue("doFireTick"))
{ {
@ -43,7 +44,7 @@
if (!this.canPlaceBlockAt(par1World, par2, par3, par4)) if (!this.canPlaceBlockAt(par1World, par2, par3, par4))
{ {
@@ -146,7 +145,7 @@ @@ -151,7 +151,7 @@
par1World.setBlockWithNotify(par2, par3, par4, 0); par1World.setBlockWithNotify(par2, par3, par4, 0);
} }
} }
@ -52,7 +53,7 @@
{ {
par1World.setBlockWithNotify(par2, par3, par4, 0); par1World.setBlockWithNotify(par2, par3, par4, 0);
} }
@@ -160,12 +159,12 @@ @@ -165,12 +165,12 @@
var9 = -50; var9 = -50;
} }
@ -71,7 +72,7 @@
for (int var10 = par2 - 1; var10 <= par2 + 1; ++var10) for (int var10 = par2 - 1; var10 <= par2 + 1; ++var10)
{ {
@@ -219,9 +218,20 @@ @@ -224,9 +224,20 @@
return false; return false;
} }
@ -93,7 +94,7 @@
if (par6Random.nextInt(par5) < var8) if (par6Random.nextInt(par5) < var8)
{ {
@@ -255,7 +265,12 @@ @@ -260,7 +271,12 @@
*/ */
private boolean canNeighborBurn(World par1World, int par2, int par3, int par4) private boolean canNeighborBurn(World par1World, int par2, int par3, int par4)
{ {
@ -107,7 +108,7 @@
} }
/** /**
@@ -271,12 +286,12 @@ @@ -276,12 +292,12 @@
} }
else else
{ {
@ -126,7 +127,7 @@
return var6; return var6;
} }
} }
@@ -291,21 +306,24 @@ @@ -296,21 +312,24 @@
/** /**
* Checks the specified block coordinate to see if it can catch fire. Args: blockAccess, x, y, z * Checks the specified block coordinate to see if it can catch fire. Args: blockAccess, x, y, z
@ -156,7 +157,7 @@
} }
/** /**
@@ -363,9 +381,9 @@ @@ -368,9 +387,9 @@
float var8; float var8;
float var9; float var9;
@ -169,7 +170,7 @@
{ {
for (var6 = 0; var6 < 2; ++var6) for (var6 = 0; var6 < 2; ++var6)
{ {
@@ -376,7 +394,7 @@ @@ -381,7 +400,7 @@
} }
} }
@ -178,7 +179,7 @@
{ {
for (var6 = 0; var6 < 2; ++var6) for (var6 = 0; var6 < 2; ++var6)
{ {
@@ -387,7 +405,7 @@ @@ -392,7 +411,7 @@
} }
} }
@ -187,7 +188,7 @@
{ {
for (var6 = 0; var6 < 2; ++var6) for (var6 = 0; var6 < 2; ++var6)
{ {
@@ -398,7 +416,7 @@ @@ -403,7 +422,7 @@
} }
} }
@ -196,7 +197,7 @@
{ {
for (var6 = 0; var6 < 2; ++var6) for (var6 = 0; var6 < 2; ++var6)
{ {
@@ -409,7 +427,7 @@ @@ -414,7 +433,7 @@
} }
} }
@ -205,7 +206,7 @@
{ {
for (var6 = 0; var6 < 2; ++var6) for (var6 = 0; var6 < 2; ++var6)
{ {
@@ -431,4 +449,46 @@ @@ -436,4 +455,46 @@
} }
} }
} }

View file

@ -1,8 +1,8 @@
--- ../src_base/common/net/minecraft/src/BlockFlower.java --- ../src_base/minecraft/net/minecraft/block/BlockFlower.java
+++ ../src_work/common/net/minecraft/src/BlockFlower.java +++ ../src_work/minecraft/net/minecraft/block/BlockFlower.java
@@ -2,7 +2,12 @@ @@ -6,7 +6,12 @@
import net.minecraft.util.AxisAlignedBB;
import java.util.Random; import net.minecraft.world.World;
-public class BlockFlower extends Block -public class BlockFlower extends Block
+import net.minecraftforge.common.EnumPlantType; +import net.minecraftforge.common.EnumPlantType;
@ -14,7 +14,7 @@
{ {
protected BlockFlower(int par1, int par2, Material par3Material) protected BlockFlower(int par1, int par2, Material par3Material)
{ {
@@ -24,7 +29,7 @@ @@ -28,7 +33,7 @@
*/ */
public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
{ {
@ -23,7 +23,7 @@
} }
/** /**
@@ -68,7 +73,9 @@ @@ -72,7 +77,9 @@
*/ */
public boolean canBlockStay(World par1World, int par2, int par3, int par4) public boolean canBlockStay(World par1World, int par2, int par3, int par4)
{ {
@ -34,7 +34,7 @@
} }
/** /**
@@ -104,4 +111,32 @@ @@ -108,4 +115,32 @@
{ {
return 1; return 1;
} }

View file

@ -1,6 +1,6 @@
--- ../src_base/common/net/minecraft/src/BlockFluid.java --- ../src_base/minecraft/net/minecraft/block/BlockFluid.java
+++ ../src_work/common/net/minecraft/src/BlockFluid.java +++ ../src_work/minecraft/net/minecraft/block/BlockFluid.java
@@ -48,7 +48,7 @@ @@ -54,7 +54,7 @@
{ {
for (int var9 = -1; var9 <= 1; ++var9) for (int var9 = -1; var9 <= 1; ++var9)
{ {

View file

@ -1,6 +1,6 @@
--- ../src_base/common/net/minecraft/src/BlockGrass.java --- ../src_base/minecraft/net/minecraft/block/BlockGrass.java
+++ ../src_work/common/net/minecraft/src/BlockGrass.java +++ ../src_work/minecraft/net/minecraft/block/BlockGrass.java
@@ -95,7 +95,7 @@ @@ -100,7 +100,7 @@
{ {
if (!par1World.isRemote) if (!par1World.isRemote)
{ {
@ -9,7 +9,7 @@
{ {
par1World.setBlockWithNotify(par2, par3, par4, Block.dirt.blockID); par1World.setBlockWithNotify(par2, par3, par4, Block.dirt.blockID);
} }
@@ -108,7 +108,7 @@ @@ -113,7 +113,7 @@
int var9 = par4 + par5Random.nextInt(3) - 1; int var9 = par4 + par5Random.nextInt(3) - 1;
int var10 = par1World.getBlockId(var7, var8 + 1, var9); int var10 = par1World.getBlockId(var7, var8 + 1, var9);

View file

@ -1,15 +1,16 @@
--- ../src_base/common/net/minecraft/src/BlockLadder.java --- ../src_base/minecraft/net/minecraft/block/BlockLadder.java
+++ ../src_work/common/net/minecraft/src/BlockLadder.java +++ ../src_work/minecraft/net/minecraft/block/BlockLadder.java
@@ -3,6 +3,8 @@ @@ -8,6 +8,9 @@
import cpw.mods.fml.common.Side; import net.minecraft.util.AxisAlignedBB;
import cpw.mods.fml.common.asm.SideOnly; import net.minecraft.world.IBlockAccess;
import java.util.Random; import net.minecraft.world.World;
+
+import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.ForgeDirection;
+import static net.minecraftforge.common.ForgeDirection.*; +import static net.minecraftforge.common.ForgeDirection.*;
public class BlockLadder extends Block public class BlockLadder extends Block
{ {
@@ -96,29 +98,32 @@ @@ -101,29 +104,32 @@
*/ */
public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
{ {
@ -47,7 +48,7 @@
{ {
var10 = 5; var10 = 5;
} }
@@ -135,22 +140,22 @@ @@ -140,22 +146,22 @@
int var6 = par1World.getBlockMetadata(par2, par3, par4); int var6 = par1World.getBlockMetadata(par2, par3, par4);
boolean var7 = false; boolean var7 = false;
@ -74,7 +75,7 @@
{ {
var7 = true; var7 = true;
} }
@@ -171,4 +176,10 @@ @@ -176,4 +182,10 @@
{ {
return 1; return 1;
} }

View file

@ -1,13 +1,16 @@
--- ../src_base/common/net/minecraft/src/BlockLeaves.java --- ../src_base/minecraft/net/minecraft/block/BlockLeaves.java
+++ ../src_work/common/net/minecraft/src/BlockLeaves.java +++ ../src_work/minecraft/net/minecraft/block/BlockLeaves.java
@@ -2,10 +2,14 @@ @@ -2,6 +2,7 @@
import cpw.mods.fml.common.Side; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly; import cpw.mods.fml.common.asm.SideOnly;
+
+import java.util.ArrayList; +import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
import net.minecraft.block.material.Material;
@@ -14,7 +15,9 @@
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
-public class BlockLeaves extends BlockLeavesBase -public class BlockLeaves extends BlockLeavesBase
+import net.minecraftforge.common.IShearable; +import net.minecraftforge.common.IShearable;
@ -16,7 +19,7 @@
{ {
/** /**
* The base index in terrain.png corresponding to the fancy version of the leaf texture. This is stored so we can * The base index in terrain.png corresponding to the fancy version of the leaf texture. This is stored so we can
@@ -98,10 +102,9 @@ @@ -107,10 +110,9 @@
{ {
int var12 = par1World.getBlockId(par2 + var9, par3 + var10, par4 + var11); int var12 = par1World.getBlockId(par2 + var9, par3 + var10, par4 + var11);
@ -29,7 +32,7 @@
} }
} }
} }
@@ -147,11 +150,13 @@ @@ -156,11 +158,13 @@
{ {
var15 = par1World.getBlockId(par2 + var12, par3 + var13, par4 + var14); var15 = par1World.getBlockId(par2 + var12, par3 + var13, par4 + var14);
@ -45,7 +48,7 @@
{ {
this.adjacentTreeBlocks[(var12 + var11) * var10 + (var13 + var11) * var9 + var14 + var11] = -2; this.adjacentTreeBlocks[(var12 + var11) * var10 + (var13 + var11) * var9 + var14 + var11] = -2;
} }
@@ -294,15 +299,7 @@ @@ -303,15 +307,7 @@
*/ */
public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6) public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6)
{ {
@ -62,7 +65,7 @@
} }
/** /**
@@ -353,4 +350,30 @@ @@ -362,4 +358,30 @@
par3List.add(new ItemStack(par1, 1, 2)); par3List.add(new ItemStack(par1, 1, 2));
par3List.add(new ItemStack(par1, 1, 3)); par3List.add(new ItemStack(par1, 1, 3));
} }

View file

@ -1,14 +1,16 @@
--- ../src_base/common/net/minecraft/src/BlockLever.java --- ../src_base/minecraft/net/minecraft/block/BlockLever.java
+++ ../src_work/common/net/minecraft/src/BlockLever.java +++ ../src_work/minecraft/net/minecraft/block/BlockLever.java
@@ -1,4 +1,7 @@ @@ -7,6 +7,9 @@
package net.minecraft.src; import net.minecraft.world.IBlockAccess;
+ import net.minecraft.world.World;
+import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.ForgeDirection;
+import static net.minecraftforge.common.ForgeDirection.*; +import static net.minecraftforge.common.ForgeDirection.*;
+
public class BlockLever extends Block public class BlockLever extends Block
{ {
@@ -47,7 +50,13 @@ protected BlockLever(int par1, int par2)
@@ -54,7 +57,13 @@
*/ */
public boolean canPlaceBlockOnSide(World par1World, int par2, int par3, int par4, int par5) public boolean canPlaceBlockOnSide(World par1World, int par2, int par3, int par4, int par5)
{ {
@ -23,7 +25,7 @@
} }
/** /**
@@ -55,7 +64,12 @@ @@ -62,7 +71,12 @@
*/ */
public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
{ {
@ -37,7 +39,7 @@
} }
public int func_85104_a(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9) public int func_85104_a(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9)
@@ -64,32 +78,32 @@ @@ -71,32 +85,32 @@
int var10 = par9 & 7; int var10 = par9 & 7;
var10 = -1; var10 = -1;
@ -76,7 +78,7 @@
{ {
var10 = 1; var10 = 1;
} }
@@ -132,42 +146,42 @@ @@ -139,42 +153,42 @@
int var6 = par1World.getBlockMetadata(par2, par3, par4) & 7; int var6 = par1World.getBlockMetadata(par2, par3, par4) & 7;
boolean var7 = false; boolean var7 = false;

View file

@ -1,6 +1,6 @@
--- ../src_base/common/net/minecraft/src/BlockLog.java --- ../src_base/minecraft/net/minecraft/block/BlockLog.java
+++ ../src_work/common/net/minecraft/src/BlockLog.java +++ ../src_work/minecraft/net/minecraft/block/BlockLog.java
@@ -59,14 +59,9 @@ @@ -63,14 +63,9 @@
{ {
int var12 = par1World.getBlockId(par2 + var9, par3 + var10, par4 + var11); int var12 = par1World.getBlockId(par2 + var9, par3 + var10, par4 + var11);
@ -17,7 +17,7 @@
} }
} }
} }
@@ -144,4 +139,16 @@ @@ -148,4 +143,16 @@
{ {
return new ItemStack(this.blockID, 1, limitToValidMetadata(par1)); return new ItemStack(this.blockID, 1, limitToValidMetadata(par1));
} }

View file

@ -1,15 +1,15 @@
--- ../src_base/common/net/minecraft/src/BlockMushroom.java --- ../src_base/minecraft/net/minecraft/block/BlockMushroom.java
+++ ../src_work/common/net/minecraft/src/BlockMushroom.java +++ ../src_work/minecraft/net/minecraft/block/BlockMushroom.java
@@ -1,6 +1,8 @@ @@ -3,6 +3,8 @@
package net.minecraft.src;
import java.util.Random; import java.util.Random;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenBigMushroom;
+ +
+import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.ForgeDirection;
public class BlockMushroom extends BlockFlower public class BlockMushroom extends BlockFlower
{ {
@@ -94,7 +96,9 @@ @@ -96,7 +98,9 @@
if (par3 >= 0 && par3 < 256) if (par3 >= 0 && par3 < 256)
{ {
int var5 = par1World.getBlockId(par2, par3 - 1, par4); int var5 = par1World.getBlockId(par2, par3 - 1, par4);

View file

@ -1,6 +1,6 @@
--- ../src_base/common/net/minecraft/src/BlockMycelium.java --- ../src_base/minecraft/net/minecraft/block/BlockMycelium.java
+++ ../src_work/common/net/minecraft/src/BlockMycelium.java +++ ../src_work/minecraft/net/minecraft/block/BlockMycelium.java
@@ -51,7 +51,7 @@ @@ -55,7 +55,7 @@
{ {
if (!par1World.isRemote) if (!par1World.isRemote)
{ {
@ -9,7 +9,7 @@
{ {
par1World.setBlockWithNotify(par2, par3, par4, Block.dirt.blockID); par1World.setBlockWithNotify(par2, par3, par4, Block.dirt.blockID);
} }
@@ -64,7 +64,7 @@ @@ -68,7 +68,7 @@
int var9 = par4 + par5Random.nextInt(3) - 1; int var9 = par4 + par5Random.nextInt(3) - 1;
int var10 = par1World.getBlockId(var7, var8 + 1, var9); int var10 = par1World.getBlockId(var7, var8 + 1, var9);

View file

@ -1,18 +1,21 @@
--- ../src_base/common/net/minecraft/src/BlockNetherStalk.java --- ../src_base/minecraft/net/minecraft/block/BlockNetherStalk.java
+++ ../src_work/common/net/minecraft/src/BlockNetherStalk.java +++ ../src_work/minecraft/net/minecraft/block/BlockNetherStalk.java
@@ -2,7 +2,11 @@ @@ -2,11 +2,14 @@
import cpw.mods.fml.common.Side; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly; import cpw.mods.fml.common.asm.SideOnly;
+
+import java.util.ArrayList; +import java.util.ArrayList;
import java.util.Random; import java.util.Random;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
+ +
+import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.ForgeDirection;
public class BlockNetherStalk extends BlockFlower public class BlockNetherStalk extends BlockFlower
{ {
@@ -29,7 +33,8 @@ @@ -33,7 +36,8 @@
*/ */
public boolean canBlockStay(World par1World, int par2, int par3, int par4) public boolean canBlockStay(World par1World, int par2, int par3, int par4)
{ {
@ -22,7 +25,7 @@
} }
/** /**
@@ -69,25 +74,7 @@ @@ -73,25 +77,7 @@
*/ */
public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7) public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)
{ {
@ -49,7 +52,7 @@
} }
/** /**
@@ -115,4 +102,23 @@ @@ -119,4 +105,23 @@
{ {
return Item.netherStalkSeeds.shiftedIndex; return Item.netherStalkSeeds.shiftedIndex;
} }

View file

@ -1,6 +1,6 @@
--- ../src_base/common/net/minecraft/src/BlockPistonBase.java --- ../src_base/minecraft/net/minecraft/block/BlockPistonBase.java
+++ ../src_work/common/net/minecraft/src/BlockPistonBase.java +++ ../src_work/minecraft/net/minecraft/block/BlockPistonBase.java
@@ -368,7 +368,7 @@ @@ -380,7 +380,7 @@
return false; return false;
} }
@ -9,7 +9,7 @@
} }
} }
@@ -386,7 +386,7 @@ @@ -398,7 +398,7 @@
{ {
if (var8 < 13) if (var8 < 13)
{ {
@ -18,7 +18,7 @@
{ {
return false; return false;
} }
@@ -436,7 +436,7 @@ @@ -448,7 +448,7 @@
if (var9 < 13) if (var9 < 13)
{ {

View file

@ -1,34 +1,23 @@
--- ../src_base/common/net/minecraft/src/BlockRail.java --- ../src_base/minecraft/net/minecraft/block/BlockRail.java
+++ ../src_work/common/net/minecraft/src/BlockRail.java +++ ../src_work/minecraft/net/minecraft/block/BlockRail.java
@@ -1,11 +1,27 @@ @@ -3,12 +3,16 @@
package net.minecraft.src;
import java.util.Random; import java.util.Random;
+ import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.item.EntityMinecart;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
+import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.ForgeDirection;
+import static net.minecraftforge.common.ForgeDirection.*; +import static net.minecraftforge.common.ForgeDirection.*;
+
public class BlockRail extends Block public class BlockRail extends Block
{ {
/** Power related rails have this field at true. */ /** Power related rails have this field at true. */
private final boolean isPowered; @@ -21,7 +25,7 @@
+
+ /**
+ * Forge: Moved render type to a field and a setter.
+ * This allows for a mod to change the render type
+ * for vanilla rails, and any mod rails that extend
+ * this class.
+ */
+ private int renderType = 9;
+
+ public void setRenderType(int value)
+ {
+ renderType = value;
+ }
/**
* Returns true if the block at the coordinates of world passed is a valid rail block (current is rail, powered or
@@ -14,7 +30,7 @@
public static final boolean isRailBlockAt(World par0World, int par1, int par2, int par3) public static final boolean isRailBlockAt(World par0World, int par1, int par2, int par3)
{ {
int var4 = par0World.getBlockId(par1, par2, par3); int var4 = par0World.getBlockId(par1, par2, par3);
@ -37,7 +26,7 @@
} }
/** /**
@@ -22,7 +38,7 @@ @@ -29,7 +33,7 @@
*/ */
public static final boolean isRailBlock(int par0) public static final boolean isRailBlock(int par0)
{ {
@ -46,7 +35,7 @@
} }
protected BlockRail(int par1, int par2, boolean par3) protected BlockRail(int par1, int par2, boolean par3)
@@ -119,7 +135,7 @@ @@ -126,7 +130,7 @@
*/ */
public int getRenderType() public int getRenderType()
{ {
@ -55,7 +44,7 @@
} }
/** /**
@@ -135,7 +151,7 @@ @@ -142,7 +146,7 @@
*/ */
public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
{ {
@ -64,7 +53,7 @@
} }
/** /**
@@ -172,27 +188,27 @@ @@ -179,27 +183,27 @@
boolean var8 = false; boolean var8 = false;
@ -97,7 +86,7 @@
{ {
var8 = true; var8 = true;
} }
@@ -393,9 +409,121 @@ @@ -400,9 +404,135 @@
/** /**
* Return true if the blocks passed is a power related rail. * Return true if the blocks passed is a power related rail.
@ -218,5 +207,19 @@
+ public boolean hasPowerBit(World world, int x, int y, int z) + public boolean hasPowerBit(World world, int x, int y, int z)
+ { + {
+ return isPowered; + return isPowered;
+ }
+
+
+ /**
+ * Forge: Moved render type to a field and a setter.
+ * This allows for a mod to change the render type
+ * for vanilla rails, and any mod rails that extend
+ * this class.
+ */
+ private int renderType = 9;
+
+ public void setRenderType(int value)
+ {
+ renderType = value;
+ } + }
} }

View file

@ -1,6 +1,6 @@
--- ../src_base/common/net/minecraft/src/BlockRedstoneWire.java --- ../src_base/minecraft/net/minecraft/block/BlockRedstoneWire.java
+++ ../src_work/common/net/minecraft/src/BlockRedstoneWire.java +++ ../src_work/minecraft/net/minecraft/block/BlockRedstoneWire.java
@@ -557,7 +557,7 @@ @@ -564,7 +564,7 @@
} }
else if (var5 != Block.redstoneRepeaterIdle.blockID && var5 != Block.redstoneRepeaterActive.blockID) else if (var5 != Block.redstoneRepeaterIdle.blockID && var5 != Block.redstoneRepeaterActive.blockID)
{ {

View file

@ -1,8 +1,8 @@
--- ../src_base/common/net/minecraft/src/BlockReed.java --- ../src_base/minecraft/net/minecraft/block/BlockReed.java
+++ ../src_work/common/net/minecraft/src/BlockReed.java +++ ../src_work/minecraft/net/minecraft/block/BlockReed.java
@@ -4,7 +4,11 @@ @@ -8,7 +8,11 @@
import cpw.mods.fml.common.asm.SideOnly; import net.minecraft.util.AxisAlignedBB;
import java.util.Random; import net.minecraft.world.World;
-public class BlockReed extends Block -public class BlockReed extends Block
+import net.minecraftforge.common.EnumPlantType; +import net.minecraftforge.common.EnumPlantType;
@ -13,7 +13,7 @@
{ {
protected BlockReed(int par1, int par2) protected BlockReed(int par1, int par2)
{ {
@@ -51,8 +55,8 @@ @@ -55,8 +59,8 @@
*/ */
public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
{ {
@ -24,7 +24,7 @@
} }
/** /**
@@ -135,4 +139,22 @@ @@ -139,4 +143,22 @@
{ {
return Item.reed.shiftedIndex; return Item.reed.shiftedIndex;
} }

View file

@ -1,20 +1,20 @@
--- ../src_base/common/net/minecraft/src/BlockSapling.java --- ../src_base/minecraft/net/minecraft/block/BlockSapling.java
+++ ../src_work/common/net/minecraft/src/BlockSapling.java +++ ../src_work/minecraft/net/minecraft/block/BlockSapling.java
@@ -4,6 +4,8 @@ @@ -13,6 +13,8 @@
import cpw.mods.fml.common.asm.SideOnly; import net.minecraft.world.gen.feature.WorldGenTaiga2;
import java.util.List; import net.minecraft.world.gen.feature.WorldGenTrees;
import java.util.Random; import net.minecraft.world.gen.feature.WorldGenerator;
+ +
+import net.minecraftforge.event.terraingen.TerrainGen; +import net.minecraftforge.event.terraingen.TerrainGen;
public class BlockSapling extends BlockFlower public class BlockSapling extends BlockFlower
{ {
@@ -56,6 +58,8 @@ @@ -65,6 +67,8 @@
*/ */
public void growTree(World par1World, int par2, int par3, int par4, Random par5Random) public void growTree(World par1World, int par2, int par3, int par4, Random par5Random)
{ {
+ if (!TerrainGen.saplingGrowTree(par1World, par5Random, par2, par3, par4)) return; + if (!TerrainGen.saplingGrowTree(par1World, par5Random, par2, par3, par4)) return;
+ +
int var6 = par1World.getBlockMetadata(par2, par3, par4) & 3; int var6 = par1World.getBlockMetadata(par2, par3, par4) & 3;
Object var7 = null; Object var7 = null;
int var8 = 0; int var8 = 0;

View file

@ -1,6 +1,6 @@
--- ../src_base/common/net/minecraft/src/BlockSnow.java --- ../src_base/minecraft/net/minecraft/block/BlockSnow.java
+++ ../src_work/common/net/minecraft/src/BlockSnow.java +++ ../src_work/minecraft/net/minecraft/block/BlockSnow.java
@@ -57,7 +57,8 @@ @@ -67,7 +67,8 @@
public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
{ {
int var5 = par1World.getBlockId(par2, par3 - 1, par4); int var5 = par1World.getBlockId(par2, par3 - 1, par4);
@ -10,7 +10,7 @@
} }
/** /**
@@ -76,7 +77,6 @@ @@ -86,7 +87,6 @@
{ {
if (!this.canPlaceBlockAt(par1World, par2, par3, par4)) if (!this.canPlaceBlockAt(par1World, par2, par3, par4))
{ {
@ -18,7 +18,7 @@
par1World.setBlockWithNotify(par2, par3, par4, 0); par1World.setBlockWithNotify(par2, par3, par4, 0);
return false; return false;
} }
@@ -92,10 +92,8 @@ @@ -102,10 +102,8 @@
*/ */
public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6) public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6)
{ {
@ -30,7 +30,7 @@
} }
/** /**
@@ -111,7 +109,7 @@ @@ -121,7 +119,7 @@
*/ */
public int quantityDropped(Random par1Random) public int quantityDropped(Random par1Random)
{ {
@ -39,7 +39,7 @@
} }
/** /**
@@ -121,7 +119,6 @@ @@ -131,7 +129,6 @@
{ {
if (par1World.getSavedLightValue(EnumSkyBlock.Block, par2, par3, par4) > 11) if (par1World.getSavedLightValue(EnumSkyBlock.Block, par2, par3, par4) > 11)
{ {

View file

@ -1,18 +1,23 @@
--- ../src_base/common/net/minecraft/src/BlockStem.java --- ../src_base/minecraft/net/minecraft/block/BlockStem.java
+++ ../src_work/common/net/minecraft/src/BlockStem.java +++ ../src_work/minecraft/net/minecraft/block/BlockStem.java
@@ -2,7 +2,11 @@ @@ -2,6 +2,7 @@
import cpw.mods.fml.common.Side; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly; import cpw.mods.fml.common.asm.SideOnly;
+
+import java.util.ArrayList; +import java.util.ArrayList;
import java.util.Random; import java.util.Random;
+ import net.minecraft.creativetab.CreativeTabs;
+import net.minecraftforge.common.ForgeDirection; import net.minecraft.item.Item;
@@ -9,6 +10,8 @@
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
+import net.minecraftforge.common.ForgeDirection;
+
public class BlockStem extends BlockFlower public class BlockStem extends BlockFlower
{ {
@@ -96,7 +100,8 @@ /** Defines if it is a Melon or a Pumpkin that the stem is producing. */
@@ -101,7 +104,8 @@
int var11 = par1World.getBlockId(var9, par3 - 1, var10); int var11 = par1World.getBlockId(var9, par3 - 1, var10);
@ -22,7 +27,7 @@
{ {
par1World.setBlockWithNotify(var9, par3, var10, this.fruitType.blockID); par1World.setBlockWithNotify(var9, par3, var10, this.fruitType.blockID);
} }
@@ -132,11 +137,11 @@ @@ -137,11 +141,11 @@
int var19 = par1World.getBlockId(var17, par3 - 1, var18); int var19 = par1World.getBlockId(var17, par3 - 1, var18);
float var20 = 0.0F; float var20 = 0.0F;
@ -36,7 +41,7 @@
{ {
var20 = 3.0F; var20 = 3.0F;
} }
@@ -236,29 +241,22 @@ @@ -241,29 +245,22 @@
public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7) public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)
{ {
super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, par7); super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, par7);

View file

@ -1,13 +1,16 @@
--- ../src_base/common/net/minecraft/src/BlockTallGrass.java --- ../src_base/minecraft/net/minecraft/block/BlockTallGrass.java
+++ ../src_work/common/net/minecraft/src/BlockTallGrass.java +++ ../src_work/minecraft/net/minecraft/block/BlockTallGrass.java
@@ -2,10 +2,15 @@ @@ -2,6 +2,7 @@
import cpw.mods.fml.common.Side; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly; import cpw.mods.fml.common.asm.SideOnly;
+
+import java.util.ArrayList; +import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
import net.minecraft.block.material.Material;
@@ -15,7 +16,10 @@
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
-public class BlockTallGrass extends BlockFlower -public class BlockTallGrass extends BlockFlower
+import net.minecraftforge.common.ForgeHooks; +import net.minecraftforge.common.ForgeHooks;
@ -17,7 +20,7 @@
{ {
protected BlockTallGrass(int par1, int par2) protected BlockTallGrass(int par1, int par2)
{ {
@@ -27,7 +32,7 @@ @@ -37,7 +41,7 @@
*/ */
public int idDropped(int par1, Random par2Random, int par3) public int idDropped(int par1, Random par2Random, int par3)
{ {
@ -26,7 +29,7 @@
} }
/** /**
@@ -44,15 +49,7 @@ @@ -54,15 +58,7 @@
*/ */
public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6) public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6)
{ {
@ -43,7 +46,7 @@
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@@ -105,4 +102,35 @@ @@ -115,4 +111,35 @@
par3List.add(new ItemStack(par1, 1, var4)); par3List.add(new ItemStack(par1, 1, var4));
} }
} }

View file

@ -1,15 +1,16 @@
--- ../src_base/common/net/minecraft/src/BlockTorch.java --- ../src_base/minecraft/net/minecraft/block/BlockTorch.java
+++ ../src_work/common/net/minecraft/src/BlockTorch.java +++ ../src_work/minecraft/net/minecraft/block/BlockTorch.java
@@ -3,6 +3,8 @@ @@ -10,6 +10,9 @@
import cpw.mods.fml.common.Side; import net.minecraft.util.Vec3;
import cpw.mods.fml.common.asm.SideOnly; import net.minecraft.world.World;
import java.util.Random;
+import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.ForgeDirection;
+import static net.minecraftforge.common.ForgeDirection.*; +import static net.minecraftforge.common.ForgeDirection.*;
+
public class BlockTorch extends Block public class BlockTorch extends Block
{ {
@@ -59,7 +61,7 @@ protected BlockTorch(int par1, int par2)
@@ -65,7 +68,7 @@
else else
{ {
int var5 = par1World.getBlockId(par2, par3, par4); int var5 = par1World.getBlockId(par2, par3, par4);
@ -18,7 +19,7 @@
} }
} }
@@ -68,7 +70,11 @@ @@ -74,7 +77,11 @@
*/ */
public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
{ {
@ -31,7 +32,7 @@
} }
public int func_85104_a(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9) public int func_85104_a(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9)
@@ -80,22 +86,22 @@ @@ -86,22 +93,22 @@
var10 = 5; var10 = 5;
} }
@ -58,7 +59,7 @@
{ {
var10 = 1; var10 = 1;
} }
@@ -123,19 +129,19 @@ @@ -129,19 +136,19 @@
{ {
if (par1World.getBlockMetadata(par2, par3, par4) == 0) if (par1World.getBlockMetadata(par2, par3, par4) == 0)
{ {
@ -82,7 +83,7 @@
{ {
par1World.setBlockMetadataWithNotify(par2, par3, par4, 4); par1World.setBlockMetadataWithNotify(par2, par3, par4, 4);
} }
@@ -159,22 +165,22 @@ @@ -165,22 +172,22 @@
int var6 = par1World.getBlockMetadata(par2, par3, par4); int var6 = par1World.getBlockMetadata(par2, par3, par4);
boolean var7 = false; boolean var7 = false;

View file

@ -1,12 +1,11 @@
--- ../src_base/common/net/minecraft/src/BlockTrapDoor.java --- ../src_base/minecraft/net/minecraft/block/BlockTrapDoor.java
+++ ../src_work/common/net/minecraft/src/BlockTrapDoor.java +++ ../src_work/minecraft/net/minecraft/block/BlockTrapDoor.java
@@ -1,10 +1,14 @@ @@ -11,8 +11,13 @@
package net.minecraft.src; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
+import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.ForgeDirection;
import cpw.mods.fml.common.Side; +
import cpw.mods.fml.common.asm.SideOnly;
public class BlockTrapDoor extends Block public class BlockTrapDoor extends Block
{ {
+ /** Set this to allow trapdoors to remain free-floating */ + /** Set this to allow trapdoors to remain free-floating */
@ -15,7 +14,7 @@
protected BlockTrapDoor(int par1, Material par2Material) protected BlockTrapDoor(int par1, Material par2Material)
{ {
super(par1, par2Material); super(par1, par2Material);
@@ -193,7 +197,7 @@ @@ -201,7 +206,7 @@
--var7; --var7;
} }
@ -24,7 +23,7 @@
{ {
par1World.setBlockWithNotify(par2, par3, par4, 0); par1World.setBlockWithNotify(par2, par3, par4, 0);
this.dropBlockAsItem(par1World, par2, par3, par4, var6, 0); this.dropBlockAsItem(par1World, par2, par3, par4, var6, 0);
@@ -255,6 +259,10 @@ @@ -263,6 +268,10 @@
*/ */
public boolean canPlaceBlockOnSide(World par1World, int par2, int par3, int par4, int par5) public boolean canPlaceBlockOnSide(World par1World, int par2, int par3, int par4, int par5)
{ {
@ -35,7 +34,7 @@
if (par5 == 0) if (par5 == 0)
{ {
return false; return false;
@@ -285,7 +293,7 @@ @@ -293,7 +302,7 @@
--par2; --par2;
} }
@ -44,7 +43,7 @@
} }
} }
@@ -300,6 +308,10 @@ @@ -308,6 +317,10 @@
*/ */
private static boolean isValidSupportBlock(int par0) private static boolean isValidSupportBlock(int par0)
{ {

View file

@ -1,16 +1,16 @@
--- ../src_base/common/net/minecraft/src/BlockTripWireSource.java --- ../src_base/minecraft/net/minecraft/block/BlockTripWireSource.java
+++ ../src_work/common/net/minecraft/src/BlockTripWireSource.java +++ ../src_work/minecraft/net/minecraft/block/BlockTripWireSource.java
@@ -1,6 +1,9 @@ @@ -8,6 +8,9 @@
package net.minecraft.src; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import java.util.Random;
+
+import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.ForgeDirection;
+import static net.minecraftforge.common.ForgeDirection.*; +import static net.minecraftforge.common.ForgeDirection.*;
+
public class BlockTripWireSource extends Block public class BlockTripWireSource extends Block
{ {
@@ -58,7 +61,11 @@ public BlockTripWireSource(int par1)
@@ -64,7 +67,11 @@
*/ */
public boolean canPlaceBlockOnSide(World par1World, int par2, int par3, int par4, int par5) public boolean canPlaceBlockOnSide(World par1World, int par2, int par3, int par4, int par5)
{ {
@ -23,7 +23,7 @@
} }
/** /**
@@ -66,29 +73,32 @@ @@ -72,29 +79,32 @@
*/ */
public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
{ {
@ -61,7 +61,7 @@
{ {
var10 = 3; var10 = 3;
} }
@@ -115,22 +125,22 @@ @@ -121,22 +131,22 @@
int var7 = var6 & 3; int var7 = var6 & 3;
boolean var8 = false; boolean var8 = false;
@ -88,7 +88,7 @@
{ {
var8 = true; var8 = true;
} }
@@ -151,7 +161,7 @@ @@ -157,7 +167,7 @@
boolean var12 = (par6 & 8) == 8; boolean var12 = (par6 & 8) == 8;
boolean var13 = par5 == Block.tripWireSource.blockID; boolean var13 = par5 == Block.tripWireSource.blockID;
boolean var14 = false; boolean var14 = false;

View file

@ -1,12 +1,16 @@
--- ../src_base/common/net/minecraft/src/BlockVine.java --- ../src_base/minecraft/net/minecraft/block/BlockVine.java
+++ ../src_work/common/net/minecraft/src/BlockVine.java +++ ../src_work/minecraft/net/minecraft/block/BlockVine.java
@@ -2,9 +2,13 @@ @@ -2,6 +2,7 @@
import cpw.mods.fml.common.Side; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly; import cpw.mods.fml.common.asm.SideOnly;
+
+import java.util.ArrayList; +import java.util.ArrayList;
import java.util.Random; import java.util.Random;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
@@ -15,7 +16,9 @@
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
-public class BlockVine extends Block -public class BlockVine extends Block
+import net.minecraftforge.common.IShearable; +import net.minecraftforge.common.IShearable;
@ -15,7 +19,7 @@
{ {
public BlockVine(int par1) public BlockVine(int par1)
{ {
@@ -425,14 +429,26 @@ @@ -436,14 +439,26 @@
*/ */
public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6) public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6)
{ {

View file

@ -1,6 +1,6 @@
--- ../src_base/common/net/minecraft/src/RailLogic.java --- ../src_base/minecraft/net/minecraft/block/RailLogic.java
+++ ../src_work/common/net/minecraft/src/RailLogic.java +++ ../src_work/minecraft/net/minecraft/block/RailLogic.java
@@ -18,6 +18,7 @@ @@ -20,6 +20,7 @@
private List connectedTracks; private List connectedTracks;
final BlockRail rail; final BlockRail rail;
@ -8,7 +8,7 @@
public RailLogic(BlockRail par1BlockRail, World par2World, int par3, int par4, int par5) public RailLogic(BlockRail par1BlockRail, World par2World, int par3, int par4, int par5)
{ {
@@ -28,18 +29,11 @@ @@ -30,18 +31,11 @@
this.trackY = par4; this.trackY = par4;
this.trackZ = par5; this.trackZ = par5;
int var6 = par2World.getBlockId(par3, par4, par5); int var6 = par2World.getBlockId(par3, par4, par5);
@ -32,7 +32,7 @@
this.setConnections(var7); this.setConnections(var7);
} }
@@ -258,7 +252,7 @@ @@ -260,7 +254,7 @@
} }
} }
@ -41,7 +41,7 @@
{ {
if (BlockRail.isRailBlockAt(this.worldObj, this.trackX, this.trackY + 1, this.trackZ - 1)) if (BlockRail.isRailBlockAt(this.worldObj, this.trackX, this.trackY + 1, this.trackZ - 1))
{ {
@@ -271,7 +265,7 @@ @@ -273,7 +267,7 @@
} }
} }
@ -50,7 +50,7 @@
{ {
if (BlockRail.isRailBlockAt(this.worldObj, this.trackX + 1, this.trackY + 1, this.trackZ)) if (BlockRail.isRailBlockAt(this.worldObj, this.trackX + 1, this.trackY + 1, this.trackZ))
{ {
@@ -422,7 +416,7 @@ @@ -424,7 +418,7 @@
} }
} }
@ -59,7 +59,7 @@
{ {
if (BlockRail.isRailBlockAt(this.worldObj, this.trackX, this.trackY + 1, this.trackZ - 1)) if (BlockRail.isRailBlockAt(this.worldObj, this.trackX, this.trackY + 1, this.trackZ - 1))
{ {
@@ -435,7 +429,7 @@ @@ -437,7 +431,7 @@
} }
} }

View file

@ -1,16 +1,17 @@
--- ../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
@@ -128,6 +128,9 @@ @@ -130,6 +130,10 @@
import net.minecraft.src.WorldInfo;
import net.minecraft.src.WorldRenderer; import com.google.common.collect.MapDifference;
import net.minecraft.src.WorldSettings;
+import net.minecraftforge.common.ForgeHooks; +import net.minecraftforge.common.ForgeHooks;
+import net.minecraftforge.event.ForgeEventFactory; +import net.minecraftforge.event.ForgeEventFactory;
+import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action; +import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action;
+
import org.lwjgl.LWJGLException; @SideOnly(Side.CLIENT)
import org.lwjgl.Sys; public abstract class Minecraft implements Runnable, IPlayerUsage
@@ -1266,7 +1269,7 @@ {
@@ -1249,7 +1253,7 @@
if (this.thePlayer.canCurrentToolHarvestBlock(var3, var4, var5)) if (this.thePlayer.canCurrentToolHarvestBlock(var3, var4, var5))
{ {
@ -19,7 +20,7 @@
this.thePlayer.swingItem(); this.thePlayer.swingItem();
} }
} }
@@ -1332,7 +1335,8 @@ @@ -1315,7 +1319,8 @@
{ {
int var8 = var3 != null ? var3.stackSize : 0; int var8 = var3 != null ? var3.stackSize : 0;
@ -29,7 +30,7 @@
{ {
var2 = false; var2 = false;
this.thePlayer.swingItem(); this.thePlayer.swingItem();
@@ -1358,7 +1362,8 @@ @@ -1341,7 +1346,8 @@
{ {
ItemStack var9 = this.thePlayer.inventory.getCurrentItem(); ItemStack var9 = this.thePlayer.inventory.getCurrentItem();
@ -39,7 +40,7 @@
{ {
this.entityRenderer.itemRenderer.func_78445_c(); this.entityRenderer.itemRenderer.func_78445_c();
} }
@@ -2047,6 +2052,18 @@ @@ -2037,6 +2043,18 @@
if (this.theIntegratedServer != null) if (this.theIntegratedServer != null)
{ {
this.theIntegratedServer.initiateShutdown(); this.theIntegratedServer.initiateShutdown();
@ -58,7 +59,7 @@
} }
this.theIntegratedServer = null; this.theIntegratedServer = null;
@@ -2356,95 +2373,12 @@ @@ -2346,95 +2364,12 @@
if (this.objectMouseOver != null) if (this.objectMouseOver != null)
{ {
boolean var1 = this.thePlayer.capabilities.isCreativeMode; boolean var1 = this.thePlayer.capabilities.isCreativeMode;

View file

@ -1,7 +1,7 @@
--- ../src_base/minecraft/net/minecraft/src/SoundManager.java --- ../src_base/minecraft/net/minecraft/client/audio/SoundManager.java
+++ ../src_work/minecraft/net/minecraft/src/SoundManager.java +++ ../src_work/minecraft/net/minecraft/client/audio/SoundManager.java
@@ -1,5 +1,9 @@ @@ -1,5 +1,9 @@
package net.minecraft.src; package net.minecraft.client.audio;
+import net.minecraftforge.client.*; +import net.minecraftforge.client.*;
+import net.minecraftforge.client.event.sound.*; +import net.minecraftforge.client.event.sound.*;
@ -10,7 +10,7 @@
import cpw.mods.fml.common.Side; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly; import cpw.mods.fml.common.asm.SideOnly;
import java.io.File; import java.io.File;
@@ -46,9 +50,11 @@ @@ -50,9 +54,11 @@
private Random rand = new Random(); private Random rand = new Random();
private int ticksBeforeMusic; private int ticksBeforeMusic;
@ -23,7 +23,7 @@
} }
/** /**
@@ -63,6 +69,8 @@ @@ -67,6 +73,8 @@
{ {
this.tryToSetLibraryAndCodecs(); this.tryToSetLibraryAndCodecs();
} }
@ -32,7 +32,7 @@
} }
/** /**
@@ -82,6 +90,8 @@ @@ -86,6 +94,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);
@ -41,7 +41,7 @@
sndSystem = new SoundSystem(); sndSystem = new SoundSystem();
this.options.soundVolume = var1; this.options.soundVolume = var1;
this.options.musicVolume = var2; this.options.musicVolume = var2;
@@ -170,10 +180,12 @@ @@ -174,10 +184,12 @@
} }
SoundPoolEntry var1 = this.soundPoolMusic.getRandomSound(); SoundPoolEntry var1 = this.soundPoolMusic.getRandomSound();
@ -55,7 +55,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");
@@ -240,6 +252,7 @@ @@ -244,6 +256,7 @@
if (par1Str != null) if (par1Str != null)
{ {
SoundPoolEntry var6 = this.soundPoolStreaming.getRandomSoundFromSoundPool(par1Str); SoundPoolEntry var6 = this.soundPoolStreaming.getRandomSoundFromSoundPool(par1Str);
@ -63,7 +63,7 @@
if (var6 != null) if (var6 != null)
{ {
@@ -251,6 +264,7 @@ @@ -255,6 +268,7 @@
float var7 = 16.0F; float var7 = 16.0F;
sndSystem.newStreamingSource(true, var5, var6.soundUrl, var6.soundName, false, par2, par3, par4, 2, var7 * 4.0F); sndSystem.newStreamingSource(true, var5, var6.soundUrl, var6.soundName, false, par2, par3, par4, 2, var7 * 4.0F);
sndSystem.setVolume(var5, 0.5F * this.options.soundVolume); sndSystem.setVolume(var5, 0.5F * this.options.soundVolume);
@ -71,7 +71,7 @@
sndSystem.play(var5); sndSystem.play(var5);
} }
} }
@@ -430,6 +444,7 @@ @@ -434,6 +448,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);
@ -79,7 +79,7 @@
if (var7 != null && par5 > 0.0F) if (var7 != null && par5 > 0.0F)
{ {
@@ -451,6 +466,7 @@ @@ -455,6 +470,7 @@
} }
sndSystem.setVolume(var8, par5 * this.options.soundVolume); sndSystem.setVolume(var8, par5 * this.options.soundVolume);
@ -87,7 +87,7 @@
sndSystem.play(var8); sndSystem.play(var8);
} }
} }
@@ -465,6 +481,7 @@ @@ -469,6 +485,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);
@ -95,7 +95,7 @@
if (var4 != null) if (var4 != null)
{ {
@@ -480,6 +497,7 @@ @@ -484,6 +501,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,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/src/SoundPool.java --- ../src_base/minecraft/net/minecraft/client/audio/SoundPool.java
+++ ../src_work/minecraft/net/minecraft/src/SoundPool.java +++ ../src_work/minecraft/net/minecraft/client/audio/SoundPool.java
@@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
import cpw.mods.fml.common.asm.SideOnly; import cpw.mods.fml.common.asm.SideOnly;
import java.io.File; import java.io.File;

View file

@ -1,13 +1,15 @@
--- ../src_base/minecraft/net/minecraft/src/GuiControls.java --- ../src_base/minecraft/net/minecraft/client/gui/GuiControls.java
+++ ../src_work/minecraft/net/minecraft/src/GuiControls.java +++ ../src_work/minecraft/net/minecraft/client/gui/GuiControls.java
@@ -1,4 +1,6 @@ @@ -5,6 +5,8 @@
package net.minecraft.src; import net.minecraft.client.settings.GameSettings;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.util.StringTranslate;
+ +
+import net.minecraftforge.client.GuiControlsScrollPanel; +import net.minecraftforge.client.GuiControlsScrollPanel;
import cpw.mods.fml.common.Side; @SideOnly(Side.CLIENT)
import cpw.mods.fml.common.asm.SideOnly; public class GuiControls extends GuiScreen
@@ -20,6 +22,8 @@ @@ -23,6 +25,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 +18,7 @@
public GuiControls(GuiScreen par1GuiScreen, GameSettings par2GameSettings) public GuiControls(GuiScreen par1GuiScreen, GameSettings par2GameSettings)
{ {
this.parentScreen = par1GuiScreen; this.parentScreen = par1GuiScreen;
@@ -36,15 +40,12 @@ @@ -39,15 +43,12 @@
*/ */
public void initGui() public void initGui()
{ {
@ -35,7 +37,7 @@
this.screenTitle = var1.translateKey("controls.title"); this.screenTitle = var1.translateKey("controls.title");
} }
@@ -53,19 +54,9 @@ @@ -56,19 +57,9 @@
*/ */
protected void actionPerformed(GuiButton par1GuiButton) protected void actionPerformed(GuiButton par1GuiButton)
{ {
@ -55,7 +57,7 @@
} }
} }
@@ -74,17 +65,7 @@ @@ -77,17 +68,7 @@
*/ */
protected void mouseClicked(int par1, int par2, int par3) protected void mouseClicked(int par1, int par2, int par3)
{ {
@ -74,7 +76,7 @@
} }
/** /**
@@ -92,14 +73,7 @@ @@ -95,14 +76,7 @@
*/ */
protected void keyTyped(char par1, int par2) protected void keyTyped(char par1, int par2)
{ {
@ -90,7 +92,7 @@
{ {
super.keyTyped(par1, par2); super.keyTyped(par1, par2);
} }
@@ -111,47 +85,8 @@ @@ -114,47 +88,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,15 +1,15 @@
--- ../src_base/minecraft/net/minecraft/src/GuiIngame.java --- ../src_base/minecraft/net/minecraft/client/gui/GuiIngame.java
+++ ../src_work/minecraft/net/minecraft/src/GuiIngame.java +++ ../src_work/minecraft/net/minecraft/client/gui/GuiIngame.java
@@ -6,6 +6,8 @@ @@ -26,6 +26,8 @@
import java.util.List;
import java.util.Random;
import net.minecraft.client.Minecraft;
+import net.minecraftforge.common.ForgeHooks;
+
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12; import org.lwjgl.opengl.GL12;
@@ -140,7 +142,7 @@ +import net.minecraftforge.common.ForgeHooks;
+
@SideOnly(Side.CLIENT)
public class GuiIngame extends Gui
{
@@ -157,7 +159,7 @@
var47 = var7 - 39; var47 = var7 - 39;
var22 = var47 - 10; var22 = var47 - 10;

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/src/GuiSlot.java --- ../src_base/minecraft/net/minecraft/client/gui/GuiSlot.java
+++ ../src_work/minecraft/net/minecraft/src/GuiSlot.java +++ ../src_work/minecraft/net/minecraft/client/gui/GuiSlot.java
@@ -67,6 +67,8 @@ @@ -68,6 +68,8 @@
private boolean showSelectionBox = true; private boolean showSelectionBox = true;
private boolean field_77243_s; private boolean field_77243_s;
private int field_77242_t; private int field_77242_t;
@ -9,7 +9,7 @@
public GuiSlot(Minecraft par1Minecraft, int par2, int par3, int par4, int par5, int par6) public GuiSlot(Minecraft par1Minecraft, int par2, int par3, int par4, int par5, int par6)
{ {
@@ -331,16 +333,7 @@ @@ -332,16 +334,7 @@
GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_FOG); GL11.glDisable(GL11.GL_FOG);
Tessellator var18 = Tessellator.instance; Tessellator var18 = Tessellator.instance;
@ -27,7 +27,7 @@
var9 = this.width / 2 - 92 - 16; var9 = this.width / 2 - 92 - 16;
var10 = this.top + 4 - (int)this.amountScrolled; var10 = this.top + 4 - (int)this.amountScrolled;
@@ -469,10 +462,10 @@ @@ -470,10 +463,10 @@
/** /**
* Overlays the background to hide scrolled items * Overlays the background to hide scrolled items
*/ */
@ -40,7 +40,7 @@
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
float var6 = 32.0F; float var6 = 32.0F;
var5.startDrawingQuads(); var5.startDrawingQuads();
@@ -484,4 +477,18 @@ @@ -485,4 +478,18 @@
var5.addVertexWithUV(0.0D, (double)par1, 0.0D, 0.0D, (double)((float)par1 / var6)); var5.addVertexWithUV(0.0D, (double)par1, 0.0D, 0.0D, (double)((float)par1 / var6));
var5.draw(); var5.draw();
} }

View file

@ -1,20 +1,24 @@
--- ../src_base/minecraft/net/minecraft/src/GuiAchievements.java --- ../src_base/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java
+++ ../src_work/minecraft/net/minecraft/src/GuiAchievements.java +++ ../src_work/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java
@@ -2,8 +2,13 @@ @@ -2,6 +2,8 @@
import cpw.mods.fml.common.Side; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly; 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.block.Block;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
+import net.minecraftforge.common.AchievementPage; @@ -19,6 +21,8 @@
+
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;
@@ -44,6 +49,10 @@
+import net.minecraftforge.common.AchievementPage;
+
@SideOnly(Side.CLIENT)
public class GuiAchievements extends GuiScreen
{
@@ -55,6 +59,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;
@ -25,7 +29,7 @@
public GuiAchievements(StatFileWriter par1StatFileWriter) public GuiAchievements(StatFileWriter par1StatFileWriter)
{ {
@@ -52,6 +61,14 @@ @@ -63,6 +71,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);
@ -40,7 +44,7 @@
} }
/** /**
@@ -61,6 +78,7 @@ @@ -72,6 +88,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")));
@ -48,7 +52,7 @@
} }
/** /**
@@ -72,6 +90,16 @@ @@ -83,6 +100,16 @@
{ {
this.mc.displayGuiScreen((GuiScreen)null); this.mc.displayGuiScreen((GuiScreen)null);
this.mc.setIngameFocus(); this.mc.setIngameFocus();
@ -65,7 +69,7 @@
} }
super.actionPerformed(par1GuiButton); super.actionPerformed(par1GuiButton);
@@ -296,11 +324,12 @@ @@ -307,11 +334,12 @@
int var27; int var27;
int var30; int var30;
@ -83,7 +87,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;
@@ -334,9 +363,9 @@ @@ -345,9 +373,9 @@
int var42; int var42;
int var41; int var41;

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/src/GuiContainer.java --- ../src_base/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java
+++ ../src_work/minecraft/net/minecraft/src/GuiContainer.java +++ ../src_work/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java
@@ -309,7 +309,7 @@ @@ -318,7 +318,7 @@
if (var6 >= 0) if (var6 >= 0)
{ {
GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_LIGHTING);

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/src/GuiContainerCreative.java --- ../src_base/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java
+++ ../src_work/minecraft/net/minecraft/src/GuiContainerCreative.java +++ ../src_work/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java
@@ -33,6 +33,8 @@ @@ -49,6 +49,8 @@
private Slot field_74235_v = null; private Slot field_74235_v = null;
private boolean field_74234_w = false; private boolean field_74234_w = false;
private CreativeCrafting field_82324_x; private CreativeCrafting field_82324_x;
@ -9,7 +9,7 @@
public GuiContainerCreative(EntityPlayer par1EntityPlayer) public GuiContainerCreative(EntityPlayer par1EntityPlayer)
{ {
@@ -207,6 +209,13 @@ @@ -223,6 +225,13 @@
this.func_74227_b(CreativeTabs.creativeTabArray[var1]); this.func_74227_b(CreativeTabs.creativeTabArray[var1]);
this.field_82324_x = new CreativeCrafting(this.mc); this.field_82324_x = new CreativeCrafting(this.mc);
this.mc.thePlayer.inventoryContainer.addCraftingToCrafters(this.field_82324_x); this.mc.thePlayer.inventoryContainer.addCraftingToCrafters(this.field_82324_x);
@ -23,7 +23,7 @@
} }
else else
{ {
@@ -327,7 +336,7 @@ @@ -343,7 +352,7 @@
{ {
CreativeTabs var3 = CreativeTabs.creativeTabArray[selectedTabIndex]; CreativeTabs var3 = CreativeTabs.creativeTabArray[selectedTabIndex];
@ -32,7 +32,7 @@
{ {
this.fontRenderer.drawString(var3.getTranslatedTabLabel(), 8, 6, 4210752); this.fontRenderer.drawString(var3.getTranslatedTabLabel(), 8, 6, 4210752);
} }
@@ -349,7 +358,7 @@ @@ -365,7 +374,7 @@
{ {
CreativeTabs var9 = var6[var8]; CreativeTabs var9 = var6[var8];
@ -41,7 +41,7 @@
{ {
this.func_74227_b(var9); this.func_74227_b(var9);
return; return;
@@ -365,11 +374,17 @@ @@ -381,11 +390,17 @@
*/ */
private boolean needsScrollBars() private boolean needsScrollBars()
{ {
@ -59,7 +59,7 @@
int var2 = selectedTabIndex; int var2 = selectedTabIndex;
selectedTabIndex = par1CreativeTabs.getTabIndex(); selectedTabIndex = par1CreativeTabs.getTabIndex();
ContainerCreative var3 = (ContainerCreative)this.inventorySlots; ContainerCreative var3 = (ContainerCreative)this.inventorySlots;
@@ -539,21 +554,42 @@ @@ -555,21 +570,42 @@
super.drawScreen(par1, par2, par3); super.drawScreen(par1, par2, par3);
CreativeTabs[] var11 = CreativeTabs.creativeTabArray; CreativeTabs[] var11 = CreativeTabs.creativeTabArray;
@ -107,7 +107,7 @@
} }
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
@@ -574,14 +610,32 @@ @@ -590,14 +626,32 @@
int var8 = var7.length; int var8 = var7.length;
int var9; int var9;
@ -142,7 +142,7 @@
} }
} }
@@ -599,6 +653,14 @@ @@ -615,6 +669,14 @@
this.drawTexturedModalRect(var11, var8 + (int)((float)(var9 - var8 - 17) * this.currentScroll), 232 + (this.needsScrollBars() ? 0 : 12), 0, 12, 15); this.drawTexturedModalRect(var11, var8 + (int)((float)(var9 - var8 - 17) * this.currentScroll), 232 + (this.needsScrollBars() ? 0 : 12), 0, 12, 15);
} }
@ -157,7 +157,7 @@
this.renderCreativeTab(var5); this.renderCreativeTab(var5);
if (var5 == CreativeTabs.tabInventory) if (var5 == CreativeTabs.tabInventory)
@@ -609,6 +671,15 @@ @@ -625,6 +687,15 @@
protected boolean func_74232_a(CreativeTabs par1CreativeTabs, int par2, int par3) protected boolean func_74232_a(CreativeTabs par1CreativeTabs, int par2, int par3)
{ {
@ -173,7 +173,7 @@
int var4 = par1CreativeTabs.getTabColumn(); int var4 = par1CreativeTabs.getTabColumn();
int var5 = 28 * var4; int var5 = 28 * var4;
byte var6 = 0; byte var6 = 0;
@@ -723,7 +794,7 @@ @@ -739,7 +810,7 @@
var8 += 8 + (var3 ? 1 : -1); var8 += 8 + (var3 ? 1 : -1);
GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glEnable(GL12.GL_RESCALE_NORMAL);
@ -182,7 +182,7 @@
itemRenderer.renderItemAndEffectIntoGUI(this.fontRenderer, this.mc.renderEngine, var10, var7, var8); itemRenderer.renderItemAndEffectIntoGUI(this.fontRenderer, this.mc.renderEngine, var10, var7, var8);
itemRenderer.renderItemOverlayIntoGUI(this.fontRenderer, this.mc.renderEngine, var10, var7, var8); itemRenderer.renderItemOverlayIntoGUI(this.fontRenderer, this.mc.renderEngine, var10, var7, var8);
GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_LIGHTING);
@@ -745,6 +816,15 @@ @@ -761,6 +832,15 @@
{ {
this.mc.displayGuiScreen(new GuiStats(this, this.mc.statFileWriter)); this.mc.displayGuiScreen(new GuiStats(this, this.mc.statFileWriter));
} }

View file

@ -0,0 +1,10 @@
--- ../src_base/minecraft/net/minecraft/client/model/ModelBase.java
+++ ../src_work/minecraft/net/minecraft/client/model/ModelBase.java
@@ -10,7 +10,6 @@
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
-@SideOnly(Side.CLIENT)
public abstract class ModelBase
{
public float onGround;

View file

@ -1,14 +1,14 @@
--- ../src_base/minecraft/net/minecraft/src/ModelBox.java --- ../src_base/minecraft/net/minecraft/client/model/ModelBox.java
+++ ../src_work/minecraft/net/minecraft/src/ModelBox.java +++ ../src_work/minecraft/net/minecraft/client/model/ModelBox.java
@@ -3,7 +3,6 @@ @@ -4,7 +4,6 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly; import cpw.mods.fml.common.asm.SideOnly;
import net.minecraft.client.renderer.Tessellator;
-@SideOnly(Side.CLIENT) -@SideOnly(Side.CLIENT)
public class ModelBox public class ModelBox
{ {
/** /**
@@ -95,6 +94,7 @@ @@ -96,6 +95,7 @@
/** /**
* Draw the six sided box defined by this ModelBox * Draw the six sided box defined by this ModelBox
*/ */

View file

@ -1,14 +1,14 @@
--- ../src_base/minecraft/net/minecraft/src/ModelRenderer.java --- ../src_base/minecraft/net/minecraft/client/model/ModelRenderer.java
+++ ../src_work/minecraft/net/minecraft/src/ModelRenderer.java +++ ../src_work/minecraft/net/minecraft/client/model/ModelRenderer.java
@@ -6,7 +6,6 @@ @@ -8,7 +8,6 @@
import java.util.List; import net.minecraft.client.renderer.Tessellator;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
-@SideOnly(Side.CLIENT) -@SideOnly(Side.CLIENT)
public class ModelRenderer public class ModelRenderer
{ {
/** The size of the texture file's width in pixels. */ /** The size of the texture file's width in pixels. */
@@ -119,7 +118,8 @@ @@ -121,7 +120,8 @@
this.rotationPointY = par2; this.rotationPointY = par2;
this.rotationPointZ = par3; this.rotationPointZ = par3;
} }
@ -18,7 +18,7 @@
public void render(float par1) public void render(float par1)
{ {
if (!this.isHidden) if (!this.isHidden)
@@ -202,6 +202,7 @@ @@ -204,6 +204,7 @@
} }
} }
@ -26,7 +26,7 @@
public void renderWithRotation(float par1) public void renderWithRotation(float par1)
{ {
if (!this.isHidden) if (!this.isHidden)
@@ -240,6 +241,7 @@ @@ -242,6 +243,7 @@
/** /**
* Allows the changing of Angles after a box has been rendered * Allows the changing of Angles after a box has been rendered
*/ */
@ -34,7 +34,7 @@
public void postRender(float par1) public void postRender(float par1)
{ {
if (!this.isHidden) if (!this.isHidden)
@@ -284,6 +286,7 @@ @@ -286,6 +288,7 @@
/** /**
* Compiles a GL display list for this model * Compiles a GL display list for this model
*/ */

View file

@ -0,0 +1,10 @@
--- ../src_base/minecraft/net/minecraft/client/model/PositionTextureVertex.java
+++ ../src_work/minecraft/net/minecraft/client/model/PositionTextureVertex.java
@@ -4,7 +4,6 @@
import cpw.mods.fml.common.asm.SideOnly;
import net.minecraft.util.Vec3;
-@SideOnly(Side.CLIENT)
public class PositionTextureVertex
{
public Vec3 vector3D;

View file

@ -0,0 +1,10 @@
--- ../src_base/minecraft/net/minecraft/client/model/TexturedQuad.java
+++ ../src_work/minecraft/net/minecraft/client/model/TexturedQuad.java
@@ -5,7 +5,6 @@
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.util.Vec3;
-@SideOnly(Side.CLIENT)
public class TexturedQuad
{
public PositionTextureVertex[] vertexPositions;

View file

@ -1,18 +1,18 @@
--- ../src_base/minecraft/net/minecraft/src/NetClientHandler.java --- ../src_base/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java
+++ ../src_work/minecraft/net/minecraft/src/NetClientHandler.java +++ ../src_work/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java
@@ -22,6 +22,11 @@ @@ -159,6 +159,11 @@
import java.util.Random; import net.minecraft.world.storage.MapStorage;
import javax.crypto.SecretKey; import org.lwjgl.input.Keyboard;
import net.minecraft.client.Minecraft;
+import net.minecraftforge.client.ForgeHooksClient; +import net.minecraftforge.client.ForgeHooksClient;
+import net.minecraftforge.client.event.ClientChatReceivedEvent; +import net.minecraftforge.client.event.ClientChatReceivedEvent;
+import net.minecraftforge.common.ForgeHooks; +import net.minecraftforge.common.ForgeHooks;
+import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.MinecraftForge;
+ +
import org.lwjgl.input.Keyboard;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@@ -611,7 +616,7 @@ public class NetClientHandler extends NetHandler
{
@@ -746,7 +751,7 @@
public void handleKickDisconnect(Packet255KickDisconnect par1Packet255KickDisconnect) public void handleKickDisconnect(Packet255KickDisconnect par1Packet255KickDisconnect)
{ {
@ -21,10 +21,10 @@
this.disconnected = true; this.disconnected = 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}));
@@ -677,7 +682,11 @@ @@ -811,7 +816,11 @@
public void handleChat(Packet3Chat par1Packet3Chat) public void handleChat(Packet3Chat par1Packet3Chat)
{ {
par1Packet3Chat = FMLNetworkHandler.handleChatMessage(this, par1Packet3Chat); FMLNetworkHandler.onConnectionClosed(this.netManager, this.getPlayer());
- this.mc.ingameGUI.getChatGUI().printChatMessage(par1Packet3Chat.message); - this.mc.ingameGUI.getChatGUI().printChatMessage(par1Packet3Chat.message);
+ ClientChatReceivedEvent event = new ClientChatReceivedEvent(par1Packet3Chat.message); + ClientChatReceivedEvent event = new ClientChatReceivedEvent(par1Packet3Chat.message);
+ if (!MinecraftForge.EVENT_BUS.post(event) && event.message != null) + if (!MinecraftForge.EVENT_BUS.post(event) && event.message != null)
@ -34,7 +34,7 @@
} }
public void handleAnimation(Packet18Animation par1Packet18Animation) public void handleAnimation(Packet18Animation par1Packet18Animation)
@@ -1059,6 +1068,10 @@ @@ -1193,6 +1202,10 @@
{ {
var2.readFromNBT(par1Packet132TileEntityData.customParam1); var2.readFromNBT(par1Packet132TileEntityData.customParam1);
} }

View file

@ -1,16 +1,17 @@
--- ../src_base/minecraft/net/minecraft/src/PlayerControllerMP.java --- ../src_base/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java
+++ ../src_work/minecraft/net/minecraft/src/PlayerControllerMP.java +++ ../src_work/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java
@@ -3,6 +3,9 @@ @@ -20,6 +20,10 @@
import cpw.mods.fml.common.Side; import net.minecraft.world.EnumGameType;
import cpw.mods.fml.common.asm.SideOnly; import net.minecraft.world.World;
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) @SideOnly(Side.CLIENT)
public class PlayerControllerMP public class PlayerControllerMP
@@ -105,6 +108,12 @@ {
@@ -121,6 +125,12 @@
*/ */
public boolean onPlayerDestroyBlock(int par1, int par2, int par3, int par4) public boolean onPlayerDestroyBlock(int par1, int par2, int par3, int par4)
{ {
@ -23,7 +24,7 @@
if (this.currentGameType.isAdventure() && !this.mc.thePlayer.canCurrentToolHarvestBlock(par1, par2, par3)) if (this.currentGameType.isAdventure() && !this.mc.thePlayer.canCurrentToolHarvestBlock(par1, par2, par3))
{ {
return false; return false;
@@ -122,7 +131,7 @@ @@ -138,7 +148,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);
@ -32,7 +33,7 @@
if (var8) if (var8)
{ {
@@ -318,6 +327,12 @@ @@ -334,6 +344,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);
@ -45,7 +46,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))
{ {
@@ -355,7 +370,15 @@ @@ -371,7 +387,15 @@
} }
else else
{ {
@ -62,7 +63,7 @@
} }
} }
@@ -377,9 +400,10 @@ @@ -393,9 +417,10 @@
{ {
par1EntityPlayer.inventory.mainInventory[par1EntityPlayer.inventory.currentItem] = var5; par1EntityPlayer.inventory.mainInventory[par1EntityPlayer.inventory.currentItem] = var5;

View file

@ -1,15 +1,16 @@
--- ../src_base/minecraft/net/minecraft/src/WorldClient.java --- ../src_base/minecraft/net/minecraft/client/multiplayer/WorldClient.java
+++ ../src_work/minecraft/net/minecraft/src/WorldClient.java +++ ../src_work/minecraft/net/minecraft/client/multiplayer/WorldClient.java
@@ -7,6 +7,8 @@ @@ -25,6 +25,9 @@
import java.util.Random; import net.minecraft.world.chunk.IChunkProvider;
import java.util.Set; import net.minecraft.world.storage.SaveHandlerMP;
import net.minecraft.client.Minecraft;
+import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.world.WorldEvent; +import net.minecraftforge.event.world.WorldEvent;
+
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class WorldClient extends World public class WorldClient extends World
@@ -38,8 +40,11 @@ {
@@ -55,8 +58,11 @@
super(new SaveHandlerMP(), "MpServer", WorldProvider.getProviderForDimension(par3), par2WorldSettings, par5Profiler); super(new SaveHandlerMP(), "MpServer", WorldProvider.getProviderForDimension(par3), par2WorldSettings, par5Profiler);
this.sendQueue = par1NetClientHandler; this.sendQueue = par1NetClientHandler;
this.difficultySetting = par4; this.difficultySetting = par4;
@ -22,7 +23,7 @@
} }
/** /**
@@ -271,6 +276,12 @@ @@ -288,6 +294,12 @@
*/ */
protected void updateWeather() protected void updateWeather()
{ {

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/src/EffectRenderer.java --- ../src_base/minecraft/net/minecraft/client/particle/EffectRenderer.java
+++ ../src_work/minecraft/net/minecraft/src/EffectRenderer.java +++ ../src_work/minecraft/net/minecraft/client/particle/EffectRenderer.java
@@ -3,9 +3,18 @@ @@ -3,7 +3,9 @@
import cpw.mods.fml.common.Side; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly; import cpw.mods.fml.common.asm.SideOnly;
import java.util.ArrayList; import java.util.ArrayList;
@ -8,18 +8,27 @@
import java.util.List; import java.util.List;
+import java.util.Map.Entry; +import java.util.Map.Entry;
import java.util.Random; import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.ActiveRenderInfo;
@@ -12,10 +14,17 @@
import net.minecraft.crash.CrashReport;
import net.minecraft.crash.CrashReportCategory;
import net.minecraft.entity.Entity;
+import net.minecraft.item.Item;
import net.minecraft.util.MathHelper;
+import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.ReportedException;
import net.minecraft.world.World;
import org.lwjgl.opengl.GL11;
+ +
+import net.minecraftforge.client.ForgeHooksClient; +import net.minecraftforge.client.ForgeHooksClient;
+import net.minecraftforge.common.ForgeHooks; +import net.minecraftforge.common.ForgeHooks;
+
import org.lwjgl.opengl.GL11;
+
+import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.ArrayListMultimap;
+import com.google.common.collect.Multimap; +import com.google.common.collect.Multimap;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class EffectRenderer public class EffectRenderer
@@ -18,6 +27,8 @@ @@ -28,6 +37,8 @@
/** RNG. */ /** RNG. */
private Random rand = new Random(); private Random rand = new Random();
@ -28,7 +37,7 @@
public EffectRenderer(World par1World, RenderEngine par2RenderEngine) public EffectRenderer(World par1World, RenderEngine par2RenderEngine)
{ {
if (par1World != null) if (par1World != null)
@@ -56,9 +67,13 @@ @@ -66,9 +77,13 @@
for (int var3 = 0; var3 < this.fxLayers[var1].size(); ++var3) for (int var3 = 0; var3 < this.fxLayers[var1].size(); ++var3)
{ {
var2 = (EntityFX)this.fxLayers[var1].get(var3); var2 = (EntityFX)this.fxLayers[var1].get(var3);
@ -45,7 +54,7 @@
{ {
this.fxLayers[var1].remove(var3--); this.fxLayers[var1].remove(var3--);
} }
@@ -71,6 +86,17 @@ @@ -81,6 +96,17 @@
var5.addCrashSectionCallable("Last ticked particle", new CallableLastTickedParticle(this, var2)); var5.addCrashSectionCallable("Last ticked particle", new CallableLastTickedParticle(this, var2));
var5.addCrashSection("Texture index", Integer.valueOf(var1)); var5.addCrashSection("Texture index", Integer.valueOf(var1));
throw new ReportedException(var4); throw new ReportedException(var4);
@ -63,7 +72,7 @@
} }
} }
} }
@@ -120,6 +146,7 @@ @@ -130,6 +156,7 @@
for (int var11 = 0; var11 < this.fxLayers[var8].size(); ++var11) for (int var11 = 0; var11 < this.fxLayers[var8].size(); ++var11)
{ {
EntityFX var12 = (EntityFX)this.fxLayers[var8].get(var11); EntityFX var12 = (EntityFX)this.fxLayers[var8].get(var11);
@ -71,7 +80,7 @@
var10.setBrightness(var12.getBrightnessForRender(par2)); var10.setBrightness(var12.getBrightnessForRender(par2));
var12.renderParticle(var10, par2, var3, var7, var4, var5, var6); var12.renderParticle(var10, par2, var3, var7, var4, var5, var6);
} }
@@ -127,6 +154,27 @@ @@ -137,6 +164,27 @@
var10.draw(); var10.draw();
GL11.glDisable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_BLEND);
} }
@ -99,7 +108,7 @@
} }
} }
@@ -146,6 +194,7 @@ @@ -156,6 +204,7 @@
for (int var11 = 0; var11 < this.fxLayers[var9].size(); ++var11) for (int var11 = 0; var11 < this.fxLayers[var9].size(); ++var11)
{ {
EntityFX var12 = (EntityFX)this.fxLayers[var9].get(var11); EntityFX var12 = (EntityFX)this.fxLayers[var9].get(var11);
@ -107,7 +116,7 @@
var10.setBrightness(var12.getBrightnessForRender(par2)); var10.setBrightness(var12.getBrightnessForRender(par2));
var12.renderParticle(var10, par2, var4, var8, var5, var6, var7); var12.renderParticle(var10, par2, var4, var8, var5, var6, var7);
} }
@@ -160,13 +209,15 @@ @@ -170,13 +219,15 @@
{ {
this.fxLayers[var2].clear(); this.fxLayers[var2].clear();
} }
@ -126,7 +135,7 @@
byte var7 = 4; byte var7 = 4;
for (int var8 = 0; var8 < var7; ++var8) for (int var8 = 0; var8 < var7; ++var8)
@@ -179,7 +230,7 @@ @@ -189,7 +240,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);
@ -135,7 +144,7 @@
} }
} }
} }
@@ -231,12 +282,60 @@ @@ -241,12 +292,60 @@
var8 = (double)par1 + var6.getBlockBoundsMaxX() + (double)var7; var8 = (double)par1 + var6.getBlockBoundsMaxX() + (double)var7;
} }

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/src/EntityDiggingFX.java --- ../src_base/minecraft/net/minecraft/client/particle/EntityDiggingFX.java
+++ ../src_work/minecraft/net/minecraft/src/EntityDiggingFX.java +++ ../src_work/minecraft/net/minecraft/client/particle/EntityDiggingFX.java
@@ -7,20 +7,22 @@ @@ -10,20 +10,22 @@
public class EntityDiggingFX extends EntityFX public class EntityDiggingFX extends EntityFX
{ {
private Block blockInstance; private Block blockInstance;

View file

@ -1,18 +1,18 @@
--- ../src_base/minecraft/net/minecraft/src/EntityRenderer.java --- ../src_base/minecraft/net/minecraft/client/renderer/EntityRenderer.java
+++ ../src_work/minecraft/net/minecraft/src/EntityRenderer.java +++ ../src_work/minecraft/net/minecraft/client/renderer/EntityRenderer.java
@@ -7,6 +7,11 @@ @@ -37,6 +37,11 @@
import java.util.List; import org.lwjgl.opengl.GLContext;
import java.util.Random; import org.lwjgl.util.glu.GLU;
import net.minecraft.client.Minecraft;
+import net.minecraftforge.client.ForgeHooksClient; +import net.minecraftforge.client.ForgeHooksClient;
+import net.minecraftforge.client.event.DrawBlockHighlightEvent; +import net.minecraftforge.client.event.DrawBlockHighlightEvent;
+import net.minecraftforge.client.event.RenderWorldLastEvent; +import net.minecraftforge.client.event.RenderWorldLastEvent;
+import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.MinecraftForge;
+ +
import org.lwjgl.input.Mouse; @SideOnly(Side.CLIENT)
import org.lwjgl.opengl.Display; public class EntityRenderer
import org.lwjgl.opengl.GL11; {
@@ -309,8 +314,15 @@ @@ -333,8 +338,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;
} }
@@ -326,7 +338,7 @@ @@ -350,7 +362,7 @@
} }
else else
{ {
@ -39,7 +39,7 @@
float var4 = 70.0F; float var4 = 70.0F;
if (par2) if (par2)
@@ -413,15 +425,7 @@ @@ -437,15 +449,7 @@
if (!this.mc.gameSettings.debugCamEnable) if (!this.mc.gameSettings.debugCamEnable)
{ {
@ -56,7 +56,7 @@
GL11.glRotatef(var2.prevRotationYaw + (var2.rotationYaw - var2.prevRotationYaw) * par1 + 180.0F, 0.0F, -1.0F, 0.0F); GL11.glRotatef(var2.prevRotationYaw + (var2.rotationYaw - var2.prevRotationYaw) * par1 + 180.0F, 0.0F, -1.0F, 0.0F);
GL11.glRotatef(var2.prevRotationPitch + (var2.rotationPitch - var2.prevRotationPitch) * par1, -1.0F, 0.0F, 0.0F); GL11.glRotatef(var2.prevRotationPitch + (var2.rotationPitch - var2.prevRotationPitch) * par1, -1.0F, 0.0F, 0.0F);
} }
@@ -1112,8 +1116,11 @@ @@ -1136,8 +1140,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");
@ -70,7 +70,7 @@
GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glEnable(GL11.GL_ALPHA_TEST);
} }
} }
@@ -1177,15 +1184,18 @@ @@ -1201,15 +1208,18 @@
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");
@ -92,7 +92,7 @@
GL11.glDisable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_BLEND);
this.mc.mcProfiler.endStartSection("weather"); this.mc.mcProfiler.endStartSection("weather");
this.renderRainSnow(par1); this.renderRainSnow(par1);
@@ -1195,6 +1205,9 @@ @@ -1219,6 +1229,9 @@
{ {
this.func_82829_a(var5, par1); this.func_82829_a(var5, par1);
} }

View file

@ -1,28 +1,35 @@
--- ../src_base/minecraft/net/minecraft/src/ItemRenderer.java --- ../src_base/minecraft/net/minecraft/client/renderer/ItemRenderer.java
+++ ../src_work/minecraft/net/minecraft/src/ItemRenderer.java +++ ../src_work/minecraft/net/minecraft/client/renderer/ItemRenderer.java
@@ -7,6 +7,12 @@ @@ -15,11 +15,19 @@
import net.minecraft.entity.EntityLiving;
import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemMap;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
import net.minecraft.world.storage.MapData;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12; import org.lwjgl.opengl.GL12;
+
+import net.minecraftforge.client.ForgeHooksClient; +import net.minecraftforge.client.ForgeHooksClient;
+import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.client.IItemRenderer;
+import net.minecraftforge.client.MinecraftForgeClient; +import net.minecraftforge.client.MinecraftForgeClient;
+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) @SideOnly(Side.CLIENT)
public class ItemRenderer public class ItemRenderer
{ @@ -54,27 +62,21 @@
@@ -39,27 +45,21 @@
public void renderItem(EntityLiving par1EntityLiving, ItemStack par2ItemStack, int par3)
{ {
GL11.glPushMatrix(); GL11.glPushMatrix();
-
- Block var4 = null; - Block var4 = null;
- if (par2ItemStack.itemID < Block.blocksList.length) - if (par2ItemStack.itemID < Block.blocksList.length)
- { - {
- var4 = Block.blocksList[par2ItemStack.itemID]; - var4 = Block.blocksList[par2ItemStack.itemID];
- } - }
-
- if (var4 != null && RenderBlocks.renderItemIn3d(var4.getRenderType())) - if (var4 != null && RenderBlocks.renderItemIn3d(var4.getRenderType()))
- { - {
- GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture("/terrain.png")); - GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture("/terrain.png"));
@ -53,7 +60,7 @@
Tessellator var5 = Tessellator.instance; Tessellator var5 = Tessellator.instance;
int var6 = par1EntityLiving.getItemIcon(par2ItemStack, par3); int var6 = par1EntityLiving.getItemIcon(par2ItemStack, par3);
@@ -265,8 +265,9 @@ @@ -280,8 +282,9 @@
Render var24; Render var24;
RenderPlayer var26; RenderPlayer var26;
@ -65,7 +72,7 @@
GL11.glPushMatrix(); GL11.glPushMatrix();
var7 = 0.8F; var7 = 0.8F;
var20 = var3.getSwingProgress(par1); var20 = var3.getSwingProgress(par1);
@@ -332,11 +333,17 @@ @@ -347,11 +350,17 @@
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();
@ -88,7 +95,7 @@
} }
GL11.glPopMatrix(); GL11.glPopMatrix();
@@ -439,12 +446,15 @@ @@ -454,12 +463,15 @@
if (var17.getItem().requiresMultipleRenderPasses()) if (var17.getItem().requiresMultipleRenderPasses())
{ {
this.renderItem(var3, var17, 0); this.renderItem(var3, var17, 0);

View file

@ -1,15 +1,15 @@
--- ../src_base/minecraft/net/minecraft/src/RenderBlocks.java --- ../src_base/minecraft/net/minecraft/client/renderer/RenderBlocks.java
+++ ../src_work/minecraft/net/minecraft/src/RenderBlocks.java +++ ../src_work/minecraft/net/minecraft/client/renderer/RenderBlocks.java
@@ -3,6 +3,8 @@ @@ -37,6 +37,8 @@
import cpw.mods.fml.common.Side; import net.minecraft.world.World;
import cpw.mods.fml.common.asm.SideOnly;
import net.minecraft.client.Minecraft;
+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;
+
+import static net.minecraftforge.common.ForgeDirection.*;
@@ -558,9 +560,8 @@ @SideOnly(Side.CLIENT)
public class RenderBlocks
@@ -591,9 +593,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;
@@ -569,6 +570,7 @@ @@ -602,6 +603,7 @@
var5.setBrightness(var25); var5.setBrightness(var25);
var5.setColorOpaque_F(var9, var9, var9); var5.setColorOpaque_F(var9, var9, var9);
int var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 0); int var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 0);
@ -29,7 +29,7 @@
int var28 = (var27 & 15) << 4; int var28 = (var27 & 15) << 4;
int var29 = var27 & 240; int var29 = var27 & 240;
double var30 = (double)((float)var28 / 256.0F); double var30 = (double)((float)var28 / 256.0F);
@@ -587,6 +589,7 @@ @@ -620,6 +622,7 @@
var5.setBrightness(par1Block.getMixedBrightnessForBlock(this.blockAccess, par2, par3 + 1, par4)); var5.setBrightness(par1Block.getMixedBrightnessForBlock(this.blockAccess, par2, par3 + 1, par4));
var5.setColorOpaque_F(var10, var10, var10); var5.setColorOpaque_F(var10, var10, var10);
var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 1); var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 1);
@ -37,7 +37,7 @@
var28 = (var27 & 15) << 4; var28 = (var27 & 15) << 4;
var29 = var27 & 240; var29 = var27 & 240;
var30 = (double)((float)var28 / 256.0F); var30 = (double)((float)var28 / 256.0F);
@@ -2316,7 +2319,7 @@ @@ -2349,7 +2352,7 @@
double var28; double var28;
double var30; double var30;
@ -46,7 +46,7 @@
{ {
float var36 = 0.2F; float var36 = 0.2F;
float var19 = 0.0625F; float var19 = 0.0625F;
@@ -2336,7 +2339,7 @@ @@ -2369,7 +2372,7 @@
var9 = var20; var9 = var20;
} }
@ -55,7 +55,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);
@@ -2348,7 +2351,7 @@ @@ -2381,7 +2384,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);
} }
@ -64,7 +64,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);
@@ -2360,7 +2363,7 @@ @@ -2393,7 +2396,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);
} }
@ -73,7 +73,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);
@@ -2372,7 +2375,7 @@ @@ -2405,7 +2408,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);
} }
@ -82,7 +82,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);
@@ -2384,7 +2387,7 @@ @@ -2417,7 +2420,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);
} }
@ -91,7 +91,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;
@@ -4580,7 +4583,7 @@ @@ -4613,7 +4616,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);
@ -100,7 +100,7 @@
{ {
this.colorRedTopLeft *= par5; this.colorRedTopLeft *= par5;
this.colorRedBottomLeft *= par5; this.colorRedBottomLeft *= par5;
@@ -4703,7 +4706,7 @@ @@ -4736,7 +4739,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));
@ -109,7 +109,7 @@
{ {
this.colorRedTopLeft *= par5; this.colorRedTopLeft *= par5;
this.colorRedBottomLeft *= par5; this.colorRedBottomLeft *= par5;
@@ -4826,7 +4829,7 @@ @@ -4859,7 +4862,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);
@ -118,7 +118,7 @@
{ {
this.colorRedTopLeft *= par5; this.colorRedTopLeft *= par5;
this.colorRedBottomLeft *= par5; this.colorRedBottomLeft *= par5;
@@ -4949,7 +4952,7 @@ @@ -4982,7 +4985,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);
@ -127,7 +127,7 @@
{ {
this.colorRedTopLeft *= par5; this.colorRedTopLeft *= par5;
this.colorRedBottomLeft *= par5; this.colorRedBottomLeft *= par5;
@@ -5061,7 +5064,7 @@ @@ -5094,7 +5097,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);
@ -136,7 +136,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);
@@ -5077,7 +5080,7 @@ @@ -5110,7 +5113,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);
@ -145,7 +145,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);
@@ -5093,7 +5096,7 @@ @@ -5126,7 +5129,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);
@ -154,7 +154,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);
@@ -5109,7 +5112,7 @@ @@ -5142,7 +5145,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,16 +1,15 @@
--- ../src_base/minecraft/net/minecraft/src/RenderEngine.java --- ../src_base/minecraft/net/minecraft/client/renderer/RenderEngine.java
+++ ../src_work/minecraft/net/minecraft/src/RenderEngine.java +++ ../src_work/minecraft/net/minecraft/client/renderer/RenderEngine.java
@@ -20,6 +20,9 @@ @@ -29,6 +29,8 @@
import java.util.logging.Logger; import net.minecraft.util.IntHashMap;
import javax.imageio.ImageIO;
+
+import net.minecraftforge.client.ForgeHooksClient;
+
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import cpw.mods.fml.client.TextureFXManager; +import net.minecraftforge.client.ForgeHooksClient;
@@ -167,6 +170,7 @@ +
@SideOnly(Side.CLIENT)
public class RenderEngine
{
@@ -172,6 +174,7 @@
try try
{ {
@ -18,7 +17,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);
@@ -210,6 +214,7 @@ @@ -215,6 +218,7 @@
} }
this.textureMap.put(par1Str, Integer.valueOf(var3)); this.textureMap.put(par1Str, Integer.valueOf(var3));

View file

@ -1,17 +1,15 @@
--- ../src_base/minecraft/net/minecraft/src/RenderGlobal.java --- ../src_base/minecraft/net/minecraft/client/renderer/RenderGlobal.java
+++ ../src_work/minecraft/net/minecraft/src/RenderGlobal.java +++ ../src_work/minecraft/net/minecraft/client/renderer/RenderGlobal.java
@@ -11,7 +11,10 @@ @@ -61,6 +61,8 @@
import java.util.List;
import java.util.Map;
import java.util.Random;
+
import net.minecraft.client.Minecraft;
+import net.minecraftforge.client.SkyProvider;
+
import org.lwjgl.opengl.ARBOcclusionQuery; import org.lwjgl.opengl.ARBOcclusionQuery;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
@@ -882,6 +885,12 @@ +import net.minecraftforge.client.SkyProvider;
+
@SideOnly(Side.CLIENT)
public class RenderGlobal implements IWorldAccess
{
@@ -928,6 +930,12 @@
*/ */
public void renderSky(float par1) public void renderSky(float par1)
{ {
@ -24,7 +22,7 @@
if (this.mc.theWorld.provider.dimensionId == 1) if (this.mc.theWorld.provider.dimensionId == 1)
{ {
GL11.glDisable(GL11.GL_FOG); GL11.glDisable(GL11.GL_FOG);
@@ -1120,6 +1129,13 @@ @@ -1166,6 +1174,13 @@
public void renderClouds(float par1) public void renderClouds(float par1)
{ {
@ -38,7 +36,7 @@
if (this.mc.theWorld.provider.isSurfaceWorld()) if (this.mc.theWorld.provider.isSurfaceWorld())
{ {
if (this.mc.gameSettings.fancyGraphics) if (this.mc.gameSettings.fancyGraphics)
@@ -1546,6 +1562,11 @@ @@ -1592,6 +1607,11 @@
} }
public void drawBlockDamageTexture(Tessellator par1Tessellator, EntityPlayer par2EntityPlayer, float par3) public void drawBlockDamageTexture(Tessellator par1Tessellator, EntityPlayer par2EntityPlayer, float par3)
@ -50,7 +48,7 @@
{ {
double var4 = par2EntityPlayer.lastTickPosX + (par2EntityPlayer.posX - par2EntityPlayer.lastTickPosX) * (double)par3; double var4 = par2EntityPlayer.lastTickPosX + (par2EntityPlayer.posX - par2EntityPlayer.lastTickPosX) * (double)par3;
double var6 = par2EntityPlayer.lastTickPosY + (par2EntityPlayer.posY - par2EntityPlayer.lastTickPosY) * (double)par3; double var6 = par2EntityPlayer.lastTickPosY + (par2EntityPlayer.posY - par2EntityPlayer.lastTickPosY) * (double)par3;
@@ -1817,6 +1838,7 @@ @@ -1863,6 +1883,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;
@ -58,7 +56,7 @@
if (par1Str.equals("hugeexplosion")) if (par1Str.equals("hugeexplosion"))
{ {
@@ -1949,6 +1971,7 @@ @@ -1995,6 +2016,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);
@ -66,7 +64,7 @@
} }
else if (par1Str.equals("dripWater")) else if (par1Str.equals("dripWater"))
{ {
@@ -1965,6 +1988,7 @@ @@ -2011,6 +2033,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);
@ -74,7 +72,7 @@
} }
else if (par1Str.equals("heart")) else if (par1Str.equals("heart"))
{ {
@@ -1986,6 +2010,7 @@ @@ -2032,6 +2055,7 @@
{ {
int var27 = Integer.parseInt(par1Str.substring(par1Str.indexOf("_") + 1)); int var27 = Integer.parseInt(par1Str.substring(par1Str.indexOf("_") + 1));
var21 = new EntityBreakingFX(this.theWorld, par2, par4, par6, par8, par10, par12, Item.itemsList[var27]); var21 = new EntityBreakingFX(this.theWorld, par2, par4, par6, par8, par10, par12, Item.itemsList[var27]);
@ -82,7 +80,7 @@
} }
else if (par1Str.startsWith("tilecrack_")) else if (par1Str.startsWith("tilecrack_"))
{ {
@@ -1993,11 +2018,12 @@ @@ -2039,11 +2063,12 @@
int var25 = Integer.parseInt(var28[1]); int var25 = Integer.parseInt(var28[1]);
int var26 = Integer.parseInt(var28[2]); int var26 = Integer.parseInt(var28[2]);
var21 = (new EntityDiggingFX(this.theWorld, par2, par4, par6, par8, par10, par12, Block.blocksList[var25], 0, var26)).func_90019_g(var26); var21 = (new EntityDiggingFX(this.theWorld, par2, par4, par6, par8, par10, par12, Block.blocksList[var25], 0, var26)).func_90019_g(var26);

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/src/Tessellator.java --- ../src_base/minecraft/net/minecraft/client/renderer/Tessellator.java
+++ ../src_work/minecraft/net/minecraft/src/Tessellator.java +++ ../src_work/minecraft/net/minecraft/client/renderer/Tessellator.java
@@ -7,6 +7,8 @@ @@ -7,6 +7,8 @@
import java.nio.FloatBuffer; import java.nio.FloatBuffer;
import java.nio.IntBuffer; import java.nio.IntBuffer;

View file

@ -1,16 +1,14 @@
--- ../src_base/minecraft/net/minecraft/src/WorldRenderer.java --- ../src_base/minecraft/net/minecraft/client/renderer/WorldRenderer.java
+++ ../src_work/minecraft/net/minecraft/src/WorldRenderer.java +++ ../src_work/minecraft/net/minecraft/client/renderer/WorldRenderer.java
@@ -5,6 +5,9 @@ @@ -17,13 +17,15 @@
import java.util.ArrayList; import net.minecraft.world.chunk.Chunk;
import java.util.HashSet;
import java.util.List;
+
+import net.minecraftforge.client.ForgeHooksClient;
+
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
+import net.minecraftforge.client.ForgeHooksClient;
+
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@@ -13,7 +16,7 @@ public class WorldRenderer
{
/** 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 +17,7 @@
public static int chunksUpdated = 0; public static int chunksUpdated = 0;
public int posX; public int posX;
public int posY; public int posY;
@@ -182,15 +185,16 @@ @@ -192,15 +194,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 +37,7 @@
{ {
TileEntity var20 = var9.getBlockTileEntity(var17, var15, var16); TileEntity var20 = var9.getBlockTileEntity(var17, var15, var16);
@@ -202,14 +206,17 @@ @@ -212,14 +215,17 @@
int var24 = var23.getRenderBlockPass(); int var24 = var23.getRenderBlockPass();
@ -60,7 +58,7 @@
} }
} }
} }
@@ -218,10 +225,11 @@ @@ -228,10 +234,11 @@
if (var14) if (var14)
{ {

View file

@ -1,8 +1,12 @@
--- ../src_base/minecraft/net/minecraft/src/RenderBiped.java --- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderBiped.java
+++ ../src_work/minecraft/net/minecraft/src/RenderBiped.java +++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderBiped.java
@@ -3,6 +3,11 @@ @@ -11,9 +11,15 @@
import cpw.mods.fml.common.Side; import net.minecraft.entity.EntityLiving;
import cpw.mods.fml.common.asm.SideOnly; import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.Item;
+import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
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;
@ -12,7 +16,7 @@
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class RenderBiped extends RenderLiving public class RenderBiped extends RenderLiving
@@ -48,7 +53,7 @@ @@ -59,7 +65,7 @@
if (var5 instanceof ItemArmor) if (var5 instanceof ItemArmor)
{ {
ItemArmor var6 = (ItemArmor)var5; ItemArmor var6 = (ItemArmor)var5;
@ -21,7 +25,7 @@
ModelBiped var7 = par2 == 2 ? this.field_82425_h : this.field_82423_g; ModelBiped var7 = par2 == 2 ? this.field_82425_h : this.field_82423_g;
var7.bipedHead.showModel = par2 == 0; var7.bipedHead.showModel = par2 == 0;
var7.bipedHeadwear.showModel = par2 == 0; var7.bipedHeadwear.showModel = par2 == 0;
@@ -163,9 +168,12 @@ @@ -174,9 +180,12 @@
GL11.glPushMatrix(); GL11.glPushMatrix();
this.modelBipedMain.bipedHead.postRender(0.0625F); this.modelBipedMain.bipedHead.postRender(0.0625F);
@ -37,7 +41,7 @@
{ {
var6 = 0.625F; var6 = 0.625F;
GL11.glTranslatef(0.0F, -0.25F, 0.0F); GL11.glTranslatef(0.0F, -0.25F, 0.0F);
@@ -207,7 +215,10 @@ @@ -218,7 +227,10 @@
this.modelBipedMain.bipedRightArm.postRender(0.0625F); this.modelBipedMain.bipedRightArm.postRender(0.0625F);
GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F); GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F);
@ -49,7 +53,7 @@
{ {
var6 = 0.5F; var6 = 0.5F;
GL11.glTranslatef(0.0F, 0.1875F, -0.3125F); GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
@@ -254,7 +265,10 @@ @@ -265,7 +277,10 @@
if (var4.getItem().requiresMultipleRenderPasses()) if (var4.getItem().requiresMultipleRenderPasses())
{ {

View file

@ -1,15 +1,21 @@
--- ../src_base/minecraft/net/minecraft/src/RenderItem.java --- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderItem.java
+++ ../src_work/minecraft/net/minecraft/src/RenderItem.java +++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderItem.java
@@ -4,6 +4,8 @@ @@ -12,11 +12,14 @@
import cpw.mods.fml.common.asm.SideOnly; import net.minecraft.entity.Entity;
import java.util.Random; import net.minecraft.entity.item.EntityItem;
import net.minecraft.client.Minecraft; import net.minecraft.item.Item;
+import net.minecraftforge.client.ForgeHooksClient; +import net.minecraft.item.ItemBlock;
+ import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12; import org.lwjgl.opengl.GL12;
@@ -58,13 +60,16 @@ +import net.minecraftforge.client.ForgeHooksClient;
+
@SideOnly(Side.CLIENT)
public class RenderItem extends Render
{
@@ -68,13 +71,16 @@
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);
@ -28,7 +34,7 @@
{ {
GL11.glRotatef(var12, 0.0F, 1.0F, 0.0F); GL11.glRotatef(var12, 0.0F, 1.0F, 0.0F);
@@ -75,9 +80,9 @@ @@ -85,9 +91,9 @@
GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
} }
@ -40,7 +46,7 @@
if (var16 == 1 || var16 == 19 || var16 == 12 || var16 == 2) if (var16 == 1 || var16 == 19 || var16 == 12 || var16 == 2)
{ {
@@ -99,7 +104,7 @@ @@ -109,7 +115,7 @@
} }
var24 = 1.0F; var24 = 1.0F;
@ -49,7 +55,7 @@
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
} }
@@ -121,11 +126,12 @@ @@ -131,11 +137,12 @@
GL11.glScalef(0.5F, 0.5F, 0.5F); GL11.glScalef(0.5F, 0.5F, 0.5F);
} }
@ -67,7 +73,7 @@
var17 = 1.0F; var17 = 1.0F;
if (this.field_77024_a) if (this.field_77024_a)
@@ -155,14 +161,7 @@ @@ -165,14 +172,7 @@
var15 = var10.getIconIndex(); var15 = var10.getIconIndex();
@ -83,7 +89,7 @@
if (this.field_77024_a) if (this.field_77024_a)
{ {
@@ -231,10 +230,10 @@ @@ -241,10 +241,10 @@
float var13; float var13;
float var16; float var16;
@ -97,7 +103,7 @@
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef((float)(par4 - 2), (float)(par5 + 3), -3.0F + this.zLevel); GL11.glTranslatef((float)(par4 - 2), (float)(par5 + 3), -3.0F + this.zLevel);
GL11.glScalef(10.0F, 10.0F, 10.0F); GL11.glScalef(10.0F, 10.0F, 10.0F);
@@ -265,11 +264,11 @@ @@ -275,11 +275,11 @@
if (Item.itemsList[var6].requiresMultipleRenderPasses()) if (Item.itemsList[var6].requiresMultipleRenderPasses())
{ {
GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_LIGHTING);
@ -114,7 +120,7 @@
int var11 = Item.itemsList[var6].getColorFromItemStack(par3ItemStack, var9); int var11 = Item.itemsList[var6].getColorFromItemStack(par3ItemStack, var9);
var12 = (float)(var11 >> 16 & 255) / 255.0F; var12 = (float)(var11 >> 16 & 255) / 255.0F;
var13 = (float)(var11 >> 8 & 255) / 255.0F; var13 = (float)(var11 >> 8 & 255) / 255.0F;
@@ -289,14 +288,7 @@ @@ -299,14 +299,7 @@
{ {
GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_LIGHTING);
@ -130,7 +136,7 @@
var9 = Item.itemsList[var6].getColorFromItemStack(par3ItemStack, 0); var9 = Item.itemsList[var6].getColorFromItemStack(par3ItemStack, 0);
float var17 = (float)(var9 >> 16 & 255) / 255.0F; float var17 = (float)(var9 >> 16 & 255) / 255.0F;
@@ -323,7 +315,10 @@ @@ -333,7 +326,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/client/renderer/entity/RenderManager.java
+++ ../src_work/minecraft/net/minecraft/src/RenderManager.java +++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
@@ -133,12 +133,14 @@ @@ -211,12 +211,14 @@
if (par4EntityLiving.isPlayerSleeping()) if (par4EntityLiving.isPlayerSleeping())
{ {

View file

@ -1,19 +1,24 @@
--- ../src_base/minecraft/net/minecraft/src/RenderPlayer.java --- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java
+++ ../src_work/minecraft/net/minecraft/src/RenderPlayer.java +++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java
@@ -3,6 +3,12 @@ @@ -16,10 +16,17 @@
import cpw.mods.fml.common.Side; import net.minecraft.item.EnumAction;
import cpw.mods.fml.common.asm.SideOnly; import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.client.Minecraft; import net.minecraft.item.Item;
+import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
import org.lwjgl.opengl.GL11;
+
+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.*;
+import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.client.IItemRenderer;
+import net.minecraftforge.client.MinecraftForgeClient; +import net.minecraftforge.client.MinecraftForgeClient;
+import net.minecraftforge.client.ForgeHooksClient; +import net.minecraftforge.client.ForgeHooksClient;
+
import org.lwjgl.opengl.GL11;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@@ -12,6 +18,8 @@ public class RenderPlayer extends RenderLiving
@@ -28,6 +35,8 @@
private ModelBiped modelArmorChestplate; private ModelBiped modelArmorChestplate;
private ModelBiped modelArmor; private ModelBiped modelArmor;
public static String[] armorFilenamePrefix = new String[] {"cloth", "chain", "iron", "diamond", "gold"}; public static String[] armorFilenamePrefix = new String[] {"cloth", "chain", "iron", "diamond", "gold"};
@ -22,7 +27,7 @@
public RenderPlayer() public RenderPlayer()
{ {
@@ -35,7 +43,7 @@ @@ -51,7 +60,7 @@
if (var5 instanceof ItemArmor) if (var5 instanceof ItemArmor)
{ {
ItemArmor var6 = (ItemArmor)var5; ItemArmor var6 = (ItemArmor)var5;
@ -31,7 +36,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;
@@ -104,7 +112,7 @@ @@ -120,7 +129,7 @@
if (var5 instanceof ItemArmor) if (var5 instanceof ItemArmor)
{ {
ItemArmor var6 = (ItemArmor)var5; ItemArmor var6 = (ItemArmor)var5;
@ -40,7 +45,7 @@
float var7 = 1.0F; float var7 = 1.0F;
GL11.glColor3f(var7, var7, var7); GL11.glColor3f(var7, var7, var7);
} }
@@ -156,7 +164,7 @@ @@ -172,7 +181,7 @@
float var8 = 1.6F; float var8 = 1.6F;
float var9 = 0.016666668F * var8; float var9 = 0.016666668F * var8;
double var10 = par1EntityPlayer.getDistanceSqToEntity(this.renderManager.livingPlayer); double var10 = par1EntityPlayer.getDistanceSqToEntity(this.renderManager.livingPlayer);
@ -49,7 +54,7 @@
if (var10 < (double)(var12 * var12)) if (var10 < (double)(var12 * var12))
{ {
@@ -223,9 +231,12 @@ @@ -239,9 +248,12 @@
this.modelBipedMain.bipedHead.postRender(0.0625F); this.modelBipedMain.bipedHead.postRender(0.0625F);
float var5; float var5;
@ -65,7 +70,7 @@
{ {
var5 = 0.625F; var5 = 0.625F;
GL11.glTranslatef(0.0F, -0.25F, 0.0F); GL11.glTranslatef(0.0F, -0.25F, 0.0F);
@@ -343,7 +354,10 @@ @@ -359,7 +371,10 @@
var23 = var21.getItemUseAction(); var23 = var21.getItemUseAction();
} }
@ -77,7 +82,7 @@
{ {
var7 = 0.5F; var7 = 0.5F;
GL11.glTranslatef(0.0F, 0.1875F, -0.3125F); GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
@@ -400,7 +414,7 @@ @@ -416,7 +431,7 @@
if (var21.getItem().requiresMultipleRenderPasses()) if (var21.getItem().requiresMultipleRenderPasses())
{ {

View file

@ -1,16 +1,21 @@
--- ../src_base/minecraft/net/minecraft/src/RenderSnowMan.java --- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderSnowMan.java
+++ ../src_work/minecraft/net/minecraft/src/RenderSnowMan.java +++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderSnowMan.java
@@ -1,4 +1,9 @@ @@ -7,8 +7,14 @@
package net.minecraft.src; import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.monster.EntitySnowman;
+import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import org.lwjgl.opengl.GL11;
+ +
+import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.client.IItemRenderer;
+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.*;
+import net.minecraftforge.client.MinecraftForgeClient; +import net.minecraftforge.client.MinecraftForgeClient;
import cpw.mods.fml.common.Side; @SideOnly(Side.CLIENT)
import cpw.mods.fml.common.asm.SideOnly; public class RenderSnowMan extends RenderLiving
@@ -25,12 +30,15 @@ @@ -31,12 +37,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,15 +1,15 @@
--- ../src_base/minecraft/net/minecraft/src/TileEntityRendererPiston.java --- ../src_base/minecraft/net/minecraft/client/renderer/tileentity/TileEntityRendererPiston.java
+++ ../src_work/minecraft/net/minecraft/src/TileEntityRendererPiston.java +++ ../src_work/minecraft/net/minecraft/client/renderer/tileentity/TileEntityRendererPiston.java
@@ -3,6 +3,8 @@ @@ -12,6 +12,8 @@
import cpw.mods.fml.common.Side; import net.minecraft.tileentity.TileEntityPiston;
import cpw.mods.fml.common.asm.SideOnly; import net.minecraft.world.World;
import net.minecraft.client.Minecraft;
+import net.minecraftforge.client.ForgeHooksClient;
+
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
+
+import net.minecraftforge.client.ForgeHooksClient;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@@ -33,6 +35,7 @@ public class TileEntityRendererPiston extends TileEntitySpecialRenderer
@@ -41,6 +43,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);
@@ -56,6 +59,7 @@ @@ -64,6 +67,7 @@
var10.setTranslation(0.0D, 0.0D, 0.0D); var10.setTranslation(0.0D, 0.0D, 0.0D);
var10.draw(); var10.draw();

View file

@ -1,8 +1,8 @@
--- ../src_base/common/net/minecraft/src/CommandHandler.java --- ../src_base/minecraft/net/minecraft/command/CommandHandler.java
+++ ../src_work/common/net/minecraft/src/CommandHandler.java +++ ../src_work/minecraft/net/minecraft/command/CommandHandler.java
@@ -9,6 +9,9 @@ @@ -10,6 +10,9 @@
import java.util.Set;
import java.util.Map.Entry; import java.util.Map.Entry;
import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.CommandEvent; +import net.minecraftforge.event.CommandEvent;
@ -10,7 +10,7 @@
public class CommandHandler implements ICommandManager public class CommandHandler implements ICommandManager
{ {
/** Map of Strings to the ICommand objects they represent */ /** Map of Strings to the ICommand objects they represent */
@@ -39,6 +42,16 @@ @@ -40,6 +43,16 @@
if (var5.canCommandSenderUseCommand(par1ICommandSender)) if (var5.canCommandSenderUseCommand(par1ICommandSender))
{ {

View file

@ -0,0 +1,10 @@
--- ../src_base/minecraft/net/minecraft/crash/CallableSuspiciousClasses.java
+++ ../src_work/minecraft/net/minecraft/crash/CallableSuspiciousClasses.java
@@ -130,6 +130,6 @@
public Object call()
{
- return "FML is installed";
+ return "FML and Forge are installed";
}
}

View file

@ -1,12 +1,14 @@
--- ../src_base/common/net/minecraft/src/CreativeTabs.java --- ../src_base/minecraft/net/minecraft/creativetab/CreativeTabs.java
+++ ../src_work/common/net/minecraft/src/CreativeTabs.java +++ ../src_work/minecraft/net/minecraft/creativetab/CreativeTabs.java
@@ -2,11 +2,13 @@ @@ -2,13 +2,15 @@
import cpw.mods.fml.common.Side; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly; import cpw.mods.fml.common.asm.SideOnly;
+
+import java.util.Arrays; +import java.util.Arrays;
import java.util.List; import java.util.List;
import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
import net.minecraft.util.StringTranslate;
public class CreativeTabs public class CreativeTabs
{ {
@ -15,7 +17,7 @@
public static final CreativeTabs tabBlock = new CreativeTabBlock(0, "buildingBlocks"); public static final CreativeTabs tabBlock = new CreativeTabBlock(0, "buildingBlocks");
public static final CreativeTabs tabDecorations = new CreativeTabDeco(1, "decorations"); public static final CreativeTabs tabDecorations = new CreativeTabDeco(1, "decorations");
public static final CreativeTabs tabRedstone = new CreativeTabRedstone(2, "redstone"); public static final CreativeTabs tabRedstone = new CreativeTabRedstone(2, "redstone");
@@ -29,8 +31,22 @@ @@ -31,8 +33,22 @@
/** Whether to draw the title in the foreground of the creative GUI */ /** Whether to draw the title in the foreground of the creative GUI */
private boolean drawTitle = true; private boolean drawTitle = true;
@ -38,7 +40,7 @@
this.tabIndex = par1; this.tabIndex = par1;
this.tabLabel = par2Str; this.tabLabel = par2Str;
creativeTabArray[par1] = this; creativeTabArray[par1] = this;
@@ -117,6 +133,10 @@ @@ -119,6 +135,10 @@
*/ */
public int getTabColumn() public int getTabColumn()
{ {
@ -49,7 +51,7 @@
return this.tabIndex % 6; return this.tabIndex % 6;
} }
@@ -127,6 +147,10 @@ @@ -129,6 +149,10 @@
*/ */
public boolean isTabInFirstRow() public boolean isTabInFirstRow()
{ {
@ -60,7 +62,7 @@
return this.tabIndex < 6; return this.tabIndex < 6;
} }
@@ -144,10 +168,40 @@ @@ -146,10 +170,40 @@
{ {
Item var5 = var2[var4]; Item var5 = var2[var4];

View file

@ -1,6 +1,14 @@
--- ../src_base/common/net/minecraft/src/Enchantment.java --- ../src_base/minecraft/net/minecraft/enchantment/Enchantment.java
+++ ../src_work/common/net/minecraft/src/Enchantment.java +++ ../src_work/minecraft/net/minecraft/enchantment/Enchantment.java
@@ -191,4 +191,14 @@ @@ -1,6 +1,7 @@
package net.minecraft.enchantment;
import net.minecraft.entity.EntityLiving;
+import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
import net.minecraft.util.StatCollector;
@@ -195,4 +196,14 @@
String var2 = StatCollector.translateToLocal(this.getName()); String var2 = StatCollector.translateToLocal(this.getName());
return var2 + " " + StatCollector.translateToLocal("enchantment.level." + par1); return var2 + " " + StatCollector.translateToLocal("enchantment.level." + par1);
} }

View file

@ -1,6 +1,6 @@
--- ../src_base/common/net/minecraft/src/EnchantmentHelper.java --- ../src_base/minecraft/net/minecraft/enchantment/EnchantmentHelper.java
+++ ../src_work/common/net/minecraft/src/EnchantmentHelper.java +++ ../src_work/minecraft/net/minecraft/enchantment/EnchantmentHelper.java
@@ -411,7 +411,7 @@ @@ -418,7 +418,7 @@
{ {
Enchantment var7 = var4[var6]; Enchantment var7 = var4[var6];

View file

@ -1,15 +1,39 @@
--- ../src_base/common/net/minecraft/src/Entity.java --- ../src_base/minecraft/net/minecraft/entity/Entity.java
+++ ../src_work/common/net/minecraft/src/Entity.java +++ ../src_work/minecraft/net/minecraft/entity/Entity.java
@@ -4,6 +4,8 @@ @@ -2,8 +2,10 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly; import cpw.mods.fml.common.asm.SideOnly;
+import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
+import java.util.UUID; +import java.util.UUID;
+import java.util.ArrayList; import net.minecraft.block.Block;
import net.minecraft.server.MinecraftServer; import net.minecraft.block.BlockFluid;
import net.minecraft.block.StepSound;
public abstract class Entity @@ -11,8 +13,13 @@
@@ -197,6 +199,11 @@ import net.minecraft.crash.CrashReport;
import net.minecraft.crash.CrashReportCategory;
import net.minecraft.entity.effect.EntityLightningBolt;
+import net.minecraft.entity.item.EntityBoat;
import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.item.EntityItemFrame;
+import net.minecraft.entity.item.EntityMinecart;
+import net.minecraft.entity.item.EntityPainting;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagDouble;
@@ -23,6 +30,7 @@
import net.minecraft.util.DamageSource;
import net.minecraft.util.Direction;
import net.minecraft.util.MathHelper;
+import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.ReportedException;
import net.minecraft.util.StatCollector;
import net.minecraft.util.Vec3;
@@ -221,6 +229,11 @@
protected int field_82152_aq; protected int field_82152_aq;
private boolean field_83001_bt; private boolean field_83001_bt;
public EnumEntitySize myEntitySize; public EnumEntitySize myEntitySize;
@ -21,7 +45,7 @@
public Entity(World par1World) public Entity(World par1World)
{ {
@@ -519,7 +526,7 @@ @@ -543,7 +556,7 @@
if (!this.worldObj.isRemote) if (!this.worldObj.isRemote)
{ {
this.setFlag(0, this.fire > 0); this.setFlag(0, this.fire > 0);
@ -30,7 +54,7 @@
} }
this.firstUpdate = false; this.firstUpdate = false;
@@ -1489,6 +1496,15 @@ @@ -1513,6 +1526,15 @@
par1NBTTagCompound.setInteger("Dimension", this.dimension); par1NBTTagCompound.setInteger("Dimension", this.dimension);
par1NBTTagCompound.setBoolean("Invulnerable", this.field_83001_bt); par1NBTTagCompound.setBoolean("Invulnerable", this.field_83001_bt);
par1NBTTagCompound.setInteger("PortalCooldown", this.timeUntilPortal); par1NBTTagCompound.setInteger("PortalCooldown", this.timeUntilPortal);
@ -46,7 +70,7 @@
this.writeEntityToNBT(par1NBTTagCompound); this.writeEntityToNBT(par1NBTTagCompound);
} }
catch (Throwable var5) catch (Throwable var5)
@@ -1543,6 +1559,14 @@ @@ -1567,6 +1589,14 @@
this.timeUntilPortal = par1NBTTagCompound.getInteger("PortalCooldown"); this.timeUntilPortal = par1NBTTagCompound.getInteger("PortalCooldown");
this.setPosition(this.posX, this.posY, this.posZ); this.setPosition(this.posX, this.posY, this.posZ);
this.setRotation(this.rotationYaw, this.rotationPitch); this.setRotation(this.rotationYaw, this.rotationPitch);
@ -61,7 +85,7 @@
this.readEntityFromNBT(par1NBTTagCompound); this.readEntityFromNBT(par1NBTTagCompound);
} }
catch (Throwable var5) catch (Throwable var5)
@@ -1637,7 +1661,14 @@ @@ -1661,7 +1691,14 @@
{ {
EntityItem var3 = new EntityItem(this.worldObj, this.posX, this.posY + (double)par2, this.posZ, par1ItemStack); EntityItem var3 = new EntityItem(this.worldObj, this.posX, this.posY + (double)par2, this.posZ, par1ItemStack);
var3.delayBeforeCanPickup = 10; var3.delayBeforeCanPickup = 10;
@ -77,7 +101,7 @@
return var3; return var3;
} }
@@ -1996,7 +2027,7 @@ @@ -2020,7 +2057,7 @@
*/ */
public boolean isRiding() public boolean isRiding()
{ {
@ -86,7 +110,7 @@
} }
/** /**
@@ -2331,7 +2362,7 @@ @@ -2355,7 +2392,7 @@
public float func_82146_a(Explosion par1Explosion, Block par2Block, int par3, int par4, int par5) public float func_82146_a(Explosion par1Explosion, Block par2Block, int par3, int par4, int par5)
{ {
@ -95,7 +119,7 @@
} }
public int func_82143_as() public int func_82143_as()
@@ -2367,4 +2398,84 @@ @@ -2391,4 +2428,84 @@
{ {
return this.isBurning(); return this.isBurning();
} }

View file

@ -1,17 +1,26 @@
--- ../src_base/common/net/minecraft/src/EntityLiving.java --- ../src_base/minecraft/net/minecraft/entity/EntityLiving.java
+++ ../src_work/common/net/minecraft/src/EntityLiving.java +++ ../src_work/minecraft/net/minecraft/entity/EntityLiving.java
@@ -7,6 +7,10 @@ @@ -20,6 +20,7 @@
import java.util.Iterator; import net.minecraft.entity.item.EntityXPOrb;
import java.util.List; import net.minecraft.entity.monster.EntityCreeper;
import java.util.Random; import net.minecraft.entity.monster.EntityGhast;
+import net.minecraft.entity.passive.EntityPig;
import net.minecraft.entity.passive.EntityWolf;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityArrow;
@@ -45,6 +46,11 @@
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
+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.living.*; +import net.minecraftforge.event.entity.living.*;
+import static net.minecraftforge.event.entity.living.LivingEvent.*; +import static net.minecraftforge.event.entity.living.LivingEvent.*;
+
public abstract class EntityLiving extends Entity public abstract class EntityLiving extends Entity
{ {
@@ -344,6 +348,7 @@ /**
@@ -381,6 +387,7 @@
public void setAttackTarget(EntityLiving par1EntityLiving) public void setAttackTarget(EntityLiving par1EntityLiving)
{ {
this.attackTarget = par1EntityLiving; this.attackTarget = par1EntityLiving;
@ -19,7 +28,7 @@
} }
/** /**
@@ -440,6 +445,7 @@ @@ -477,6 +484,7 @@
{ {
this.entityLivingToAttack = par1EntityLiving; this.entityLivingToAttack = par1EntityLiving;
this.revengeTimer = this.entityLivingToAttack != null ? 60 : 0; this.revengeTimer = this.entityLivingToAttack != null ? 60 : 0;
@ -27,7 +36,7 @@
} }
protected void entityInit() protected void entityInit()
@@ -729,6 +735,11 @@ @@ -766,6 +774,11 @@
*/ */
public void onUpdate() public void onUpdate()
{ {
@ -39,7 +48,7 @@
super.onUpdate(); super.onUpdate();
if (!this.worldObj.isRemote) if (!this.worldObj.isRemote)
@@ -914,6 +925,11 @@ @@ -951,6 +964,11 @@
*/ */
public boolean attackEntityFrom(DamageSource par1DamageSource, int par2) public boolean attackEntityFrom(DamageSource par1DamageSource, int par2)
{ {
@ -51,7 +60,7 @@
if (this.func_85032_ar()) if (this.func_85032_ar())
{ {
return false; return false;
@@ -1124,6 +1140,11 @@ @@ -1161,6 +1179,11 @@
{ {
if (!this.func_85032_ar()) if (!this.func_85032_ar())
{ {
@ -63,7 +72,7 @@
par2 = this.applyArmorCalculations(par1DamageSource, par2); par2 = this.applyArmorCalculations(par1DamageSource, par2);
par2 = this.applyPotionDamageCalculations(par1DamageSource, par2); par2 = this.applyPotionDamageCalculations(par1DamageSource, par2);
this.health -= par2; this.health -= par2;
@@ -1188,6 +1209,11 @@ @@ -1225,6 +1248,11 @@
*/ */
public void onDeath(DamageSource par1DamageSource) public void onDeath(DamageSource par1DamageSource)
{ {
@ -75,7 +84,7 @@
Entity var2 = par1DamageSource.getEntity(); Entity var2 = par1DamageSource.getEntity();
if (this.scoreValue >= 0 && var2 != null) if (this.scoreValue >= 0 && var2 != null)
@@ -1210,6 +1236,10 @@ @@ -1247,6 +1275,10 @@
{ {
var3 = EnchantmentHelper.getLootingModifier((EntityLiving)var2); var3 = EnchantmentHelper.getLootingModifier((EntityLiving)var2);
} }
@ -86,7 +95,7 @@
if (!this.isChild() && this.worldObj.getGameRules().getGameRuleBooleanValue("doMobLoot")) if (!this.isChild() && this.worldObj.getGameRules().getGameRuleBooleanValue("doMobLoot"))
{ {
@@ -1218,7 +1248,7 @@ @@ -1255,7 +1287,7 @@
if (this.recentlyHit > 0) if (this.recentlyHit > 0)
{ {
@ -95,7 +104,7 @@
if (var4 < 5) if (var4 < 5)
{ {
@@ -1226,6 +1256,16 @@ @@ -1263,6 +1295,16 @@
} }
} }
} }
@ -112,7 +121,7 @@
} }
this.worldObj.setEntityState(this, (byte)3); this.worldObj.setEntityState(this, (byte)3);
@@ -1269,6 +1309,12 @@ @@ -1306,6 +1348,12 @@
*/ */
protected void fall(float par1) protected void fall(float par1)
{ {
@ -125,7 +134,7 @@
super.fall(par1); super.fall(par1);
int var2 = MathHelper.ceiling_float_int(par1 - 3.0F); int var2 = MathHelper.ceiling_float_int(par1 - 3.0F);
@@ -1471,7 +1517,7 @@ @@ -1508,7 +1556,7 @@
int var2 = MathHelper.floor_double(this.boundingBox.minY); int var2 = MathHelper.floor_double(this.boundingBox.minY);
int var3 = MathHelper.floor_double(this.posZ); int var3 = MathHelper.floor_double(this.posZ);
int var4 = this.worldObj.getBlockId(var1, var2, var3); int var4 = this.worldObj.getBlockId(var1, var2, var3);
@ -134,7 +143,7 @@
} }
/** /**
@@ -1878,6 +1924,7 @@ @@ -1915,6 +1963,7 @@
} }
this.isAirBorne = true; this.isAirBorne = true;
@ -142,7 +151,7 @@
} }
/** /**
@@ -2415,8 +2462,6 @@ @@ -2452,8 +2501,6 @@
return this.getCreatureAttribute() == EnumCreatureAttribute.UNDEAD; return this.getCreatureAttribute() == EnumCreatureAttribute.UNDEAD;
} }
@ -151,7 +160,7 @@
/** /**
* Remove the speified potion effect from this entity. * Remove the speified potion effect from this entity.
*/ */
@@ -2867,4 +2912,42 @@ @@ -2904,4 +2951,42 @@
{ {
this.dataWatcher.updateObject(10, Byte.valueOf((byte)par1)); this.dataWatcher.updateObject(10, Byte.valueOf((byte)par1));
} }

View file

@ -1,6 +1,6 @@
--- ../src_base/common/net/minecraft/src/EntityDragon.java --- ../src_base/minecraft/net/minecraft/entity/boss/EntityDragon.java
+++ ../src_work/common/net/minecraft/src/EntityDragon.java +++ ../src_work/minecraft/net/minecraft/entity/boss/EntityDragon.java
@@ -517,10 +517,11 @@ @@ -530,10 +530,11 @@
for (int var12 = var4; var12 <= var7; ++var12) for (int var12 = var4; var12 <= var7; ++var12)
{ {
int var13 = this.worldObj.getBlockId(var10, var11, var12); int var13 = this.worldObj.getBlockId(var10, var11, var12);

View file

@ -1,7 +1,7 @@
--- ../src_base/common/net/minecraft/src/EntityItem.java --- ../src_base/minecraft/net/minecraft/entity/item/EntityItem.java
+++ ../src_work/common/net/minecraft/src/EntityItem.java +++ ../src_work/minecraft/net/minecraft/entity/item/EntityItem.java
@@ -1,6 +1,11 @@ @@ -1,6 +1,11 @@
package net.minecraft.src; package net.minecraft.entity.item;
import java.util.Iterator; import java.util.Iterator;
+ +
@ -11,20 +11,20 @@
+import net.minecraftforge.event.entity.player.EntityItemPickupEvent; +import net.minecraftforge.event.entity.player.EntityItemPickupEvent;
import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
@@ -20,6 +25,11 @@ @@ -33,6 +38,11 @@
/** The EntityItem's random initial float height. */ /** The EntityItem's random initial float height. */
public float hoverStart = (float)(Math.random() * Math.PI * 2.0D); public float hoverStart = (float)(Math.random() * Math.PI * 2.0D);
+
+ /** + /**
+ * The maximum age of this EntityItem. The item is expired once this is reached. + * The maximum age of this EntityItem. The item is expired once this is reached.
+ */ + */
+ public int lifespan = 6000; + public int lifespan = 6000;
+
public EntityItem(World par1World, double par2, double par4, double par6, ItemStack par8ItemStack) public EntityItem(World par1World, double par2, double par4, double par6, ItemStack par8ItemStack)
{ {
@@ -32,6 +42,7 @@ super(par1World);
@@ -44,6 +54,7 @@
this.motionX = (double)((float)(Math.random() * 0.20000000298023224D - 0.10000000149011612D)); this.motionX = (double)((float)(Math.random() * 0.20000000298023224D - 0.10000000149011612D));
this.motionY = 0.20000000298023224D; this.motionY = 0.20000000298023224D;
this.motionZ = (double)((float)(Math.random() * 0.20000000298023224D - 0.10000000149011612D)); this.motionZ = (double)((float)(Math.random() * 0.20000000298023224D - 0.10000000149011612D));
@ -32,7 +32,7 @@
} }
/** /**
@@ -112,7 +123,20 @@ @@ -124,7 +135,20 @@
++this.age; ++this.age;
@ -54,7 +54,7 @@
{ {
this.setDead(); this.setDead();
} }
@@ -228,6 +252,7 @@ @@ -240,6 +264,7 @@
{ {
par1NBTTagCompound.setShort("Health", (short)((byte)this.health)); par1NBTTagCompound.setShort("Health", (short)((byte)this.health));
par1NBTTagCompound.setShort("Age", (short)this.age); par1NBTTagCompound.setShort("Age", (short)this.age);
@ -62,7 +62,7 @@
if (this.item != null) if (this.item != null)
{ {
@@ -245,10 +270,15 @@ @@ -257,10 +282,15 @@
NBTTagCompound var2 = par1NBTTagCompound.getCompoundTag("Item"); NBTTagCompound var2 = par1NBTTagCompound.getCompoundTag("Item");
this.item = ItemStack.loadItemStackFromNBT(var2); this.item = ItemStack.loadItemStackFromNBT(var2);
@ -79,7 +79,7 @@
} }
/** /**
@@ -258,9 +288,21 @@ @@ -270,9 +300,21 @@
{ {
if (!this.worldObj.isRemote) if (!this.worldObj.isRemote)
{ {

View file

@ -1,22 +1,27 @@
--- ../src_base/common/net/minecraft/src/EntityMinecart.java --- ../src_base/minecraft/net/minecraft/entity/item/EntityMinecart.java
+++ ../src_work/common/net/minecraft/src/EntityMinecart.java +++ ../src_work/minecraft/net/minecraft/entity/item/EntityMinecart.java
@@ -2,7 +2,15 @@ @@ -2,6 +2,8 @@
import cpw.mods.fml.common.Side; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly; import cpw.mods.fml.common.asm.SideOnly;
+ +
+import java.util.ArrayList; +import java.util.ArrayList;
import java.util.List; import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.BlockRail;
@@ -21,6 +23,11 @@
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
+import net.minecraftforge.common.IMinecartCollisionHandler; +import net.minecraftforge.common.IMinecartCollisionHandler;
+import net.minecraftforge.common.MinecartRegistry; +import net.minecraftforge.common.MinecartRegistry;
+import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.entity.minecart.MinecartCollisionEvent; +import net.minecraftforge.event.entity.minecart.*;
+import net.minecraftforge.event.entity.minecart.MinecartInteractEvent; +
+import net.minecraftforge.event.entity.minecart.MinecartUpdateEvent;
public class EntityMinecart extends Entity implements IInventory public class EntityMinecart extends Entity implements IInventory
{ {
@@ -33,6 +41,25 @@ /** Array of item stacks stored in minecart (for storage minecarts). */
@@ -50,6 +57,25 @@
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
protected double velocityZ; protected double velocityZ;
@ -42,7 +47,7 @@
public EntityMinecart(World par1World) public EntityMinecart(World par1World)
{ {
super(par1World); super(par1World);
@@ -44,6 +71,18 @@ @@ -61,6 +87,18 @@
this.setSize(0.98F, 0.7F); this.setSize(0.98F, 0.7F);
this.yOffset = this.height / 2.0F; this.yOffset = this.height / 2.0F;
this.field_82344_g = par1World != null ? par1World.func_82735_a(this) : null; this.field_82344_g = par1World != null ? par1World.func_82735_a(this) : null;
@ -61,7 +66,7 @@
} }
/** /**
@@ -69,6 +108,10 @@ @@ -86,6 +124,10 @@
*/ */
public AxisAlignedBB getCollisionBox(Entity par1Entity) public AxisAlignedBB getCollisionBox(Entity par1Entity)
{ {
@ -72,7 +77,7 @@
return par1Entity.canBePushed() ? par1Entity.boundingBox : null; return par1Entity.canBePushed() ? par1Entity.boundingBox : null;
} }
@@ -77,6 +120,10 @@ @@ -94,6 +136,10 @@
*/ */
public AxisAlignedBB getBoundingBox() public AxisAlignedBB getBoundingBox()
{ {
@ -83,7 +88,7 @@
return null; return null;
} }
@@ -85,7 +132,7 @@ @@ -102,7 +148,7 @@
*/ */
public boolean canBePushed() public boolean canBePushed()
{ {
@ -92,7 +97,7 @@
} }
public EntityMinecart(World par1World, double par2, double par4, double par6, int par8) public EntityMinecart(World par1World, double par2, double par4, double par6, int par8)
@@ -140,48 +187,7 @@ @@ -157,48 +203,7 @@
} }
this.setDead(); this.setDead();
@ -142,7 +147,7 @@
} }
return true; return true;
@@ -299,7 +305,7 @@ @@ -316,7 +321,7 @@
this.kill(); this.kill();
} }
@ -151,7 +156,7 @@
{ {
this.worldObj.spawnParticle("largesmoke", this.posX, this.posY + 0.8D, this.posZ, 0.0D, 0.0D, 0.0D); this.worldObj.spawnParticle("largesmoke", this.posX, this.posY + 0.8D, this.posZ, 0.0D, 0.0D, 0.0D);
} }
@@ -343,18 +349,18 @@ @@ -360,18 +365,18 @@
double var6 = 0.0078125D; double var6 = 0.0078125D;
int var8 = this.worldObj.getBlockId(var1, var2, var3); int var8 = this.worldObj.getBlockId(var1, var2, var3);
@ -173,7 +178,7 @@
var12 = !var11; var12 = !var11;
} }
@@ -368,25 +374,7 @@ @@ -385,25 +390,7 @@
this.posY = (double)(var2 + 1); this.posY = (double)(var2 + 1);
} }
@ -200,7 +205,7 @@
int[][] var13 = field_70500_g[var10]; int[][] var13 = field_70500_g[var10];
double var14 = (double)(var13[1][0] - var13[0][0]); double var14 = (double)(var13[1][0] - var13[0][0]);
@@ -419,7 +407,7 @@ @@ -436,7 +423,7 @@
} }
} }
@ -209,7 +214,7 @@
{ {
var24 = Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ); var24 = Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ);
@@ -467,36 +455,8 @@ @@ -484,36 +471,8 @@
this.posX = var26 + var14 * var24; this.posX = var26 + var14 * var24;
this.posZ = var28 + var16 * var24; this.posZ = var28 + var16 * var24;
this.setPosition(this.posX, this.posY + (double)this.yOffset, this.posZ); this.setPosition(this.posX, this.posY + (double)this.yOffset, this.posZ);
@ -248,7 +253,7 @@
if (var13[0][1] != 0 && MathHelper.floor_double(this.posX) - var1 == var13[0][0] && MathHelper.floor_double(this.posZ) - var3 == var13[0][2]) if (var13[0][1] != 0 && MathHelper.floor_double(this.posX) - var1 == var13[0][0] && MathHelper.floor_double(this.posZ) - var3 == var13[0][2])
{ {
@@ -507,42 +467,7 @@ @@ -524,42 +483,7 @@
this.setPosition(this.posX, this.posY + (double)var13[1][1], this.posZ); this.setPosition(this.posX, this.posY + (double)var13[1][1], this.posZ);
} }
@ -292,7 +297,7 @@
Vec3 var52 = this.func_70489_a(this.posX, this.posY, this.posZ); Vec3 var52 = this.func_70489_a(this.posX, this.posY, this.posZ);
@@ -572,30 +497,14 @@ @@ -589,30 +513,14 @@
double var41; double var41;
@ -331,7 +336,7 @@
{ {
var41 = Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ); var41 = Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ);
@@ -631,41 +540,7 @@ @@ -648,41 +556,7 @@
} }
else else
{ {
@ -374,7 +379,7 @@
} }
this.doBlockCollisions(); this.doBlockCollisions();
@@ -692,7 +567,18 @@ @@ -709,7 +583,18 @@
} }
this.setRotation(this.rotationYaw, this.rotationPitch); this.setRotation(this.rotationYaw, this.rotationPitch);
@ -394,7 +399,7 @@
if (var15 != null && !var15.isEmpty()) if (var15 != null && !var15.isEmpty())
{ {
@@ -717,17 +603,8 @@ @@ -734,17 +619,8 @@
this.riddenByEntity = null; this.riddenByEntity = null;
} }
@ -414,7 +419,7 @@
} }
} }
@@ -751,12 +628,7 @@ @@ -768,12 +644,7 @@
} }
else else
{ {
@ -428,7 +433,7 @@
par3 = (double)var10; par3 = (double)var10;
@@ -802,13 +674,8 @@ @@ -819,13 +690,8 @@
if (BlockRail.isRailBlock(var10)) if (BlockRail.isRailBlock(var10))
{ {
@ -443,7 +448,7 @@
if (var11 >= 2 && var11 <= 5) if (var11 >= 2 && var11 <= 5)
{ {
@@ -873,13 +740,14 @@ @@ -890,13 +756,14 @@
{ {
par1NBTTagCompound.setInteger("Type", this.minecartType); par1NBTTagCompound.setInteger("Type", this.minecartType);
@ -462,7 +467,7 @@
{ {
NBTTagList var2 = new NBTTagList(); NBTTagList var2 = new NBTTagList();
@@ -905,13 +773,21 @@ @@ -922,13 +789,21 @@
{ {
this.minecartType = par1NBTTagCompound.getInteger("Type"); this.minecartType = par1NBTTagCompound.getInteger("Type");
@ -488,7 +493,7 @@
{ {
NBTTagList var2 = par1NBTTagCompound.getTagList("Items"); NBTTagList var2 = par1NBTTagCompound.getTagList("Items");
this.cargoItems = new ItemStack[this.getSizeInventory()]; this.cargoItems = new ItemStack[this.getSizeInventory()];
@@ -940,11 +816,17 @@ @@ -957,11 +832,17 @@
*/ */
public void applyEntityCollision(Entity par1Entity) public void applyEntityCollision(Entity par1Entity)
{ {
@ -507,7 +512,7 @@
{ {
par1Entity.mountEntity(this); par1Entity.mountEntity(this);
} }
@@ -990,7 +872,7 @@ @@ -1007,7 +888,7 @@
double var18 = par1Entity.motionX + this.motionX; double var18 = par1Entity.motionX + this.motionX;
double var20 = par1Entity.motionZ + this.motionZ; double var20 = par1Entity.motionZ + this.motionZ;
@ -516,7 +521,7 @@
{ {
this.motionX *= 0.20000000298023224D; this.motionX *= 0.20000000298023224D;
this.motionZ *= 0.20000000298023224D; this.motionZ *= 0.20000000298023224D;
@@ -998,7 +880,7 @@ @@ -1015,7 +896,7 @@
par1Entity.motionX *= 0.949999988079071D; par1Entity.motionX *= 0.949999988079071D;
par1Entity.motionZ *= 0.949999988079071D; par1Entity.motionZ *= 0.949999988079071D;
} }
@ -525,7 +530,7 @@
{ {
par1Entity.motionX *= 0.20000000298023224D; par1Entity.motionX *= 0.20000000298023224D;
par1Entity.motionZ *= 0.20000000298023224D; par1Entity.motionZ *= 0.20000000298023224D;
@@ -1033,7 +915,7 @@ @@ -1050,7 +931,7 @@
*/ */
public int getSizeInventory() public int getSizeInventory()
{ {
@ -534,7 +539,7 @@
} }
/** /**
@@ -1136,7 +1018,12 @@ @@ -1153,7 +1034,12 @@
*/ */
public boolean interact(EntityPlayer par1EntityPlayer) public boolean interact(EntityPlayer par1EntityPlayer)
{ {
@ -548,7 +553,7 @@
{ {
if (this.riddenByEntity != null && this.riddenByEntity instanceof EntityPlayer && this.riddenByEntity != par1EntityPlayer) if (this.riddenByEntity != null && this.riddenByEntity instanceof EntityPlayer && this.riddenByEntity != par1EntityPlayer)
{ {
@@ -1148,14 +1035,14 @@ @@ -1165,14 +1051,14 @@
par1EntityPlayer.mountEntity(this); par1EntityPlayer.mountEntity(this);
} }
} }
@ -565,7 +570,7 @@
{ {
ItemStack var2 = par1EntityPlayer.inventory.getCurrentItem(); ItemStack var2 = par1EntityPlayer.inventory.getCurrentItem();
@@ -1279,4 +1166,375 @@ @@ -1296,4 +1182,375 @@
{ {
return this.dataWatcher.getWatchableObjectInt(18); return this.dataWatcher.getWatchableObjectInt(18);
} }

View file

@ -1,7 +1,8 @@
--- ../src_base/common/net/minecraft/src/EntityMooshroom.java --- ../src_base/minecraft/net/minecraft/entity/passive/EntityMooshroom.java
+++ ../src_work/common/net/minecraft/src/EntityMooshroom.java +++ ../src_work/minecraft/net/minecraft/entity/passive/EntityMooshroom.java
@@ -1,6 +1,10 @@ @@ -8,7 +8,11 @@
package net.minecraft.src; import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
-public class EntityMooshroom extends EntityCow -public class EntityMooshroom extends EntityCow
+import java.util.ArrayList; +import java.util.ArrayList;
@ -12,7 +13,7 @@
{ {
public EntityMooshroom(World par1World) public EntityMooshroom(World par1World)
{ {
@@ -31,31 +35,7 @@ @@ -39,31 +43,7 @@
} }
} }
@ -45,7 +46,7 @@
} }
/** /**
@@ -70,4 +50,29 @@ @@ -78,4 +58,29 @@
{ {
return this.spawnBabyAnimal(par1EntityAgeable); return this.spawnBabyAnimal(par1EntityAgeable);
} }

View file

@ -1,6 +1,6 @@
--- ../src_base/common/net/minecraft/src/EntityOcelot.java --- ../src_base/minecraft/net/minecraft/entity/passive/EntityOcelot.java
+++ ../src_work/common/net/minecraft/src/EntityOcelot.java +++ ../src_work/minecraft/net/minecraft/entity/passive/EntityOcelot.java
@@ -333,8 +333,9 @@ @@ -354,8 +354,9 @@
} }
int var4 = this.worldObj.getBlockId(var1, var2 - 1, var3); int var4 = this.worldObj.getBlockId(var1, var2 - 1, var3);

View file

@ -1,12 +1,17 @@
--- ../src_base/common/net/minecraft/src/EntitySheep.java --- ../src_base/minecraft/net/minecraft/entity/passive/EntitySheep.java
+++ ../src_work/common/net/minecraft/src/EntitySheep.java +++ ../src_work/minecraft/net/minecraft/entity/passive/EntitySheep.java
@@ -2,9 +2,13 @@ @@ -2,6 +2,8 @@
import cpw.mods.fml.common.Side; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly; import cpw.mods.fml.common.asm.SideOnly;
+ +
+import java.util.ArrayList; +import java.util.ArrayList;
import java.util.Random; import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityAgeable;
@@ -24,7 +26,9 @@
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
-public class EntitySheep extends EntityAnimal -public class EntitySheep extends EntityAnimal
+import net.minecraftforge.common.IShearable; +import net.minecraftforge.common.IShearable;
@ -15,7 +20,7 @@
{ {
private final InventoryCrafting field_90016_e = new InventoryCrafting(new ContainerSheep(this), 2, 1); private final InventoryCrafting field_90016_e = new InventoryCrafting(new ContainerSheep(this), 2, 1);
@@ -118,28 +122,6 @@ @@ -138,28 +142,6 @@
*/ */
public boolean interact(EntityPlayer par1EntityPlayer) public boolean interact(EntityPlayer par1EntityPlayer)
{ {
@ -44,7 +49,7 @@
return super.interact(par1EntityPlayer); return super.interact(par1EntityPlayer);
} }
@@ -328,4 +310,24 @@ @@ -348,4 +330,24 @@
{ {
return this.func_90015_b(par1EntityAgeable); return this.func_90015_b(par1EntityAgeable);
} }

View file

@ -1,8 +1,8 @@
--- ../src_base/common/net/minecraft/src/EntityPlayer.java --- ../src_base/minecraft/net/minecraft/entity/player/EntityPlayer.java
+++ ../src_work/common/net/minecraft/src/EntityPlayer.java +++ ../src_work/minecraft/net/minecraft/entity/player/EntityPlayer.java
@@ -8,8 +8,21 @@ @@ -55,8 +55,21 @@
import java.util.Iterator; import net.minecraft.world.World;
import java.util.List; import net.minecraft.world.chunk.IChunkProvider;
+import net.minecraftforge.common.ForgeHooks; +import net.minecraftforge.common.ForgeHooks;
+import net.minecraftforge.common.ISpecialArmor.ArmorProperties; +import net.minecraftforge.common.ISpecialArmor.ArmorProperties;
@ -22,7 +22,7 @@
/** Inventory of the player */ /** Inventory of the player */
public InventoryPlayer inventory = new InventoryPlayer(this); public InventoryPlayer inventory = new InventoryPlayer(this);
private InventoryEnderChest theInventoryEnderChest = new InventoryEnderChest(); private InventoryEnderChest theInventoryEnderChest = new InventoryEnderChest();
@@ -212,6 +225,7 @@ @@ -259,6 +272,7 @@
if (var1 == this.itemInUse) if (var1 == this.itemInUse)
{ {
@ -30,7 +30,7 @@
if (this.itemInUseCount <= 25 && this.itemInUseCount % 4 == 0) if (this.itemInUseCount <= 25 && this.itemInUseCount % 4 == 0)
{ {
this.updateItemUse(var1, 5); this.updateItemUse(var1, 5);
@@ -450,11 +464,11 @@ @@ -497,11 +511,11 @@
this.cameraYaw = 0.0F; this.cameraYaw = 0.0F;
this.addMountedMovementStat(this.posX - var1, this.posY - var3, this.posZ - var5); this.addMountedMovementStat(this.posX - var1, this.posY - var3, this.posZ - var5);
@ -44,7 +44,7 @@
} }
} }
@@ -577,6 +591,9 @@ @@ -624,6 +638,9 @@
this.setPosition(this.posX, this.posY, this.posZ); this.setPosition(this.posX, this.posY, this.posZ);
this.motionY = 0.10000000149011612D; this.motionY = 0.10000000149011612D;
@ -54,7 +54,7 @@
if (this.username.equals("Notch")) if (this.username.equals("Notch"))
{ {
this.dropPlayerItemWithRandomChoice(new ItemStack(Item.appleRed, 1), true); this.dropPlayerItemWithRandomChoice(new ItemStack(Item.appleRed, 1), true);
@@ -585,6 +602,20 @@ @@ -632,6 +649,20 @@
if (!this.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory")) if (!this.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory"))
{ {
this.inventory.dropAllItems(); this.inventory.dropAllItems();
@ -75,7 +75,7 @@
} }
if (par1DamageSource != null) if (par1DamageSource != null)
@@ -624,7 +655,16 @@ @@ -671,7 +702,16 @@
*/ */
public EntityItem dropOneItem() public EntityItem dropOneItem()
{ {
@ -93,7 +93,7 @@
} }
/** /**
@@ -633,7 +673,7 @@ @@ -680,7 +720,7 @@
*/ */
public EntityItem dropPlayerItem(ItemStack par1ItemStack) public EntityItem dropPlayerItem(ItemStack par1ItemStack)
{ {
@ -102,7 +102,7 @@
} }
/** /**
@@ -685,18 +725,33 @@ @@ -732,18 +772,33 @@
*/ */
public void joinEntityItemWithWorld(EntityItem par1EntityItem) public void joinEntityItemWithWorld(EntityItem par1EntityItem)
{ {
@ -140,7 +140,7 @@
{ {
var2 += (float)(var3 * var3 + 1); var2 += (float)(var3 * var3 + 1);
} }
@@ -721,7 +776,8 @@ @@ -768,7 +823,8 @@
var2 /= 5.0F; var2 /= 5.0F;
} }
@ -150,7 +150,7 @@
} }
/** /**
@@ -729,7 +785,7 @@ @@ -776,7 +832,7 @@
*/ */
public boolean canHarvestBlock(Block par1Block) public boolean canHarvestBlock(Block par1Block)
{ {
@ -159,7 +159,7 @@
} }
/** /**
@@ -1014,12 +1070,22 @@ @@ -1061,12 +1117,22 @@
{ {
if (!this.func_85032_ar()) if (!this.func_85032_ar())
{ {
@ -183,7 +183,7 @@
par2 = this.applyPotionDamageCalculations(par1DamageSource, par2); par2 = this.applyPotionDamageCalculations(par1DamageSource, par2);
this.addExhaustion(par1DamageSource.getHungerDamage()); this.addExhaustion(par1DamageSource.getHungerDamage());
this.health -= par2; this.health -= par2;
@@ -1060,6 +1126,10 @@ @@ -1107,6 +1173,10 @@
public boolean interactWith(Entity par1Entity) public boolean interactWith(Entity par1Entity)
{ {
@ -194,7 +194,7 @@
if (par1Entity.interact(this)) if (par1Entity.interact(this))
{ {
return true; return true;
@@ -1103,7 +1173,9 @@ @@ -1150,7 +1220,9 @@
*/ */
public void destroyCurrentEquippedItem() public void destroyCurrentEquippedItem()
{ {
@ -204,7 +204,7 @@
} }
/** /**
@@ -1120,6 +1192,15 @@ @@ -1167,6 +1239,15 @@
*/ */
public void attackTargetEntityWithCurrentItem(Entity par1Entity) public void attackTargetEntityWithCurrentItem(Entity par1Entity)
{ {
@ -220,7 +220,7 @@
if (par1Entity.canAttackWithItem()) if (par1Entity.canAttackWithItem())
{ {
if (!par1Entity.func_85031_j(this)) if (!par1Entity.func_85031_j(this))
@@ -1278,6 +1359,12 @@ @@ -1325,6 +1406,12 @@
*/ */
public EnumStatus sleepInBedAt(int par1, int par2, int par3) public EnumStatus sleepInBedAt(int par1, int par2, int par3)
{ {
@ -233,7 +233,7 @@
if (!this.worldObj.isRemote) if (!this.worldObj.isRemote)
{ {
if (this.isPlayerSleeping() || !this.isEntityAlive()) if (this.isPlayerSleeping() || !this.isEntityAlive())
@@ -1317,6 +1404,11 @@ @@ -1364,6 +1451,11 @@
{ {
int var9 = this.worldObj.getBlockMetadata(par1, par2, par3); int var9 = this.worldObj.getBlockMetadata(par1, par2, par3);
int var5 = BlockBed.getDirection(var9); int var5 = BlockBed.getDirection(var9);
@ -245,7 +245,7 @@
float var10 = 0.5F; float var10 = 0.5F;
float var7 = 0.5F; float var7 = 0.5F;
@@ -1387,10 +1479,12 @@ @@ -1434,10 +1526,12 @@
ChunkCoordinates var4 = this.playerLocation; ChunkCoordinates var4 = this.playerLocation;
ChunkCoordinates var5 = this.playerLocation; ChunkCoordinates var5 = this.playerLocation;
@ -262,7 +262,7 @@
if (var5 == null) if (var5 == null)
{ {
@@ -1427,7 +1521,9 @@ @@ -1474,7 +1568,9 @@
*/ */
private boolean isInBed() private boolean isInBed()
{ {
@ -273,7 +273,7 @@
} }
/** /**
@@ -1442,9 +1538,12 @@ @@ -1489,9 +1585,12 @@
var3.loadChunk(par1ChunkCoordinates.posX - 3 >> 4, par1ChunkCoordinates.posZ + 3 >> 4); var3.loadChunk(par1ChunkCoordinates.posX - 3 >> 4, par1ChunkCoordinates.posZ + 3 >> 4);
var3.loadChunk(par1ChunkCoordinates.posX + 3 >> 4, par1ChunkCoordinates.posZ + 3 >> 4); var3.loadChunk(par1ChunkCoordinates.posX + 3 >> 4, par1ChunkCoordinates.posZ + 3 >> 4);
@ -289,7 +289,7 @@
return var8; return var8;
} }
else else
@@ -1466,8 +1565,11 @@ @@ -1513,8 +1612,11 @@
{ {
if (this.playerLocation != null) if (this.playerLocation != null)
{ {
@ -303,7 +303,7 @@
switch (var2) switch (var2)
{ {
@@ -1776,7 +1878,7 @@ @@ -1823,7 +1925,7 @@
{ {
if (par1ItemStack.getItem().requiresMultipleRenderPasses()) if (par1ItemStack.getItem().requiresMultipleRenderPasses())
{ {
@ -312,7 +312,7 @@
} }
if (this.itemInUse != null && par1ItemStack.itemID == Item.bow.shiftedIndex) if (this.itemInUse != null && par1ItemStack.itemID == Item.bow.shiftedIndex)
@@ -1798,6 +1900,7 @@ @@ -1845,6 +1947,7 @@
return 101; return 101;
} }
} }
@ -320,7 +320,7 @@
} }
return var3; return var3;
@@ -2016,6 +2119,14 @@ @@ -2063,6 +2166,14 @@
} }
this.theInventoryEnderChest = par1EntityPlayer.theInventoryEnderChest; this.theInventoryEnderChest = par1EntityPlayer.theInventoryEnderChest;

View file

@ -1,17 +1,26 @@
--- ../src_base/common/net/minecraft/src/EntityPlayerMP.java --- ../src_base/minecraft/net/minecraft/entity/player/EntityPlayerMP.java
+++ ../src_work/common/net/minecraft/src/EntityPlayerMP.java +++ ../src_work/minecraft/net/minecraft/entity/player/EntityPlayerMP.java
@@ -8,6 +8,10 @@ @@ -9,6 +9,7 @@
import java.util.LinkedList;
import java.util.List; import java.util.List;
import net.minecraft.server.MinecraftServer; import net.minecraft.entity.Entity;
import net.minecraft.entity.IMerchant;
+import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ContainerBeacon;
@@ -74,6 +75,11 @@
import net.minecraft.world.WorldServer;
import net.minecraft.world.chunk.Chunk;
+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.PlayerDropsEvent; +import net.minecraftforge.event.entity.player.PlayerDropsEvent;
+import net.minecraftforge.event.world.ChunkWatchEvent; +import net.minecraftforge.event.world.ChunkWatchEvent;
+
public class EntityPlayerMP extends EntityPlayer implements ICrafting public class EntityPlayerMP extends EntityPlayer implements ICrafting
{ {
@@ -80,18 +84,10 @@ private StringTranslate translator = new StringTranslate("en_US");
@@ -145,18 +151,10 @@
par4ItemInWorldManager.thisPlayerMP = this; par4ItemInWorldManager.thisPlayerMP = this;
this.theItemInWorldManager = par4ItemInWorldManager; this.theItemInWorldManager = par4ItemInWorldManager;
this.renderDistance = par1MinecraftServer.getConfigurationManager().getViewDistance(); this.renderDistance = par1MinecraftServer.getConfigurationManager().getViewDistance();
@ -31,7 +40,7 @@
this.setLocationAndAngles((double)var6 + 0.5D, (double)var8, (double)var7 + 0.5D, 0.0F, 0.0F); this.setLocationAndAngles((double)var6 + 0.5D, (double)var8, (double)var7 + 0.5D, 0.0F, 0.0F);
this.mcServer = par1MinecraftServer; this.mcServer = par1MinecraftServer;
@@ -188,7 +184,10 @@ @@ -253,7 +251,10 @@
if (var9 != null && this.worldObj.blockExists(var9.chunkXPos << 4, 0, var9.chunkZPos << 4)) if (var9 != null && this.worldObj.blockExists(var9.chunkXPos << 4, 0, var9.chunkZPos << 4))
{ {
var6.add(this.worldObj.getChunkFromChunkCoords(var9.chunkXPos, var9.chunkZPos)); var6.add(this.worldObj.getChunkFromChunkCoords(var9.chunkXPos, var9.chunkZPos));
@ -43,7 +52,7 @@
} }
} }
@@ -209,6 +208,7 @@ @@ -274,6 +275,7 @@
{ {
Chunk var10 = (Chunk)var11.next(); Chunk var10 = (Chunk)var11.next();
this.getServerForPlayer().getEntityTracker().func_85172_a(this, var10); this.getServerForPlayer().getEntityTracker().func_85172_a(this, var10);
@ -51,7 +60,7 @@
} }
} }
} }
@@ -253,11 +253,29 @@ @@ -318,11 +320,29 @@
*/ */
public void onDeath(DamageSource par1DamageSource) public void onDeath(DamageSource par1DamageSource)
{ {

View file

@ -1,6 +1,6 @@
--- ../src_base/common/net/minecraft/src/ContainerFurnace.java --- ../src_base/minecraft/net/minecraft/inventory/ContainerFurnace.java
+++ ../src_work/common/net/minecraft/src/ContainerFurnace.java +++ ../src_work/minecraft/net/minecraft/inventory/ContainerFurnace.java
@@ -120,7 +120,7 @@ @@ -125,7 +125,7 @@
} }
else if (par2 != 1 && par2 != 0) else if (par2 != 1 && par2 != 0)
{ {

View file

@ -1,6 +1,6 @@
--- ../src_base/common/net/minecraft/src/Slot.java --- ../src_base/minecraft/net/minecraft/inventory/Slot.java
+++ ../src_work/common/net/minecraft/src/Slot.java +++ ../src_work/minecraft/net/minecraft/inventory/Slot.java
@@ -19,6 +19,12 @@ @@ -21,6 +21,12 @@
/** display position of the inventory slot on the screen y axis */ /** display position of the inventory slot on the screen y axis */
public int yDisplayPosition; public int yDisplayPosition;
@ -13,7 +13,7 @@
public Slot(IInventory par1IInventory, int par2, int par3, int par4) public Slot(IInventory par1IInventory, int par2, int par3, int par4)
{ {
@@ -145,6 +151,44 @@ @@ -147,6 +153,44 @@
*/ */
public int getBackgroundIconIndex() public int getBackgroundIconIndex()
{ {

View file

@ -1,15 +1,17 @@
--- ../src_base/common/net/minecraft/src/SlotCrafting.java --- ../src_base/minecraft/net/minecraft/inventory/SlotCrafting.java
+++ ../src_work/common/net/minecraft/src/SlotCrafting.java +++ ../src_work/minecraft/net/minecraft/inventory/SlotCrafting.java
@@ -1,4 +1,8 @@ @@ -6,6 +6,10 @@
package net.minecraft.src; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.AchievementList;
+ +
+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;
import cpw.mods.fml.common.registry.GameRegistry; public class SlotCrafting extends Slot
{
@@ -119,9 +123,15 @@ @@ -124,9 +128,15 @@
if (var4.getItem().hasContainerItem()) if (var4.getItem().hasContainerItem())
{ {

View file

@ -1,6 +1,6 @@
--- ../src_base/common/net/minecraft/src/SlotFurnace.java --- ../src_base/minecraft/net/minecraft/inventory/SlotFurnace.java
+++ ../src_work/common/net/minecraft/src/SlotFurnace.java +++ ../src_work/minecraft/net/minecraft/inventory/SlotFurnace.java
@@ -62,7 +62,7 @@ @@ -69,7 +69,7 @@
if (!this.thePlayer.worldObj.isRemote) if (!this.thePlayer.worldObj.isRemote)
{ {
int var2 = this.field_75228_b; int var2 = this.field_75228_b;

View file

@ -0,0 +1,28 @@
--- ../src_base/minecraft/net/minecraft/item/EnumArmorMaterial.java
+++ ../src_work/minecraft/net/minecraft/item/EnumArmorMaterial.java
@@ -22,6 +22,9 @@
/** Return the enchantability factor of the material */
private int enchantability;
+
+ //Added by forge for custom Armor materials.
+ public Item customCraftingMaterial = null;
private EnumArmorMaterial(int par3, int[] par4ArrayOfInteger, int par5)
{
@@ -61,6 +64,14 @@
*/
public int getArmorCraftingMaterial()
{
- return this == CLOTH ? Item.leather.shiftedIndex : (this == CHAIN ? Item.ingotIron.shiftedIndex : (this == GOLD ? Item.ingotGold.shiftedIndex : (this == IRON ? Item.ingotIron.shiftedIndex : (this == DIAMOND ? Item.diamond.shiftedIndex : 0))));
+ switch (this)
+ {
+ case CLOTH: return Item.leather.shiftedIndex;
+ case CHAIN: return Item.ingotIron.shiftedIndex;
+ case GOLD: return Item.ingotGold.shiftedIndex;
+ case IRON: return Item.ingotIron.shiftedIndex;
+ case DIAMOND: return Item.diamond.shiftedIndex;
+ default: return (customCraftingMaterial == null ? 0 : customCraftingMaterial.shiftedIndex);
+ }
}
}

View file

@ -0,0 +1,28 @@
--- ../src_base/minecraft/net/minecraft/item/EnumToolMaterial.java
+++ ../src_work/minecraft/net/minecraft/item/EnumToolMaterial.java
@@ -30,6 +30,9 @@
/** Defines the natural enchantability factor of the material. */
private final int enchantability;
+
+ //Added by forge for custom Armor materials.
+ public Item customCraftingMaterial = null;
private EnumToolMaterial(int par3, int par4, float par5, int par6, int par7)
{
@@ -86,6 +89,14 @@
*/
public int getToolCraftingMaterial()
{
- return this == WOOD ? Block.planks.blockID : (this == STONE ? Block.cobblestone.blockID : (this == GOLD ? Item.ingotGold.shiftedIndex : (this == IRON ? Item.ingotIron.shiftedIndex : (this == EMERALD ? Item.diamond.shiftedIndex : 0))));
+ switch (this)
+ {
+ case WOOD: return Block.planks.blockID;
+ case STONE: return Block.cobblestone.blockID;
+ case GOLD: return Item.ingotGold.shiftedIndex;
+ case IRON: return Item.ingotIron.shiftedIndex;
+ case EMERALD: return Item.diamond.shiftedIndex;
+ default: return (customCraftingMaterial == null ? 0 : customCraftingMaterial.shiftedIndex);
+ }
}
}

View file

@ -1,15 +1,24 @@
--- ../src_base/common/net/minecraft/src/Item.java --- ../src_base/minecraft/net/minecraft/item/Item.java
+++ ../src_work/common/net/minecraft/src/Item.java +++ ../src_work/minecraft/net/minecraft/item/Item.java
@@ -212,17 +212,25 @@ @@ -14,6 +14,7 @@
import net.minecraft.entity.item.EntityItemFrame;
import net.minecraft.entity.item.EntityPainting;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionHelper;
import net.minecraft.stats.StatList;
@@ -227,6 +228,9 @@
/** full name of item from language file */ /** full name of item from language file */
private String itemName; private String itemName;
+
+ /** FORGE: To disable repair recipes. */ + /** FORGE: To disable repair recipes. */
+ protected boolean canRepair = true; + protected boolean canRepair = true;
+
public Item(int par1) public Item(int par1)
{ {
this.shiftedIndex = 256 + par1; @@ -234,12 +238,17 @@
if (itemsList[256 + par1] != null) if (itemsList[256 + par1] != null)
{ {
@ -18,8 +27,9 @@
} }
itemsList[256 + par1] = this; itemsList[256 + par1] = this;
GameData.newItemAdded(this); GameData.newItemAdded(this);
+ +
+ if (!(this instanceof ItemBlock)) + if (!(this instanceof ItemBlock))
+ { + {
+ isDefaultTexture = "/gui/items.png".equals(getTextureFile()); + isDefaultTexture = "/gui/items.png".equals(getTextureFile());
@ -27,7 +37,7 @@
} }
/** /**
@@ -608,6 +616,10 @@ @@ -625,6 +634,10 @@
float var18 = var15 * var16; float var18 = var15 * var16;
float var20 = var14 * var16; float var20 = var14 * var16;
double var21 = 5.0D; double var21 = 5.0D;
@ -38,7 +48,7 @@
Vec3 var23 = var13.addVector((double)var18 * var21, (double)var17 * var21, (double)var20 * var21); Vec3 var23 = var13.addVector((double)var18 * var21, (double)var17 * var21, (double)var20 * var21);
return par1World.rayTraceBlocks_do_do(var13, var23, par3, !par3); return par1World.rayTraceBlocks_do_do(var13, var23, par3, !par3);
} }
@@ -682,4 +694,279 @@ @@ -699,4 +712,279 @@
{ {
StatList.initStats(); StatList.initStats();
} }

View file

@ -1,6 +1,6 @@
--- ../src_base/common/net/minecraft/src/ItemBlock.java --- ../src_base/minecraft/net/minecraft/item/ItemBlock.java
+++ ../src_work/common/net/minecraft/src/ItemBlock.java +++ ../src_work/minecraft/net/minecraft/item/ItemBlock.java
@@ -14,6 +14,7 @@ @@ -19,6 +19,7 @@
super(par1); super(par1);
this.blockID = par1 + 256; this.blockID = par1 + 256;
this.setIconIndex(Block.blocksList[par1 + 256].getBlockTextureFromSide(2)); this.setIconIndex(Block.blocksList[par1 + 256].getBlockTextureFromSide(2));
@ -8,7 +8,7 @@
} }
/** /**
@@ -36,7 +37,8 @@ @@ -41,7 +42,8 @@
{ {
par7 = 1; par7 = 1;
} }
@ -18,7 +18,7 @@
{ {
if (par7 == 0) if (par7 == 0)
{ {
@@ -87,14 +89,8 @@ @@ -92,14 +94,8 @@
int var13 = this.getMetadata(par1ItemStack.getItemDamage()); int var13 = this.getMetadata(par1ItemStack.getItemDamage());
int var14 = Block.blocksList[this.blockID].func_85104_a(par3World, par4, par5, par6, par7, par8, par9, par10, var13); int var14 = Block.blocksList[this.blockID].func_85104_a(par3World, par4, par5, par6, par7, par8, par9, par10, var13);
@ -35,7 +35,7 @@
par3World.playSoundEffect((double)((float)par4 + 0.5F), (double)((float)par5 + 0.5F), (double)((float)par6 + 0.5F), var12.stepSound.getPlaceSound(), (var12.stepSound.getVolume() + 1.0F) / 2.0F, var12.stepSound.getPitch() * 0.8F); par3World.playSoundEffect((double)((float)par4 + 0.5F), (double)((float)par5 + 0.5F), (double)((float)par6 + 0.5F), var12.stepSound.getPlaceSound(), (var12.stepSound.getVolume() + 1.0F) / 2.0F, var12.stepSound.getPitch() * 0.8F);
--par1ItemStack.stackSize; --par1ItemStack.stackSize;
} }
@@ -120,7 +116,8 @@ @@ -125,7 +121,8 @@
{ {
par5 = 1; par5 = 1;
} }
@ -45,7 +45,7 @@
{ {
if (par5 == 0) if (par5 == 0)
{ {
@@ -185,4 +182,28 @@ @@ -190,4 +187,28 @@
{ {
Block.blocksList[this.blockID].getSubBlocks(par1, par2CreativeTabs, par3List); Block.blocksList[this.blockID].getSubBlocks(par1, par2CreativeTabs, par3List);
} }

View file

@ -1,7 +1,9 @@
--- ../src_base/common/net/minecraft/src/ItemBow.java --- ../src_base/minecraft/net/minecraft/item/ItemBow.java
+++ ../src_work/common/net/minecraft/src/ItemBow.java +++ ../src_work/minecraft/net/minecraft/item/ItemBow.java
@@ -1,4 +1,8 @@ @@ -6,6 +6,10 @@
package net.minecraft.src; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.world.World;
+ +
+import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.entity.player.ArrowLooseEvent; +import net.minecraftforge.event.entity.player.ArrowLooseEvent;
@ -9,7 +11,7 @@
public class ItemBow extends Item public class ItemBow extends Item
{ {
@@ -15,11 +19,20 @@ @@ -22,11 +26,20 @@
*/ */
public void onPlayerStoppedUsing(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer, int par4) public void onPlayerStoppedUsing(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer, int par4)
{ {
@ -31,7 +33,7 @@
float var7 = (float)var6 / 20.0F; float var7 = (float)var6 / 20.0F;
var7 = (var7 * var7 + var7 * 2.0F) / 3.0F; var7 = (var7 * var7 + var7 * 2.0F) / 3.0F;
@@ -104,6 +117,13 @@ @@ -111,6 +124,13 @@
*/ */
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{ {

View file

@ -1,7 +1,9 @@
--- ../src_base/common/net/minecraft/src/ItemBucket.java --- ../src_base/minecraft/net/minecraft/item/ItemBucket.java
+++ ../src_work/common/net/minecraft/src/ItemBucket.java +++ ../src_work/minecraft/net/minecraft/item/ItemBucket.java
@@ -1,4 +1,8 @@ @@ -8,6 +8,10 @@
package net.minecraft.src; import net.minecraft.util.EnumMovingObjectType;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
+ +
+import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.Event; +import net.minecraftforge.event.Event;
@ -9,7 +11,7 @@
public class ItemBucket extends Item public class ItemBucket extends Item
{ {
@@ -31,6 +35,32 @@ @@ -40,6 +44,32 @@
} }
else else
{ {

View file

@ -1,13 +1,6 @@
--- ../src_base/common/net/minecraft/src/ItemBucketMilk.java --- ../src_base/minecraft/net/minecraft/item/ItemBucketMilk.java
+++ ../src_work/common/net/minecraft/src/ItemBucketMilk.java +++ ../src_work/minecraft/net/minecraft/item/ItemBucketMilk.java
@@ -1,4 +1,6 @@ @@ -22,7 +22,7 @@
package net.minecraft.src;
+
+import java.util.HashMap;
public class ItemBucketMilk extends Item
{
@@ -18,7 +20,7 @@
if (!par2World.isRemote) if (!par2World.isRemote)
{ {

View file

@ -1,18 +1,18 @@
--- ../src_base/common/net/minecraft/src/ItemDye.java --- ../src_base/minecraft/net/minecraft/item/ItemDye.java
+++ ../src_work/common/net/minecraft/src/ItemDye.java +++ ../src_work/minecraft/net/minecraft/item/ItemDye.java
@@ -3,6 +3,11 @@ @@ -18,6 +18,11 @@
import cpw.mods.fml.common.Side; import net.minecraft.util.MathHelper;
import cpw.mods.fml.common.asm.SideOnly; import net.minecraft.world.World;
import java.util.List;
+
+import net.minecraftforge.common.ForgeHooks; +import net.minecraftforge.common.ForgeHooks;
+import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.Event.Result; +import net.minecraftforge.event.Event.Result;
+import net.minecraftforge.event.entity.player.BonemealEvent; +import net.minecraftforge.event.entity.player.BonemealEvent;
+
public class ItemDye extends Item public class ItemDye extends Item
{ {
@@ -54,6 +59,21 @@ /** List of dye color names */
@@ -68,6 +73,21 @@
if (par1ItemStack.getItemDamage() == 15) if (par1ItemStack.getItemDamage() == 15)
{ {
var11 = par3World.getBlockId(par4, par5, par6); var11 = par3World.getBlockId(par4, par5, par6);
@ -34,7 +34,7 @@
if (var11 == Block.sapling.blockID) if (var11 == Block.sapling.blockID)
{ {
@@ -153,16 +173,9 @@ @@ -167,16 +187,9 @@
par3World.setBlockAndMetadataWithNotify(var13, var14, var15, Block.tallGrass.blockID, 1); par3World.setBlockAndMetadataWithNotify(var13, var14, var15, Block.tallGrass.blockID, 1);
} }
} }

View file

@ -1,15 +1,15 @@
--- ../src_base/common/net/minecraft/src/ItemHoe.java --- ../src_base/minecraft/net/minecraft/item/ItemHoe.java
+++ ../src_work/common/net/minecraft/src/ItemHoe.java +++ ../src_work/minecraft/net/minecraft/item/ItemHoe.java
@@ -1,5 +1,8 @@ @@ -1,5 +1,8 @@
package net.minecraft.src; package net.minecraft.item;
+import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.Event.Result; +import net.minecraftforge.event.Event.Result;
+import net.minecraftforge.event.entity.player.UseHoeEvent; +import net.minecraftforge.event.entity.player.UseHoeEvent;
import cpw.mods.fml.common.Side; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly; import cpw.mods.fml.common.asm.SideOnly;
import net.minecraft.block.Block;
@@ -28,6 +31,18 @@ @@ -32,6 +35,18 @@
} }
else else
{ {

View file

@ -1,8 +1,9 @@
--- ../src_base/common/net/minecraft/src/ItemInWorldManager.java --- ../src_base/minecraft/net/minecraft/item/ItemInWorldManager.java
+++ ../src_work/common/net/minecraft/src/ItemInWorldManager.java +++ ../src_work/minecraft/net/minecraft/item/ItemInWorldManager.java
@@ -1,7 +1,17 @@ @@ -8,8 +8,19 @@
package net.minecraft.src; import net.minecraft.world.World;
+ import net.minecraft.world.WorldServer;
+import net.minecraftforge.common.ForgeHooks; +import net.minecraftforge.common.ForgeHooks;
+import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.Event; +import net.minecraftforge.event.Event;
@ -10,15 +11,16 @@
+import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent; +import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent;
+import net.minecraftforge.event.entity.player.PlayerInteractEvent; +import net.minecraftforge.event.entity.player.PlayerInteractEvent;
+import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action; +import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action;
+
public class ItemInWorldManager public class ItemInWorldManager
{ {
+ /** Forge reach distance */ + /** Forge reach distance */
+ private double blockReachDistance = 5.0d; + private double blockReachDistance = 5.0d;
+
/** The world object that this object is connected to. */ /** The world object that this object is connected to. */
public World theWorld; public World theWorld;
@@ -134,6 +144,13 @@ @@ -142,6 +153,13 @@
{ {
if (!this.gameType.isAdventure() || this.thisPlayerMP.canCurrentToolHarvestBlock(par1, par2, par3)) if (!this.gameType.isAdventure() || this.thisPlayerMP.canCurrentToolHarvestBlock(par1, par2, par3))
{ {
@ -32,7 +34,7 @@
if (this.isCreative()) if (this.isCreative())
{ {
if (!this.theWorld.extinguishFire((EntityPlayer)null, par1, par2, par3, par4)) if (!this.theWorld.extinguishFire((EntityPlayer)null, par1, par2, par3, par4))
@@ -143,15 +160,32 @@ @@ -151,15 +169,32 @@
} }
else else
{ {
@ -71,7 +73,7 @@
} }
if (var6 > 0 && var5 >= 1.0F) if (var6 > 0 && var5 >= 1.0F)
@@ -225,7 +259,7 @@ @@ -233,7 +268,7 @@
var4.onBlockHarvested(this.theWorld, par1, par2, par3, var5, this.thisPlayerMP); var4.onBlockHarvested(this.theWorld, par1, par2, par3, var5, this.thisPlayerMP);
} }
@ -80,7 +82,7 @@
if (var4 != null && var6) if (var4 != null && var6)
{ {
@@ -246,19 +280,30 @@ @@ -254,19 +289,30 @@
} }
else else
{ {
@ -113,7 +115,7 @@
if (var7 != null) if (var7 != null)
{ {
@@ -267,9 +312,11 @@ @@ -275,9 +321,11 @@
if (var7.stackSize == 0) if (var7.stackSize == 0)
{ {
this.thisPlayerMP.destroyCurrentEquippedItem(); this.thisPlayerMP.destroyCurrentEquippedItem();
@ -125,7 +127,7 @@
if (var6 && var8) if (var6 && var8)
{ {
Block.blocksList[var4].harvestBlock(this.theWorld, this.thisPlayerMP, par1, par2, par3, var5); Block.blocksList[var4].harvestBlock(this.theWorld, this.thisPlayerMP, par1, par2, par3, var5);
@@ -310,6 +357,7 @@ @@ -318,6 +366,7 @@
if (var6.stackSize == 0) if (var6.stackSize == 0)
{ {
par1EntityPlayer.inventory.mainInventory[par1EntityPlayer.inventory.currentItem] = null; par1EntityPlayer.inventory.mainInventory[par1EntityPlayer.inventory.currentItem] = null;
@ -133,7 +135,7 @@
} }
if (!par1EntityPlayer.isUsingItem()) if (!par1EntityPlayer.isUsingItem())
@@ -327,29 +375,56 @@ @@ -335,29 +384,56 @@
*/ */
public boolean activateBlockOrUseItem(EntityPlayer par1EntityPlayer, World par2World, ItemStack par3ItemStack, int par4, int par5, int par6, int par7, float par8, float par9, float par10) public boolean activateBlockOrUseItem(EntityPlayer par1EntityPlayer, World par2World, ItemStack par3ItemStack, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
{ {
@ -212,7 +214,7 @@
} }
/** /**
@@ -359,4 +434,13 @@ @@ -367,4 +443,13 @@
{ {
this.theWorld = par1WorldServer; this.theWorld = par1WorldServer;
} }

View file

@ -1,6 +1,6 @@
--- ../src_base/common/net/minecraft/src/ItemMap.java --- ../src_base/minecraft/net/minecraft/item/ItemMap.java
+++ ../src_work/common/net/minecraft/src/ItemMap.java +++ ../src_work/minecraft/net/minecraft/item/ItemMap.java
@@ -87,7 +87,7 @@ @@ -98,7 +98,7 @@
boolean var21 = var19 * var19 + var20 * var20 > (var11 - 2) * (var11 - 2); boolean var21 = var19 * var19 + var20 * var20 > (var11 - 2) * (var11 - 2);
int var22 = (var7 / var6 + var13 - var4 / 2) * var6; int var22 = (var7 / var6 + var13 - var4 / 2) * var6;
int var23 = (var8 / var6 + var18 - var5 / 2) * var6; int var23 = (var8 / var6 + var18 - var5 / 2) * var6;
@ -9,7 +9,7 @@
Chunk var25 = par1World.getChunkFromBlockCoords(var22, var23); Chunk var25 = par1World.getChunkFromBlockCoords(var22, var23);
if (!var25.isEmpty()) if (!var25.isEmpty())
@@ -183,7 +183,7 @@ @@ -194,7 +194,7 @@
var31 = 0; var31 = 0;
var32 = 0; var32 = 0;

View file

@ -1,7 +1,12 @@
--- ../src_base/common/net/minecraft/src/ItemSeeds.java --- ../src_base/minecraft/net/minecraft/item/ItemSeeds.java
+++ ../src_work/common/net/minecraft/src/ItemSeeds.java +++ ../src_work/minecraft/net/minecraft/item/ItemSeeds.java
@@ -1,6 +1,10 @@ @@ -1,10 +1,15 @@
package net.minecraft.src; package net.minecraft.item;
+import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
-public class ItemSeeds extends Item -public class ItemSeeds extends Item
+import net.minecraftforge.common.EnumPlantType; +import net.minecraftforge.common.EnumPlantType;
@ -12,7 +17,7 @@
{ {
/** /**
* The type of block this seed turns into (wheat or pumpkin stems for instance) * The type of block this seed turns into (wheat or pumpkin stems for instance)
@@ -31,8 +35,9 @@ @@ -35,8 +40,9 @@
else if (par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack) && par2EntityPlayer.canPlayerEdit(par4, par5 + 1, par6, par7, par1ItemStack)) else if (par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack) && par2EntityPlayer.canPlayerEdit(par4, par5 + 1, par6, par7, par1ItemStack))
{ {
int var11 = par3World.getBlockId(par4, par5, par6); int var11 = par3World.getBlockId(par4, par5, par6);
@ -23,7 +28,7 @@
{ {
par3World.setBlockWithNotify(par4, par5 + 1, par6, this.blockType); par3World.setBlockWithNotify(par4, par5 + 1, par6, this.blockType);
--par1ItemStack.stackSize; --par1ItemStack.stackSize;
@@ -48,4 +53,22 @@ @@ -52,4 +58,22 @@
return false; return false;
} }
} }

View file

@ -1,15 +1,26 @@
--- ../src_base/common/net/minecraft/src/ItemShears.java --- ../src_base/minecraft/net/minecraft/item/ItemShears.java
+++ ../src_work/common/net/minecraft/src/ItemShears.java +++ ../src_work/minecraft/net/minecraft/item/ItemShears.java
@@ -1,4 +1,8 @@ @@ -1,9 +1,19 @@
package net.minecraft.src; package net.minecraft.item;
+ +
+import java.util.ArrayList; +import java.util.ArrayList;
+import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.enchantment.Enchantment;
+import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.stats.StatList;
import net.minecraft.world.World;
+ +
+import net.minecraftforge.common.IShearable; +import net.minecraftforge.common.IShearable;
public class ItemShears extends Item public class ItemShears extends Item
{ {
@@ -12,13 +16,12 @@ @@ -17,13 +27,12 @@
public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLiving par7EntityLiving) public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLiving par7EntityLiving)
{ {
@ -24,7 +35,7 @@
return true; return true;
} }
} }
@@ -39,4 +42,64 @@ @@ -44,4 +53,69 @@
{ {
return par2Block.blockID != Block.web.blockID && par2Block.blockID != Block.leaves.blockID ? (par2Block.blockID == Block.cloth.blockID ? 5.0F : super.getStrVsBlock(par1ItemStack, par2Block)) : 15.0F; return par2Block.blockID != Block.web.blockID && par2Block.blockID != Block.leaves.blockID ? (par2Block.blockID == Block.cloth.blockID ? 5.0F : super.getStrVsBlock(par1ItemStack, par2Block)) : 15.0F;
} }
@ -43,12 +54,14 @@
+ { + {
+ ArrayList<ItemStack> drops = target.onSheared(itemstack, entity.worldObj, (int)entity.posX, (int)entity.posY, (int)entity.posZ, + ArrayList<ItemStack> drops = target.onSheared(itemstack, entity.worldObj, (int)entity.posX, (int)entity.posY, (int)entity.posZ,
+ EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, itemstack)); + EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, itemstack));
+
+ Random rand = new Random();
+ for(ItemStack stack : drops) + for(ItemStack stack : drops)
+ { + {
+ EntityItem ent = entity.entityDropItem(stack, 1.0F); + EntityItem ent = entity.entityDropItem(stack, 1.0F);
+ ent.motionY += entity.rand.nextFloat() * 0.05F; + ent.motionY += rand.nextFloat() * 0.05F;
+ ent.motionX += (entity.rand.nextFloat() - entity.rand.nextFloat()) * 0.1F; + ent.motionX += (rand.nextFloat() - rand.nextFloat()) * 0.1F;
+ ent.motionZ += (entity.rand.nextFloat() - entity.rand.nextFloat()) * 0.1F; + ent.motionZ += (rand.nextFloat() - rand.nextFloat()) * 0.1F;
+ } + }
+ itemstack.damageItem(1, entity); + itemstack.damageItem(1, entity);
+ } + }
@ -72,16 +85,19 @@
+ { + {
+ ArrayList<ItemStack> drops = target.onSheared(itemstack, player.worldObj, x, y, z, + ArrayList<ItemStack> drops = target.onSheared(itemstack, player.worldObj, x, y, z,
+ EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, itemstack)); + EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, itemstack));
+ Random rand = new Random();
+
+ for(ItemStack stack : drops) + for(ItemStack stack : drops)
+ { + {
+ float f = 0.7F; + float f = 0.7F;
+ double d = (double)(player.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D; + double d = (double)(rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
+ double d1 = (double)(player.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D; + double d1 = (double)(rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
+ double d2 = (double)(player.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D; + double d2 = (double)(rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
+ EntityItem entityitem = new EntityItem(player.worldObj, (double)x + d, (double)y + d1, (double)z + d2, stack); + EntityItem entityitem = new EntityItem(player.worldObj, (double)x + d, (double)y + d1, (double)z + d2, stack);
+ entityitem.delayBeforeCanPickup = 10; + entityitem.delayBeforeCanPickup = 10;
+ player.worldObj.spawnEntityInWorld(entityitem); + player.worldObj.spawnEntityInWorld(entityitem);
+ } + }
+
+ itemstack.damageItem(1, player); + itemstack.damageItem(1, player);
+ player.addStat(StatList.mineBlockStatArray[id], 1); + player.addStat(StatList.mineBlockStatArray[id], 1);
+ } + }

View file

@ -1,13 +1,13 @@
--- ../src_base/common/net/minecraft/src/ItemTool.java --- ../src_base/minecraft/net/minecraft/item/ItemTool.java
+++ ../src_work/common/net/minecraft/src/ItemTool.java +++ ../src_work/minecraft/net/minecraft/item/ItemTool.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
package net.minecraft.src; package net.minecraft.item;
+import net.minecraftforge.common.ForgeHooks; +import net.minecraftforge.common.ForgeHooks;
import cpw.mods.fml.common.Side; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly; import cpw.mods.fml.common.asm.SideOnly;
import net.minecraft.block.Block;
@@ -105,4 +106,15 @@ @@ -110,4 +111,15 @@
{ {
return this.toolMaterial.getToolCraftingMaterial() == par2ItemStack.itemID ? true : super.getIsRepairable(par1ItemStack, par2ItemStack); return this.toolMaterial.getToolCraftingMaterial() == par2ItemStack.itemID ? true : super.getIsRepairable(par1ItemStack, par2ItemStack);
} }

View file

@ -1,6 +1,6 @@
--- ../src_base/common/net/minecraft/src/CraftingManager.java --- ../src_base/minecraft/net/minecraft/item/crafting/CraftingManager.java
+++ ../src_work/common/net/minecraft/src/CraftingManager.java +++ ../src_work/minecraft/net/minecraft/item/crafting/CraftingManager.java
@@ -263,7 +263,7 @@ @@ -268,7 +268,7 @@
} }
} }

Some files were not shown because too many files have changed in this diff Show more