Regenerate all patches, No functional change as added this is a formatting change only.

This commit is contained in:
Lex Manos 2013-11-18 17:17:45 -08:00
parent 0999017fda
commit 99faaae9f6
217 changed files with 1261 additions and 1371 deletions

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/Block.java
+++ ../src_work/minecraft/net/minecraft/block/Block.java
--- ../src-base/minecraft/net/minecraft/block/Block.java
+++ ../src-work/minecraft/net/minecraft/block/Block.java
@@ -1,15 +1,22 @@
package net.minecraft.block;
@ -158,9 +158,8 @@
par2EntityPlayer.addExhaustion(0.025F);
- if (this.canSilkHarvest() && EnchantmentHelper.getSilkTouchModifier(par2EntityPlayer))
- {
+ if (this.canSilkHarvest(par1World, par2EntityPlayer, par3, par4, par5, par6) && EnchantmentHelper.getSilkTouchModifier(par2EntityPlayer))
+ {
{
+ ArrayList<ItemStack> items = new ArrayList<ItemStack>();
ItemStack itemstack = this.createStackedBlock(par6);
@ -180,13 +179,10 @@
+ harvesters.set(par2EntityPlayer);
int i1 = EnchantmentHelper.getFortuneModifier(par2EntityPlayer);
this.dropBlockAsItem(par1World, par3, par4, par5, par6, i1);
- }
- }
-
+ harvesters.set(null);
+ }
+ }
+
}
}
+ private int silk_check_meta = -1; //Dirty hack to stop us from needing to special case the silk check hook.
/**
* Return true if a player with Silk Touch can harvest this block directly, and not its normal drops.

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockBaseRailLogic.java
+++ ../src_work/minecraft/net/minecraft/block/BlockBaseRailLogic.java
--- ../src-base/minecraft/net/minecraft/block/BlockBaseRailLogic.java
+++ ../src-work/minecraft/net/minecraft/block/BlockBaseRailLogic.java
@@ -16,6 +16,8 @@
/** The chunk position the rail is at. */
private List railChunkPosition;
@ -14,7 +14,7 @@
this.railZ = par5;
int l = par2World.getBlockId(par3, par4, par5);
- int i1 = par2World.getBlockMetadata(par3, par4, par5);
-
- if (((BlockRailBase)Block.blocksList[l]).isPowered)
- {
- this.isStraightRail = true;
@ -24,7 +24,6 @@
- {
- this.isStraightRail = false;
- }
+
+ BlockRailBase target = (BlockRailBase)Block.blocksList[l];
+ int i1 = target.getBasicRailMetadata(par2World, null, par3, par4, par5);
+ isStraightRail = !target.isFlexibleRail(par2World, par3, par4, par5);

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockButton.java
+++ ../src_work/minecraft/net/minecraft/block/BlockButton.java
--- ../src-base/minecraft/net/minecraft/block/BlockButton.java
+++ ../src-work/minecraft/net/minecraft/block/BlockButton.java
@@ -14,6 +14,9 @@
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockCactus.java
+++ ../src_work/minecraft/net/minecraft/block/BlockCactus.java
--- ../src-base/minecraft/net/minecraft/block/BlockCactus.java
+++ ../src-work/minecraft/net/minecraft/block/BlockCactus.java
@@ -12,7 +12,11 @@
import net.minecraft.util.Icon;
import net.minecraft.world.World;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockChest.java
+++ ../src_work/minecraft/net/minecraft/block/BlockChest.java
--- ../src-base/minecraft/net/minecraft/block/BlockChest.java
+++ ../src-work/minecraft/net/minecraft/block/BlockChest.java
@@ -23,6 +23,8 @@
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
@ -23,30 +23,21 @@
return null;
}
- else if (par1World.getBlockId(par2 - 1, par3, par4) == this.blockID && (par1World.isBlockNormalCube(par2 - 1, par3 + 1, par4) || isOcelotBlockingChest(par1World, par2 - 1, par3, par4)))
- {
- return null;
- }
- else if (par1World.getBlockId(par2 + 1, par3, par4) == this.blockID && (par1World.isBlockNormalCube(par2 + 1, par3 + 1, par4) || isOcelotBlockingChest(par1World, par2 + 1, par3, par4)))
- {
- return null;
- }
- else if (par1World.getBlockId(par2, par3, par4 - 1) == this.blockID && (par1World.isBlockNormalCube(par2, par3 + 1, par4 - 1) || isOcelotBlockingChest(par1World, par2, par3, par4 - 1)))
- {
- return null;
- }
- else if (par1World.getBlockId(par2, par3, par4 + 1) == this.blockID && (par1World.isBlockNormalCube(par2, par3 + 1, par4 + 1) || isOcelotBlockingChest(par1World, par2, par3, par4 + 1)))
+ else if (par1World.getBlockId(par2 - 1, par3, par4) == this.blockID && (par1World.isBlockSolidOnSide(par2 - 1, par3 + 1, par4, DOWN) || isOcelotBlockingChest(par1World, par2 - 1, par3, par4)))
+ {
+ return null;
+ }
{
return null;
}
- else if (par1World.getBlockId(par2 + 1, par3, par4) == this.blockID && (par1World.isBlockNormalCube(par2 + 1, par3 + 1, par4) || isOcelotBlockingChest(par1World, par2 + 1, par3, par4)))
+ else if (par1World.getBlockId(par2 + 1, par3, par4) == this.blockID && (par1World.isBlockSolidOnSide(par2 + 1, par3 + 1, par4, DOWN) || isOcelotBlockingChest(par1World, par2 + 1, par3, par4)))
+ {
+ return null;
+ }
{
return null;
}
- else if (par1World.getBlockId(par2, par3, par4 - 1) == this.blockID && (par1World.isBlockNormalCube(par2, par3 + 1, par4 - 1) || isOcelotBlockingChest(par1World, par2, par3, par4 - 1)))
+ else if (par1World.getBlockId(par2, par3, par4 - 1) == this.blockID && (par1World.isBlockSolidOnSide(par2, par3 + 1, par4 - 1, DOWN) || isOcelotBlockingChest(par1World, par2, par3, par4 - 1)))
+ {
+ return null;
+ }
{
return null;
}
- else if (par1World.getBlockId(par2, par3, par4 + 1) == this.blockID && (par1World.isBlockNormalCube(par2, par3 + 1, par4 + 1) || isOcelotBlockingChest(par1World, par2, par3, par4 + 1)))
+ else if (par1World.getBlockId(par2, par3, par4 + 1) == this.blockID && (par1World.isBlockSolidOnSide(par2, par3 + 1, par4 + 1, DOWN) || isOcelotBlockingChest(par1World, par2, par3, par4 + 1)))
{
return null;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockCocoa.java
+++ ../src_work/minecraft/net/minecraft/block/BlockCocoa.java
--- ../src-base/minecraft/net/minecraft/block/BlockCocoa.java
+++ ../src-work/minecraft/net/minecraft/block/BlockCocoa.java
@@ -2,6 +2,8 @@
import cpw.mods.fml.relauncher.Side;
@ -30,9 +30,8 @@
for (int k1 = 0; k1 < b0; ++k1)
{
- this.dropBlockAsItem_do(par1World, par2, par3, par4, new ItemStack(Item.dyePowder, 1, 3));
- }
+ dropped.add(new ItemStack(Item.dyePowder, 1, 3));
+ }
}
+ return dropped;
}

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockComparator.java
+++ ../src_work/minecraft/net/minecraft/block/BlockComparator.java
--- ../src-base/minecraft/net/minecraft/block/BlockComparator.java
+++ ../src-work/minecraft/net/minecraft/block/BlockComparator.java
@@ -268,4 +268,17 @@
{
return new TileEntityComparator();

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockCrops.java
+++ ../src_work/minecraft/net/minecraft/block/BlockCrops.java
--- ../src-base/minecraft/net/minecraft/block/BlockCrops.java
+++ ../src-work/minecraft/net/minecraft/block/BlockCrops.java
@@ -2,6 +2,7 @@
import cpw.mods.fml.relauncher.Side;
@ -34,31 +34,28 @@
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);
-
- if (!par1World.isRemote)
- {
- if (par5 >= 7)
+ }
+
- if (!par1World.isRemote)
+ @Override
+ public ArrayList<ItemStack> getBlockDropped(World world, int x, int y, int z, int metadata, int fortune)
+ {
+ ArrayList<ItemStack> ret = super.getBlockDropped(world, x, y, z, metadata, fortune);
+
+ if (metadata >= 7)
+ {
{
- if (par5 >= 7)
+ for (int n = 0; n < 3 + fortune; n++)
{
- int j1 = 3 + par7;
-
- for (int k1 = 0; k1 < j1; ++k1)
- {
+ if (world.rand.nextInt(15) <= metadata)
{
- if (par1World.rand.nextInt(15) <= par5)
- {
- this.dropBlockAsItem_do(par1World, par2, par3, par4, new ItemStack(this.getSeedItem(), 1, 0));
- }
+ if (world.rand.nextInt(15) <= metadata)
+ {
+ ret.add(new ItemStack(this.getSeedItem(), 1, 0));
}
}

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockDoor.java
+++ ../src_work/minecraft/net/minecraft/block/BlockDoor.java
--- ../src-base/minecraft/net/minecraft/block/BlockDoor.java
+++ ../src-work/minecraft/net/minecraft/block/BlockDoor.java
@@ -290,7 +290,7 @@
{
if (this.blockMaterial == Material.iron)

View file

@ -1,15 +1,15 @@
--- ../src_base/minecraft/net/minecraft/block/BlockFarmland.java
+++ ../src_work/minecraft/net/minecraft/block/BlockFarmland.java
@@ -10,6 +10,9 @@
import net.minecraft.util.AxisAlignedBB;
--- ../src-base/minecraft/net/minecraft/block/BlockFarmland.java
+++ ../src-work/minecraft/net/minecraft/block/BlockFarmland.java
@@ -11,6 +11,9 @@
import net.minecraft.util.Icon;
import net.minecraft.world.World;
+
+import net.minecraftforge.common.ForgeDirection;
+import net.minecraftforge.common.IPlantable;
+
public class BlockFarmland extends Block
{
@SideOnly(Side.CLIENT)
@@ -115,7 +118,8 @@
{
int j1 = par1World.getBlockId(l, par3 + 1, i1);

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockFire.java
+++ ../src_work/minecraft/net/minecraft/block/BlockFire.java
--- ../src-base/minecraft/net/minecraft/block/BlockFire.java
+++ ../src-work/minecraft/net/minecraft/block/BlockFire.java
@@ -11,6 +11,9 @@
import net.minecraft.world.World;
import net.minecraft.world.WorldProviderEnd;
@ -29,21 +29,22 @@
}
/**
@@ -123,12 +127,8 @@
@@ -123,13 +127,9 @@
{
if (par1World.getGameRules().getGameRuleBooleanValue("doFireTick"))
{
- boolean flag = par1World.getBlockId(par2, par3 - 1, par4) == Block.netherrack.blockID;
-
+ Block base = Block.blocksList[par1World.getBlockId(par2, par3 - 1, par4)];
+ boolean flag = (base != null && base.isFireSource(par1World, par2, par3 - 1, par4, par1World.getBlockMetadata(par2, par3 - 1, par4), UP));
- if (par1World.provider instanceof WorldProviderEnd && par1World.getBlockId(par2, par3 - 1, par4) == Block.bedrock.blockID)
- {
- flag = true;
- }
+ Block base = Block.blocksList[par1World.getBlockId(par2, par3 - 1, par4)];
+ boolean flag = (base != null && base.isFireSource(par1World, par2, par3 - 1, par4, par1World.getBlockMetadata(par2, par3 - 1, par4), UP));
-
if (!this.canPlaceBlockAt(par1World, par2, par3, par4))
{
par1World.setBlockToAir(par2, par3, par4);
@@ -157,7 +157,7 @@
par1World.setBlockToAir(par2, par3, par4);
}
@ -72,7 +73,7 @@
for (int i1 = par2 - 1; i1 <= par2 + 1; ++i1)
{
@@ -230,9 +230,20 @@
@@ -230,10 +230,21 @@
return false;
}
@ -82,7 +83,7 @@
- int j1 = this.abilityToCatchFire[par1World.getBlockId(par2, par3, par4)];
+ tryToCatchBlockOnFire(par1World, par2, par3, par4, par5, par6Random, par7, UP);
+ }
+
+ private void tryToCatchBlockOnFire(World par1World, int par2, int par3, int par4, int par5, Random par6Random, int par7, ForgeDirection face)
+ {
+ int j1 = 0;
@ -91,9 +92,10 @@
+ {
+ j1 = block.getFlammability(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), face);
+ }
+
if (par6Random.nextInt(par5) < j1)
{
boolean flag = par1World.getBlockId(par2, par3, par4) == Block.tnt.blockID;
@@ -266,7 +277,12 @@
*/
private boolean canNeighborBurn(World par1World, int par2, int par3, int par4)
@ -131,9 +133,8 @@
/**
* Checks the specified block coordinate to see if it can catch fire. Args: blockAccess, x, y, z
- */
+ * Deprecated for a side-sensitive version
+ */
*/
+ @Deprecated
public boolean canBlockCatchFire(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
{
@ -145,9 +146,8 @@
* Retrieves a specified block's chance to encourage their neighbors to burn and if the number is greater than the
* current number passed in it will return its number instead of the passed in one. Args: world, x, y, z,
* curChanceToEncourageFire
- */
+ * Deprecated for a side-sensitive version
+ */
*/
+ @Deprecated
public int getChanceToEncourageFire(World par1World, int par2, int par3, int par4, int par5)
{
@ -162,10 +162,9 @@
float f2;
- if (!par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && !Block.fire.canBlockCatchFire(par1World, par2, par3 - 1, par4))
- {
- if (Block.fire.canBlockCatchFire(par1World, par2 - 1, par3, par4))
+ if (!par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && !Block.fire.canBlockCatchFire(par1World, par2, par3 - 1, par4, UP))
+ {
{
- if (Block.fire.canBlockCatchFire(par1World, par2 - 1, par3, par4))
+ if (Block.fire.canBlockCatchFire(par1World, par2 - 1, par3, par4, EAST))
{
for (l = 0; l < 2; ++l)

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockFlower.java
+++ ../src_work/minecraft/net/minecraft/block/BlockFlower.java
--- ../src-base/minecraft/net/minecraft/block/BlockFlower.java
+++ ../src-work/minecraft/net/minecraft/block/BlockFlower.java
@@ -6,7 +6,12 @@
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockFlowing.java
+++ ../src_work/minecraft/net/minecraft/block/BlockFlowing.java
--- ../src-base/minecraft/net/minecraft/block/BlockFlowing.java
+++ ../src-work/minecraft/net/minecraft/block/BlockFlowing.java
@@ -206,7 +206,7 @@
{
this.triggerLavaMixEffects(par1World, par2, par3, par4);

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockFluid.java
+++ ../src_work/minecraft/net/minecraft/block/BlockFluid.java
--- ../src-base/minecraft/net/minecraft/block/BlockFluid.java
+++ ../src-work/minecraft/net/minecraft/block/BlockFluid.java
@@ -59,7 +59,7 @@
{
for (int l1 = -1; l1 <= 1; ++l1)
@ -9,17 +9,17 @@
l += (i2 & 16711680) >> 16;
i1 += (i2 & 65280) >> 8;
j1 += i2 & 255;
@@ -81,6 +81,13 @@
}
@@ -83,6 +83,13 @@
return (float)(par0 + 1) / 9.0F;
+ }
+
}
+
+ @Deprecated //Implemented here for compatibility, need to change this when we make vanilla fluids use our fluid methods.
+ public float getFilledPercentage(IBlockAccess world, int x, int y, int z)
+ {
+ return 1 - BlockFluid.getFluidHeightPercent(world.getBlockMetadata(x, y, z));
}
+ }
+
@SideOnly(Side.CLIENT)
/**

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockGrass.java
+++ ../src_work/minecraft/net/minecraft/block/BlockGrass.java
--- ../src-base/minecraft/net/minecraft/block/BlockGrass.java
+++ ../src-work/minecraft/net/minecraft/block/BlockGrass.java
@@ -44,7 +44,7 @@
{
if (!par1World.isRemote)

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/block/BlockLadder.java
+++ ../src_work/minecraft/net/minecraft/block/BlockLadder.java
@@ -5,9 +5,13 @@
--- ../src-base/minecraft/net/minecraft/block/BlockLadder.java
+++ ../src-work/minecraft/net/minecraft/block/BlockLadder.java
@@ -5,10 +5,14 @@
import java.util.Random;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
@ -8,12 +8,13 @@
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
+
+import net.minecraftforge.common.ForgeDirection;
+import static net.minecraftforge.common.ForgeDirection.*;
+
public class BlockLadder extends Block
{
protected BlockLadder(int par1)
@@ -104,7 +108,10 @@
*/
public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockLeaves.java
+++ ../src_work/minecraft/net/minecraft/block/BlockLeaves.java
--- ../src-base/minecraft/net/minecraft/block/BlockLeaves.java
+++ ../src-work/minecraft/net/minecraft/block/BlockLeaves.java
@@ -2,6 +2,8 @@
import cpw.mods.fml.relauncher.Side;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockLever.java
+++ ../src_work/minecraft/net/minecraft/block/BlockLever.java
--- ../src-base/minecraft/net/minecraft/block/BlockLever.java
+++ ../src-work/minecraft/net/minecraft/block/BlockLever.java
@@ -10,6 +10,9 @@
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
@ -83,76 +83,48 @@
boolean flag = false;
- if (!par1World.isBlockNormalCube(par2 - 1, par3, par4) && i1 == 1)
- {
- flag = true;
- }
-
- if (!par1World.isBlockNormalCube(par2 + 1, par3, par4) && i1 == 2)
- {
- flag = true;
- }
-
- if (!par1World.isBlockNormalCube(par2, par3, par4 - 1) && i1 == 3)
- {
- flag = true;
- }
-
- if (!par1World.isBlockNormalCube(par2, par3, par4 + 1) && i1 == 4)
- {
- flag = true;
- }
-
- if (!par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && i1 == 5)
- {
- flag = true;
- }
-
- if (!par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && i1 == 6)
- {
- flag = true;
- }
-
- if (!par1World.isBlockNormalCube(par2, par3 + 1, par4) && i1 == 0)
- {
- flag = true;
- }
-
- if (!par1World.isBlockNormalCube(par2, par3 + 1, par4) && i1 == 7)
+ if (!par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST) && i1 == 1)
+ {
+ flag = true;
+ }
+
{
flag = true;
}
- if (!par1World.isBlockNormalCube(par2 + 1, par3, par4) && i1 == 2)
+ if (!par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST) && i1 == 2)
+ {
+ flag = true;
+ }
+
{
flag = true;
}
- if (!par1World.isBlockNormalCube(par2, par3, par4 - 1) && i1 == 3)
+ if (!par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH) && i1 == 3)
+ {
+ flag = true;
+ }
+
{
flag = true;
}
- if (!par1World.isBlockNormalCube(par2, par3, par4 + 1) && i1 == 4)
+ if (!par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH) && i1 == 4)
+ {
+ flag = true;
+ }
+
{
flag = true;
}
- if (!par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && i1 == 5)
+ if (!par1World.isBlockSolidOnSide(par2, par3 - 1, par4, UP) && i1 == 5)
+ {
+ flag = true;
+ }
+
{
flag = true;
}
- if (!par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && i1 == 6)
+ if (!par1World.isBlockSolidOnSide(par2, par3 - 1, par4, UP) && i1 == 6)
+ {
+ flag = true;
+ }
+
{
flag = true;
}
- if (!par1World.isBlockNormalCube(par2, par3 + 1, par4) && i1 == 0)
+ if (!par1World.isBlockSolidOnSide(par2, par3 + 1, par4, DOWN) && i1 == 0)
+ {
+ flag = true;
+ }
+
{
flag = true;
}
- if (!par1World.isBlockNormalCube(par2, par3 + 1, par4) && i1 == 7)
+ if (!par1World.isBlockSolidOnSide(par2, par3 + 1, par4, DOWN) && i1 == 7)
{
flag = true;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockLog.java
+++ ../src_work/minecraft/net/minecraft/block/BlockLog.java
--- ../src-base/minecraft/net/minecraft/block/BlockLog.java
+++ ../src-work/minecraft/net/minecraft/block/BlockLog.java
@@ -62,14 +62,9 @@
{
int j2 = par1World.getBlockId(par2 + k1, par3 + l1, par4 + i2);

View file

@ -1,17 +1,18 @@
--- ../src_base/minecraft/net/minecraft/block/BlockMobSpawner.java
+++ ../src_work/minecraft/net/minecraft/block/BlockMobSpawner.java
@@ -45,8 +45,12 @@
--- ../src-base/minecraft/net/minecraft/block/BlockMobSpawner.java
+++ ../src-work/minecraft/net/minecraft/block/BlockMobSpawner.java
@@ -45,9 +45,13 @@
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);
- int j1 = 15 + par1World.rand.nextInt(15) + par1World.rand.nextInt(15);
- this.dropXpOnBlockBreak(par1World, par2, par3, par4, j1);
+ }
}
+
+ @Override
+ public int getExpDrop(World world, int data, int enchantmentLevel)
+ {
+ return 15 + world.rand.nextInt(15) + world.rand.nextInt(15);
}
+ }
/**
* Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two

View file

@ -1,14 +1,14 @@
--- ../src_base/minecraft/net/minecraft/block/BlockMushroom.java
+++ ../src_work/minecraft/net/minecraft/block/BlockMushroom.java
@@ -3,6 +3,8 @@
import java.util.Random;
--- ../src-base/minecraft/net/minecraft/block/BlockMushroom.java
+++ ../src-work/minecraft/net/minecraft/block/BlockMushroom.java
@@ -4,6 +4,8 @@
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
{
protected BlockMushroom(int par1)
@@ -96,7 +98,9 @@
if (par3 >= 0 && par3 < 256)
{

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockMycelium.java
+++ ../src_work/minecraft/net/minecraft/block/BlockMycelium.java
--- ../src-base/minecraft/net/minecraft/block/BlockMycelium.java
+++ ../src-work/minecraft/net/minecraft/block/BlockMycelium.java
@@ -41,7 +41,7 @@
{
if (!par1World.isRemote)

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockNetherStalk.java
+++ ../src_work/minecraft/net/minecraft/block/BlockNetherStalk.java
--- ../src-base/minecraft/net/minecraft/block/BlockNetherStalk.java
+++ ../src-work/minecraft/net/minecraft/block/BlockNetherStalk.java
@@ -2,6 +2,8 @@
import cpw.mods.fml.relauncher.Side;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockOre.java
+++ ../src_work/minecraft/net/minecraft/block/BlockOre.java
--- ../src-base/minecraft/net/minecraft/block/BlockOre.java
+++ ../src-work/minecraft/net/minecraft/block/BlockOre.java
@@ -60,6 +60,11 @@
{
super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, par7);
@ -16,11 +16,11 @@
{
j1 = MathHelper.getRandomIntegerInRange(par1World.rand, 2, 5);
}
+ return j1;
+ }
-
- this.dropXpOnBlockBreak(par1World, par2, par3, par4, j1);
- }
+ return j1;
}
+
+ return 0;
}

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockPane.java
+++ ../src_work/minecraft/net/minecraft/block/BlockPane.java
--- ../src-base/minecraft/net/minecraft/block/BlockPane.java
+++ ../src-work/minecraft/net/minecraft/block/BlockPane.java
@@ -13,6 +13,7 @@
import net.minecraft.util.Icon;
import net.minecraft.world.IBlockAccess;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockPistonBase.java
+++ ../src_work/minecraft/net/minecraft/block/BlockPistonBase.java
--- ../src-base/minecraft/net/minecraft/block/BlockPistonBase.java
+++ ../src-work/minecraft/net/minecraft/block/BlockPistonBase.java
@@ -439,7 +439,7 @@
return false;
}

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockPortal.java
+++ ../src_work/minecraft/net/minecraft/block/BlockPortal.java
--- ../src-base/minecraft/net/minecraft/block/BlockPortal.java
+++ ../src-work/minecraft/net/minecraft/block/BlockPortal.java
@@ -118,7 +118,7 @@
}
else

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockPumpkin.java
+++ ../src_work/minecraft/net/minecraft/block/BlockPumpkin.java
--- ../src-base/minecraft/net/minecraft/block/BlockPumpkin.java
+++ ../src-work/minecraft/net/minecraft/block/BlockPumpkin.java
@@ -123,7 +123,8 @@
public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
{

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockRailBase.java
+++ ../src_work/minecraft/net/minecraft/block/BlockRailBase.java
--- ../src-base/minecraft/net/minecraft/block/BlockRailBase.java
+++ ../src-work/minecraft/net/minecraft/block/BlockRailBase.java
@@ -3,6 +3,7 @@
import java.util.Random;
import net.minecraft.block.material.Material;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockRedstoneOre.java
+++ ../src_work/minecraft/net/minecraft/block/BlockRedstoneOre.java
--- ../src-base/minecraft/net/minecraft/block/BlockRedstoneOre.java
+++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneOre.java
@@ -116,11 +116,17 @@
{
super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, par7);
@ -13,9 +13,8 @@
{
int j1 = 1 + par1World.rand.nextInt(5);
- this.dropXpOnBlockBreak(par1World, par2, par3, par4, j1);
- }
+ return j1;
+ }
}
+ return 0;
}

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockRedstoneWire.java
+++ ../src_work/minecraft/net/minecraft/block/BlockRedstoneWire.java
--- ../src-base/minecraft/net/minecraft/block/BlockRedstoneWire.java
+++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneWire.java
@@ -475,7 +475,7 @@
}
else if (!Block.redstoneRepeaterIdle.func_94487_f(i1))

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockReed.java
+++ ../src_work/minecraft/net/minecraft/block/BlockReed.java
--- ../src-base/minecraft/net/minecraft/block/BlockReed.java
+++ ../src-work/minecraft/net/minecraft/block/BlockReed.java
@@ -8,7 +8,11 @@
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockSand.java
+++ ../src_work/minecraft/net/minecraft/block/BlockSand.java
--- ../src-base/minecraft/net/minecraft/block/BlockSand.java
+++ ../src-work/minecraft/net/minecraft/block/BlockSand.java
@@ -105,7 +105,7 @@
{
int l = par0World.getBlockId(par1, par2, par3);

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockSapling.java
+++ ../src_work/minecraft/net/minecraft/block/BlockSapling.java
--- ../src-base/minecraft/net/minecraft/block/BlockSapling.java
+++ ../src-work/minecraft/net/minecraft/block/BlockSapling.java
@@ -16,6 +16,8 @@
import net.minecraft.world.gen.feature.WorldGenTrees;
import net.minecraft.world.gen.feature.WorldGenerator;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockSkull.java
+++ ../src_work/minecraft/net/minecraft/block/BlockSkull.java
--- ../src-base/minecraft/net/minecraft/block/BlockSkull.java
+++ ../src-work/minecraft/net/minecraft/block/BlockSkull.java
@@ -2,6 +2,8 @@
import cpw.mods.fml.relauncher.Side;
@ -21,22 +21,20 @@
* Called when the block is attempted to be harvested
*/
public void onBlockHarvested(World par1World, int par2, int par3, int par4, int par5, EntityPlayer par6EntityPlayer)
@@ -149,6 +146,8 @@
par5 |= 8;
@@ -150,6 +147,8 @@
par1World.setBlockMetadataWithNotify(par2, par3, par4, par5, 4);
}
+
+ dropBlockAsItem(par1World, par2, par3, par4, par5, 0);
+ dropBlockAsItem(par1World, par2, par3, par4, par5, 0);
+
super.onBlockHarvested(par1World, par2, par3, par4, par5, par6EntityPlayer);
}
@@ -160,24 +159,30 @@
*/
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
{
- if (!par1World.isRemote)
- {
- if ((par6 & 8) == 0)
+ super.breakBlock(par1World, par2, par3, par4, par5, par6);
+ }
+
@ -45,15 +43,14 @@
+ {
+ ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
+ if ((metadata & 8) == 0)
+ {
+ ItemStack itemstack = new ItemStack(Item.skull.itemID, 1, this.getDamageValue(world, x, y, z));
+ TileEntitySkull tileentityskull = (TileEntitySkull)world.getBlockTileEntity(x, y, z);
+
+ if (tileentityskull == null)
{
{
- if ((par6 & 8) == 0)
- {
- ItemStack itemstack = new ItemStack(Item.skull.itemID, 1, this.getDamageValue(par1World, par2, par3, par4));
- TileEntitySkull tileentityskull = (TileEntitySkull)par1World.getBlockTileEntity(par2, par3, par4);
-
+ ItemStack itemstack = new ItemStack(Item.skull.itemID, 1, this.getDamageValue(world, x, y, z));
+ TileEntitySkull tileentityskull = (TileEntitySkull)world.getBlockTileEntity(x, y, z);
- if (tileentityskull.getSkullType() == 3 && tileentityskull.getExtraType() != null && tileentityskull.getExtraType().length() > 0)
- {
- itemstack.setTagCompound(new NBTTagCompound());
@ -61,18 +58,19 @@
- }
-
- this.dropBlockAsItem_do(par1World, par2, par3, par4, itemstack);
+ if (tileentityskull == null)
+ {
+ return drops;
}
-
- super.breakBlock(par1World, par2, par3, par4, par5, par6);
- }
+ if (tileentityskull.getSkullType() == 3 && tileentityskull.getExtraType() != null && tileentityskull.getExtraType().length() > 0)
+ {
+ itemstack.setTagCompound(new NBTTagCompound());
+ itemstack.getTagCompound().setString("SkullOwner", tileentityskull.getExtraType());
+ }
+ drops.add(itemstack);
+ }
}
+ return drops;
}

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockSnow.java
+++ ../src_work/minecraft/net/minecraft/block/BlockSnow.java
--- ../src-base/minecraft/net/minecraft/block/BlockSnow.java
+++ ../src-work/minecraft/net/minecraft/block/BlockSnow.java
@@ -96,8 +96,12 @@
*/
public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockStem.java
+++ ../src_work/minecraft/net/minecraft/block/BlockStem.java
--- ../src-base/minecraft/net/minecraft/block/BlockStem.java
+++ ../src-work/minecraft/net/minecraft/block/BlockStem.java
@@ -2,6 +2,8 @@
import cpw.mods.fml.relauncher.Side;
@ -46,19 +46,17 @@
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);
-
+ }
- if (!par1World.isRemote)
- {
- Item item = null;
-
- if (this.fruitType == Block.pumpkin)
+ }
+
+ @Override
+ public ArrayList<ItemStack> getBlockDropped(World world, int x, int y, int z, int metadata, int fortune)
+ {
+ ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
+
- if (this.fruitType == Block.pumpkin)
+ for (int i = 0; i < 3; i++)
+ {
+ if (world.rand.nextInt(15) <= metadata)
@ -79,8 +77,7 @@
- this.dropBlockAsItem_do(par1World, par2, par3, par4, new ItemStack(item));
- }
- }
- }
+ }
}
+
+ return ret;
}

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockTallGrass.java
+++ ../src_work/minecraft/net/minecraft/block/BlockTallGrass.java
--- ../src-base/minecraft/net/minecraft/block/BlockTallGrass.java
+++ ../src-work/minecraft/net/minecraft/block/BlockTallGrass.java
@@ -2,6 +2,8 @@
import cpw.mods.fml.relauncher.Side;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockTorch.java
+++ ../src_work/minecraft/net/minecraft/block/BlockTorch.java
--- ../src-base/minecraft/net/minecraft/block/BlockTorch.java
+++ ../src-work/minecraft/net/minecraft/block/BlockTorch.java
@@ -10,6 +10,9 @@
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
@ -88,36 +88,24 @@
boolean flag = false;
- if (!par1World.isBlockNormalCubeDefault(par2 - 1, par3, par4, true) && i1 == 1)
- {
- flag = true;
- }
-
- if (!par1World.isBlockNormalCubeDefault(par2 + 1, par3, par4, true) && i1 == 2)
- {
- flag = true;
- }
-
- if (!par1World.isBlockNormalCubeDefault(par2, par3, par4 - 1, true) && i1 == 3)
- {
- flag = true;
- }
-
- if (!par1World.isBlockNormalCubeDefault(par2, par3, par4 + 1, true) && i1 == 4)
+ if (!par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST, true) && i1 == 1)
+ {
+ flag = true;
+ }
+
{
flag = true;
}
- if (!par1World.isBlockNormalCubeDefault(par2 + 1, par3, par4, true) && i1 == 2)
+ if (!par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST, true) && i1 == 2)
+ {
+ flag = true;
+ }
+
{
flag = true;
}
- if (!par1World.isBlockNormalCubeDefault(par2, par3, par4 - 1, true) && i1 == 3)
+ if (!par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH, true) && i1 == 3)
+ {
+ flag = true;
+ }
+
{
flag = true;
}
- if (!par1World.isBlockNormalCubeDefault(par2, par3, par4 + 1, true) && i1 == 4)
+ if (!par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH, true) && i1 == 4)
{
flag = true;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockTrapDoor.java
+++ ../src_work/minecraft/net/minecraft/block/BlockTrapDoor.java
--- ../src-base/minecraft/net/minecraft/block/BlockTrapDoor.java
+++ ../src-work/minecraft/net/minecraft/block/BlockTrapDoor.java
@@ -11,8 +11,13 @@
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockTripWireSource.java
+++ ../src_work/minecraft/net/minecraft/block/BlockTripWireSource.java
--- ../src-base/minecraft/net/minecraft/block/BlockTripWireSource.java
+++ ../src-work/minecraft/net/minecraft/block/BlockTripWireSource.java
@@ -8,6 +8,9 @@
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/block/BlockVine.java
+++ ../src_work/minecraft/net/minecraft/block/BlockVine.java
--- ../src-base/minecraft/net/minecraft/block/BlockVine.java
+++ ../src-work/minecraft/net/minecraft/block/BlockVine.java
@@ -2,9 +2,12 @@
import cpw.mods.fml.relauncher.Side;
@ -38,7 +38,7 @@
- super.harvestBlock(par1World, par2EntityPlayer, par3, par4, par5, par6);
- }
+ super.harvestBlock(par1World, par2EntityPlayer, par3, par4, par5, par6);
+ }
}
+
+ @Override
+ public boolean isShearable(ItemStack item, World world, int x, int y, int z)
@ -58,5 +58,5 @@
+ public boolean isLadder(World world, int x, int y, int z, EntityLivingBase entity)
+ {
+ return true;
}
+ }
}

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/Minecraft.java
+++ ../src_work/minecraft/net/minecraft/client/Minecraft.java
--- ../src-base/minecraft/net/minecraft/client/Minecraft.java
+++ ../src-work/minecraft/net/minecraft/client/Minecraft.java
@@ -137,6 +137,16 @@
import com.google.common.collect.MapDifference;
@ -56,12 +56,10 @@
this.statFileWriter.syncStats();
if (par1GuiScreen == null && this.theWorld == null)
@@ -694,6 +699,20 @@
else if (par1GuiScreen == null && this.thePlayer.getHealth() <= 0.0F)
{
@@ -696,6 +701,20 @@
par1GuiScreen = new GuiGameOver();
+ }
+
}
+ GuiScreen old = this.currentScreen;
+ GuiOpenEvent event = new GuiOpenEvent(par1GuiScreen);
+
@ -74,9 +72,11 @@
+ if (old != null && par1GuiScreen != old)
+ {
+ old.onGuiClosed();
}
+ }
+
if (par1GuiScreen instanceof GuiMainMenu)
{
this.gameSettings.showDebugInfo = false;
@@ -1301,7 +1320,7 @@
if (this.thePlayer.isCurrentToolAdventureModeExempt(j, k, l))
@ -155,7 +155,7 @@
}
/**
@@ -2237,107 +2277,12 @@
@@ -2237,108 +2277,13 @@
if (this.objectMouseOver != null)
{
boolean flag = this.thePlayer.capabilities.isCreativeMode;
@ -165,7 +165,8 @@
int k;
- if (this.objectMouseOver.typeOfHit == EnumMovingObjectType.TILE)
- {
+ if (!ForgeHooks.onPickBlock(this.objectMouseOver, this.thePlayer, this.theWorld))
{
- k = this.objectMouseOver.blockX;
- int l = this.objectMouseOver.blockY;
- int i1 = this.objectMouseOver.blockZ;
@ -186,14 +187,15 @@
- flag1 = Item.itemsList[j].getHasSubtypes();
- int j1 = j < 256 && !Block.blocksList[block.blockID].isFlowerPot() ? j : block.blockID;
- i = Block.blocksList[j1].getDamageValue(this.theWorld, k, l, i1);
- }
+ return;
}
- else
- {
- if (this.objectMouseOver.typeOfHit != EnumMovingObjectType.ENTITY || this.objectMouseOver.entityHit == null || !flag)
- {
- return;
- }
-
- if (this.objectMouseOver.entityHit instanceof EntityPainting)
- {
- j = Item.painting.itemID;
@ -260,13 +262,10 @@
- }
-
- this.thePlayer.inventory.setCurrentItem(j, i, flag1, flag);
+ if (!ForgeHooks.onPickBlock(this.objectMouseOver, this.thePlayer, this.theWorld))
+ {
+ return;
+ }
-
if (flag)
{
k = this.thePlayer.inventoryContainer.inventorySlots.size() - 9 + this.thePlayer.inventory.currentItem;
@@ -2420,11 +2365,18 @@
par1PlayerUsageSnooper.addData("gl_max_texture_size", Integer.valueOf(getGLMaximumTextureSize()));
}

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/audio/SoundManager.java
+++ ../src_work/minecraft/net/minecraft/client/audio/SoundManager.java
--- ../src-base/minecraft/net/minecraft/client/audio/SoundManager.java
+++ ../src-work/minecraft/net/minecraft/client/audio/SoundManager.java
@@ -1,5 +1,9 @@
package net.minecraft.client.audio;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/entity/EntityOtherPlayerMP.java
+++ ../src_work/minecraft/net/minecraft/client/entity/EntityOtherPlayerMP.java
--- ../src-base/minecraft/net/minecraft/client/entity/EntityOtherPlayerMP.java
+++ ../src-work/minecraft/net/minecraft/client/entity/EntityOtherPlayerMP.java
@@ -170,7 +170,8 @@
}
}

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/entity/EntityPlayerSP.java
+++ ../src_work/minecraft/net/minecraft/client/entity/EntityPlayerSP.java
--- ../src-base/minecraft/net/minecraft/client/entity/EntityPlayerSP.java
+++ ../src-work/minecraft/net/minecraft/client/entity/EntityPlayerSP.java
@@ -49,6 +49,9 @@
import net.minecraft.util.MovementInput;
import net.minecraft.util.Session;
@ -34,17 +34,16 @@
double d4 = par5 - (double)k;
- if (this.isBlockTranslucent(i, j, k) || this.isBlockTranslucent(i, j + 1, k))
- {
- boolean flag = !this.isBlockTranslucent(i - 1, j, k) && !this.isBlockTranslucent(i - 1, j + 1, k);
- boolean flag1 = !this.isBlockTranslucent(i + 1, j, k) && !this.isBlockTranslucent(i + 1, j + 1, k);
- boolean flag2 = !this.isBlockTranslucent(i, j, k - 1) && !this.isBlockTranslucent(i, j + 1, k - 1);
- boolean flag3 = !this.isBlockTranslucent(i, j, k + 1) && !this.isBlockTranslucent(i, j + 1, k + 1);
+ int entHeight = Math.max(Math.round(this.height), 1);
+
+ boolean inTranslucentBlock = true;
+
+ for (int i1 = 0; i1 < entHeight; i1++)
+ {
{
- boolean flag = !this.isBlockTranslucent(i - 1, j, k) && !this.isBlockTranslucent(i - 1, j + 1, k);
- boolean flag1 = !this.isBlockTranslucent(i + 1, j, k) && !this.isBlockTranslucent(i + 1, j + 1, k);
- boolean flag2 = !this.isBlockTranslucent(i, j, k - 1) && !this.isBlockTranslucent(i, j + 1, k - 1);
- boolean flag3 = !this.isBlockTranslucent(i, j, k + 1) && !this.isBlockTranslucent(i, j + 1, k + 1);
+ if (!this.isBlockTranslucent(i, j + i1, k))
+ {
+ inTranslucentBlock = false;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/gui/GuiChat.java
+++ ../src_work/minecraft/net/minecraft/client/gui/GuiChat.java
--- ../src-base/minecraft/net/minecraft/client/gui/GuiChat.java
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiChat.java
@@ -7,8 +7,11 @@
import java.util.Iterator;
import java.util.List;

View file

@ -1,23 +1,23 @@
--- ../src_base/minecraft/net/minecraft/client/gui/GuiControls.java
+++ ../src_work/minecraft/net/minecraft/client/gui/GuiControls.java
@@ -6,6 +6,8 @@
import net.minecraft.client.settings.GameSettings;
--- ../src-base/minecraft/net/minecraft/client/gui/GuiControls.java
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiControls.java
@@ -7,6 +7,8 @@
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.util.EnumChatFormatting;
+
+import net.minecraftforge.client.GuiControlsScrollPanel;
+import net.minecraftforge.client.GuiControlsScrollPanel;
+
@SideOnly(Side.CLIENT)
public class GuiControls extends GuiScreen
@@ -23,6 +25,8 @@
{
@@ -24,6 +26,8 @@
/** The ID of the button that has been pressed. */
private int buttonId = -1;
+
+ private GuiControlsScrollPanel scrollPane;
+ private GuiControlsScrollPanel scrollPane;
+
public GuiControls(GuiScreen par1GuiScreen, GameSettings par2GameSettings)
{
this.parentScreen = par1GuiScreen;
@@ -43,14 +47,9 @@
*/
public void initGui()
@ -36,7 +36,7 @@
this.screenTitle = I18n.getString("controls.title");
}
@@ -59,19 +58,9 @@
@@ -59,20 +58,10 @@
*/
protected void actionPerformed(GuiButton par1GuiButton)
{
@ -48,14 +48,15 @@
if (par1GuiButton.id == 200)
{
this.mc.displayGuiScreen(this.parentScreen);
- }
}
- else
- {
- this.buttonId = par1GuiButton.id;
- par1GuiButton.displayString = "> " + this.options.getOptionDisplayString(par1GuiButton.id) + " <";
}
- }
}
/**
@@ -80,17 +69,7 @@
*/
protected void mouseClicked(int par1, int par2, int par3)
@ -75,22 +76,23 @@
}
/**
@@ -98,14 +77,7 @@
@@ -98,15 +77,8 @@
*/
protected void keyTyped(char par1, int par2)
{
- if (this.buttonId >= 0)
- {
+ if (scrollPane.keyTyped(par1, par2))
{
- this.options.setKeyBinding(this.buttonId, par2);
- ((GuiButton)this.buttonList.get(this.buttonId)).displayString = this.options.getOptionDisplayString(this.buttonId);
- this.buttonId = -1;
- KeyBinding.resetKeyBindingArrayAndHash();
- }
- else
+ if (scrollPane.keyTyped(par1, par2))
{
- {
super.keyTyped(par1, par2);
}
}
@@ -117,6 +89,7 @@
public void drawScreen(int par1, int par2, float par3)
{

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/gui/GuiCreateWorld.java
+++ ../src_work/minecraft/net/minecraft/client/gui/GuiCreateWorld.java
--- ../src-base/minecraft/net/minecraft/client/gui/GuiCreateWorld.java
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiCreateWorld.java
@@ -376,7 +376,7 @@
}
else if (par1GuiButton.id == 8)

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/gui/GuiIngame.java
+++ ../src_work/minecraft/net/minecraft/client/gui/GuiIngame.java
--- ../src-base/minecraft/net/minecraft/client/gui/GuiIngame.java
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiIngame.java
@@ -40,6 +40,8 @@
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
@ -14,10 +14,9 @@
ItemStack itemstack = this.mc.thePlayer.inventory.armorItemInSlot(3);
- if (this.mc.gameSettings.thirdPersonView == 0 && itemstack != null && itemstack.itemID == Block.pumpkin.blockID)
- {
- this.renderPumpkinBlur(k, l);
+ if (this.mc.gameSettings.thirdPersonView == 0 && itemstack != null && itemstack.getItem() != null)
+ {
{
- this.renderPumpkinBlur(k, l);
+ if (itemstack.itemID == Block.pumpkin.blockID)
+ {
+ this.renderPumpkinBlur(k, l);

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/gui/GuiSlot.java
+++ ../src_work/minecraft/net/minecraft/client/gui/GuiSlot.java
--- ../src-base/minecraft/net/minecraft/client/gui/GuiSlot.java
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiSlot.java
@@ -331,16 +331,7 @@
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_FOG);

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java
+++ ../src_work/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java
--- ../src-base/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java
+++ ../src-work/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java
@@ -2,6 +2,9 @@
import cpw.mods.fml.relauncher.Side;
@ -53,12 +53,10 @@
}
/**
@@ -87,6 +105,16 @@
{
this.mc.displayGuiScreen((GuiScreen)null);
@@ -89,6 +107,16 @@
this.mc.setIngameFocus();
+ }
+
}
+ if (par1GuiButton.id == 2)
+ {
+ currentPage++;
@ -67,23 +65,23 @@
+ currentPage = -1;
+ }
+ button.displayString = AchievementPage.getTitle(currentPage);
}
+ }
+
super.actionPerformed(par1GuiButton);
}
@@ -314,11 +342,12 @@
int i4;
int j4;
- for (i3 = 0; i3 < AchievementList.achievementList.size(); ++i3)
- {
- Achievement achievement = (Achievement)AchievementList.achievementList.get(i3);
-
- if (achievement.parentAchievement != null)
+ List<Achievement> achievementList = (currentPage == -1 ? minecraftAchievements : AchievementPage.getAchievementPage(currentPage).getAchievements());
+ for (i3 = 0; i3 < achievementList.size(); ++i3)
+ {
{
- Achievement achievement = (Achievement)AchievementList.achievementList.get(i3);
+ Achievement achievement = achievementList.get(i3);
+
- if (achievement.parentAchievement != null)
+ if (achievement.parentAchievement != null && achievementList.contains(achievement.parentAchievement))
{
k3 = achievement.displayColumn * 24 - k + 11 + k1;
@ -93,10 +91,9 @@
int i5;
- for (k3 = 0; k3 < AchievementList.achievementList.size(); ++k3)
- {
- Achievement achievement2 = (Achievement)AchievementList.achievementList.get(k3);
+ for (k3 = 0; k3 < achievementList.size(); ++k3)
+ {
{
- Achievement achievement2 = (Achievement)AchievementList.achievementList.get(k3);
+ Achievement achievement2 = (Achievement)achievementList.get(k3);
j4 = achievement2.displayColumn * 24 - k;
l3 = achievement2.displayRow * 24 - l;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java
+++ ../src_work/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java
--- ../src-base/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java
+++ ../src-work/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java
@@ -8,6 +8,7 @@
import java.util.List;
import java.util.Set;
@ -44,18 +44,18 @@
}
/**
@@ -242,6 +251,11 @@
}
@@ -243,6 +252,11 @@
protected void func_102021_a(List par1List, int par2, int par3)
+ {
{
+ drawHoveringText(par1List, par2, par3, fontRenderer);
+ }
+
+ protected void drawHoveringText(List par1List, int par2, int par3, FontRenderer font)
{
+ {
if (!par1List.isEmpty())
{
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
@@ -255,7 +269,7 @@
while (iterator.hasNext())
{

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java
+++ ../src_work/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java
--- ../src-base/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java
+++ ../src-work/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java
@@ -61,6 +61,8 @@
private Slot field_74235_v;
private boolean field_74234_w;
@ -61,10 +61,9 @@
Item.enchantedBook.func_92113_a(enchantment, containercreative.itemList);
}
}
-
+ updateFilteredItems(containercreative);
+ }
+
+ //split from above for custom search tabs
+ private void updateFilteredItems(ContainerCreative containercreative)
+ {
@ -116,26 +115,24 @@
{
this.searchField.setVisible(true);
this.searchField.setCanLoseFocus(false);
@@ -653,21 +682,42 @@
@@ -653,23 +682,44 @@
super.drawScreen(par1, par2, par3);
CreativeTabs[] acreativetabs = CreativeTabs.creativeTabArray;
- int i2 = acreativetabs.length;
-
- for (int j2 = 0; j2 < i2; ++j2)
+ int start = tabPage * 10;
+ int i2 = Math.min(acreativetabs.length, ((tabPage + 1) * 10) + 2);
+ if (tabPage != 0) start += 2;
+ boolean rendered = false;
+
- for (int j2 = 0; j2 < i2; ++j2)
+ for (int j2 = start; j2 < i2; ++j2)
{
CreativeTabs creativetabs = acreativetabs[j2];
- if (this.renderCreativeInventoryHoveringText(creativetabs, par1, par2))
- {
+ if (creativetabs != null && this.renderCreativeInventoryHoveringText(creativetabs, par1, par2))
+ {
{
+ rendered = true;
break;
}
@ -149,8 +146,8 @@
if (this.field_74235_v != null && selectedTabIndex == CreativeTabs.tabInventory.getTabIndex() && this.isPointInRegion(this.field_74235_v.xDisplayPosition, this.field_74235_v.yDisplayPosition, 16, 16, par1, par2))
{
this.drawCreativeTabHoveringText(I18n.getString("inventory.binSlot"), par1, par2);
+ }
+
}
+ if (maxPages != 0)
+ {
+ String page = String.format("%d / %d", tabPage + 1, maxPages + 1);
@ -161,10 +158,12 @@
+ fontRenderer.drawString(page, guiLeft + (xSize / 2) - (width / 2), guiTop - 44, -1);
+ this.zLevel = 0.0F;
+ itemRenderer.zLevel = 0.0F;
}
+ }
+
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
@@ -741,14 +791,32 @@
GL11.glDisable(GL11.GL_LIGHTING);
}
@@ -741,17 +791,35 @@
int k = acreativetabs.length;
int l;
@ -182,9 +181,9 @@
+ if (creativetabs1 != null && creativetabs1.getTabIndex() != selectedTabIndex)
{
this.renderCreativeTab(creativetabs1);
+ }
+ }
+
}
}
+ if (tabPage != 0)
+ {
+ if (creativetabs != CreativeTabs.tabAllSearch)
@ -196,9 +195,12 @@
+ {
+ this.mc.getTextureManager().bindTexture(field_110424_t);
+ renderCreativeTab(CreativeTabs.tabInventory);
}
}
+ }
+ }
+
this.mc.getTextureManager().bindTexture(new ResourceLocation("textures/gui/container/creative_inventory/tab_" + creativetabs.getBackgroundImageName()));
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
this.searchField.drawTextBox();
@@ -766,6 +834,14 @@
this.drawTexturedModalRect(i1, k + (int)((float)(l - k - 17) * this.currentScroll), 232 + (this.needsScrollBars() ? 0 : 12), 0, 12, 15);
}

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/model/ModelBase.java
+++ ../src_work/minecraft/net/minecraft/client/model/ModelBase.java
--- ../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.EntityLivingBase;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/model/ModelBox.java
+++ ../src_work/minecraft/net/minecraft/client/model/ModelBox.java
--- ../src-base/minecraft/net/minecraft/client/model/ModelBox.java
+++ ../src-work/minecraft/net/minecraft/client/model/ModelBox.java
@@ -4,7 +4,6 @@
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.Tessellator;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/model/ModelRenderer.java
+++ ../src_work/minecraft/net/minecraft/client/model/ModelRenderer.java
--- ../src-base/minecraft/net/minecraft/client/model/ModelRenderer.java
+++ ../src-work/minecraft/net/minecraft/client/model/ModelRenderer.java
@@ -8,7 +8,6 @@
import net.minecraft.client.renderer.Tessellator;
import org.lwjgl.opengl.GL11;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/model/PositionTextureVertex.java
+++ ../src_work/minecraft/net/minecraft/client/model/PositionTextureVertex.java
--- ../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.relauncher.SideOnly;
import net.minecraft.util.Vec3;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/model/TexturedQuad.java
+++ ../src_work/minecraft/net/minecraft/client/model/TexturedQuad.java
--- ../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;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java
+++ ../src_work/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java
--- ../src-base/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java
+++ ../src-work/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java
@@ -13,6 +13,8 @@
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.chunk.EmptyChunk;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java
+++ ../src_work/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java
--- ../src-base/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java
+++ ../src-work/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java
@@ -191,6 +191,11 @@
import net.minecraft.world.storage.MapStorage;
import org.lwjgl.input.Keyboard;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java
+++ ../src_work/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java
--- ../src-base/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java
+++ ../src-work/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java
@@ -22,6 +22,10 @@
import net.minecraft.world.EnumGameType;
import net.minecraft.world.World;
@ -37,15 +37,14 @@
float f2 = (float)par8Vec3.zCoord - (float)par6;
boolean flag = false;
int i1;
-
- if (!par1EntityPlayer.isSneaking() || par1EntityPlayer.getHeldItem() == null)
+ if (par3ItemStack != null &&
+ par3ItemStack.getItem() != null &&
+ par3ItemStack.getItem().onItemUseFirst(par3ItemStack, par1EntityPlayer, par2World, par4, par5, par6, par7, f, f1, f2))
+ {
+ return true;
+ }
+
- if (!par1EntityPlayer.isSneaking() || par1EntityPlayer.getHeldItem() == null)
+ if (!par1EntityPlayer.isSneaking() || (par1EntityPlayer.getHeldItem() == null || par1EntityPlayer.getHeldItem().getItem().shouldPassSneakingClickToBlock(par2World, par4, par5, par6)))
{
i1 = par2World.getBlockId(par4, par5, par6);

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/multiplayer/WorldClient.java
+++ ../src_work/minecraft/net/minecraft/client/multiplayer/WorldClient.java
--- ../src-base/minecraft/net/minecraft/client/multiplayer/WorldClient.java
+++ ../src-work/minecraft/net/minecraft/client/multiplayer/WorldClient.java
@@ -29,6 +29,9 @@
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.storage.SaveHandlerMP;
@ -14,11 +14,11 @@
super(new SaveHandlerMP(), "MpServer", WorldProvider.getProviderForDimension(par3), par2WorldSettings, par5Profiler, par6ILogAgent);
this.sendQueue = par1NetClientHandler;
this.difficultySetting = par4;
+ this.mapStorage = par1NetClientHandler.mapStorage;
- this.setSpawnLocation(8, 64, 8);
this.mapStorage = par1NetClientHandler.mapStorage;
+ this.isRemote = true;
+ finishSetup();
this.setSpawnLocation(8, 64, 8);
- this.mapStorage = par1NetClientHandler.mapStorage;
+ this.setSpawnLocation(8, 64, 8);
+ MinecraftForge.EVENT_BUS.post(new WorldEvent.Load(this));
}

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/particle/EffectRenderer.java
+++ ../src_work/minecraft/net/minecraft/client/particle/EffectRenderer.java
--- ../src-base/minecraft/net/minecraft/client/particle/EffectRenderer.java
+++ ../src-work/minecraft/net/minecraft/client/particle/EffectRenderer.java
@@ -12,6 +12,7 @@
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.Entity;
@ -8,23 +8,23 @@
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import org.lwjgl.opengl.GL11;
@@ -63,9 +64,13 @@
@@ -63,10 +64,14 @@
for (int j = 0; j < this.fxLayers[i].size(); ++j)
{
EntityFX entityfx = (EntityFX)this.fxLayers[i].get(j);
- entityfx.onUpdate();
-
- if (entityfx.isDead)
+
+ if (entityfx != null)
+ {
{
+ entityfx.onUpdate();
+ }
+
+ if (entityfx == null || entityfx.isDead)
{
+ {
this.fxLayers[i].remove(j--);
}
}
@@ -115,6 +120,7 @@
for (int j = 0; j < this.fxLayers[i].size(); ++j)
{
@ -46,11 +46,10 @@
public void addBlockDestroyEffects(int par1, int par2, int par3, int par4, int par5)
{
- if (par4 != 0)
- {
- Block block = Block.blocksList[par4];
+ Block block = Block.blocksList[par4];
+ if (block != null && !block.addBlockDestroyEffects(worldObj, par1, par2, par3, par5, this))
+ {
{
- Block block = Block.blocksList[par4];
byte b0 = 4;
for (int j1 = 0; j1 < b0; ++j1)

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/particle/EntityDiggingFX.java
+++ ../src_work/minecraft/net/minecraft/client/particle/EntityDiggingFX.java
--- ../src-base/minecraft/net/minecraft/client/particle/EntityDiggingFX.java
+++ ../src-work/minecraft/net/minecraft/client/particle/EntityDiggingFX.java
@@ -10,15 +10,22 @@
public class EntityDiggingFX extends EntityFX
{

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/particle/EntityFireworkStarterFX.java
+++ ../src_work/minecraft/net/minecraft/client/particle/EntityFireworkStarterFX.java
--- ../src-base/minecraft/net/minecraft/client/particle/EntityFireworkStarterFX.java
+++ ../src-work/minecraft/net/minecraft/client/particle/EntityFireworkStarterFX.java
@@ -30,11 +30,11 @@
{
this.fireworkExplosions = par15NBTTagCompound.getTagList("Explosions");

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/renderer/EntityRenderer.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/EntityRenderer.java
--- ../src-base/minecraft/net/minecraft/client/renderer/EntityRenderer.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/EntityRenderer.java
@@ -40,6 +40,11 @@
import org.lwjgl.opengl.GLContext;
import org.lwjgl.util.glu.Project;
@ -133,11 +133,10 @@
GL11.glDisable(GL11.GL_BLEND);
this.mc.mcProfiler.endStartSection("weather");
this.renderRainSnow(par1);
@@ -1248,6 +1273,20 @@
{
@@ -1249,6 +1274,20 @@
this.renderCloudsCheck(renderglobal, par1);
}
+
+ //Forge: Moved section from above, now particles are the last thing to render.
+ this.enableLightmap((double)par1);
+ this.mc.mcProfiler.endStartSection("litParticles");
@ -151,6 +150,7 @@
+
+ this.mc.mcProfiler.endStartSection("FRenderLast");
+ ForgeHooksClient.dispatchRenderLast(renderglobal, par1);
+
this.mc.mcProfiler.endStartSection("hand");
if (this.cameraZoom == 1.0D)

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/renderer/ItemRenderer.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/ItemRenderer.java
--- ../src-base/minecraft/net/minecraft/client/renderer/ItemRenderer.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/ItemRenderer.java
@@ -16,6 +16,8 @@
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.EnumAction;
@ -23,7 +23,7 @@
@SideOnly(Side.CLIENT)
public class ItemRenderer
{
@@ -54,15 +63,32 @@
@@ -54,16 +63,33 @@
this.mapItemRenderer = new MapItemRenderer(par1Minecraft.gameSettings, par1Minecraft.getTextureManager());
}
@ -44,7 +44,7 @@
- if (par2ItemStack.getItemSpriteNumber() == 0 && par2ItemStack.itemID < Block.blocksList.length && Block.blocksList[par2ItemStack.itemID] != null && RenderBlocks.renderItemIn3d(Block.blocksList[par2ItemStack.itemID].getRenderType()))
+ Block block = null;
+ if (par2ItemStack.getItem() instanceof ItemBlock && par2ItemStack.itemID < Block.blocksList.length)
+ {
{
+ block = Block.blocksList[par2ItemStack.itemID];
+ }
+
@ -55,9 +55,10 @@
+ ForgeHooksClient.renderEquippedItem(type, customRenderer, renderBlocksInstance, par1EntityLivingBase, par2ItemStack);
+ }
+ else if (block != null && par2ItemStack.getItemSpriteNumber() == 0 && RenderBlocks.renderItemIn3d(Block.blocksList[par2ItemStack.itemID].getRenderType()))
{
+ {
texturemanager.bindTexture(texturemanager.getResourceLocation(0));
this.renderBlocksInstance.renderBlockAsItem(Block.blocksList[par2ItemStack.itemID], par2ItemStack.getItemDamage(), 1.0F);
}
@@ -94,7 +120,7 @@
GL11.glTranslatef(-0.9375F, -0.0625F, 0.0F);
renderItemIn2D(tessellator, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 0.0625F);
@ -76,32 +77,31 @@
{
GL11.glPushMatrix();
f12 = 0.8F;
@@ -333,11 +359,20 @@
@@ -333,12 +359,21 @@
tessellator.addVertexWithUV((double)(128 + b0), (double)(0 - b0), 0.0D, 1.0D, 0.0D);
tessellator.addVertexWithUV((double)(0 - b0), (double)(0 - b0), 0.0D, 0.0D, 0.0D);
tessellator.draw();
- MapData mapdata = Item.map.getMapData(itemstack, this.mc.theWorld);
-
- if (mapdata != null)
- {
- this.mapItemRenderer.renderMap(this.mc.thePlayer, this.mc.getTextureManager(), mapdata);
+
+ IItemRenderer custom = MinecraftForgeClient.getItemRenderer(itemstack, FIRST_PERSON_MAP);
+ MapData mapdata = ((ItemMap)itemstack.getItem()).getMapData(itemstack, this.mc.theWorld);
+
+ if (custom == null)
+ {
{
- this.mapItemRenderer.renderMap(this.mc.thePlayer, this.mc.getTextureManager(), mapdata);
+ if (mapdata != null)
+ {
+ this.mapItemRenderer.renderMap(this.mc.thePlayer, this.mc.getTextureManager(), mapdata);
+ }
+ }
}
+ else
+ {
+ custom.renderItem(FIRST_PERSON_MAP, itemstack, mc.thePlayer, mc.getTextureManager(), mapdata);
}
+ }
GL11.glPopMatrix();
}
@@ -439,17 +474,20 @@
if (itemstack.getItem().requiresMultipleRenderPasses())

View file

@ -1,16 +1,16 @@
--- ../src_base/minecraft/net/minecraft/client/renderer/OpenGlHelper.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/OpenGlHelper.java
@@ -25,6 +25,10 @@
* True if the renderer supports multitextures and the OpenGL version != 1.3
--- ../src-base/minecraft/net/minecraft/client/renderer/OpenGlHelper.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/OpenGlHelper.java
@@ -26,6 +26,10 @@
*/
private static boolean useMultitextureARB;
+
+ /* Stores the last values sent into setLightmapTextureCoords */
+ public static float lastBrightnessX = 0.0f;
+ public static float lastBrightnessY = 0.0f;
+
/**
* Initializes the texture constants to be used when rendering lightmap values
*/
@@ -88,5 +92,11 @@
{
GL13.glMultiTexCoord2f(par0, par1, par2);

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/renderer/RenderBlocks.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/RenderBlocks.java
--- ../src-base/minecraft/net/minecraft/client/renderer/RenderBlocks.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/RenderBlocks.java
@@ -45,6 +45,8 @@
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/renderer/RenderGlobal.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/RenderGlobal.java
--- ../src-base/minecraft/net/minecraft/client/renderer/RenderGlobal.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/RenderGlobal.java
@@ -68,6 +68,9 @@
import org.lwjgl.opengl.ARBOcclusionQuery;
import org.lwjgl.opengl.GL11;
@ -103,15 +103,15 @@
if (this.mc.theWorld.provider.isSurfaceWorld())
{
if (this.mc.gameSettings.fancyGraphics)
@@ -1595,6 +1628,11 @@
}
@@ -1596,6 +1629,11 @@
public void drawBlockDamageTexture(Tessellator par1Tessellator, EntityPlayer par2EntityPlayer, float par3)
+ {
{
+ drawBlockDamageTexture(par1Tessellator, (EntityLivingBase)par2EntityPlayer, par3);
+ }
+
+ public void drawBlockDamageTexture(Tessellator par1Tessellator, EntityLivingBase par2EntityPlayer, float par3)
{
+ {
double d0 = par2EntityPlayer.lastTickPosX + (par2EntityPlayer.posX - par2EntityPlayer.lastTickPosX) * (double)par3;
double d1 = par2EntityPlayer.lastTickPosY + (par2EntityPlayer.posY - par2EntityPlayer.lastTickPosY) * (double)par3;
double d2 = par2EntityPlayer.lastTickPosZ + (par2EntityPlayer.posZ - par2EntityPlayer.lastTickPosZ) * (double)par3;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/renderer/Tessellator.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/Tessellator.java
--- ../src-base/minecraft/net/minecraft/client/renderer/Tessellator.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/Tessellator.java
@@ -7,6 +7,8 @@
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
@ -75,11 +75,6 @@
- this.shortBuffer = this.byteBuffer.asShortBuffer();
- this.rawBuffer = new int[par1];
- this.useVBO = tryVBO && GLContext.getCapabilities().GL_ARB_vertex_buffer_object;
-
- if (this.useVBO)
- {
- this.vertexBuffers = GLAllocation.createDirectIntBuffer(this.vboCount);
- ARBVertexBufferObject.glGenBuffersARB(this.vertexBuffers);
+ }
+
+ public Tessellator()
@ -90,9 +85,12 @@
+ {
+ instance.defaultTexture = true;
+ useVBO = tryVBO && GLContext.getCapabilities().GL_ARB_vertex_buffer_object;
+
- if (this.useVBO)
+ if (useVBO)
+ {
{
- this.vertexBuffers = GLAllocation.createDirectIntBuffer(this.vboCount);
- ARBVertexBufferObject.glGenBuffersARB(this.vertexBuffers);
+ vertexBuffers = GLAllocation.createDirectIntBuffer(vboCount);
+ ARBVertexBufferObject.glGenBuffersARB(vertexBuffers);
}
@ -103,10 +101,9 @@
this.isDrawing = false;
- if (this.vertexCount > 0)
- {
+ int offs = 0;
+ while (offs < vertexCount)
+ {
{
+ int vtc = 0;
+ if (drawMode == 7 && convertQuadsToTriangles)
+ {
@ -140,19 +137,19 @@
}
GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY);
@@ -278,6 +300,12 @@
{
GL11.glDisableClientState(GL11.GL_NORMAL_ARRAY);
@@ -280,6 +302,12 @@
}
+ }
+
}
+ if (rawBufferSize > 0x20000 && rawBufferIndex < (rawBufferSize << 3))
+ {
+ rawBufferSize = 0;
+ rawBuffer = null;
}
+ }
+
int i = this.rawBufferIndex * 4;
this.reset();
return i;
@@ -442,6 +470,19 @@
*/
public void addVertex(double par1, double par3, double par5)

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/renderer/WorldRenderer.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/WorldRenderer.java
--- ../src-base/minecraft/net/minecraft/client/renderer/WorldRenderer.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/WorldRenderer.java
@@ -23,7 +23,7 @@
/** Reference to the World object. */
public World worldObj;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderBiped.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderBiped.java
--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderBiped.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderBiped.java
@@ -14,9 +14,15 @@
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.Item;
@ -85,12 +85,11 @@
float f1 = 1.0F;
- if (itemarmor.getArmorMaterial() == EnumArmorMaterial.CLOTH)
- {
- int j = itemarmor.getColor(itemstack);
+ //Move out of if to allow for more then just CLOTH to have color
+ int j = itemarmor.getColor(itemstack);
+ if (j != -1)
+ {
{
- int j = itemarmor.getColor(itemstack);
float f2 = (float)(j >> 16 & 255) / 255.0F;
float f3 = (float)(j >> 8 & 255) / 255.0F;
float f4 = (float)(j & 255) / 255.0F;
@ -108,13 +107,12 @@
this.modelBipedMain.bipedHead.postRender(0.0625F);
- if (itemstack1.getItem().itemID < 256)
- {
- if (RenderBlocks.renderItemIn3d(Block.blocksList[itemstack1.itemID].getRenderType()))
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack1, EQUIPPED);
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack1, BLOCK_3D));
+
+ if (itemstack1.getItem() instanceof ItemBlock)
+ {
{
- if (RenderBlocks.renderItemIn3d(Block.blocksList[itemstack1.itemID].getRenderType()))
+ if (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[itemstack1.itemID].getRenderType()))
{
f2 = 0.625F;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderItem.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderItem.java
--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderItem.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderItem.java
@@ -21,6 +21,8 @@
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
@ -9,7 +9,7 @@
@SideOnly(Side.CLIENT)
public class RenderItem extends Render
{
@@ -53,29 +55,9 @@
@@ -53,30 +55,10 @@
if (itemstack.getItem() != null)
{
GL11.glPushMatrix();
@ -17,7 +17,8 @@
+ float f2 = shouldBob() ? MathHelper.sin(((float)par1EntityItem.age + par9) / 10.0F + par1EntityItem.hoverStart) * 0.1F + 0.1F : 0F;
float f3 = (((float)par1EntityItem.age + par9) / 20.0F + par1EntityItem.hoverStart) * (180F / (float)Math.PI);
- byte b0 = 1;
-
+ byte b0 = getMiniBlockCount(itemstack);
- if (par1EntityItem.getEntityItem().stackSize > 1)
- {
- b0 = 2;
@ -37,20 +38,19 @@
- {
- b0 = 5;
- }
+ byte b0 = getMiniBlockCount(itemstack);
-
GL11.glTranslatef((float)par2, (float)par4 + f2, (float)par6);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
float f4;
@@ -84,9 +66,18 @@
float f6;
int i;
- if (itemstack.getItemSpriteNumber() == 0 && itemstack.itemID < Block.blocksList.length && Block.blocksList[itemstack.itemID] != null && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType()))
- {
- Block block = Block.blocksList[itemstack.itemID];
+ Block block = null;
+ if (itemstack.itemID < Block.blocksList.length)
+ {
{
- Block block = Block.blocksList[itemstack.itemID];
+ block = Block.blocksList[itemstack.itemID];
+ }
+
@ -99,23 +99,24 @@
}
}
}
@@ -204,6 +195,10 @@
* Renders a dropped item
@@ -205,6 +196,10 @@
*/
private void renderDroppedItem(EntityItem par1EntityItem, Icon par2Icon, int par3, float par4, float par5, float par6, float par7)
+ {
{
+ renderDroppedItem(par1EntityItem, par2Icon, par3, par4, par5, par6, par7, 0);
+ }
+ private void renderDroppedItem(EntityItem par1EntityItem, Icon par2Icon, int par3, float par4, float par5, float par6, float par7, int pass)
{
+ {
Tessellator tessellator = Tessellator.instance;
if (par2Icon == null)
@@ -240,32 +235,26 @@
f11 = 0.021875F;
ItemStack itemstack = par1EntityItem.getEntityItem();
int j = itemstack.stackSize;
- byte b0;
-
+ byte b0 = getMiniItemCount(itemstack);
- if (j < 2)
- {
- b0 = 1;
@ -132,15 +133,12 @@
- {
- b0 = 4;
- }
+ byte b0 = getMiniItemCount(itemstack);
-
GL11.glTranslatef(-f9, -f10, -((f12 + f11) * (float)b0 / 2.0F));
for (int k = 0; k < b0; ++k)
{
- GL11.glTranslatef(0.0F, 0.0F, f12 + f11);
-
- if (itemstack.getItemSpriteNumber() == 0 && Block.blocksList[itemstack.itemID] != null)
+ // Makes items offset when in 3D, like when in 2D, looks much better. Considered a vanilla bug...
+ if (k > 0 && shouldSpreadItems())
+ {
@ -153,7 +151,8 @@
+ {
+ GL11.glTranslatef(0f, 0f, f12 + f11);
+ }
+
- if (itemstack.getItemSpriteNumber() == 0 && Block.blocksList[itemstack.itemID] != null)
+ if (itemstack.getItemSpriteNumber() == 0)
{
this.bindTexture(TextureMap.locationBlocksTexture);
@ -196,13 +195,11 @@
{
GL11.glDisable(GL11.GL_LIGHTING);
- par2TextureManager.bindTexture(TextureMap.locationItemsTexture);
-
- for (int j1 = 0; j1 <= 1; ++j1)
- {
- Icon icon = Item.itemsList[k].getIconFromDamageForRenderPass(l, j1);
+
+ for (int j1 = 0; j1 < Item.itemsList[k].getRenderPasses(l); ++j1)
+ {
{
- Icon icon = Item.itemsList[k].getIconFromDamageForRenderPass(l, j1);
+ par2TextureManager.bindTexture(par3ItemStack.getItemSpriteNumber() == 0 ? TextureMap.locationBlocksTexture : TextureMap.locationItemsTexture);
+ Icon icon = Item.itemsList[k].getIcon(par3ItemStack, j1);
int k1 = Item.itemsList[k].getColorFromItemStack(par3ItemStack, j1);
@ -260,12 +257,11 @@
if (par3ItemStack != null)
{
- this.renderItemIntoGUI(par1FontRenderer, par2TextureManager, par3ItemStack, par4, par5);
-
+ if (!ForgeHooksClient.renderInventoryItem(renderBlocks, par2TextureManager, par3ItemStack, renderWithColor, zLevel, (float)par4, (float)par5))
+ {
+ this.renderItemIntoGUI(par1FontRenderer, par2TextureManager, par3ItemStack, par4, par5, true);
+ }
+
+ /* Modders must handle this themselves if they use custom renderers!
if (par3ItemStack.hasEffect())
{

View file

@ -1,17 +1,16 @@
--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
@@ -223,12 +223,14 @@
if (par4EntityLivingBase.isPlayerSleeping())
{
- int i = par1World.getBlockId(MathHelper.floor_double(par4EntityLivingBase.posX), MathHelper.floor_double(par4EntityLivingBase.posY), MathHelper.floor_double(par4EntityLivingBase.posZ));
-
- if (i == Block.bed.blockID)
+ int x = MathHelper.floor_double(par4EntityLivingBase.posX);
+ int y = MathHelper.floor_double(par4EntityLivingBase.posY);
+ int z = MathHelper.floor_double(par4EntityLivingBase.posZ);
+ Block block = Block.blocksList[par1World.getBlockId(x, y, z)];
+
- if (i == Block.bed.blockID)
+ if (block != null && block.isBed(par1World, x, y, z, par4EntityLivingBase))
{
- int j = par1World.getBlockMetadata(MathHelper.floor_double(par4EntityLivingBase.posX), MathHelper.floor_double(par4EntityLivingBase.posY), MathHelper.floor_double(par4EntityLivingBase.posZ));

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java
--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java
@@ -15,13 +15,22 @@
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.Item;
@ -58,12 +58,11 @@
float f1 = 1.0F;
- if (itemarmor.getArmorMaterial() == EnumArmorMaterial.CLOTH)
- {
- int j = itemarmor.getColor(itemstack);
+ //Move outside if to allow for more then just CLOTH
+ int j = itemarmor.getColor(itemstack);
+ if (j != -1)
+ {
{
- int j = itemarmor.getColor(itemstack);
float f2 = (float)(j >> 16 & 255) / 255.0F;
float f3 = (float)(j >> 8 & 255) / 255.0F;
float f4 = (float)(j & 255) / 255.0F;
@ -116,10 +115,9 @@
float f2;
- if (itemstack.getItem().itemID < 256)
- {
- if (RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType()))
+ if (itemstack != null && itemstack.getItem() instanceof ItemBlock)
+ {
{
- if (RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType()))
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack, EQUIPPED);
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack, BLOCK_3D));
+

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderSnowMan.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderSnowMan.java
--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderSnowMan.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderSnowMan.java
@@ -8,9 +8,14 @@
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RendererLivingEntity.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RendererLivingEntity.java
--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RendererLivingEntity.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RendererLivingEntity.java
@@ -18,6 +18,9 @@
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.MathHelper;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/renderer/texture/Stitcher.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/texture/Stitcher.java
--- ../src-base/minecraft/net/minecraft/client/renderer/texture/Stitcher.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/texture/Stitcher.java
@@ -187,7 +187,7 @@
if (flag4 ^ flag5)

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/renderer/texture/TextureAtlasSprite.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/texture/TextureAtlasSprite.java
--- ../src-base/minecraft/net/minecraft/client/renderer/texture/TextureAtlasSprite.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/texture/TextureAtlasSprite.java
@@ -11,9 +11,11 @@
import java.util.List;
import javax.imageio.ImageIO;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/renderer/texture/TextureMap.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/texture/TextureMap.java
--- ../src-base/minecraft/net/minecraft/client/renderer/texture/TextureMap.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/texture/TextureMap.java
@@ -21,6 +21,7 @@
import net.minecraft.util.Icon;
import net.minecraft.util.ReportedException;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/client/renderer/tileentity/TileEntityChestRenderer.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/tileentity/TileEntityChestRenderer.java
--- ../src-base/minecraft/net/minecraft/client/renderer/tileentity/TileEntityChestRenderer.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/tileentity/TileEntityChestRenderer.java
@@ -1,5 +1,6 @@
package net.minecraft.client.renderer.tileentity;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/command/CommandHandler.java
+++ ../src_work/minecraft/net/minecraft/command/CommandHandler.java
--- ../src-base/minecraft/net/minecraft/command/CommandHandler.java
+++ ../src-work/minecraft/net/minecraft/command/CommandHandler.java
@@ -12,6 +12,9 @@
import net.minecraft.util.ChatMessageComponent;
import net.minecraft.util.EnumChatFormatting;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/crash/CallableSuspiciousClasses.java
+++ ../src_work/minecraft/net/minecraft/crash/CallableSuspiciousClasses.java
--- ../src-base/minecraft/net/minecraft/crash/CallableSuspiciousClasses.java
+++ ../src-work/minecraft/net/minecraft/crash/CallableSuspiciousClasses.java
@@ -130,6 +130,6 @@
public Object call()

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/crash/CrashReport.java
+++ ../src_work/minecraft/net/minecraft/crash/CrashReport.java
--- ../src-base/minecraft/net/minecraft/crash/CrashReport.java
+++ ../src-work/minecraft/net/minecraft/crash/CrashReport.java
@@ -245,7 +245,8 @@
StackTraceElement stacktraceelement = null;
StackTraceElement stacktraceelement1 = null;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/crash/CrashReportCategory.java
+++ ../src_work/minecraft/net/minecraft/crash/CrashReportCategory.java
--- ../src-base/minecraft/net/minecraft/crash/CrashReportCategory.java
+++ ../src-work/minecraft/net/minecraft/crash/CrashReportCategory.java
@@ -130,8 +130,11 @@
public int func_85073_a(int par1)
{

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/creativetab/CreativeTabs.java
+++ ../src_work/minecraft/net/minecraft/creativetab/CreativeTabs.java
--- ../src-base/minecraft/net/minecraft/creativetab/CreativeTabs.java
+++ ../src-work/minecraft/net/minecraft/creativetab/CreativeTabs.java
@@ -7,6 +7,7 @@
import net.minecraft.enchantment.EnchantmentData;
import net.minecraft.enchantment.EnumEnchantmentType;
@ -53,17 +53,16 @@
return this.tabIndex < 6;
}
@@ -187,9 +210,17 @@
@@ -187,10 +210,18 @@
{
Item item = aitem[j];
- if (item != null && item.getCreativeTab() == this)
- {
- item.getSubItems(item.itemID, this, par1List);
+ if (item == null)
+ {
{
- item.getSubItems(item.itemID, this, par1List);
+ continue;
+ }
}
+
+ for (CreativeTabs tab : item.getCreativeTabs())
+ {
@ -71,9 +70,10 @@
+ {
+ item.getSubItems(item.itemID, this, par1List);
+ }
}
+ }
}
if (this.func_111225_m() != null)
@@ -232,4 +263,36 @@
}
}

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/enchantment/Enchantment.java
+++ ../src_work/minecraft/net/minecraft/enchantment/Enchantment.java
--- ../src-base/minecraft/net/minecraft/enchantment/Enchantment.java
+++ ../src-work/minecraft/net/minecraft/enchantment/Enchantment.java
@@ -1,6 +1,9 @@
package net.minecraft.enchantment;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/enchantment/EnchantmentHelper.java
+++ ../src_work/minecraft/net/minecraft/enchantment/EnchantmentHelper.java
--- ../src-base/minecraft/net/minecraft/enchantment/EnchantmentHelper.java
+++ ../src-work/minecraft/net/minecraft/enchantment/EnchantmentHelper.java
@@ -463,7 +463,10 @@
{
Enchantment enchantment = aenchantment[k];

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/entity/Entity.java
+++ ../src_work/minecraft/net/minecraft/entity/Entity.java
--- ../src-base/minecraft/net/minecraft/entity/Entity.java
+++ ../src-work/minecraft/net/minecraft/entity/Entity.java
@@ -1,10 +1,15 @@
package net.minecraft.entity;
@ -49,7 +49,7 @@
public abstract class Entity
{
@@ -218,6 +234,13 @@
@@ -218,7 +234,14 @@
private boolean invulnerable;
private UUID entityUniqueID;
public EnumEntitySize myEntitySize;
@ -58,11 +58,12 @@
+ public boolean captureDrops = false;
+ public ArrayList<EntityItem> capturedDrops = new ArrayList<EntityItem>();
+ private UUID persistentID;
+
+ private HashMap<String, IExtendedEntityProperties> extendedProperties;
+ private HashMap<String, IExtendedEntityProperties> extendedProperties;
+
public Entity(World par1World)
{
this.entityId = nextEntityID++;
@@ -245,6 +268,15 @@
this.dataWatcher.addObject(0, Byte.valueOf((byte)0));
this.dataWatcher.addObject(1, Short.valueOf((short)300));
@ -84,13 +85,12 @@
int l = this.worldObj.getBlockId(i, j, k);
- if (l != 0 && Block.blocksList[l].blockMaterial == par1Material)
- {
+ Block block = Block.blocksList[l];
+ if (block != null && block.blockMaterial == par1Material)
{
- float f = BlockFluid.getFluidHeightPercent(this.worldObj.getBlockMetadata(i, j, k)) - 0.11111111F;
- float f1 = (float)(j + 1) - f;
- return d0 < (double)f1;
+ Block block = Block.blocksList[l];
+ if (block != null && block.blockMaterial == par1Material)
+ {
+ double filled = block.getFilledPercentage(worldObj, i, j, k);
+ if (filled < 0)
+ {

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/entity/EntityLiving.java
+++ ../src_work/minecraft/net/minecraft/entity/EntityLiving.java
--- ../src-base/minecraft/net/minecraft/entity/EntityLiving.java
+++ ../src-work/minecraft/net/minecraft/entity/EntityLiving.java
@@ -31,6 +31,11 @@
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
@ -20,7 +20,7 @@
}
/**
@@ -547,9 +553,21 @@
@@ -547,10 +553,22 @@
*/
protected void despawnEntity()
{
@ -28,7 +28,7 @@
if (this.persistenceRequired)
{
this.entityAge = 0;
+ }
}
+ else if ((this.entityAge & 0x1F) == 0x1F && (result = ForgeEventFactory.canEntityDespawn(this)) != Result.DEFAULT)
+ {
+ if (result == Result.DENY)
@ -39,9 +39,10 @@
+ {
+ this.setDead();
+ }
}
+ }
else
{
EntityPlayer entityplayer = this.worldObj.getClosestPlayerToEntity(this, -1.0D);
@@ -726,8 +744,6 @@
return this.worldObj.checkNoEntityCollision(this.boundingBox) && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).isEmpty() && !this.worldObj.isAnyLiquid(this.boundingBox);
}

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/entity/EntityLivingBase.java
+++ ../src_work/minecraft/net/minecraft/entity/EntityLivingBase.java
--- ../src-base/minecraft/net/minecraft/entity/EntityLivingBase.java
+++ ../src-work/minecraft/net/minecraft/entity/EntityLivingBase.java
@@ -20,9 +20,11 @@
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.item.EntityXPOrb;
@ -73,7 +73,7 @@
if (!this.isChild() && this.worldObj.getGameRules().getGameRuleBooleanValue("doMobLoot"))
{
this.dropFewItems(this.recentlyHit > 0, i);
@@ -1013,12 +1021,22 @@
@@ -1013,7 +1021,7 @@
if (this.recentlyHit > 0)
{
@ -82,10 +82,10 @@
if (j < 5)
{
this.dropRareDrop(j <= 0 ? 1 : 0);
@@ -1021,6 +1029,16 @@
}
+ }
+ }
}
}
+
+ captureDrops = false;
+
@ -94,9 +94,11 @@
+ for (EntityItem item : capturedDrops)
+ {
+ worldObj.spawnEntityInWorld(item);
}
}
+ }
+ }
}
this.worldObj.setEntityState(this, (byte)3);
@@ -1088,7 +1106,7 @@
int j = MathHelper.floor_double(this.boundingBox.minY);
int k = MathHelper.floor_double(this.posZ);

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/entity/ai/EntityAIAttackOnCollide.java
+++ ../src_work/minecraft/net/minecraft/entity/ai/EntityAIAttackOnCollide.java
--- ../src-base/minecraft/net/minecraft/entity/ai/EntityAIAttackOnCollide.java
+++ ../src-work/minecraft/net/minecraft/entity/ai/EntityAIAttackOnCollide.java
@@ -3,6 +3,7 @@
import net.minecraft.entity.EntityCreature;
import net.minecraft.entity.EntityLivingBase;
@ -8,15 +8,15 @@
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
@@ -28,6 +29,8 @@
PathEntity entityPathEntity;
@@ -29,6 +30,8 @@
Class classTarget;
private int field_75445_i;
+
+ private int failedPathFindingPenalty;
+ private int failedPathFindingPenalty;
+
public EntityAIAttackOnCollide(EntityCreature par1EntityCreature, Class par2Class, double par3, boolean par5)
{
this(par1EntityCreature, par3, par5);
@@ -65,8 +68,16 @@
}
else

View file

@ -1,13 +1,12 @@
--- ../src_base/minecraft/net/minecraft/entity/boss/EntityDragon.java
+++ ../src_work/minecraft/net/minecraft/entity/boss/EntityDragon.java
--- ../src-base/minecraft/net/minecraft/entity/boss/EntityDragon.java
+++ ../src-work/minecraft/net/minecraft/entity/boss/EntityDragon.java
@@ -527,10 +527,11 @@
for (int i2 = k; i2 <= j1; ++i2)
{
int j2 = this.worldObj.getBlockId(k1, l1, i2);
-
- if (j2 != 0)
+ Block block = Block.blocksList[j2];
+
- if (j2 != 0)
+ if (block != null)
{
- if (j2 != Block.obsidian.blockID && j2 != Block.whiteStone.blockID && j2 != Block.bedrock.blockID && this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing"))

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/entity/boss/EntityWither.java
+++ ../src_work/minecraft/net/minecraft/entity/boss/EntityWither.java
--- ../src-base/minecraft/net/minecraft/entity/boss/EntityWither.java
+++ ../src-work/minecraft/net/minecraft/entity/boss/EntityWither.java
@@ -355,7 +355,8 @@
int l2 = j1 + l1;
int i3 = this.worldObj.getBlockId(j2, k2, l2);

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/entity/effect/EntityLightningBolt.java
+++ ../src_work/minecraft/net/minecraft/entity/effect/EntityLightningBolt.java
--- ../src-base/minecraft/net/minecraft/entity/effect/EntityLightningBolt.java
+++ ../src-work/minecraft/net/minecraft/entity/effect/EntityLightningBolt.java
@@ -10,6 +10,8 @@
import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/entity/item/EntityEnderPearl.java
+++ ../src_work/minecraft/net/minecraft/entity/item/EntityEnderPearl.java
--- ../src-base/minecraft/net/minecraft/entity/item/EntityEnderPearl.java
+++ ../src-work/minecraft/net/minecraft/entity/item/EntityEnderPearl.java
@@ -9,6 +9,8 @@
import net.minecraft.util.DamageSource;
import net.minecraft.util.MovingObjectPosition;

View file

@ -1,17 +1,17 @@
--- ../src_base/minecraft/net/minecraft/entity/item/EntityItem.java
+++ ../src_work/minecraft/net/minecraft/entity/item/EntityItem.java
@@ -1,6 +1,11 @@
package net.minecraft.entity.item;
--- ../src-base/minecraft/net/minecraft/entity/item/EntityItem.java
+++ ../src-work/minecraft/net/minecraft/entity/item/EntityItem.java
@@ -2,6 +2,11 @@
import java.util.Iterator;
+
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.Event.Result;
+import net.minecraftforge.event.entity.item.ItemExpireEvent;
+import net.minecraftforge.event.entity.player.EntityItemPickupEvent;
+
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
@@ -30,6 +35,11 @@
/** The EntityItem's random initial float height. */
public float hoverStart;
@ -48,7 +48,7 @@
super.onUpdate();
if (this.delayBeforeCanPickup > 0)
@@ -133,7 +153,29 @@
@@ -133,8 +153,30 @@
++this.age;
@ -56,7 +56,7 @@
+ ItemStack item = getDataWatcher().getWatchableObjectItemStack(10);
+
+ if (!this.worldObj.isRemote && this.age >= lifespan)
+ {
{
+ if (item != null)
+ {
+ ItemExpireEvent event = new ItemExpireEvent(this, (item.getItem() == null ? 6000 : item.getItem().getEntityLifespan(item, worldObj)));
@ -76,9 +76,10 @@
+ }
+
+ if (item != null && item.stackSize <= 0)
{
+ {
this.setDead();
}
}
@@ -268,6 +310,7 @@
{
par1NBTTagCompound.setShort("Health", (short)((byte)this.health));

View file

@ -1,5 +1,5 @@
--- ../src_base/minecraft/net/minecraft/entity/item/EntityMinecart.java
+++ ../src_work/minecraft/net/minecraft/entity/item/EntityMinecart.java
--- ../src-base/minecraft/net/minecraft/entity/item/EntityMinecart.java
+++ ../src-work/minecraft/net/minecraft/entity/item/EntityMinecart.java
@@ -21,6 +21,10 @@
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
@ -68,12 +68,11 @@
int l = this.worldObj.getBlockId(j, i, k);
- if (BlockRailBase.isRailBlock(l))
- {
+ if (canUseRail() && BlockRailBase.isRailBlock(l))
{
- int i1 = this.worldObj.getBlockMetadata(j, i, k);
- this.updateOnTrack(j, i, k, d4, d5, l, i1);
-
+ if (canUseRail() && BlockRailBase.isRailBlock(l))
+ {
+ BlockRailBase rail = (BlockRailBase)Block.blocksList[l];
+ float railMaxSpeed = rail.getRailMaxSpeed(worldObj, this, j, i, k);
+ double maxSpeed = Math.min(railMaxSpeed, getCurrentCartSpeedCapOnRail());
@ -92,12 +91,12 @@
}
this.doBlockCollisions();
@@ -391,7 +419,18 @@
@@ -391,8 +419,19 @@
}
this.setRotation(this.rotationYaw, this.rotationPitch);
- List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.expand(0.20000000298023224D, 0.0D, 0.20000000298023224D));
+
+ AxisAlignedBB box;
+ if (getCollisionHandler() != null)
+ {
@ -109,9 +108,10 @@
+ }
+
+ List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, box);
+
if (list != null && !list.isEmpty())
{
for (int j1 = 0; j1 < list.size(); ++j1)
@@ -415,6 +454,8 @@
this.riddenByEntity = null;
@ -121,12 +121,10 @@
}
}
@@ -443,6 +484,17 @@
if (this.motionZ > par1)
{
@@ -445,6 +486,17 @@
this.motionZ = par1;
+ }
+
}
+ double moveY = motionY;
+ if(getMaxSpeedAirVertical() > 0 && motionY > getMaxSpeedAirVertical())
+ {
@ -136,9 +134,11 @@
+ moveY = 0.15f;
+ motionY = moveY;
+ }
}
+ }
+
if (this.onGround)
{
this.motionX *= 0.5D;
@@ -452,13 +504,13 @@
this.motionZ *= 0.5D;
}
@ -175,19 +175,20 @@
{
d7 = Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ);
@@ -599,36 +651,8 @@
@@ -599,37 +651,9 @@
this.posX = d8 + d2 * d7;
this.posZ = d9 + d3 * d7;
this.setPosition(this.posX, this.posY + (double)this.yOffset, this.posZ);
- d12 = this.motionX;
- d13 = this.motionZ;
-
- if (this.riddenByEntity != null)
- {
- d12 *= 0.75D;
- d13 *= 0.75D;
- }
-
+ moveMinecartOnRail(par1, par2, par3, par4);
- if (d12 < -par4)
- {
- d12 = -par4;
@ -209,54 +210,56 @@
- }
-
- this.moveEntity(d12, 0.0D, d13);
+
+ moveMinecartOnRail(par1, par2, par3, par4);
-
if (aint[0][1] != 0 && MathHelper.floor_double(this.posX) - par1 == aint[0][0] && MathHelper.floor_double(this.posZ) - par3 == aint[0][2])
{
@@ -666,7 +690,12 @@
this.setPosition(this.posX, this.posY + (double)aint[0][1], this.posZ);
@@ -666,8 +690,13 @@
this.motionZ = d6 * (double)(k1 - par3);
}
- if (flag)
+ if(shouldDoRailFunctions())
+ {
{
+ ((BlockRailBase)Block.blocksList[par8]).onMinecartPass(worldObj, this, par1, par2, par3);
+ }
+
+ if (flag && shouldDoRailFunctions())
{
+ {
double d15 = Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ);
@@ -737,12 +766,7 @@
if (d15 > 0.01D)
@@ -737,13 +766,8 @@
}
else
{
- int i1 = this.worldObj.getBlockMetadata(i, j, k);
-
+ int i1 = ((BlockRailBase)Block.blocksList[l]).getBasicRailMetadata(worldObj, this, i, j, k);
- if (((BlockRailBase)Block.blocksList[l]).isPowered())
- {
- i1 &= 7;
- }
+ int i1 = ((BlockRailBase)Block.blocksList[l]).getBasicRailMetadata(worldObj, this, i, j, k);
-
par3 = (double)j;
@@ -788,13 +812,8 @@
if (i1 >= 2 && i1 <= 5)
@@ -788,14 +812,9 @@
if (BlockRailBase.isRailBlock(l))
{
- int i1 = this.worldObj.getBlockMetadata(i, j, k);
+ int i1 = ((BlockRailBase)Block.blocksList[l]).getBasicRailMetadata(worldObj, this, i, j, k);
par3 = (double)j;
-
- if (((BlockRailBase)Block.blocksList[l]).isPowered())
- {
- i1 &= 7;
- }
-
if (i1 >= 2 && i1 <= 5)
{
par3 = (double)(j + 1);
@@ -900,11 +919,17 @@
*/
public void applyEntityCollision(Entity par1Entity)

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