Updated FML:

MinecraftForge/FML@03fb1879d7 Fix obf error when right clicking a Empty Map.
MinecraftForge/FML@6bb9b8b953 Clean up FMLEventChannel. Closes #367.
MinecraftForge/FML@b7b3450dcd Update MCP mapping snapshot to latest crowdsourced names.
MinecraftForge/FML@8c9e8b5270 Fix isRemote, this is integral to so many parts of the code, everyone knows it by this name, People should not change it.
This commit is contained in:
Lex Manos 2014-02-05 00:05:37 -08:00
parent 9d919f8ac9
commit e68577ffd3
188 changed files with 1869 additions and 1870 deletions

2
fml

@ -1 +1 @@
Subproject commit cee0f0b81179d307059843f08401f8700fb3ddb2
Subproject commit 8c9e8b52708bd0630303f8b5dc184ab60e2553a1

View File

@ -53,74 +53,74 @@
public class Block
{
@@ -110,7 +131,8 @@
@@ -132,7 +153,8 @@
public static Block func_149729_e(int p_149729_0_)
public static Block getBlockById(int p_149729_0_)
{
- return (Block)field_149771_c.func_148754_a(p_149729_0_);
+ Block ret = (Block)field_149771_c.func_148754_a(p_149729_0_);
- return (Block)blockRegistry.getObjectById(p_149729_0_);
+ Block ret = (Block)blockRegistry.getObjectById(p_149729_0_);
+ return ret == null ? Blocks.air : ret;
}
public static Block func_149634_a(Item p_149634_0_)
@@ -481,9 +503,10 @@
return this.field_149789_z;
public static Block getBlockFromItem(Item p_149634_0_)
@@ -517,9 +539,10 @@
return this.needsRandomTick;
}
+ @Deprecated //Forge: New Metadata sensitive version.
public boolean func_149716_u()
public boolean hasTileEntity()
{
- return this.field_149758_A;
- return this.isBlockContainer;
+ return hasTileEntity(0);
}
public final void func_149676_a(float p_149676_1_, float p_149676_2_, float p_149676_3_, float p_149676_4_, float p_149676_5_, float p_149676_6_)
@@ -500,13 +523,13 @@
public int func_149677_c(IBlockAccess p_149677_1_, int p_149677_2_, int p_149677_3_, int p_149677_4_)
// JAVADOC METHOD $$ func_149676_a
@@ -538,13 +561,13 @@
public int getMixedBrightnessForBlock(IBlockAccess p_149677_1_, int p_149677_2_, int p_149677_3_, int p_149677_4_)
{
Block block = p_149677_1_.func_147439_a(p_149677_2_, p_149677_3_, p_149677_4_);
- int l = p_149677_1_.getLightBrightnessForSkyBlocks(p_149677_2_, p_149677_3_, p_149677_4_, block.func_149750_m());
Block block = p_149677_1_.getBlock(p_149677_2_, p_149677_3_, p_149677_4_);
- int l = p_149677_1_.getLightBrightnessForSkyBlocks(p_149677_2_, p_149677_3_, p_149677_4_, block.getLightValue());
+ int l = p_149677_1_.getLightBrightnessForSkyBlocks(p_149677_2_, p_149677_3_, p_149677_4_, block.getLightValue(p_149677_1_, p_149677_2_, p_149677_3_, p_149677_4_));
if (l == 0 && block instanceof BlockSlab)
{
--p_149677_3_;
block = p_149677_1_.func_147439_a(p_149677_2_, p_149677_3_, p_149677_4_);
- return p_149677_1_.getLightBrightnessForSkyBlocks(p_149677_2_, p_149677_3_, p_149677_4_, block.func_149750_m());
block = p_149677_1_.getBlock(p_149677_2_, p_149677_3_, p_149677_4_);
- return p_149677_1_.getLightBrightnessForSkyBlocks(p_149677_2_, p_149677_3_, p_149677_4_, block.getLightValue());
+ return p_149677_1_.getLightBrightnessForSkyBlocks(p_149677_2_, p_149677_3_, p_149677_4_, block.getLightValue(p_149677_1_, p_149677_2_, p_149677_3_, p_149677_4_));
}
else
{
@@ -595,7 +618,13 @@
@@ -649,7 +672,13 @@
// JAVADOC METHOD $$ func_149726_b
public void onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_) {}
public void func_149726_b(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_) {}
- public void func_149749_a(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) {}
+ public void func_149749_a(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)
- public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) {}
+ public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)
+ {
+ if (hasTileEntity(p_149749_6_) && !(this instanceof BlockContainer))
+ {
+ p_149749_1_.func_147475_p(p_149749_2_, p_149749_3_, p_149749_4_);
+ p_149749_1_.removeTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
+ }
+ }
public int func_149745_a(Random p_149745_1_)
// JAVADOC METHOD $$ func_149745_a
public int quantityDropped(Random p_149745_1_)
@@ -665,8 +694,7 @@
// JAVADOC METHOD $$ func_149737_a
public float getPlayerRelativeBlockHardness(EntityPlayer p_149737_1_, World p_149737_2_, int p_149737_3_, int p_149737_4_, int p_149737_5_)
{
@@ -609,8 +638,7 @@
public float func_149737_a(EntityPlayer p_149737_1_, World p_149737_2_, int p_149737_3_, int p_149737_4_, int p_149737_5_)
{
- float f = this.func_149712_f(p_149737_2_, p_149737_3_, p_149737_4_, p_149737_5_);
- return f < 0.0F ? 0.0F : (!p_149737_1_.func_146099_a(this) ? p_149737_1_.func_146096_a(this, false) / f / 100.0F : p_149737_1_.func_146096_a(this, true) / f / 30.0F);
- float f = this.getBlockHardness(p_149737_2_, p_149737_3_, p_149737_4_, p_149737_5_);
- return f < 0.0F ? 0.0F : (!p_149737_1_.canHarvestBlock(this) ? p_149737_1_.getCurrentPlayerStrVsBlock(this, false) / f / 100.0F : p_149737_1_.getCurrentPlayerStrVsBlock(this, true) / f / 30.0F);
+ return ForgeHooks.blockStrength(this, p_149737_1_, p_149737_2_, p_149737_3_, p_149737_4_, p_149737_5_);
}
public final void func_149697_b(World p_149697_1_, int p_149697_2_, int p_149697_3_, int p_149697_4_, int p_149697_5_, int p_149697_6_)
@@ -622,18 +650,14 @@
// JAVADOC METHOD $$ func_149697_b
@@ -680,18 +708,14 @@
{
if (!p_149690_1_.isRemote)
{
- int j1 = this.func_149679_a(p_149690_7_, p_149690_1_.rand);
- int j1 = this.quantityDroppedWithBonus(p_149690_7_, p_149690_1_.rand);
+ ArrayList<ItemStack> items = getDrops(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_7_);
+ p_149690_6_ = ForgeEventFactory.fireBlockHarvesting(items, p_149690_1_, this, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_7_, p_149690_6_, false, harvesters.get());
@ -129,65 +129,66 @@
{
if (p_149690_1_.rand.nextFloat() <= p_149690_6_)
{
- Item item = this.func_149650_a(p_149690_5_, p_149690_1_.rand, p_149690_7_);
- Item item = this.getItemDropped(p_149690_5_, p_149690_1_.rand, p_149690_7_);
-
- if (item != null)
- {
- this.func_149642_a(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, new ItemStack(item, 1, this.func_149692_a(p_149690_5_)));
- this.dropBlockAsItem(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, new ItemStack(item, 1, this.damageDropped(p_149690_5_)));
- }
+ this.func_149642_a(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, item);
+ this.dropBlockAsItem(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, item);
}
}
}
@@ -827,7 +851,7 @@
public boolean func_149742_c(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
@@ -897,7 +921,7 @@
// JAVADOC METHOD $$ func_149742_c
public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
{
- return p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_, p_149742_4_).field_149764_J.isReplaceable();
+ return p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_, p_149742_4_).isReplaceable(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_);
- return p_149742_1_.getBlock(p_149742_2_, p_149742_3_, p_149742_4_).blockMaterial.isReplaceable();
+ return p_149742_1_.getBlock(p_149742_2_, p_149742_3_, p_149742_4_).isReplaceable(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_);
}
public boolean func_149727_a(World p_149727_1_, int p_149727_2_, int p_149727_3_, int p_149727_4_, EntityPlayer p_149727_5_, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_)
@@ -920,25 +944,35 @@
p_149636_2_.addStat(StatList.mineBlockStatArray[func_149682_b(this)], 1);
// JAVADOC METHOD $$ func_149727_a
@@ -1008,26 +1032,36 @@
p_149636_2_.addStat(StatList.mineBlockStatArray[getIdFromBlock(this)], 1);
p_149636_2_.addExhaustion(0.025F);
- if (this.func_149700_E() && EnchantmentHelper.getSilkTouchModifier(p_149636_2_))
- if (this.canSilkHarvest() && EnchantmentHelper.getSilkTouchModifier(p_149636_2_))
+ if (this.canSilkHarvest(p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_) && EnchantmentHelper.getSilkTouchModifier(p_149636_2_))
{
+ ArrayList<ItemStack> items = new ArrayList<ItemStack>();
ItemStack itemstack = this.func_149644_j(p_149636_6_);
ItemStack itemstack = this.createStackedBlock(p_149636_6_);
if (itemstack != null)
{
- this.func_149642_a(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, itemstack);
- this.dropBlockAsItem(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, itemstack);
+ items.add(itemstack);
}
+
+ ForgeEventFactory.fireBlockHarvesting(items, p_149636_1_, this, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_, 0, 1.0f, true, p_149636_2_);
+ for (ItemStack is : items)
+ {
+ this.func_149642_a(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, is);
+ this.dropBlockAsItem(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, is);
+ }
}
else
{
+ harvesters.set(p_149636_2_);
int i1 = EnchantmentHelper.getFortuneModifier(p_149636_2_);
this.func_149697_b(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_, i1);
this.dropBlockAsItem(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_, i1);
+ harvesters.set(null);
}
}
protected boolean func_149700_E()
// JAVADOC METHOD $$ func_149700_E
protected boolean canSilkHarvest()
{
- return this.func_149686_d() && !this.field_149758_A;
- return this.renderAsNormalBlock() && !this.isBlockContainer;
+ Integer meta = silk_check_meta.get();
+ return this.func_149686_d() && !this.hasTileEntity(meta == null ? 0 : meta);
+ return this.renderAsNormalBlock() && !this.hasTileEntity(meta == null ? 0 : meta);
}
protected ItemStack func_149644_j(int p_149644_1_)
@@ -1114,6 +1148,1065 @@
// JAVADOC METHOD $$ func_149644_j
@@ -1228,6 +1262,1065 @@
return null;
}
@ -205,12 +206,12 @@
+ */
+ public int getLightValue(IBlockAccess world, int x, int y, int z)
+ {
+ Block block = world.func_147439_a(x, y, z);
+ Block block = world.getBlock(x, y, z);
+ if (block != this)
+ {
+ return block.getLightValue(world, x, y, z);
+ }
+ return func_149750_m();
+ return getLightValue();
+ }
+
+ /**
@ -241,7 +242,7 @@
+ */
+ public boolean isNormalCube(IBlockAccess world, int x, int y, int z)
+ {
+ return func_149688_o().isOpaque() && func_149686_d() && !func_149744_f();
+ return getMaterial().isOpaque() && renderAsNormalBlock() && !canProvidePower();
+ }
+
+ /**
@ -298,7 +299,7 @@
+ */
+ public boolean isReplaceable(IBlockAccess world, int x, int y, int z)
+ {
+ return field_149764_J.isReplaceable();
+ return blockMaterial.isReplaceable();
+ }
+
+ /**
@ -330,7 +331,7 @@
+ */
+ public boolean isAir(IBlockAccess world, int x, int y, int z)
+ {
+ return func_149688_o() == Material.field_151579_a;
+ return getMaterial() == Material.air;
+ }
+
+ /**
@ -365,7 +366,7 @@
+ */
+ public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z)
+ {
+ return world.func_147468_f(x, y, z);
+ return world.setBlockToAir(x, y, z);
+ }
+
+ /**
@ -470,7 +471,7 @@
+ {
+ if (isTileProvider)
+ {
+ return ((ITileEntityProvider)this).func_149915_a(world, metadata);
+ return ((ITileEntityProvider)this).createNewTileEntity(world, metadata);
+ }
+ return null;
+ }
@ -486,7 +487,7 @@
+ */
+ public int quantityDropped(int meta, int fortune, Random random)
+ {
+ return func_149679_a(fortune, random);
+ return quantityDroppedWithBonus(fortune, random);
+ }
+
+ /**
@ -507,10 +508,10 @@
+ int count = quantityDropped(metadata, fortune, world.rand);
+ for(int i = 0; i < count; i++)
+ {
+ Item item = func_149650_a(metadata, world.rand, fortune);
+ Item item = getItemDropped(metadata, world.rand, fortune);
+ if (item != null)
+ {
+ ret.add(new ItemStack(item, 1, func_149692_a(metadata)));
+ ret.add(new ItemStack(item, 1, damageDropped(metadata)));
+ }
+ }
+ return ret;
@ -530,7 +531,7 @@
+ public boolean canSilkHarvest(World world, EntityPlayer player, int x, int y, int z, int metadata)
+ {
+ silk_check_meta.set(metadata);;
+ boolean ret = this.func_149700_E();
+ boolean ret = this.canSilkHarvest();
+ silk_check_meta.set(null);
+ return ret;
+ }
@ -623,7 +624,7 @@
+ */
+ public int getBedDirection(IBlockAccess world, int x, int y, int z)
+ {
+ return BlockBed.func_149895_l(world.getBlockMetadata(x, y, z));
+ return BlockBed.getDirection(world.getBlockMetadata(x, y, z));
+ }
+
+ /**
@ -637,7 +638,7 @@
+ */
+ public boolean isBedFoot(IBlockAccess world, int x, int y, int z)
+ {
+ return BlockBed.func_149975_b(world.getBlockMetadata(x, y, z));
+ return BlockBed.isBlockHeadOfBed(world.getBlockMetadata(x, y, z));
+ }
+
+ /**
@ -675,7 +676,7 @@
+ */
+ public boolean isLeaves(IBlockAccess world, int x, int y, int z)
+ {
+ return func_149688_o() == Material.field_151584_j;
+ return getMaterial() == Material.leaves;
+ }
+
+ /**
@ -736,7 +737,7 @@
+ */
+ public float getExplosionResistance(Entity par1Entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ)
+ {
+ return func_149638_a(par1Entity);
+ return getExplosionResistance(par1Entity);
+ }
+
+ /**
@ -752,8 +753,8 @@
+ */
+ public void onBlockExploded(World world, int x, int y, int z, Explosion explosion)
+ {
+ world.func_147468_f(x, y, z);
+ func_149723_a(world, x, y, z, explosion);
+ world.setBlockToAir(x, y, z);
+ onBlockDestroyedByExplosion(world, x, y, z, explosion);
+ }
+
+ /**
@ -776,7 +777,7 @@
+ */
+ public boolean canConnectRedstone(IBlockAccess world, int x, int y, int z, int side)
+ {
+ return func_149744_f() && side != -1;
+ return canProvidePower() && side != -1;
+ }
+
+ /**
@ -809,7 +810,7 @@
+ */
+ public boolean canRenderInPass(int pass)
+ {
+ return pass == func_149701_w();
+ return pass == getRenderBlockPass();
+ }
+
+ /**
@ -820,15 +821,15 @@
+ */
+ public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z)
+ {
+ Item item = func_149694_d(world, x, y, z);
+ Item item = getItem(world, x, y, z);
+
+ if (item == null)
+ {
+ return null;
+ }
+
+ Block block = item instanceof ItemBlock && !func_149648_K() ? Block.func_149634_a(item) : this;
+ return new ItemStack(item, 1, block.func_149643_k(world, x, y, z));
+ Block block = item instanceof ItemBlock && !isFlowerPot() ? Block.getBlockFromItem(item) : this;
+ return new ItemStack(item, 1, block.getDamageValue(world, x, y, z));
+ }
+
+ /**
@ -913,7 +914,7 @@
+ return true;
+ }
+
+ if (plantable instanceof BlockBush && ((BlockBush)plantable).func_149854_a(this))
+ if (plantable instanceof BlockBush && ((BlockBush)plantable).canPlaceBlockOn(this))
+ {
+ return true;
+ }
@ -925,13 +926,13 @@
+ case Crop: return this == Blocks.farmland;
+ case Cave: return isSideSolid(world, x, y, z, UP);
+ case Plains: return this == Blocks.grass || this == Blocks.dirt;
+ case Water: return world.func_147439_a(x, y, z).func_149688_o() == Material.field_151586_h && world.getBlockMetadata(x, y, z) == 0;
+ case Water: return world.getBlock(x, y, z).getMaterial() == Material.water && world.getBlockMetadata(x, y, z) == 0;
+ case Beach:
+ boolean isBeach = this == Blocks.grass || this == Blocks.dirt || this == Blocks.sand;
+ boolean hasWater = (world.func_147439_a(x - 1, y, z ).func_149688_o() == Material.field_151586_h ||
+ world.func_147439_a(x + 1, y, z ).func_149688_o() == Material.field_151586_h ||
+ world.func_147439_a(x, y, z - 1).func_149688_o() == Material.field_151586_h ||
+ world.func_147439_a(x, y, z + 1).func_149688_o() == Material.field_151586_h);
+ boolean hasWater = (world.getBlock(x - 1, y, z ).getMaterial() == Material.water ||
+ world.getBlock(x + 1, y, z ).getMaterial() == Material.water ||
+ world.getBlock(x, y, z - 1).getMaterial() == Material.water ||
+ world.getBlock(x, y, z + 1).getMaterial() == Material.water);
+ return isBeach && hasWater;
+ }
+
@ -959,7 +960,7 @@
+ {
+ if (this == Blocks.grass || this == Blocks.farmland)
+ {
+ world.func_147465_d(x, y, z, Blocks.dirt, 0, 2);
+ world.setBlock(x, y, z, Blocks.dirt, 0, 2);
+ }
+ }
+
@ -1000,7 +1001,7 @@
+ */
+ public int getLightOpacity(IBlockAccess world, int x, int y, int z)
+ {
+ return func_149717_k();
+ return getLightOpacity();
+ }
+
+ /**
@ -1150,7 +1151,7 @@
+ */
+ public boolean shouldCheckWeakPower(IBlockAccess world, int x, int y, int z, int side)
+ {
+ return func_149721_r();
+ return isNormalCube();
+ }
+
+ /**
@ -1252,4 +1253,4 @@
+
public static class SoundType
{
public final String field_150501_a;
public final String soundName;

View File

@ -15,25 +15,25 @@
{
private static final String __OBFID = "CL_00000208";
@@ -27,7 +32,7 @@
public boolean func_149742_c(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
@@ -28,7 +33,7 @@
// JAVADOC METHOD $$ func_149742_c
public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
{
- return super.func_149742_c(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_) && this.func_149854_a(p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_ - 1, p_149742_4_));
+ return super.func_149742_c(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_) && this.func_149718_j(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_);
- return super.canPlaceBlockAt(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_) && this.canPlaceBlockOn(p_149742_1_.getBlock(p_149742_2_, p_149742_3_ - 1, p_149742_4_));
+ return super.canPlaceBlockAt(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_) && this.canBlockStay(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_);
}
protected boolean func_149854_a(Block p_149854_1_)
@@ -57,7 +62,7 @@
public boolean func_149718_j(World p_149718_1_, int p_149718_2_, int p_149718_3_, int p_149718_4_)
// JAVADOC METHOD $$ func_149854_a
@@ -63,7 +68,7 @@
// JAVADOC METHOD $$ func_149718_j
public boolean canBlockStay(World p_149718_1_, int p_149718_2_, int p_149718_3_, int p_149718_4_)
{
- return this.func_149854_a(p_149718_1_.func_147439_a(p_149718_2_, p_149718_3_ - 1, p_149718_4_));
+ return p_149718_1_.func_147439_a(p_149718_2_, p_149718_3_ - 1, p_149718_4_).canSustainPlant(p_149718_1_, p_149718_2_, p_149718_3_ - 1, p_149718_4_, ForgeDirection.UP, this);
- return this.canPlaceBlockOn(p_149718_1_.getBlock(p_149718_2_, p_149718_3_ - 1, p_149718_4_));
+ return p_149718_1_.getBlock(p_149718_2_, p_149718_3_ - 1, p_149718_4_).canSustainPlant(p_149718_1_, p_149718_2_, p_149718_3_ - 1, p_149718_4_, ForgeDirection.UP, this);
}
public AxisAlignedBB func_149668_a(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_)
@@ -79,4 +84,37 @@
// JAVADOC METHOD $$ func_149668_a
@@ -89,4 +94,37 @@
{
return 1;
}

View File

@ -10,11 +10,11 @@
public abstract class BlockButton extends Block
{
private final boolean field_150047_a;
@@ -49,12 +52,19 @@
public boolean func_149707_d(World p_149707_1_, int p_149707_2_, int p_149707_3_, int p_149707_4_, int p_149707_5_)
@@ -54,13 +57,20 @@
// JAVADOC METHOD $$ func_149707_d
public boolean canPlaceBlockOnSide(World p_149707_1_, int p_149707_2_, int p_149707_3_, int p_149707_4_, int p_149707_5_)
{
- return p_149707_5_ == 2 && p_149707_1_.func_147439_a(p_149707_2_, p_149707_3_, p_149707_4_ + 1).func_149721_r() ? true : (p_149707_5_ == 3 && p_149707_1_.func_147439_a(p_149707_2_, p_149707_3_, p_149707_4_ - 1).func_149721_r() ? true : (p_149707_5_ == 4 && p_149707_1_.func_147439_a(p_149707_2_ + 1, p_149707_3_, p_149707_4_).func_149721_r() ? true : p_149707_5_ == 5 && p_149707_1_.func_147439_a(p_149707_2_ - 1, p_149707_3_, p_149707_4_).func_149721_r()));
- return p_149707_5_ == 2 && p_149707_1_.getBlock(p_149707_2_, p_149707_3_, p_149707_4_ + 1).isNormalCube() ? true : (p_149707_5_ == 3 && p_149707_1_.getBlock(p_149707_2_, p_149707_3_, p_149707_4_ - 1).isNormalCube() ? true : (p_149707_5_ == 4 && p_149707_1_.getBlock(p_149707_2_ + 1, p_149707_3_, p_149707_4_).isNormalCube() ? true : p_149707_5_ == 5 && p_149707_1_.getBlock(p_149707_2_ - 1, p_149707_3_, p_149707_4_).isNormalCube()));
+ ForgeDirection dir = ForgeDirection.getOrientation(p_149707_5_);
+ return (dir == NORTH && p_149707_1_.isSideSolid(p_149707_2_, p_149707_3_, p_149707_4_ + 1, NORTH)) ||
+ (dir == SOUTH && p_149707_1_.isSideSolid(p_149707_2_, p_149707_3_, p_149707_4_ - 1, SOUTH)) ||
@ -22,47 +22,48 @@
+ (dir == EAST && p_149707_1_.isSideSolid(p_149707_2_ - 1, p_149707_3_, p_149707_4_, EAST));
}
public boolean func_149742_c(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
// JAVADOC METHOD $$ func_149742_c
public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
{
- return p_149742_1_.func_147439_a(p_149742_2_ - 1, p_149742_3_, p_149742_4_).func_149721_r() ? true : (p_149742_1_.func_147439_a(p_149742_2_ + 1, p_149742_3_, p_149742_4_).func_149721_r() ? true : (p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_, p_149742_4_ - 1).func_149721_r() ? true : p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_, p_149742_4_ + 1).func_149721_r()));
- return p_149742_1_.getBlock(p_149742_2_ - 1, p_149742_3_, p_149742_4_).isNormalCube() ? true : (p_149742_1_.getBlock(p_149742_2_ + 1, p_149742_3_, p_149742_4_).isNormalCube() ? true : (p_149742_1_.getBlock(p_149742_2_, p_149742_3_, p_149742_4_ - 1).isNormalCube() ? true : p_149742_1_.getBlock(p_149742_2_, p_149742_3_, p_149742_4_ + 1).isNormalCube()));
+ return (p_149742_1_.isSideSolid(p_149742_2_ - 1, p_149742_3_, p_149742_4_, EAST)) ||
+ (p_149742_1_.isSideSolid(p_149742_2_ + 1, p_149742_3_, p_149742_4_, WEST)) ||
+ (p_149742_1_.isSideSolid(p_149742_2_, p_149742_3_, p_149742_4_ - 1, SOUTH)) ||
+ (p_149742_1_.isSideSolid(p_149742_2_, p_149742_3_, p_149742_4_ + 1, NORTH));
}
public int func_149660_a(World p_149660_1_, int p_149660_2_, int p_149660_3_, int p_149660_4_, int p_149660_5_, float p_149660_6_, float p_149660_7_, float p_149660_8_, int p_149660_9_)
@@ -63,19 +73,21 @@
// JAVADOC METHOD $$ func_149660_a
@@ -70,19 +80,21 @@
int k1 = j1 & 8;
j1 &= 7;
- if (p_149660_5_ == 2 && p_149660_1_.func_147439_a(p_149660_2_, p_149660_3_, p_149660_4_ + 1).func_149721_r())
- if (p_149660_5_ == 2 && p_149660_1_.getBlock(p_149660_2_, p_149660_3_, p_149660_4_ + 1).isNormalCube())
+ ForgeDirection dir = ForgeDirection.getOrientation(p_149660_5_);
+
+ if (dir == NORTH && p_149660_1_.isSideSolid(p_149660_2_, p_149660_3_, p_149660_4_ + 1, NORTH))
{
j1 = 4;
}
- else if (p_149660_5_ == 3 && p_149660_1_.func_147439_a(p_149660_2_, p_149660_3_, p_149660_4_ - 1).func_149721_r())
- else if (p_149660_5_ == 3 && p_149660_1_.getBlock(p_149660_2_, p_149660_3_, p_149660_4_ - 1).isNormalCube())
+ else if (dir == SOUTH && p_149660_1_.isSideSolid(p_149660_2_, p_149660_3_, p_149660_4_ - 1, SOUTH))
{
j1 = 3;
}
- else if (p_149660_5_ == 4 && p_149660_1_.func_147439_a(p_149660_2_ + 1, p_149660_3_, p_149660_4_).func_149721_r())
- else if (p_149660_5_ == 4 && p_149660_1_.getBlock(p_149660_2_ + 1, p_149660_3_, p_149660_4_).isNormalCube())
+ else if (dir == WEST && p_149660_1_.isSideSolid(p_149660_2_ + 1, p_149660_3_, p_149660_4_, WEST))
{
j1 = 2;
}
- else if (p_149660_5_ == 5 && p_149660_1_.func_147439_a(p_149660_2_ - 1, p_149660_3_, p_149660_4_).func_149721_r())
- else if (p_149660_5_ == 5 && p_149660_1_.getBlock(p_149660_2_ - 1, p_149660_3_, p_149660_4_).isNormalCube())
+ else if (dir == EAST && p_149660_1_.isSideSolid(p_149660_2_ - 1, p_149660_3_, p_149660_4_, EAST))
{
j1 = 1;
}
@@ -89,7 +101,11 @@
@@ -96,7 +108,11 @@
private int func_150045_e(World p_150045_1_, int p_150045_2_, int p_150045_3_, int p_150045_4_)
{
- return p_150045_1_.func_147439_a(p_150045_2_ - 1, p_150045_3_, p_150045_4_).func_149721_r() ? 1 : (p_150045_1_.func_147439_a(p_150045_2_ + 1, p_150045_3_, p_150045_4_).func_149721_r() ? 2 : (p_150045_1_.func_147439_a(p_150045_2_, p_150045_3_, p_150045_4_ - 1).func_149721_r() ? 3 : (p_150045_1_.func_147439_a(p_150045_2_, p_150045_3_, p_150045_4_ + 1).func_149721_r() ? 4 : 1)));
- return p_150045_1_.getBlock(p_150045_2_ - 1, p_150045_3_, p_150045_4_).isNormalCube() ? 1 : (p_150045_1_.getBlock(p_150045_2_ + 1, p_150045_3_, p_150045_4_).isNormalCube() ? 2 : (p_150045_1_.getBlock(p_150045_2_, p_150045_3_, p_150045_4_ - 1).isNormalCube() ? 3 : (p_150045_1_.getBlock(p_150045_2_, p_150045_3_, p_150045_4_ + 1).isNormalCube() ? 4 : 1)));
+ if (p_150045_1_.isSideSolid(p_150045_2_ - 1, p_150045_3_, p_150045_4_, EAST)) return 1;
+ if (p_150045_1_.isSideSolid(p_150045_2_ + 1, p_150045_3_, p_150045_4_, WEST)) return 2;
+ if (p_150045_1_.isSideSolid(p_150045_2_, p_150045_3_, p_150045_4_ - 1, SOUTH)) return 3;
@ -70,30 +71,30 @@
+ return 1;
}
public void func_149695_a(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_)
@@ -99,22 +115,22 @@
// JAVADOC METHOD $$ func_149695_a
@@ -107,22 +123,22 @@
int l = p_149695_1_.getBlockMetadata(p_149695_2_, p_149695_3_, p_149695_4_) & 7;
boolean flag = false;
- if (!p_149695_1_.func_147439_a(p_149695_2_ - 1, p_149695_3_, p_149695_4_).func_149721_r() && l == 1)
- if (!p_149695_1_.getBlock(p_149695_2_ - 1, p_149695_3_, p_149695_4_).isNormalCube() && l == 1)
+ if (!p_149695_1_.isSideSolid(p_149695_2_ - 1, p_149695_3_, p_149695_4_, EAST) && l == 1)
{
flag = true;
}
- if (!p_149695_1_.func_147439_a(p_149695_2_ + 1, p_149695_3_, p_149695_4_).func_149721_r() && l == 2)
- if (!p_149695_1_.getBlock(p_149695_2_ + 1, p_149695_3_, p_149695_4_).isNormalCube() && l == 2)
+ if (!p_149695_1_.isSideSolid(p_149695_2_ + 1, p_149695_3_, p_149695_4_, WEST) && l == 2)
{
flag = true;
}
- if (!p_149695_1_.func_147439_a(p_149695_2_, p_149695_3_, p_149695_4_ - 1).func_149721_r() && l == 3)
- if (!p_149695_1_.getBlock(p_149695_2_, p_149695_3_, p_149695_4_ - 1).isNormalCube() && l == 3)
+ if (!p_149695_1_.isSideSolid(p_149695_2_, p_149695_3_, p_149695_4_ - 1, SOUTH) && l == 3)
{
flag = true;
}
- if (!p_149695_1_.func_147439_a(p_149695_2_, p_149695_3_, p_149695_4_ + 1).func_149721_r() && l == 4)
- if (!p_149695_1_.getBlock(p_149695_2_, p_149695_3_, p_149695_4_ + 1).isNormalCube() && l == 4)
+ if (!p_149695_1_.isSideSolid(p_149695_2_, p_149695_3_, p_149695_4_ + 1, NORTH) && l == 4)
{
flag = true;

View File

@ -15,18 +15,18 @@
{
@SideOnly(Side.CLIENT)
private IIcon field_150041_a;
@@ -125,7 +129,7 @@
@@ -135,7 +139,7 @@
else
{
Block block = p_149718_1_.func_147439_a(p_149718_2_, p_149718_3_ - 1, p_149718_4_);
Block block = p_149718_1_.getBlock(p_149718_2_, p_149718_3_ - 1, p_149718_4_);
- return block == Blocks.cactus || block == Blocks.sand;
+ return block.canSustainPlant(p_149718_1_, p_149718_2_, p_149718_3_ - 1, p_149718_4_, ForgeDirection.UP, this);
}
}
@@ -141,4 +145,22 @@
this.field_150041_a = p_149651_1_.registerIcon(this.func_149641_N() + "_top");
this.field_150040_b = p_149651_1_.registerIcon(this.func_149641_N() + "_bottom");
@@ -152,4 +156,22 @@
this.field_150041_a = p_149651_1_.registerIcon(this.getTextureName() + "_top");
this.field_150040_b = p_149651_1_.registerIcon(this.getTextureName() + "_bottom");
}
+
+ @Override

View File

@ -9,36 +9,36 @@
public class BlockChest extends BlockContainer
{
private final Random field_149955_b = new Random();
@@ -407,7 +409,7 @@
@@ -416,7 +418,7 @@
{
return null;
}
- else if (p_149951_1_.func_147439_a(p_149951_2_, p_149951_3_ + 1, p_149951_4_).func_149721_r())
- else if (p_149951_1_.getBlock(p_149951_2_, p_149951_3_ + 1, p_149951_4_).isNormalCube())
+ else if (p_149951_1_.isSideSolid(p_149951_2_, p_149951_3_ + 1, p_149951_4_, DOWN))
{
return null;
}
@@ -415,19 +417,19 @@
@@ -424,19 +426,19 @@
{
return null;
}
- else if (p_149951_1_.func_147439_a(p_149951_2_ - 1, p_149951_3_, p_149951_4_) == this && (p_149951_1_.func_147439_a(p_149951_2_ - 1, p_149951_3_ + 1, p_149951_4_).func_149721_r() || func_149953_o(p_149951_1_, p_149951_2_ - 1, p_149951_3_, p_149951_4_)))
+ else if (p_149951_1_.func_147439_a(p_149951_2_ - 1, p_149951_3_, p_149951_4_) == this && (p_149951_1_.isSideSolid(p_149951_2_ - 1, p_149951_3_ + 1, p_149951_4_, DOWN) || func_149953_o(p_149951_1_, p_149951_2_ - 1, p_149951_3_, p_149951_4_)))
- else if (p_149951_1_.getBlock(p_149951_2_ - 1, p_149951_3_, p_149951_4_) == this && (p_149951_1_.getBlock(p_149951_2_ - 1, p_149951_3_ + 1, p_149951_4_).isNormalCube() || func_149953_o(p_149951_1_, p_149951_2_ - 1, p_149951_3_, p_149951_4_)))
+ else if (p_149951_1_.getBlock(p_149951_2_ - 1, p_149951_3_, p_149951_4_) == this && (p_149951_1_.isSideSolid(p_149951_2_ - 1, p_149951_3_ + 1, p_149951_4_, DOWN) || func_149953_o(p_149951_1_, p_149951_2_ - 1, p_149951_3_, p_149951_4_)))
{
return null;
}
- else if (p_149951_1_.func_147439_a(p_149951_2_ + 1, p_149951_3_, p_149951_4_) == this && (p_149951_1_.func_147439_a(p_149951_2_ + 1, p_149951_3_ + 1, p_149951_4_).func_149721_r() || func_149953_o(p_149951_1_, p_149951_2_ + 1, p_149951_3_, p_149951_4_)))
+ else if (p_149951_1_.func_147439_a(p_149951_2_ + 1, p_149951_3_, p_149951_4_) == this && (p_149951_1_.isSideSolid(p_149951_2_ + 1, p_149951_3_ + 1, p_149951_4_, DOWN) || func_149953_o(p_149951_1_, p_149951_2_ + 1, p_149951_3_, p_149951_4_)))
- else if (p_149951_1_.getBlock(p_149951_2_ + 1, p_149951_3_, p_149951_4_) == this && (p_149951_1_.getBlock(p_149951_2_ + 1, p_149951_3_ + 1, p_149951_4_).isNormalCube() || func_149953_o(p_149951_1_, p_149951_2_ + 1, p_149951_3_, p_149951_4_)))
+ else if (p_149951_1_.getBlock(p_149951_2_ + 1, p_149951_3_, p_149951_4_) == this && (p_149951_1_.isSideSolid(p_149951_2_ + 1, p_149951_3_ + 1, p_149951_4_, DOWN) || func_149953_o(p_149951_1_, p_149951_2_ + 1, p_149951_3_, p_149951_4_)))
{
return null;
}
- else if (p_149951_1_.func_147439_a(p_149951_2_, p_149951_3_, p_149951_4_ - 1) == this && (p_149951_1_.func_147439_a(p_149951_2_, p_149951_3_ + 1, p_149951_4_ - 1).func_149721_r() || func_149953_o(p_149951_1_, p_149951_2_, p_149951_3_, p_149951_4_ - 1)))
+ else if (p_149951_1_.func_147439_a(p_149951_2_, p_149951_3_, p_149951_4_ - 1) == this && (p_149951_1_.isSideSolid(p_149951_2_, p_149951_3_ + 1, p_149951_4_ - 1, DOWN) || func_149953_o(p_149951_1_, p_149951_2_, p_149951_3_, p_149951_4_ - 1)))
- else if (p_149951_1_.getBlock(p_149951_2_, p_149951_3_, p_149951_4_ - 1) == this && (p_149951_1_.getBlock(p_149951_2_, p_149951_3_ + 1, p_149951_4_ - 1).isNormalCube() || func_149953_o(p_149951_1_, p_149951_2_, p_149951_3_, p_149951_4_ - 1)))
+ else if (p_149951_1_.getBlock(p_149951_2_, p_149951_3_, p_149951_4_ - 1) == this && (p_149951_1_.isSideSolid(p_149951_2_, p_149951_3_ + 1, p_149951_4_ - 1, DOWN) || func_149953_o(p_149951_1_, p_149951_2_, p_149951_3_, p_149951_4_ - 1)))
{
return null;
}
- else if (p_149951_1_.func_147439_a(p_149951_2_, p_149951_3_, p_149951_4_ + 1) == this && (p_149951_1_.func_147439_a(p_149951_2_, p_149951_3_ + 1, p_149951_4_ + 1).func_149721_r() || func_149953_o(p_149951_1_, p_149951_2_, p_149951_3_, p_149951_4_ + 1)))
+ else if (p_149951_1_.func_147439_a(p_149951_2_, p_149951_3_, p_149951_4_ + 1) == this && (p_149951_1_.isSideSolid(p_149951_2_, p_149951_3_ + 1, p_149951_4_ + 1, DOWN) || func_149953_o(p_149951_1_, p_149951_2_, p_149951_3_, p_149951_4_ + 1)))
- else if (p_149951_1_.getBlock(p_149951_2_, p_149951_3_, p_149951_4_ + 1) == this && (p_149951_1_.getBlock(p_149951_2_, p_149951_3_ + 1, p_149951_4_ + 1).isNormalCube() || func_149953_o(p_149951_1_, p_149951_2_, p_149951_3_, p_149951_4_ + 1)))
+ else if (p_149951_1_.getBlock(p_149951_2_, p_149951_3_, p_149951_4_ + 1) == this && (p_149951_1_.isSideSolid(p_149951_2_, p_149951_3_ + 1, p_149951_4_ + 1, DOWN) || func_149953_o(p_149951_1_, p_149951_2_, p_149951_3_, p_149951_4_ + 1)))
{
return null;
}

View File

@ -8,11 +8,11 @@
import java.util.Random;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -160,6 +161,13 @@
public void func_149690_a(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_)
@@ -173,6 +174,13 @@
// JAVADOC METHOD $$ func_149690_a
public void dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_)
{
+ super.func_149690_a(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, p_149690_7_);
+ super.dropBlockAsItemWithChance(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, p_149690_7_);
+ }
+
+ @Override
@ -22,24 +22,24 @@
int j1 = func_149987_c(p_149690_5_);
byte b0 = 1;
@@ -170,8 +178,9 @@
@@ -183,8 +191,9 @@
for (int k1 = 0; k1 < b0; ++k1)
{
- this.func_149642_a(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, new ItemStack(Items.dye, 1, 3));
- this.dropBlockAsItem(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, new ItemStack(Items.dye, 1, 3));
+ dropped.add(new ItemStack(Items.dye, 1, 3));
}
+ return dropped;
}
@SideOnly(Side.CLIENT)
@@ -216,4 +225,10 @@
// JAVADOC METHOD $$ func_149694_d
@@ -231,4 +240,10 @@
++j1;
p_149853_1_.setBlockMetadataWithNotify(p_149853_3_, p_149853_4_, p_149853_5_, j1 << 2 | i1, 2);
}
+
+ @Override
+ public Item func_149650_a(int par1, Random par2Random, int par3)
+ public Item getItemDropped(int par1, Random par2Random, int par3)
+ {
+ return null;
+ }

View File

@ -16,24 +16,24 @@
public class BlockCrops extends BlockBush implements IGrowable
{
@@ -89,11 +91,11 @@
@@ -91,11 +93,11 @@
{
float f1 = 0.0F;
- if (p_149864_1_.func_147439_a(l, p_149864_3_ - 1, i1) == Blocks.farmland)
+ if (p_149864_1_.func_147439_a(l, p_149864_3_ - 1, i1).canSustainPlant(p_149864_1_, l, p_149864_3_ - 1, i1, ForgeDirection.UP, this))
- if (p_149864_1_.getBlock(l, p_149864_3_ - 1, i1) == Blocks.farmland)
+ if (p_149864_1_.getBlock(l, p_149864_3_ - 1, i1).canSustainPlant(p_149864_1_, l, p_149864_3_ - 1, i1, ForgeDirection.UP, this))
{
f1 = 1.0F;
- if (p_149864_1_.getBlockMetadata(l, p_149864_3_ - 1, i1) > 0)
+ if (p_149864_1_.func_147439_a(l, p_149864_3_ - 1, i1).isFertile(p_149864_1_, l, p_149864_3_ - 1, i1))
+ if (p_149864_1_.getBlock(l, p_149864_3_ - 1, i1).isFertile(p_149864_1_, l, p_149864_3_ - 1, i1))
{
f1 = 3.0F;
}
@@ -145,22 +147,6 @@
public void func_149690_a(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_)
@@ -150,22 +152,6 @@
public void dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_)
{
super.func_149690_a(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, 0);
super.dropBlockAsItemWithChance(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, 0);
-
- if (!p_149690_1_.isRemote)
- {
@ -45,15 +45,15 @@
- {
- if (p_149690_1_.rand.nextInt(15) <= p_149690_5_)
- {
- this.func_149642_a(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, new ItemStack(this.func_149866_i(), 1, 0));
- this.dropBlockAsItem(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, new ItemStack(this.func_149866_i(), 1, 0));
- }
- }
- }
- }
}
public Item func_149650_a(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
@@ -204,4 +190,23 @@
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
@@ -211,4 +197,23 @@
{
this.func_149863_m(p_149853_1_, p_149853_3_, p_149853_4_, p_149853_5_);
}

View File

@ -1,8 +1,8 @@
--- ../src-base/minecraft/net/minecraft/block/BlockDoor.java
+++ ../src-work/minecraft/net/minecraft/block/BlockDoor.java
@@ -249,7 +249,7 @@
@@ -258,7 +258,7 @@
{
if (this.field_149764_J == Material.field_151573_f)
if (this.blockMaterial == Material.iron)
{
- return true;
+ return false; //Allow items to interact with the door

View File

@ -1,10 +1,10 @@
--- ../src-base/minecraft/net/minecraft/block/BlockDoublePlant.java
+++ ../src-work/minecraft/net/minecraft/block/BlockDoublePlant.java
@@ -81,6 +81,7 @@
public boolean func_149718_j(World p_149718_1_, int p_149718_2_, int p_149718_3_, int p_149718_4_)
@@ -86,6 +86,7 @@
// JAVADOC METHOD $$ func_149718_j
public boolean canBlockStay(World p_149718_1_, int p_149718_2_, int p_149718_3_, int p_149718_4_)
{
+ if (p_149718_1_.func_147439_a(p_149718_2_, p_149718_3_, p_149718_4_) != this) return super.func_149718_j(p_149718_1_, p_149718_2_, p_149718_3_, p_149718_4_); //Forge: This function is called during world gen and placement, before this block is set, so if we are not 'here' then assume it's the pre-check.
+ if (p_149718_1_.getBlock(p_149718_2_, p_149718_3_, p_149718_4_) != this) return super.canBlockStay(p_149718_1_, p_149718_2_, p_149718_3_, p_149718_4_); //Forge: This function is called during world gen and placement, before this block is set, so if we are not 'here' then assume it's the pre-check.
int l = p_149718_1_.getBlockMetadata(p_149718_2_, p_149718_3_, p_149718_4_);
return func_149887_c(l) ? p_149718_1_.func_147439_a(p_149718_2_, p_149718_3_ - 1, p_149718_4_) == this : p_149718_1_.func_147439_a(p_149718_2_, p_149718_3_ + 1, p_149718_4_) == this && super.func_149718_j(p_149718_1_, p_149718_2_, p_149718_3_, p_149718_4_);
return func_149887_c(l) ? p_149718_1_.getBlock(p_149718_2_, p_149718_3_ - 1, p_149718_4_) == this : p_149718_1_.getBlock(p_149718_2_, p_149718_3_ + 1, p_149718_4_) == this && super.canBlockStay(p_149718_1_, p_149718_2_, p_149718_3_, p_149718_4_);
}

View File

@ -1,19 +1,19 @@
--- ../src-base/minecraft/net/minecraft/block/BlockFalling.java
+++ ../src-work/minecraft/net/minecraft/block/BlockFalling.java
@@ -84,7 +84,7 @@
@@ -88,7 +88,7 @@
{
Block block = p_149831_0_.func_147439_a(p_149831_1_, p_149831_2_, p_149831_3_);
Block block = p_149831_0_.getBlock(p_149831_1_, p_149831_2_, p_149831_3_);
- if (block.field_149764_J == Material.field_151579_a)
- if (block.blockMaterial == Material.air)
+ if (block.isAir(p_149831_0_, p_149831_1_, p_149831_2_, p_149831_3_))
{
return true;
}
@@ -94,6 +94,7 @@
@@ -98,6 +98,7 @@
}
else
{
+ //TODO: King, take a look here when doing liquids!
Material material = block.field_149764_J;
return material == Material.field_151586_h ? true : material == Material.field_151587_i;
Material material = block.blockMaterial;
return material == Material.water ? true : material == Material.lava;
}

View File

@ -9,9 +9,9 @@
public class BlockFarmland extends Block
{
@@ -94,7 +96,7 @@
@@ -100,7 +102,7 @@
{
Block block = p_149822_1_.func_147439_a(l, p_149822_3_ + 1, i1);
Block block = p_149822_1_.getBlock(l, p_149822_3_ + 1, i1);
- if (block == Blocks.wheat || block == Blocks.melon_stem || block == Blocks.pumpkin_stem || block == Blocks.potatoes || block == Blocks.carrots)
+ if (block instanceof IPlantable && canSustainPlant(p_149822_1_, p_149822_2_, p_149822_3_, p_149822_4_, ForgeDirection.UP, (IPlantable)block))

View File

@ -30,7 +30,7 @@
private IIcon[] field_149850_M;
private static final String __OBFID = "CL_00000245";
@@ -54,10 +61,10 @@
Blocks.fire.func_149842_a(func_149682_b(Blocks.carpet), 60, 20);
Blocks.fire.func_149842_a(getIdFromBlock(Blocks.carpet), 60, 20);
}
+ @Deprecated // Use setFireInfo
@ -38,44 +38,44 @@
{
- this.field_149849_a[p_149842_1_] = p_149842_2_;
- this.field_149848_b[p_149842_1_] = p_149842_3_;
+ this.setFireInfo((Block)Block.field_149771_c.func_148754_a(p_149842_1_), p_149842_2_, p_149842_3_);
+ this.setFireInfo((Block)Block.blockRegistry.getObjectById(p_149842_1_), p_149842_2_, p_149842_3_);
}
public AxisAlignedBB func_149668_a(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_)
@@ -94,13 +101,8 @@
// JAVADOC METHOD $$ func_149668_a
@@ -101,13 +108,8 @@
{
if (p_149674_1_.getGameRules().getGameRuleBooleanValue("doFireTick"))
{
- boolean flag = p_149674_1_.func_147439_a(p_149674_2_, p_149674_3_ - 1, p_149674_4_) == Blocks.netherrack;
+ boolean flag = p_149674_1_.func_147439_a(p_149674_2_, p_149674_3_ - 1, p_149674_4_).isFireSource(p_149674_1_, p_149674_2_, p_149674_3_ - 1, p_149674_4_, UP);
- boolean flag = p_149674_1_.getBlock(p_149674_2_, p_149674_3_ - 1, p_149674_4_) == Blocks.netherrack;
+ boolean flag = p_149674_1_.getBlock(p_149674_2_, p_149674_3_ - 1, p_149674_4_).isFireSource(p_149674_1_, p_149674_2_, p_149674_3_ - 1, p_149674_4_, UP);
- if (p_149674_1_.provider instanceof WorldProviderEnd && p_149674_1_.func_147439_a(p_149674_2_, p_149674_3_ - 1, p_149674_4_) == Blocks.bedrock)
- if (p_149674_1_.provider instanceof WorldProviderEnd && p_149674_1_.getBlock(p_149674_2_, p_149674_3_ - 1, p_149674_4_) == Blocks.bedrock)
- {
- flag = true;
- }
-
if (!this.func_149742_c(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_))
if (!this.canPlaceBlockAt(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_))
{
p_149674_1_.func_147468_f(p_149674_2_, p_149674_3_, p_149674_4_);
@@ -128,7 +130,7 @@
p_149674_1_.func_147468_f(p_149674_2_, p_149674_3_, p_149674_4_);
p_149674_1_.setBlockToAir(p_149674_2_, p_149674_3_, p_149674_4_);
@@ -135,7 +137,7 @@
p_149674_1_.setBlockToAir(p_149674_2_, p_149674_3_, p_149674_4_);
}
}
- else if (!flag && !this.func_149844_e(p_149674_1_, p_149674_2_, p_149674_3_ - 1, p_149674_4_) && l == 15 && p_149674_5_.nextInt(4) == 0)
- else if (!flag && !this.canBlockCatchFire(p_149674_1_, p_149674_2_, p_149674_3_ - 1, p_149674_4_) && l == 15 && p_149674_5_.nextInt(4) == 0)
+ else if (!flag && !this.canCatchFire(p_149674_1_, p_149674_2_, p_149674_3_ - 1, p_149674_4_, UP) && l == 15 && p_149674_5_.nextInt(4) == 0)
{
p_149674_1_.func_147468_f(p_149674_2_, p_149674_3_, p_149674_4_);
p_149674_1_.setBlockToAir(p_149674_2_, p_149674_3_, p_149674_4_);
}
@@ -142,12 +144,12 @@
@@ -149,12 +151,12 @@
b0 = -50;
}
- this.func_149841_a(p_149674_1_, p_149674_2_ + 1, p_149674_3_, p_149674_4_, 300 + b0, p_149674_5_, l);
- this.func_149841_a(p_149674_1_, p_149674_2_ - 1, p_149674_3_, p_149674_4_, 300 + b0, p_149674_5_, l);
- this.func_149841_a(p_149674_1_, p_149674_2_, p_149674_3_ - 1, p_149674_4_, 250 + b0, p_149674_5_, l);
- this.func_149841_a(p_149674_1_, p_149674_2_, p_149674_3_ + 1, p_149674_4_, 250 + b0, p_149674_5_, l);
- this.func_149841_a(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_ - 1, 300 + b0, p_149674_5_, l);
- this.func_149841_a(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_ + 1, 300 + b0, p_149674_5_, l);
- this.tryCatchFire(p_149674_1_, p_149674_2_ + 1, p_149674_3_, p_149674_4_, 300 + b0, p_149674_5_, l);
- this.tryCatchFire(p_149674_1_, p_149674_2_ - 1, p_149674_3_, p_149674_4_, 300 + b0, p_149674_5_, l);
- this.tryCatchFire(p_149674_1_, p_149674_2_, p_149674_3_ - 1, p_149674_4_, 250 + b0, p_149674_5_, l);
- this.tryCatchFire(p_149674_1_, p_149674_2_, p_149674_3_ + 1, p_149674_4_, 250 + b0, p_149674_5_, l);
- this.tryCatchFire(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_ - 1, 300 + b0, p_149674_5_, l);
- this.tryCatchFire(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_ + 1, 300 + b0, p_149674_5_, l);
+ this.tryCatchFire(p_149674_1_, p_149674_2_ + 1, p_149674_3_, p_149674_4_, 300 + b0, p_149674_5_, l, WEST );
+ this.tryCatchFire(p_149674_1_, p_149674_2_ - 1, p_149674_3_, p_149674_4_, 300 + b0, p_149674_5_, l, EAST );
+ this.tryCatchFire(p_149674_1_, p_149674_2_, p_149674_3_ - 1, p_149674_4_, 250 + b0, p_149674_5_, l, UP );
@ -85,29 +85,29 @@
for (int i1 = p_149674_2_ - 1; i1 <= p_149674_2_ + 1; ++i1)
{
@@ -201,10 +203,16 @@
return false;
@@ -209,10 +211,16 @@
}
// JAVADOC METHOD $$ func_149841_a
+ @Deprecated
private void func_149841_a(World p_149841_1_, int p_149841_2_, int p_149841_3_, int p_149841_4_, int p_149841_5_, Random p_149841_6_, int p_149841_7_)
private void tryCatchFire(World p_149841_1_, int p_149841_2_, int p_149841_3_, int p_149841_4_, int p_149841_5_, Random p_149841_6_, int p_149841_7_)
{
- int j1 = this.field_149848_b[Block.func_149682_b(p_149841_1_.func_147439_a(p_149841_2_, p_149841_3_, p_149841_4_))];
- int j1 = this.field_149848_b[Block.getIdFromBlock(p_149841_1_.getBlock(p_149841_2_, p_149841_3_, p_149841_4_))];
+ this.tryCatchFire(p_149841_1_, p_149841_2_, p_149841_3_, p_149841_4_, p_149841_5_, p_149841_6_, p_149841_7_, UP);
+ }
+ private void tryCatchFire(World p_149841_1_, int p_149841_2_, int p_149841_3_, int p_149841_4_, int p_149841_5_, Random p_149841_6_, int p_149841_7_, ForgeDirection face)
+ {
+ int j1 = p_149841_1_.func_147439_a(p_149841_2_, p_149841_3_, p_149841_4_).getFlammability(p_149841_1_, p_149841_2_, p_149841_3_, p_149841_4_, face);
+ int j1 = p_149841_1_.getBlock(p_149841_2_, p_149841_3_, p_149841_4_).getFlammability(p_149841_1_, p_149841_2_, p_149841_3_, p_149841_4_, face);
+
if (p_149841_6_.nextInt(p_149841_5_) < j1)
{
boolean flag = p_149841_1_.func_147439_a(p_149841_2_, p_149841_3_, p_149841_4_) == Blocks.tnt;
@@ -234,7 +242,12 @@
private boolean func_149847_e(World p_149847_1_, int p_149847_2_, int p_149847_3_, int p_149847_4_)
boolean flag = p_149841_1_.getBlock(p_149841_2_, p_149841_3_, p_149841_4_) == Blocks.tnt;
@@ -243,7 +251,12 @@
// JAVADOC METHOD $$ func_149847_e
private boolean canNeighborBurn(World p_149847_1_, int p_149847_2_, int p_149847_3_, int p_149847_4_)
{
- return this.func_149844_e(p_149847_1_, p_149847_2_ + 1, p_149847_3_, p_149847_4_) ? true : (this.func_149844_e(p_149847_1_, p_149847_2_ - 1, p_149847_3_, p_149847_4_) ? true : (this.func_149844_e(p_149847_1_, p_149847_2_, p_149847_3_ - 1, p_149847_4_) ? true : (this.func_149844_e(p_149847_1_, p_149847_2_, p_149847_3_ + 1, p_149847_4_) ? true : (this.func_149844_e(p_149847_1_, p_149847_2_, p_149847_3_, p_149847_4_ - 1) ? true : this.func_149844_e(p_149847_1_, p_149847_2_, p_149847_3_, p_149847_4_ + 1)))));
- return this.canBlockCatchFire(p_149847_1_, p_149847_2_ + 1, p_149847_3_, p_149847_4_) ? true : (this.canBlockCatchFire(p_149847_1_, p_149847_2_ - 1, p_149847_3_, p_149847_4_) ? true : (this.canBlockCatchFire(p_149847_1_, p_149847_2_, p_149847_3_ - 1, p_149847_4_) ? true : (this.canBlockCatchFire(p_149847_1_, p_149847_2_, p_149847_3_ + 1, p_149847_4_) ? true : (this.canBlockCatchFire(p_149847_1_, p_149847_2_, p_149847_3_, p_149847_4_ - 1) ? true : this.canBlockCatchFire(p_149847_1_, p_149847_2_, p_149847_3_, p_149847_4_ + 1)))));
+ return this.canCatchFire(p_149847_1_, p_149847_2_ + 1, p_149847_3_, p_149847_4_, WEST ) ||
+ this.canCatchFire(p_149847_1_, p_149847_2_ - 1, p_149847_3_, p_149847_4_, EAST ) ||
+ this.canCatchFire(p_149847_1_, p_149847_2_, p_149847_3_ - 1, p_149847_4_, UP ) ||
@ -116,8 +116,8 @@
+ this.canCatchFire(p_149847_1_, p_149847_2_, p_149847_3_, p_149847_4_ + 1, NORTH);
}
private int func_149845_m(World p_149845_1_, int p_149845_2_, int p_149845_3_, int p_149845_4_)
@@ -247,12 +260,13 @@
// JAVADOC METHOD $$ func_149845_m
@@ -257,12 +270,13 @@
}
else
{
@ -137,77 +137,77 @@
return l;
}
}
@@ -262,15 +276,16 @@
return false;
@@ -274,15 +288,16 @@
}
// JAVADOC METHOD $$ func_149844_e
+ @Deprecated
public boolean func_149844_e(IBlockAccess p_149844_1_, int p_149844_2_, int p_149844_3_, int p_149844_4_)
public boolean canBlockCatchFire(IBlockAccess p_149844_1_, int p_149844_2_, int p_149844_3_, int p_149844_4_)
{
- return this.field_149849_a[Block.func_149682_b(p_149844_1_.func_147439_a(p_149844_2_, p_149844_3_, p_149844_4_))] > 0;
- return this.field_149849_a[Block.getIdFromBlock(p_149844_1_.getBlock(p_149844_2_, p_149844_3_, p_149844_4_))] > 0;
+ return canCatchFire(p_149844_1_, p_149844_2_, p_149844_3_, p_149844_4_, UP);
}
+ @Deprecated
public int func_149846_a(World p_149846_1_, int p_149846_2_, int p_149846_3_, int p_149846_4_, int p_149846_5_)
{
- int i1 = this.field_149849_a[Block.func_149682_b(p_149846_1_.func_147439_a(p_149846_2_, p_149846_3_, p_149846_4_))];
- int i1 = this.field_149849_a[Block.getIdFromBlock(p_149846_1_.getBlock(p_149846_2_, p_149846_3_, p_149846_4_))];
- return i1 > p_149846_5_ ? i1 : p_149846_5_;
+ return getChanceToEncourageFire(p_149846_1_, p_149846_2_, p_149846_3_, p_149846_4_, p_149846_5_, UP);
}
public boolean func_149742_c(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
@@ -314,9 +329,9 @@
// JAVADOC METHOD $$ func_149742_c
@@ -330,9 +345,9 @@
float f1;
float f2;
- if (!World.func_147466_a(p_149734_1_, p_149734_2_, p_149734_3_ - 1, p_149734_4_) && !Blocks.fire.func_149844_e(p_149734_1_, p_149734_2_, p_149734_3_ - 1, p_149734_4_))
+ if (!World.func_147466_a(p_149734_1_, p_149734_2_, p_149734_3_ - 1, p_149734_4_) && !Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_ - 1, p_149734_4_, UP))
- if (!World.doesBlockHaveSolidTopSurface(p_149734_1_, p_149734_2_, p_149734_3_ - 1, p_149734_4_) && !Blocks.fire.canBlockCatchFire(p_149734_1_, p_149734_2_, p_149734_3_ - 1, p_149734_4_))
+ if (!World.doesBlockHaveSolidTopSurface(p_149734_1_, p_149734_2_, p_149734_3_ - 1, p_149734_4_) && !Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_ - 1, p_149734_4_, UP))
{
- if (Blocks.fire.func_149844_e(p_149734_1_, p_149734_2_ - 1, p_149734_3_, p_149734_4_))
- if (Blocks.fire.canBlockCatchFire(p_149734_1_, p_149734_2_ - 1, p_149734_3_, p_149734_4_))
+ if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_ - 1, p_149734_3_, p_149734_4_, EAST))
{
for (l = 0; l < 2; ++l)
{
@@ -327,7 +342,7 @@
@@ -343,7 +358,7 @@
}
}
- if (Blocks.fire.func_149844_e(p_149734_1_, p_149734_2_ + 1, p_149734_3_, p_149734_4_))
- if (Blocks.fire.canBlockCatchFire(p_149734_1_, p_149734_2_ + 1, p_149734_3_, p_149734_4_))
+ if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_ + 1, p_149734_3_, p_149734_4_, WEST))
{
for (l = 0; l < 2; ++l)
{
@@ -338,7 +353,7 @@
@@ -354,7 +369,7 @@
}
}
- if (Blocks.fire.func_149844_e(p_149734_1_, p_149734_2_, p_149734_3_, p_149734_4_ - 1))
- if (Blocks.fire.canBlockCatchFire(p_149734_1_, p_149734_2_, p_149734_3_, p_149734_4_ - 1))
+ if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_, p_149734_4_ - 1, SOUTH))
{
for (l = 0; l < 2; ++l)
{
@@ -349,7 +364,7 @@
@@ -365,7 +380,7 @@
}
}
- if (Blocks.fire.func_149844_e(p_149734_1_, p_149734_2_, p_149734_3_, p_149734_4_ + 1))
- if (Blocks.fire.canBlockCatchFire(p_149734_1_, p_149734_2_, p_149734_3_, p_149734_4_ + 1))
+ if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_, p_149734_4_ + 1, NORTH))
{
for (l = 0; l < 2; ++l)
{
@@ -360,7 +375,7 @@
@@ -376,7 +391,7 @@
}
}
- if (Blocks.fire.func_149844_e(p_149734_1_, p_149734_2_, p_149734_3_ + 1, p_149734_4_))
- if (Blocks.fire.canBlockCatchFire(p_149734_1_, p_149734_2_, p_149734_3_ + 1, p_149734_4_))
+ if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_ + 1, p_149734_4_, DOWN))
{
for (l = 0; l < 2; ++l)
{
@@ -405,4 +420,101 @@
@@ -422,4 +437,101 @@
{
return MapColor.field_151656_f;
return MapColor.tntColor;
}
+
+ /*================================= Forge Start ======================================*/
@ -221,7 +221,7 @@
+ public void setFireInfo(Block block, int encouragement, int flammibility)
+ {
+ if (block == Blocks.air) throw new IllegalArgumentException("Tried to set air on fire... This is bad.");
+ int id = Block.func_149682_b(block);
+ int id = Block.getIdFromBlock(block);
+ this.field_149849_a[id] = encouragement;
+ this.field_149848_b[id] = flammibility;
+
@ -253,7 +253,7 @@
+
+ for (Entry<Block, FireInfo> e : blockInfo.entrySet())
+ {
+ int id = Block.func_149682_b(e.getKey());
+ int id = Block.getIdFromBlock(e.getKey());
+ if (id >= 0 && id < 4096)
+ {
+ field_149849_a[id] = e.getValue().encouragement;
@ -264,13 +264,13 @@
+
+ public int getFlammability(Block block)
+ {
+ int id = Block.func_149682_b(block);
+ int id = Block.getIdFromBlock(block);
+ return id >= 0 && id < 4096 ? field_149848_b[id] : 0;
+ }
+
+ public int getEncouragement(Block block)
+ {
+ int id = Block.func_149682_b(block);
+ int id = Block.getIdFromBlock(block);
+ return id >= 0 && id < 4096 ? field_149849_a[id] : 0;
+ }
+
@ -286,7 +286,7 @@
+ */
+ public boolean canCatchFire(IBlockAccess world, int x, int y, int z, ForgeDirection face)
+ {
+ return world.func_147439_a(x, y, z).isFlammable(world, x, y, z, face);
+ return world.getBlock(x, y, z).isFlammable(world, x, y, z, face);
+ }
+
+ /**
@ -302,7 +302,7 @@
+ */
+ public int getChanceToEncourageFire(IBlockAccess world, int x, int y, int z, int oldChance, ForgeDirection face)
+ {
+ int newChance = world.func_147439_a(x, y, z).getFireSpreadSpeed(world, x, y, z, face);
+ int newChance = world.getBlock(x, y, z).getFireSpreadSpeed(world, x, y, z, face);
+ return (newChance > oldChance ? newChance : oldChance);
+ }
+ /*================================= Forge Start ======================================*/

View File

@ -1,35 +1,35 @@
--- ../src-base/minecraft/net/minecraft/block/BlockGrass.java
+++ ../src-work/minecraft/net/minecraft/block/BlockGrass.java
@@ -43,7 +43,7 @@
@@ -45,7 +45,7 @@
{
if (!p_149674_1_.isRemote)
{
- if (p_149674_1_.getBlockLightValue(p_149674_2_, p_149674_3_ + 1, p_149674_4_) < 4 && p_149674_1_.func_147439_a(p_149674_2_, p_149674_3_ + 1, p_149674_4_).func_149717_k() > 2)
- if (p_149674_1_.getBlockLightValue(p_149674_2_, p_149674_3_ + 1, p_149674_4_) < 4 && p_149674_1_.getBlock(p_149674_2_, p_149674_3_ + 1, p_149674_4_).getLightOpacity() > 2)
+ if (p_149674_1_.getBlockLightValue(p_149674_2_, p_149674_3_ + 1, p_149674_4_) < 4 && p_149674_1_.getBlockLightOpacity(p_149674_2_, p_149674_3_ + 1, p_149674_4_) > 2)
{
p_149674_1_.func_147449_b(p_149674_2_, p_149674_3_, p_149674_4_, Blocks.dirt);
p_149674_1_.setBlock(p_149674_2_, p_149674_3_, p_149674_4_, Blocks.dirt);
}
@@ -56,7 +56,7 @@
@@ -58,7 +58,7 @@
int k1 = p_149674_4_ + p_149674_5_.nextInt(3) - 1;
Block block = p_149674_1_.func_147439_a(i1, j1 + 1, k1);
Block block = p_149674_1_.getBlock(i1, j1 + 1, k1);
- if (p_149674_1_.func_147439_a(i1, j1, k1) == Blocks.dirt && p_149674_1_.getBlockMetadata(i1, j1, k1) == 0 && p_149674_1_.getBlockLightValue(i1, j1 + 1, k1) >= 4 && block.func_149717_k() <= 2)
+ if (p_149674_1_.func_147439_a(i1, j1, k1) == Blocks.dirt && p_149674_1_.getBlockMetadata(i1, j1, k1) == 0 && p_149674_1_.getBlockLightValue(i1, j1 + 1, k1) >= 4 && p_149674_1_.getBlockLightOpacity(i1, j1 + 1, k1) <= 2)
- if (p_149674_1_.getBlock(i1, j1, k1) == Blocks.dirt && p_149674_1_.getBlockMetadata(i1, j1, k1) == 0 && p_149674_1_.getBlockLightValue(i1, j1 + 1, k1) >= 4 && block.getLightOpacity() <= 2)
+ if (p_149674_1_.getBlock(i1, j1, k1) == Blocks.dirt && p_149674_1_.getBlockMetadata(i1, j1, k1) == 0 && p_149674_1_.getBlockLightValue(i1, j1 + 1, k1) >= 4 && p_149674_1_.getBlockLightOpacity(i1, j1 + 1, k1) <= 2)
{
p_149674_1_.func_147449_b(i1, j1, k1, Blocks.grass);
p_149674_1_.setBlock(i1, j1, k1, Blocks.grass);
}
@@ -184,15 +184,7 @@
@@ -188,15 +188,7 @@
}
else
{
- String s = p_149853_1_.getBiomeGenForCoords(i1, k1).func_150572_a(p_149853_2_, i1, j1, k1);
- field_149992_a.debug("Flower in " + p_149853_1_.getBiomeGenForCoords(i1, k1).biomeName + ": " + s);
- logger.debug("Flower in " + p_149853_1_.getBiomeGenForCoords(i1, k1).biomeName + ": " + s);
- BlockFlower blockflower = BlockFlower.func_149857_e(s);
-
- if (blockflower != null && blockflower.func_149718_j(p_149853_1_, i1, j1, k1))
- if (blockflower != null && blockflower.canBlockStay(p_149853_1_, i1, j1, k1))
- {
- int i2 = BlockFlower.func_149856_f(s);
- p_149853_1_.func_147465_d(i1, j1, k1, blockflower, i2, 3);
- p_149853_1_.setBlock(i1, j1, k1, blockflower, i2, 3);
- }
+ p_149853_1_.getBiomeGenForCoords(i1, k1).plantFlower(p_149853_1_, p_149853_2_, i1, j1, k1);
}

View File

@ -1,11 +1,11 @@
--- ../src-base/minecraft/net/minecraft/block/BlockIce.java
+++ ../src-work/minecraft/net/minecraft/block/BlockIce.java
@@ -43,7 +43,7 @@
p_149636_2_.addStat(StatList.mineBlockStatArray[Block.func_149682_b(this)], 1);
@@ -46,7 +46,7 @@
p_149636_2_.addStat(StatList.mineBlockStatArray[Block.getIdFromBlock(this)], 1);
p_149636_2_.addExhaustion(0.025F);
- if (this.func_149700_E() && EnchantmentHelper.getSilkTouchModifier(p_149636_2_))
- if (this.canSilkHarvest() && EnchantmentHelper.getSilkTouchModifier(p_149636_2_))
+ if (this.canSilkHarvest(p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_) && EnchantmentHelper.getSilkTouchModifier(p_149636_2_))
{
ItemStack itemstack = this.func_149644_j(p_149636_6_);
ItemStack itemstack = this.createStackedBlock(p_149636_6_);

View File

@ -15,72 +15,73 @@
public class BlockLadder extends Block
{
private static final String __OBFID = "CL_00000262";
@@ -79,29 +83,32 @@
public boolean func_149742_c(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
@@ -86,7 +90,10 @@
// JAVADOC METHOD $$ func_149742_c
public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
{
- return p_149742_1_.func_147439_a(p_149742_2_ - 1, p_149742_3_, p_149742_4_).func_149721_r() ? true : (p_149742_1_.func_147439_a(p_149742_2_ + 1, p_149742_3_, p_149742_4_).func_149721_r() ? true : (p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_, p_149742_4_ - 1).func_149721_r() ? true : p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_, p_149742_4_ + 1).func_149721_r()));
- return p_149742_1_.getBlock(p_149742_2_ - 1, p_149742_3_, p_149742_4_).isNormalCube() ? true : (p_149742_1_.getBlock(p_149742_2_ + 1, p_149742_3_, p_149742_4_).isNormalCube() ? true : (p_149742_1_.getBlock(p_149742_2_, p_149742_3_, p_149742_4_ - 1).isNormalCube() ? true : p_149742_1_.getBlock(p_149742_2_, p_149742_3_, p_149742_4_ + 1).isNormalCube()));
+ return p_149742_1_.isSideSolid(p_149742_2_ - 1, p_149742_3_, p_149742_4_, EAST ) ||
+ p_149742_1_.isSideSolid(p_149742_2_ + 1, p_149742_3_, p_149742_4_, WEST ) ||
+ p_149742_1_.isSideSolid(p_149742_2_, p_149742_3_, p_149742_4_ - 1, SOUTH) ||
+ p_149742_1_.isSideSolid(p_149742_2_, p_149742_3_, p_149742_4_ + 1, NORTH);
}
public int func_149660_a(World p_149660_1_, int p_149660_2_, int p_149660_3_, int p_149660_4_, int p_149660_5_, float p_149660_6_, float p_149660_7_, float p_149660_8_, int p_149660_9_)
// JAVADOC METHOD $$ func_149660_a
@@ -94,22 +101,22 @@
{
int j1 = p_149660_9_;
- if ((p_149660_9_ == 0 || p_149660_5_ == 2) && p_149660_1_.func_147439_a(p_149660_2_, p_149660_3_, p_149660_4_ + 1).func_149721_r())
- if ((p_149660_9_ == 0 || p_149660_5_ == 2) && p_149660_1_.getBlock(p_149660_2_, p_149660_3_, p_149660_4_ + 1).isNormalCube())
+ if ((p_149660_9_ == 0 || p_149660_5_ == 2) && p_149660_1_.isSideSolid(p_149660_2_, p_149660_3_, p_149660_4_ + 1, NORTH))
{
j1 = 2;
}
- if ((j1 == 0 || p_149660_5_ == 3) && p_149660_1_.func_147439_a(p_149660_2_, p_149660_3_, p_149660_4_ - 1).func_149721_r())
- if ((j1 == 0 || p_149660_5_ == 3) && p_149660_1_.getBlock(p_149660_2_, p_149660_3_, p_149660_4_ - 1).isNormalCube())
+ if ((j1 == 0 || p_149660_5_ == 3) && p_149660_1_.isSideSolid(p_149660_2_, p_149660_3_, p_149660_4_ - 1, SOUTH))
{
j1 = 3;
}
- if ((j1 == 0 || p_149660_5_ == 4) && p_149660_1_.func_147439_a(p_149660_2_ + 1, p_149660_3_, p_149660_4_).func_149721_r())
- if ((j1 == 0 || p_149660_5_ == 4) && p_149660_1_.getBlock(p_149660_2_ + 1, p_149660_3_, p_149660_4_).isNormalCube())
+ if ((j1 == 0 || p_149660_5_ == 4) && p_149660_1_.isSideSolid(p_149660_2_ + 1, p_149660_3_, p_149660_4_, WEST))
{
j1 = 4;
}
- if ((j1 == 0 || p_149660_5_ == 5) && p_149660_1_.func_147439_a(p_149660_2_ - 1, p_149660_3_, p_149660_4_).func_149721_r())
- if ((j1 == 0 || p_149660_5_ == 5) && p_149660_1_.getBlock(p_149660_2_ - 1, p_149660_3_, p_149660_4_).isNormalCube())
+ if ((j1 == 0 || p_149660_5_ == 5) && p_149660_1_.isSideSolid(p_149660_2_ - 1, p_149660_3_, p_149660_4_, EAST))
{
j1 = 5;
}
@@ -114,22 +121,22 @@
@@ -123,22 +130,22 @@
int l = p_149695_1_.getBlockMetadata(p_149695_2_, p_149695_3_, p_149695_4_);
boolean flag = false;
- if (l == 2 && p_149695_1_.func_147439_a(p_149695_2_, p_149695_3_, p_149695_4_ + 1).func_149721_r())
- if (l == 2 && p_149695_1_.getBlock(p_149695_2_, p_149695_3_, p_149695_4_ + 1).isNormalCube())
+ if (l == 2 && p_149695_1_.isSideSolid(p_149695_2_, p_149695_3_, p_149695_4_ + 1, NORTH))
{
flag = true;
}
- if (l == 3 && p_149695_1_.func_147439_a(p_149695_2_, p_149695_3_, p_149695_4_ - 1).func_149721_r())
- if (l == 3 && p_149695_1_.getBlock(p_149695_2_, p_149695_3_, p_149695_4_ - 1).isNormalCube())
+ if (l == 3 && p_149695_1_.isSideSolid(p_149695_2_, p_149695_3_, p_149695_4_ - 1, SOUTH))
{
flag = true;
}
- if (l == 4 && p_149695_1_.func_147439_a(p_149695_2_ + 1, p_149695_3_, p_149695_4_).func_149721_r())
- if (l == 4 && p_149695_1_.getBlock(p_149695_2_ + 1, p_149695_3_, p_149695_4_).isNormalCube())
+ if (l == 4 && p_149695_1_.isSideSolid(p_149695_2_ + 1, p_149695_3_, p_149695_4_, WEST))
{
flag = true;
}
- if (l == 5 && p_149695_1_.func_147439_a(p_149695_2_ - 1, p_149695_3_, p_149695_4_).func_149721_r())
- if (l == 5 && p_149695_1_.getBlock(p_149695_2_ - 1, p_149695_3_, p_149695_4_).isNormalCube())
+ if (l == 5 && p_149695_1_.isSideSolid(p_149695_2_ - 1, p_149695_3_, p_149695_4_, EAST))
{
flag = true;
}
@@ -147,4 +154,10 @@
@@ -157,4 +164,10 @@
{
return 1;
}

View File

@ -19,12 +19,12 @@
{
int[] field_150128_a;
@SideOnly(Side.CLIENT)
@@ -82,10 +84,10 @@
@@ -84,10 +86,10 @@
{
for (int l1 = -b0; l1 <= b0; ++l1)
{
- if (p_149749_1_.func_147439_a(p_149749_2_ + j1, p_149749_3_ + k1, p_149749_4_ + l1).func_149688_o() == Material.field_151584_j)
+ Block block = p_149749_1_.func_147439_a(p_149749_2_ + j1, p_149749_3_ + k1, p_149749_4_ + l1);
- if (p_149749_1_.getBlock(p_149749_2_ + j1, p_149749_3_ + k1, p_149749_4_ + l1).getMaterial() == Material.leaves)
+ Block block = p_149749_1_.getBlock(p_149749_2_ + j1, p_149749_3_ + k1, p_149749_4_ + l1);
+ if (block.isLeaves(p_149749_1_, p_149749_2_ + j1, p_149749_3_ + k1, p_149749_4_ + l1))
{
- int i2 = p_149749_1_.getBlockMetadata(p_149749_2_ + j1, p_149749_3_ + k1, p_149749_4_ + l1);
@ -33,33 +33,33 @@
}
}
}
@@ -127,9 +129,9 @@
@@ -130,9 +132,9 @@
{
Block block = p_149674_1_.func_147439_a(p_149674_2_ + l1, p_149674_3_ + i2, p_149674_4_ + j2);
Block block = p_149674_1_.getBlock(p_149674_2_ + l1, p_149674_3_ + i2, p_149674_4_ + j2);
- if (block != Blocks.log && block != Blocks.log2)
+ if (!block.canSustainLeaves(p_149674_1_, p_149674_2_ + l1, p_149674_3_ + i2, p_149674_4_ + j2))
{
- if (block.func_149688_o() == Material.field_151584_j)
- if (block.getMaterial() == Material.leaves)
+ if (block.isLeaves(p_149674_1_, p_149674_2_ + l1, p_149674_3_ + i2, p_149674_4_ + j2))
{
this.field_150128_a[(l1 + k1) * j1 + (i2 + k1) * b1 + j2 + k1] = -2;
}
@@ -281,13 +283,7 @@
public void func_149636_a(World p_149636_1_, EntityPlayer p_149636_2_, int p_149636_3_, int p_149636_4_, int p_149636_5_, int p_149636_6_)
@@ -288,13 +290,7 @@
// JAVADOC METHOD $$ func_149636_a
public void harvestBlock(World p_149636_1_, EntityPlayer p_149636_2_, int p_149636_3_, int p_149636_4_, int p_149636_5_, int p_149636_6_)
{
- if (!p_149636_1_.isRemote && p_149636_2_.getCurrentEquippedItem() != null && p_149636_2_.getCurrentEquippedItem().getItem() == Items.shears)
{
- p_149636_2_.addStat(StatList.mineBlockStatArray[Block.func_149682_b(this)], 1);
- this.func_149642_a(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, new ItemStack(Item.func_150898_a(this), 1, p_149636_6_ & 3));
- p_149636_2_.addStat(StatList.mineBlockStatArray[Block.getIdFromBlock(this)], 1);
- this.dropBlockAsItem(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, new ItemStack(Item.getItemFromBlock(this), 1, p_149636_6_ & 3));
- }
- else
- {
super.func_149636_a(p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_);
super.harvestBlock(p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_);
}
}
@@ -318,4 +314,38 @@
@@ -330,4 +326,38 @@
}
public abstract String[] func_150125_e();

View File

@ -10,11 +10,11 @@
public class BlockLever extends Block
{
private static final String __OBFID = "CL_00000264";
@@ -42,12 +45,23 @@
public boolean func_149707_d(World p_149707_1_, int p_149707_2_, int p_149707_3_, int p_149707_4_, int p_149707_5_)
@@ -47,13 +50,24 @@
// JAVADOC METHOD $$ func_149707_d
public boolean canPlaceBlockOnSide(World p_149707_1_, int p_149707_2_, int p_149707_3_, int p_149707_4_, int p_149707_5_)
{
- return p_149707_5_ == 0 && p_149707_1_.func_147439_a(p_149707_2_, p_149707_3_ + 1, p_149707_4_).func_149721_r() ? true : (p_149707_5_ == 1 && World.func_147466_a(p_149707_1_, p_149707_2_, p_149707_3_ - 1, p_149707_4_) ? true : (p_149707_5_ == 2 && p_149707_1_.func_147439_a(p_149707_2_, p_149707_3_, p_149707_4_ + 1).func_149721_r() ? true : (p_149707_5_ == 3 && p_149707_1_.func_147439_a(p_149707_2_, p_149707_3_, p_149707_4_ - 1).func_149721_r() ? true : (p_149707_5_ == 4 && p_149707_1_.func_147439_a(p_149707_2_ + 1, p_149707_3_, p_149707_4_).func_149721_r() ? true : p_149707_5_ == 5 && p_149707_1_.func_147439_a(p_149707_2_ - 1, p_149707_3_, p_149707_4_).func_149721_r()))));
- return p_149707_5_ == 0 && p_149707_1_.getBlock(p_149707_2_, p_149707_3_ + 1, p_149707_4_).isNormalCube() ? true : (p_149707_5_ == 1 && World.doesBlockHaveSolidTopSurface(p_149707_1_, p_149707_2_, p_149707_3_ - 1, p_149707_4_) ? true : (p_149707_5_ == 2 && p_149707_1_.getBlock(p_149707_2_, p_149707_3_, p_149707_4_ + 1).isNormalCube() ? true : (p_149707_5_ == 3 && p_149707_1_.getBlock(p_149707_2_, p_149707_3_, p_149707_4_ - 1).isNormalCube() ? true : (p_149707_5_ == 4 && p_149707_1_.getBlock(p_149707_2_ + 1, p_149707_3_, p_149707_4_).isNormalCube() ? true : p_149707_5_ == 5 && p_149707_1_.getBlock(p_149707_2_ - 1, p_149707_3_, p_149707_4_).isNormalCube()))));
+ ForgeDirection dir = ForgeDirection.getOrientation(p_149707_5_);
+ return (dir == DOWN && p_149707_1_.isSideSolid(p_149707_2_, p_149707_3_ + 1, p_149707_4_, DOWN )) ||
+ (dir == UP && p_149707_1_.isSideSolid(p_149707_2_, p_149707_3_ - 1, p_149707_4_, UP )) ||
@ -24,9 +24,10 @@
+ (dir == EAST && p_149707_1_.isSideSolid(p_149707_2_ - 1, p_149707_3_, p_149707_4_, EAST ));
}
public boolean func_149742_c(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
// JAVADOC METHOD $$ func_149742_c
public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
{
- return p_149742_1_.func_147439_a(p_149742_2_ - 1, p_149742_3_, p_149742_4_).func_149721_r() ? true : (p_149742_1_.func_147439_a(p_149742_2_ + 1, p_149742_3_, p_149742_4_).func_149721_r() ? true : (p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_, p_149742_4_ - 1).func_149721_r() ? true : (p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_, p_149742_4_ + 1).func_149721_r() ? true : (World.func_147466_a(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_) ? true : p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_ + 1, p_149742_4_).func_149721_r()))));
- return p_149742_1_.getBlock(p_149742_2_ - 1, p_149742_3_, p_149742_4_).isNormalCube() ? true : (p_149742_1_.getBlock(p_149742_2_ + 1, p_149742_3_, p_149742_4_).isNormalCube() ? true : (p_149742_1_.getBlock(p_149742_2_, p_149742_3_, p_149742_4_ - 1).isNormalCube() ? true : (p_149742_1_.getBlock(p_149742_2_, p_149742_3_, p_149742_4_ + 1).isNormalCube() ? true : (World.doesBlockHaveSolidTopSurface(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_) ? true : p_149742_1_.getBlock(p_149742_2_, p_149742_3_ + 1, p_149742_4_).isNormalCube()))));
+ return p_149742_1_.isSideSolid(p_149742_2_ - 1, p_149742_3_, p_149742_4_, EAST ) ||
+ p_149742_1_.isSideSolid(p_149742_2_ + 1, p_149742_3_, p_149742_4_, WEST ) ||
+ p_149742_1_.isSideSolid(p_149742_2_, p_149742_3_, p_149742_4_ - 1, SOUTH) ||
@ -35,93 +36,93 @@
+ p_149742_1_.isSideSolid(p_149742_2_, p_149742_3_ + 1, p_149742_4_, DOWN );
}
public int func_149660_a(World p_149660_1_, int p_149660_2_, int p_149660_3_, int p_149660_4_, int p_149660_5_, float p_149660_6_, float p_149660_7_, float p_149660_8_, int p_149660_9_)
@@ -56,32 +70,32 @@
// JAVADOC METHOD $$ func_149660_a
@@ -63,32 +77,32 @@
int j1 = p_149660_9_ & 7;
byte b0 = -1;
- if (p_149660_5_ == 0 && p_149660_1_.func_147439_a(p_149660_2_, p_149660_3_ + 1, p_149660_4_).func_149721_r())
- if (p_149660_5_ == 0 && p_149660_1_.getBlock(p_149660_2_, p_149660_3_ + 1, p_149660_4_).isNormalCube())
+ if (p_149660_5_ == 0 && p_149660_1_.isSideSolid(p_149660_2_, p_149660_3_ + 1, p_149660_4_, DOWN))
{
b0 = 0;
}
- if (p_149660_5_ == 1 && World.func_147466_a(p_149660_1_, p_149660_2_, p_149660_3_ - 1, p_149660_4_))
- if (p_149660_5_ == 1 && World.doesBlockHaveSolidTopSurface(p_149660_1_, p_149660_2_, p_149660_3_ - 1, p_149660_4_))
+ if (p_149660_5_ == 1 && p_149660_1_.isSideSolid(p_149660_2_, p_149660_3_ - 1, p_149660_4_, UP))
{
b0 = 5;
}
- if (p_149660_5_ == 2 && p_149660_1_.func_147439_a(p_149660_2_, p_149660_3_, p_149660_4_ + 1).func_149721_r())
- if (p_149660_5_ == 2 && p_149660_1_.getBlock(p_149660_2_, p_149660_3_, p_149660_4_ + 1).isNormalCube())
+ if (p_149660_5_ == 2 && p_149660_1_.isSideSolid(p_149660_2_, p_149660_3_, p_149660_4_ + 1, NORTH))
{
b0 = 4;
}
- if (p_149660_5_ == 3 && p_149660_1_.func_147439_a(p_149660_2_, p_149660_3_, p_149660_4_ - 1).func_149721_r())
- if (p_149660_5_ == 3 && p_149660_1_.getBlock(p_149660_2_, p_149660_3_, p_149660_4_ - 1).isNormalCube())
+ if (p_149660_5_ == 3 && p_149660_1_.isSideSolid(p_149660_2_, p_149660_3_, p_149660_4_ - 1, SOUTH))
{
b0 = 3;
}
- if (p_149660_5_ == 4 && p_149660_1_.func_147439_a(p_149660_2_ + 1, p_149660_3_, p_149660_4_).func_149721_r())
- if (p_149660_5_ == 4 && p_149660_1_.getBlock(p_149660_2_ + 1, p_149660_3_, p_149660_4_).isNormalCube())
+ if (p_149660_5_ == 4 && p_149660_1_.isSideSolid(p_149660_2_ + 1, p_149660_3_, p_149660_4_, WEST))
{
b0 = 2;
}
- if (p_149660_5_ == 5 && p_149660_1_.func_147439_a(p_149660_2_ - 1, p_149660_3_, p_149660_4_).func_149721_r())
- if (p_149660_5_ == 5 && p_149660_1_.getBlock(p_149660_2_ - 1, p_149660_3_, p_149660_4_).isNormalCube())
+ if (p_149660_5_ == 5 && p_149660_1_.isSideSolid(p_149660_2_ - 1, p_149660_3_, p_149660_4_, EAST))
{
b0 = 1;
}
@@ -147,42 +161,42 @@
@@ -156,42 +170,42 @@
int l = p_149695_1_.getBlockMetadata(p_149695_2_, p_149695_3_, p_149695_4_) & 7;
boolean flag = false;
- if (!p_149695_1_.func_147439_a(p_149695_2_ - 1, p_149695_3_, p_149695_4_).func_149721_r() && l == 1)
- if (!p_149695_1_.getBlock(p_149695_2_ - 1, p_149695_3_, p_149695_4_).isNormalCube() && l == 1)
+ if (!p_149695_1_.isSideSolid(p_149695_2_ - 1, p_149695_3_, p_149695_4_, EAST) && l == 1)
{
flag = true;
}
- if (!p_149695_1_.func_147439_a(p_149695_2_ + 1, p_149695_3_, p_149695_4_).func_149721_r() && l == 2)
- if (!p_149695_1_.getBlock(p_149695_2_ + 1, p_149695_3_, p_149695_4_).isNormalCube() && l == 2)
+ if (!p_149695_1_.isSideSolid(p_149695_2_ + 1, p_149695_3_, p_149695_4_, WEST) && l == 2)
{
flag = true;
}
- if (!p_149695_1_.func_147439_a(p_149695_2_, p_149695_3_, p_149695_4_ - 1).func_149721_r() && l == 3)
- if (!p_149695_1_.getBlock(p_149695_2_, p_149695_3_, p_149695_4_ - 1).isNormalCube() && l == 3)
+ if (!p_149695_1_.isSideSolid(p_149695_2_, p_149695_3_, p_149695_4_ - 1, SOUTH) && l == 3)
{
flag = true;
}
- if (!p_149695_1_.func_147439_a(p_149695_2_, p_149695_3_, p_149695_4_ + 1).func_149721_r() && l == 4)
- if (!p_149695_1_.getBlock(p_149695_2_, p_149695_3_, p_149695_4_ + 1).isNormalCube() && l == 4)
+ if (!p_149695_1_.isSideSolid(p_149695_2_, p_149695_3_, p_149695_4_ + 1, NORTH) && l == 4)
{
flag = true;
}
- if (!World.func_147466_a(p_149695_1_, p_149695_2_, p_149695_3_ - 1, p_149695_4_) && l == 5)
- if (!World.doesBlockHaveSolidTopSurface(p_149695_1_, p_149695_2_, p_149695_3_ - 1, p_149695_4_) && l == 5)
+ if (!p_149695_1_.isSideSolid(p_149695_2_, p_149695_3_ - 1, p_149695_4_, UP) && l == 5)
{
flag = true;
}
- if (!World.func_147466_a(p_149695_1_, p_149695_2_, p_149695_3_ - 1, p_149695_4_) && l == 6)
- if (!World.doesBlockHaveSolidTopSurface(p_149695_1_, p_149695_2_, p_149695_3_ - 1, p_149695_4_) && l == 6)
+ if (!p_149695_1_.isSideSolid(p_149695_2_, p_149695_3_ - 1, p_149695_4_, UP) && l == 6)
{
flag = true;
}
- if (!p_149695_1_.func_147439_a(p_149695_2_, p_149695_3_ + 1, p_149695_4_).func_149721_r() && l == 0)
- if (!p_149695_1_.getBlock(p_149695_2_, p_149695_3_ + 1, p_149695_4_).isNormalCube() && l == 0)
+ if (!p_149695_1_.isSideSolid(p_149695_2_, p_149695_3_ + 1, p_149695_4_, DOWN) && l == 0)
{
flag = true;
}
- if (!p_149695_1_.func_147439_a(p_149695_2_, p_149695_3_ + 1, p_149695_4_).func_149721_r() && l == 7)
- if (!p_149695_1_.getBlock(p_149695_2_, p_149695_3_ + 1, p_149695_4_).isNormalCube() && l == 7)
+ if (!p_149695_1_.isSideSolid(p_149695_2_, p_149695_3_ + 1, p_149695_4_, DOWN) && l == 7)
{
flag = true;

View File

@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockLiquid.java
+++ ../src-work/minecraft/net/minecraft/block/BlockLiquid.java
@@ -67,7 +67,7 @@
@@ -69,7 +69,7 @@
{
for (int l1 = -1; l1 <= 1; ++l1)
{

View File

@ -8,12 +8,12 @@
import net.minecraft.world.World;
public abstract class BlockLog extends BlockRotatedPillar
@@ -53,14 +54,10 @@
@@ -54,14 +55,10 @@
{
for (int l1 = -b0; l1 <= b0; ++l1)
{
- if (p_149749_1_.func_147439_a(p_149749_2_ + j1, p_149749_3_ + k1, p_149749_4_ + l1).func_149688_o() == Material.field_151584_j)
+ Block block = p_149749_1_.func_147439_a(p_149749_2_ + j1, p_149749_3_ + k1, p_149749_4_ + l1);
- if (p_149749_1_.getBlock(p_149749_2_ + j1, p_149749_3_ + k1, p_149749_4_ + l1).getMaterial() == Material.leaves)
+ Block block = p_149749_1_.getBlock(p_149749_2_ + j1, p_149749_3_ + k1, p_149749_4_ + l1);
+ if (block.isLeaves(p_149749_1_, p_149749_2_ + j1, p_149749_3_ + k1, p_149749_4_ + l1))
{
- int i2 = p_149749_1_.getBlockMetadata(p_149749_2_ + j1, p_149749_3_ + k1, p_149749_4_ + l1);
@ -26,7 +26,7 @@
}
}
}
@@ -79,4 +76,16 @@
@@ -80,4 +77,16 @@
{
return this.field_150166_b[p_150161_1_ % this.field_150166_b.length];
}

View File

@ -8,12 +8,12 @@
import net.minecraft.world.World;
public class BlockMobSpawner extends BlockContainer
@@ -36,10 +37,15 @@
public void func_149690_a(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_)
@@ -39,10 +40,15 @@
public void dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_)
{
super.func_149690_a(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, p_149690_7_);
super.dropBlockAsItemWithChance(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, p_149690_7_);
- int j1 = 15 + p_149690_1_.rand.nextInt(15) + p_149690_1_.rand.nextInt(15);
- this.func_149657_c(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, j1);
- this.dropXpOnBlockBreak(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, j1);
}
+ private Random rand = new Random();
@ -23,6 +23,6 @@
+ return 15 + rand.nextInt(15) + rand.nextInt(15);
+ }
+
public boolean func_149662_c()
// JAVADOC METHOD $$ func_149662_c
public boolean isOpaqueCube()
{
return false;

View File

@ -8,11 +8,11 @@
public class BlockMushroom extends BlockBush implements IGrowable
{
@@ -85,7 +86,7 @@
@@ -89,7 +90,7 @@
if (p_149718_3_ >= 0 && p_149718_3_ < 256)
{
Block block = p_149718_1_.func_147439_a(p_149718_2_, p_149718_3_ - 1, p_149718_4_);
- return block == Blocks.mycelium || block == Blocks.dirt && p_149718_1_.getBlockMetadata(p_149718_2_, p_149718_3_ - 1, p_149718_4_) == 2 || p_149718_1_.getFullBlockLightValue(p_149718_2_, p_149718_3_, p_149718_4_) < 13 && this.func_149854_a(block);
Block block = p_149718_1_.getBlock(p_149718_2_, p_149718_3_ - 1, p_149718_4_);
- return block == Blocks.mycelium || block == Blocks.dirt && p_149718_1_.getBlockMetadata(p_149718_2_, p_149718_3_ - 1, p_149718_4_) == 2 || p_149718_1_.getFullBlockLightValue(p_149718_2_, p_149718_3_, p_149718_4_) < 13 && this.canPlaceBlockOn(block);
+ return block == Blocks.mycelium || block == Blocks.dirt && p_149718_1_.getBlockMetadata(p_149718_2_, p_149718_3_ - 1, p_149718_4_) == 2 || p_149718_1_.getFullBlockLightValue(p_149718_2_, p_149718_3_, p_149718_4_) < 13 && block.canSustainPlant(p_149718_1_, p_149718_2_, p_149718_3_ - 1, p_149718_4_, ForgeDirection.UP, this);
}
else

View File

@ -1,20 +1,20 @@
--- ../src-base/minecraft/net/minecraft/block/BlockMycelium.java
+++ ../src-work/minecraft/net/minecraft/block/BlockMycelium.java
@@ -37,7 +37,7 @@
@@ -39,7 +39,7 @@
{
if (!p_149674_1_.isRemote)
{
- if (p_149674_1_.getBlockLightValue(p_149674_2_, p_149674_3_ + 1, p_149674_4_) < 4 && p_149674_1_.func_147439_a(p_149674_2_, p_149674_3_ + 1, p_149674_4_).func_149717_k() > 2)
- if (p_149674_1_.getBlockLightValue(p_149674_2_, p_149674_3_ + 1, p_149674_4_) < 4 && p_149674_1_.getBlock(p_149674_2_, p_149674_3_ + 1, p_149674_4_).getLightOpacity() > 2)
+ if (p_149674_1_.getBlockLightValue(p_149674_2_, p_149674_3_ + 1, p_149674_4_) < 4 && p_149674_1_.getBlockLightOpacity(p_149674_2_, p_149674_3_ + 1, p_149674_4_) > 2)
{
p_149674_1_.func_147449_b(p_149674_2_, p_149674_3_, p_149674_4_, Blocks.dirt);
p_149674_1_.setBlock(p_149674_2_, p_149674_3_, p_149674_4_, Blocks.dirt);
}
@@ -50,7 +50,7 @@
@@ -52,7 +52,7 @@
int k1 = p_149674_4_ + p_149674_5_.nextInt(3) - 1;
Block block = p_149674_1_.func_147439_a(i1, j1 + 1, k1);
Block block = p_149674_1_.getBlock(i1, j1 + 1, k1);
- if (p_149674_1_.func_147439_a(i1, j1, k1) == Blocks.dirt && p_149674_1_.getBlockMetadata(i1, j1, k1) == 0 && p_149674_1_.getBlockLightValue(i1, j1 + 1, k1) >= 4 && block.func_149717_k() <= 2)
+ if (p_149674_1_.func_147439_a(i1, j1, k1) == Blocks.dirt && p_149674_1_.getBlockMetadata(i1, j1, k1) == 0 && p_149674_1_.getBlockLightValue(i1, j1 + 1, k1) >= 4 && p_149674_1_.getBlockLightOpacity(i1, j1 + 1, k1) <= 2)
- if (p_149674_1_.getBlock(i1, j1, k1) == Blocks.dirt && p_149674_1_.getBlockMetadata(i1, j1, k1) == 0 && p_149674_1_.getBlockLightValue(i1, j1 + 1, k1) >= 4 && block.getLightOpacity() <= 2)
+ if (p_149674_1_.getBlock(i1, j1, k1) == Blocks.dirt && p_149674_1_.getBlockMetadata(i1, j1, k1) == 0 && p_149674_1_.getBlockLightValue(i1, j1 + 1, k1) >= 4 && p_149674_1_.getBlockLightOpacity(i1, j1 + 1, k1) <= 2)
{
p_149674_1_.func_147449_b(i1, j1, k1, this);
p_149674_1_.setBlock(i1, j1, k1, this);
}

View File

@ -16,34 +16,34 @@
public class BlockNetherWart extends BlockBush
{
@@ -33,7 +35,7 @@
public boolean func_149718_j(World p_149718_1_, int p_149718_2_, int p_149718_3_, int p_149718_4_)
@@ -35,7 +37,7 @@
// JAVADOC METHOD $$ func_149718_j
public boolean canBlockStay(World p_149718_1_, int p_149718_2_, int p_149718_3_, int p_149718_4_)
{
- return this.func_149854_a(p_149718_1_.func_147439_a(p_149718_2_, p_149718_3_ - 1, p_149718_4_));
+ return super.func_149718_j(p_149718_1_, p_149718_2_, p_149718_3_, p_149718_4_);
- return this.canPlaceBlockOn(p_149718_1_.getBlock(p_149718_2_, p_149718_3_ - 1, p_149718_4_));
+ return super.canBlockStay(p_149718_1_, p_149718_2_, p_149718_3_, p_149718_4_);
}
public void func_149674_a(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_)
@@ -62,6 +64,8 @@
public void func_149690_a(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_)
// JAVADOC METHOD $$ func_149674_a
@@ -68,6 +70,8 @@
// JAVADOC METHOD $$ func_149690_a
public void dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_)
{
+ super.func_149690_a(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, p_149690_7_);
+ super.dropBlockAsItemWithChance(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, p_149690_7_);
+ /*
if (!p_149690_1_.isRemote)
{
int j1 = 1;
@@ -81,6 +85,7 @@
this.func_149642_a(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, new ItemStack(Items.nether_wart));
@@ -87,6 +91,7 @@
this.dropBlockAsItem(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, new ItemStack(Items.nether_wart));
}
}
+ */
}
public Item func_149650_a(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
@@ -109,4 +114,23 @@
this.field_149883_a[i] = p_149651_1_.registerIcon(this.func_149641_N() + "_stage_" + i);
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
@@ -117,4 +122,23 @@
this.field_149883_a[i] = p_149651_1_.registerIcon(this.getTextureName() + "_stage_" + i);
}
}
+

View File

@ -8,18 +8,18 @@
import net.minecraft.world.World;
public class BlockOre extends Block
@@ -51,34 +52,40 @@
public void func_149690_a(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_)
@@ -54,34 +55,40 @@
public void dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_)
{
super.func_149690_a(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, p_149690_7_);
super.dropBlockAsItemWithChance(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, p_149690_7_);
+ }
- if (this.func_149650_a(p_149690_5_, p_149690_1_.rand, p_149690_7_) != Item.func_150898_a(this))
- if (this.getItemDropped(p_149690_5_, p_149690_1_.rand, p_149690_7_) != Item.getItemFromBlock(this))
+ private Random rand = new Random();
+ @Override
+ public int getExpDrop(IBlockAccess p_149690_1_, int p_149690_5_, int p_149690_7_)
+ {
+ if (this.func_149650_a(p_149690_5_, rand, p_149690_7_) != Item.func_150898_a(this))
+ if (this.getItemDropped(p_149690_5_, rand, p_149690_7_) != Item.getItemFromBlock(this))
{
int j1 = 0;
@ -49,10 +49,10 @@
+ j1 = MathHelper.getRandomIntegerInRange(rand, 2, 5);
}
- this.func_149657_c(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, j1);
- this.dropXpOnBlockBreak(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, j1);
+ return j1;
}
+ return 0;
}
public int func_149692_a(int p_149692_1_)
// JAVADOC METHOD $$ func_149692_a

View File

@ -9,14 +9,14 @@
public class BlockPane extends Block
{
@@ -62,10 +64,10 @@
public void func_149743_a(World p_149743_1_, int p_149743_2_, int p_149743_3_, int p_149743_4_, AxisAlignedBB p_149743_5_, List p_149743_6_, Entity p_149743_7_)
@@ -67,10 +69,10 @@
// JAVADOC METHOD $$ func_149743_a
public void addCollisionBoxesToList(World p_149743_1_, int p_149743_2_, int p_149743_3_, int p_149743_4_, AxisAlignedBB p_149743_5_, List p_149743_6_, Entity p_149743_7_)
{
- boolean flag = this.func_150098_a(p_149743_1_.func_147439_a(p_149743_2_, p_149743_3_, p_149743_4_ - 1));
- boolean flag1 = this.func_150098_a(p_149743_1_.func_147439_a(p_149743_2_, p_149743_3_, p_149743_4_ + 1));
- boolean flag2 = this.func_150098_a(p_149743_1_.func_147439_a(p_149743_2_ - 1, p_149743_3_, p_149743_4_));
- boolean flag3 = this.func_150098_a(p_149743_1_.func_147439_a(p_149743_2_ + 1, p_149743_3_, p_149743_4_));
- boolean flag = this.canPaneConnectToBlock(p_149743_1_.getBlock(p_149743_2_, p_149743_3_, p_149743_4_ - 1));
- boolean flag1 = this.canPaneConnectToBlock(p_149743_1_.getBlock(p_149743_2_, p_149743_3_, p_149743_4_ + 1));
- boolean flag2 = this.canPaneConnectToBlock(p_149743_1_.getBlock(p_149743_2_ - 1, p_149743_3_, p_149743_4_));
- boolean flag3 = this.canPaneConnectToBlock(p_149743_1_.getBlock(p_149743_2_ + 1, p_149743_3_, p_149743_4_));
+ boolean flag = this.canPaneConnectTo(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_ - 1, NORTH);
+ boolean flag1 = this.canPaneConnectTo(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_ + 1, SOUTH);
+ boolean flag2 = this.canPaneConnectTo(p_149743_1_, p_149743_2_ - 1, p_149743_3_, p_149743_4_, WEST );
@ -24,14 +24,14 @@
if ((!flag2 || !flag3) && (flag2 || flag3 || flag || flag1))
{
@@ -117,10 +119,10 @@
@@ -124,10 +126,10 @@
float f1 = 0.5625F;
float f2 = 0.4375F;
float f3 = 0.5625F;
- boolean flag = this.func_150098_a(p_149719_1_.func_147439_a(p_149719_2_, p_149719_3_, p_149719_4_ - 1));
- boolean flag1 = this.func_150098_a(p_149719_1_.func_147439_a(p_149719_2_, p_149719_3_, p_149719_4_ + 1));
- boolean flag2 = this.func_150098_a(p_149719_1_.func_147439_a(p_149719_2_ - 1, p_149719_3_, p_149719_4_));
- boolean flag3 = this.func_150098_a(p_149719_1_.func_147439_a(p_149719_2_ + 1, p_149719_3_, p_149719_4_));
- boolean flag = this.canPaneConnectToBlock(p_149719_1_.getBlock(p_149719_2_, p_149719_3_, p_149719_4_ - 1));
- boolean flag1 = this.canPaneConnectToBlock(p_149719_1_.getBlock(p_149719_2_, p_149719_3_, p_149719_4_ + 1));
- boolean flag2 = this.canPaneConnectToBlock(p_149719_1_.getBlock(p_149719_2_ - 1, p_149719_3_, p_149719_4_));
- boolean flag3 = this.canPaneConnectToBlock(p_149719_1_.getBlock(p_149719_2_ + 1, p_149719_3_, p_149719_4_));
+ boolean flag = this.canPaneConnectTo(p_149719_1_, p_149719_2_, p_149719_3_, p_149719_4_ - 1, NORTH);
+ boolean flag1 = this.canPaneConnectTo(p_149719_1_, p_149719_2_, p_149719_3_, p_149719_4_ + 1, SOUTH);
+ boolean flag2 = this.canPaneConnectTo(p_149719_1_, p_149719_2_ - 1, p_149719_3_, p_149719_4_, WEST );
@ -39,14 +39,14 @@
if ((!flag2 || !flag3) && (flag2 || flag3 || flag || flag1))
{
@@ -186,4 +188,10 @@
this.field_149761_L = p_149651_1_.registerIcon(this.field_150101_M);
@@ -195,4 +197,10 @@
this.blockIcon = p_149651_1_.registerIcon(this.field_150101_M);
this.field_150102_N = p_149651_1_.registerIcon(this.field_150100_a);
}
+
+ public boolean canPaneConnectTo(IBlockAccess world, int x, int y, int z, ForgeDirection dir)
+ {
+ return func_150098_a(world.func_147439_a(x, y, z)) ||
+ return canPaneConnectToBlock(world.getBlock(x, y, z)) ||
+ world.isSideSolid(x, y, z, dir.getOpposite(), false);
+ }
}

View File

@ -8,17 +8,17 @@
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityPiston;
import net.minecraft.util.AxisAlignedBB;
@@ -360,7 +361,8 @@
@@ -380,7 +381,8 @@
return false;
}
- return !(p_150080_0_ instanceof ITileEntityProvider);
+ return !(p_150080_1_.func_147439_a(p_150080_2_, p_150080_3_, p_150080_4_).hasTileEntity(p_150080_1_.getBlockMetadata(p_150080_2_, p_150080_3_, p_150080_4_)));
+ return !(p_150080_1_.getBlock(p_150080_2_, p_150080_3_, p_150080_4_).hasTileEntity(p_150080_1_.getBlockMetadata(p_150080_2_, p_150080_3_, p_150080_4_)));
+
}
}
@@ -375,14 +377,14 @@
@@ -396,14 +398,14 @@
{
if (l1 < 13)
{
@ -28,14 +28,14 @@
return false;
}
Block block = p_150077_0_.func_147439_a(i1, j1, k1);
Block block = p_150077_0_.getBlock(i1, j1, k1);
- if (block.func_149688_o() != Material.field_151579_a)
- if (block.getMaterial() != Material.air)
+ if (!block.isAir(p_150077_0_, i1, j1, k1))
{
if (!func_150080_a(block, p_150077_0_, i1, j1, k1, true))
if (!canPushBlock(block, p_150077_0_, i1, j1, k1, true))
{
@@ -420,14 +422,14 @@
@@ -442,14 +444,14 @@
{
if (l1 < 13)
{
@ -45,21 +45,21 @@
return false;
}
Block block = p_150079_1_.func_147439_a(i1, j1, k1);
Block block = p_150079_1_.getBlock(i1, j1, k1);
- if (block.func_149688_o() != Material.field_151579_a)
- if (block.getMaterial() != Material.air)
+ if (!block.isAir(p_150079_1_, i1, j1, k1))
{
if (!func_150080_a(block, p_150079_1_, i1, j1, k1, true))
if (!canPushBlock(block, p_150079_1_, i1, j1, k1, true))
{
@@ -448,7 +450,9 @@
@@ -470,7 +472,9 @@
continue;
}
- block.func_149697_b(p_150079_1_, i1, j1, k1, p_150079_1_.getBlockMetadata(i1, j1, k1), 0);
- block.dropBlockAsItem(p_150079_1_, i1, j1, k1, p_150079_1_.getBlockMetadata(i1, j1, k1), 0);
+ //With our change to how snowballs are dropped this needs to disallow to mimic vanilla behavior.
+ float chance = block instanceof BlockSnow ? -1.0f : 1.0f;
+ block.func_149690_a(p_150079_1_, i1, j1, k1, p_150079_1_.getBlockMetadata(i1, j1, k1), chance, 0);
p_150079_1_.func_147468_f(i1, j1, k1);
+ block.dropBlockAsItemWithChance(p_150079_1_, i1, j1, k1, p_150079_1_.getBlockMetadata(i1, j1, k1), chance, 0);
p_150079_1_.setBlockToAir(i1, j1, k1);
}
}

View File

@ -1,11 +1,11 @@
--- ../src-base/minecraft/net/minecraft/block/BlockPumpkin.java
+++ ../src-work/minecraft/net/minecraft/block/BlockPumpkin.java
@@ -113,7 +113,7 @@
public boolean func_149742_c(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
@@ -116,7 +116,7 @@
// JAVADOC METHOD $$ func_149742_c
public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
{
- return p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_, p_149742_4_).field_149764_J.isReplaceable() && World.func_147466_a(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_);
+ return p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_, p_149742_4_).isReplaceable(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_) && World.func_147466_a(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_);
- return p_149742_1_.getBlock(p_149742_2_, p_149742_3_, p_149742_4_).blockMaterial.isReplaceable() && World.doesBlockHaveSolidTopSurface(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_);
+ return p_149742_1_.getBlock(p_149742_2_, p_149742_3_, p_149742_4_).isReplaceable(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_) && World.doesBlockHaveSolidTopSurface(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_);
}
public void func_149689_a(World p_149689_1_, int p_149689_2_, int p_149689_3_, int p_149689_4_, EntityLivingBase p_149689_5_, ItemStack p_149689_6_)
// JAVADOC METHOD $$ func_149689_a

View File

@ -17,16 +17,16 @@
}
protected BlockRailBase(boolean p_i45389_1_)
@@ -78,7 +79,7 @@
public int func_149645_b()
@@ -85,7 +86,7 @@
// JAVADOC METHOD $$ func_149645_b
public int getRenderType()
{
- return 9;
+ return renderType;
}
public int func_149745_a(Random p_149745_1_)
@@ -193,6 +194,111 @@
// JAVADOC METHOD $$ func_149745_a
@@ -205,6 +206,111 @@
}
}
@ -42,7 +42,7 @@
+ */
+ public boolean isFlexibleRail(IBlockAccess world, int y, int x, int z)
+ {
+ return func_150050_e();
+ return isPowered();
+ }
+
+ /**
@ -87,7 +87,7 @@
+ public int getBasicRailMetadata(IBlockAccess world, EntityMinecart cart, int x, int y, int z)
+ {
+ int meta = world.getBlockMetadata(x, y, z);
+ if(func_150050_e())
+ if(isPowered())
+ {
+ meta = meta & 7;
+ }
@ -138,7 +138,7 @@
public class Rail
{
private World field_150660_b;
@@ -202,6 +308,7 @@
@@ -214,6 +320,7 @@
private final boolean field_150656_f;
private List field_150657_g = new ArrayList();
private static final String __OBFID = "CL_00000196";
@ -146,11 +146,11 @@
public Rail(World p_i45388_2_, int p_i45388_3_, int p_i45388_4_, int p_i45388_5_)
{
@@ -209,19 +316,10 @@
@@ -221,19 +328,10 @@
this.field_150661_c = p_i45388_3_;
this.field_150658_d = p_i45388_4_;
this.field_150659_e = p_i45388_5_;
- Block block = p_i45388_2_.func_147439_a(p_i45388_3_, p_i45388_4_, p_i45388_5_);
- Block block = p_i45388_2_.getBlock(p_i45388_3_, p_i45388_4_, p_i45388_5_);
- int l = p_i45388_2_.getBlockMetadata(p_i45388_3_, p_i45388_4_, p_i45388_5_);
-
- if (((BlockRailBase)block).field_150053_a)
@ -163,14 +163,14 @@
- this.field_150656_f = false;
- }
-
+ BlockRailBase block = (BlockRailBase)p_i45388_2_.func_147439_a(p_i45388_3_, p_i45388_4_, p_i45388_5_);
+ BlockRailBase block = (BlockRailBase)p_i45388_2_.getBlock(p_i45388_3_, p_i45388_4_, p_i45388_5_);
+ int l = block.getBasicRailMetadata(p_i45388_2_, null, p_i45388_3_, p_i45388_4_, p_i45388_5_);
+ this.field_150656_f = block.isFlexibleRail(p_i45388_2_, p_i45388_3_, p_i45388_4_, p_i45388_5_);
+ canMakeSlopes = block.canMakeSlopes(p_i45388_2_, p_i45388_3_, p_i45388_4_, p_i45388_5_);
this.func_150648_a(l);
}
@@ -412,7 +510,7 @@
@@ -424,7 +522,7 @@
}
}
@ -179,7 +179,7 @@
{
if (BlockRailBase.func_150049_b_(this.field_150660_b, this.field_150661_c, this.field_150658_d + 1, this.field_150659_e - 1))
{
@@ -425,7 +523,7 @@
@@ -437,7 +535,7 @@
}
}
@ -188,7 +188,7 @@
{
if (BlockRailBase.func_150049_b_(this.field_150660_b, this.field_150661_c + 1, this.field_150658_d + 1, this.field_150659_e))
{
@@ -570,7 +668,7 @@
@@ -582,7 +680,7 @@
}
}
@ -197,7 +197,7 @@
{
if (BlockRailBase.func_150049_b_(this.field_150660_b, this.field_150661_c, this.field_150658_d + 1, this.field_150659_e - 1))
{
@@ -583,7 +681,7 @@
@@ -595,7 +693,7 @@
}
}

View File

@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockRedstoneComparator.java
+++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneComparator.java
@@ -228,4 +228,19 @@
@@ -237,4 +237,19 @@
{
return new TileEntityComparator();
}
@ -10,7 +10,7 @@
+ {
+ if (y == tileY && world instanceof World)
+ {
+ func_149695_a((World)world, x, y, z, world.func_147439_a(tileX, tileY, tileZ));
+ onNeighborBlockChange((World)world, x, y, z, world.getBlock(tileX, tileY, tileZ));
+ }
+ }
+

View File

@ -8,24 +8,24 @@
import net.minecraft.world.World;
public class BlockRedstoneOre extends Block
@@ -88,12 +89,17 @@
public void func_149690_a(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_)
@@ -96,12 +97,17 @@
public void dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_)
{
super.func_149690_a(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, p_149690_7_);
super.dropBlockAsItemWithChance(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, p_149690_7_);
+ }
- if (this.func_149650_a(p_149690_5_, p_149690_1_.rand, p_149690_7_) != Item.func_150898_a(this))
- if (this.getItemDropped(p_149690_5_, p_149690_1_.rand, p_149690_7_) != Item.getItemFromBlock(this))
+ private Random rand = new Random();
+ @Override // World, meta, fortune
+ public int getExpDrop(IBlockAccess p_149690_1_, int p_149690_5_, int p_149690_7_)
+ {
+ if (this.func_149650_a(p_149690_5_, rand, p_149690_7_) != Item.func_150898_a(this))
+ if (this.getItemDropped(p_149690_5_, rand, p_149690_7_) != Item.getItemFromBlock(this))
{
- int j1 = 1 + p_149690_1_.rand.nextInt(5);
- this.func_149657_c(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, j1);
- this.dropXpOnBlockBreak(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, j1);
+ return 1 + rand.nextInt(5);
}
+ return 0;
}
@SideOnly(Side.CLIENT)
// JAVADOC METHOD $$ func_149734_b

View File

@ -1,10 +1,10 @@
--- ../src-base/minecraft/net/minecraft/block/BlockRedstoneWire.java
+++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneWire.java
@@ -405,7 +405,7 @@
@@ -415,7 +415,7 @@
}
else if (!Blocks.unpowered_repeater.func_149907_e(block))
{
- return block.func_149744_f() && p_150174_4_ != -1;
- return block.canProvidePower() && p_150174_4_ != -1;
+ return block.canConnectRedstone(p_150174_0_, p_150174_1_, p_150174_2_, p_150174_3_, p_150174_4_);
}
else

View File

@ -13,18 +13,18 @@
{
private static final String __OBFID = "CL_00000300";
@@ -57,7 +61,7 @@
public boolean func_149742_c(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
@@ -59,7 +63,7 @@
public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
{
Block block = p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_ - 1, p_149742_4_);
- return block == this ? true : (block != Blocks.grass && block != Blocks.dirt && block != Blocks.sand ? false : (p_149742_1_.func_147439_a(p_149742_2_ - 1, p_149742_3_ - 1, p_149742_4_).func_149688_o() == Material.field_151586_h ? true : (p_149742_1_.func_147439_a(p_149742_2_ + 1, p_149742_3_ - 1, p_149742_4_).func_149688_o() == Material.field_151586_h ? true : (p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_ - 1, p_149742_4_ - 1).func_149688_o() == Material.field_151586_h ? true : p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_ - 1, p_149742_4_ + 1).func_149688_o() == Material.field_151586_h))));
Block block = p_149742_1_.getBlock(p_149742_2_, p_149742_3_ - 1, p_149742_4_);
- return block == this ? true : (block != Blocks.grass && block != Blocks.dirt && block != Blocks.sand ? false : (p_149742_1_.getBlock(p_149742_2_ - 1, p_149742_3_ - 1, p_149742_4_).getMaterial() == Material.water ? true : (p_149742_1_.getBlock(p_149742_2_ + 1, p_149742_3_ - 1, p_149742_4_).getMaterial() == Material.water ? true : (p_149742_1_.getBlock(p_149742_2_, p_149742_3_ - 1, p_149742_4_ - 1).getMaterial() == Material.water ? true : p_149742_1_.getBlock(p_149742_2_, p_149742_3_ - 1, p_149742_4_ + 1).getMaterial() == Material.water))));
+ return block.canSustainPlant(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_, ForgeDirection.UP, this);
}
public void func_149695_a(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_)
@@ -120,4 +124,22 @@
// JAVADOC METHOD $$ func_149695_a
@@ -130,4 +134,22 @@
{
return p_149720_1_.getBiomeGenForCoords(p_149720_2_, p_149720_4_).func_150558_b(p_149720_2_, p_149720_3_, p_149720_4_);
return p_149720_1_.getBiomeGenForCoords(p_149720_2_, p_149720_4_).getBiomeGrassColor(p_149720_2_, p_149720_3_, p_149720_4_);
}
+
+ @Override

View File

@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockSapling.java
+++ ../src-work/minecraft/net/minecraft/block/BlockSapling.java
@@ -71,6 +71,7 @@
@@ -73,6 +73,7 @@
public void func_149878_d(World p_149878_1_, int p_149878_2_, int p_149878_3_, int p_149878_4_, Random p_149878_5_)
{

View File

@ -8,28 +8,29 @@
import java.util.Iterator;
import java.util.Random;
import net.minecraft.block.material.Material;
@@ -108,8 +109,6 @@
@@ -118,9 +119,6 @@
return p_149692_1_;
}
- public void func_149690_a(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_) {}
- // JAVADOC METHOD $$ func_149690_a
- public void dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_) {}
-
public void func_149681_a(World p_149681_1_, int p_149681_2_, int p_149681_3_, int p_149681_4_, int p_149681_5_, EntityPlayer p_149681_6_)
// JAVADOC METHOD $$ func_149681_a
public void onBlockHarvested(World p_149681_1_, int p_149681_2_, int p_149681_3_, int p_149681_4_, int p_149681_5_, EntityPlayer p_149681_6_)
{
if (p_149681_6_.capabilities.isCreativeMode)
@@ -118,29 +117,38 @@
@@ -130,29 +128,38 @@
p_149681_1_.setBlockMetadataWithNotify(p_149681_2_, p_149681_3_, p_149681_4_, p_149681_5_, 4);
}
+ this.func_149697_b(p_149681_1_, p_149681_2_, p_149681_3_, p_149681_4_, p_149681_5_, 0);
+ this.dropBlockAsItem(p_149681_1_, p_149681_2_, p_149681_3_, p_149681_4_, p_149681_5_, 0);
+
super.func_149681_a(p_149681_1_, p_149681_2_, p_149681_3_, p_149681_4_, p_149681_5_, p_149681_6_);
super.onBlockHarvested(p_149681_1_, p_149681_2_, p_149681_3_, p_149681_4_, p_149681_5_, p_149681_6_);
}
public void func_149749_a(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)
public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)
{
- if (!p_149749_1_.isRemote)
+ super.func_149749_a(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
+ super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
+ }
+
+ @Override
@ -39,8 +40,8 @@
{
if ((p_149749_6_ & 8) == 0)
{
ItemStack itemstack = new ItemStack(Items.skull, 1, this.func_149643_k(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_));
TileEntitySkull tileentityskull = (TileEntitySkull)p_149749_1_.func_147438_o(p_149749_2_, p_149749_3_, p_149749_4_);
ItemStack itemstack = new ItemStack(Items.skull, 1, this.getDamageValue(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_));
TileEntitySkull tileentityskull = (TileEntitySkull)p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
+ if (tileentityskull == null) return ret;
+
@ -50,13 +51,13 @@
itemstack.getTagCompound().setString("SkullOwner", tileentityskull.func_145907_c());
}
- this.func_149642_a(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, itemstack);
- this.dropBlockAsItem(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, itemstack);
+ ret.add(itemstack);
}
-
- super.func_149749_a(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
- super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
}
+ return ret;
}
public Item func_149650_a(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)

View File

@ -1,53 +1,54 @@
--- ../src-base/minecraft/net/minecraft/block/BlockSnow.java
+++ ../src-work/minecraft/net/minecraft/block/BlockSnow.java
@@ -73,7 +73,7 @@
public boolean func_149742_c(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
@@ -79,7 +79,7 @@
public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
{
Block block = p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_ - 1, p_149742_4_);
- return block != Blocks.ice && block != Blocks.packed_ice ? (block.func_149688_o() == Material.field_151584_j ? true : (block == this && (p_149742_1_.getBlockMetadata(p_149742_2_, p_149742_3_ - 1, p_149742_4_) & 7) == 7 ? true : block.func_149662_c() && block.field_149764_J.blocksMovement())) : false;
+ return block != Blocks.ice && block != Blocks.packed_ice ? (block.isLeaves(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_) ? true : (block == this && (p_149742_1_.getBlockMetadata(p_149742_2_, p_149742_3_ - 1, p_149742_4_) & 7) == 7 ? true : block.func_149662_c() && block.field_149764_J.blocksMovement())) : false;
Block block = p_149742_1_.getBlock(p_149742_2_, p_149742_3_ - 1, p_149742_4_);
- return block != Blocks.ice && block != Blocks.packed_ice ? (block.getMaterial() == Material.leaves ? true : (block == this && (p_149742_1_.getBlockMetadata(p_149742_2_, p_149742_3_ - 1, p_149742_4_) & 7) == 7 ? true : block.isOpaqueCube() && block.blockMaterial.blocksMovement())) : false;
+ return block != Blocks.ice && block != Blocks.packed_ice ? (block.isLeaves(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_) ? true : (block == this && (p_149742_1_.getBlockMetadata(p_149742_2_, p_149742_3_ - 1, p_149742_4_) & 7) == 7 ? true : block.isOpaqueCube() && block.blockMaterial.blocksMovement())) : false;
}
public void func_149695_a(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_)
@@ -85,7 +85,6 @@
// JAVADOC METHOD $$ func_149695_a
@@ -92,7 +92,6 @@
{
if (!this.func_149742_c(p_150155_1_, p_150155_2_, p_150155_3_, p_150155_4_))
if (!this.canPlaceBlockAt(p_150155_1_, p_150155_2_, p_150155_3_, p_150155_4_))
{
- this.func_149697_b(p_150155_1_, p_150155_2_, p_150155_3_, p_150155_4_, p_150155_1_.getBlockMetadata(p_150155_2_, p_150155_3_, p_150155_4_), 0);
p_150155_1_.func_147468_f(p_150155_2_, p_150155_3_, p_150155_4_);
- this.dropBlockAsItem(p_150155_1_, p_150155_2_, p_150155_3_, p_150155_4_, p_150155_1_.getBlockMetadata(p_150155_2_, p_150155_3_, p_150155_4_), 0);
p_150155_1_.setBlockToAir(p_150155_2_, p_150155_3_, p_150155_4_);
return false;
}
@@ -97,10 +96,8 @@
public void func_149636_a(World p_149636_1_, EntityPlayer p_149636_2_, int p_149636_3_, int p_149636_4_, int p_149636_5_, int p_149636_6_)
@@ -105,10 +104,8 @@
// JAVADOC METHOD $$ func_149636_a
public void harvestBlock(World p_149636_1_, EntityPlayer p_149636_2_, int p_149636_3_, int p_149636_4_, int p_149636_5_, int p_149636_6_)
{
- int i1 = p_149636_6_ & 7;
- this.func_149642_a(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, new ItemStack(Items.snowball, i1 + 1, 0));
+ super.func_149636_a(p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_);
p_149636_1_.func_147468_f(p_149636_3_, p_149636_4_, p_149636_5_);
- p_149636_2_.addStat(StatList.mineBlockStatArray[Block.func_149682_b(this)], 1);
- this.dropBlockAsItem(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, new ItemStack(Items.snowball, i1 + 1, 0));
+ super.harvestBlock(p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_);
p_149636_1_.setBlockToAir(p_149636_3_, p_149636_4_, p_149636_5_);
- p_149636_2_.addStat(StatList.mineBlockStatArray[Block.getIdFromBlock(this)], 1);
}
public Item func_149650_a(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
@@ -110,14 +107,13 @@
public int func_149745_a(Random p_149745_1_)
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
@@ -119,7 +116,7 @@
// JAVADOC METHOD $$ func_149745_a
public int quantityDropped(Random p_149745_1_)
{
- return 0;
+ return 1;
}
public void func_149674_a(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_)
// JAVADOC METHOD $$ func_149674_a
@@ -127,7 +124,6 @@
{
if (p_149674_1_.getSavedLightValue(EnumSkyBlock.Block, p_149674_2_, p_149674_3_, p_149674_4_) > 11)
{
- this.func_149697_b(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_, p_149674_1_.getBlockMetadata(p_149674_2_, p_149674_3_, p_149674_4_), 0);
p_149674_1_.func_147468_f(p_149674_2_, p_149674_3_, p_149674_4_);
- this.dropBlockAsItem(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_, p_149674_1_.getBlockMetadata(p_149674_2_, p_149674_3_, p_149674_4_), 0);
p_149674_1_.setBlockToAir(p_149674_2_, p_149674_3_, p_149674_4_);
}
}
@@ -127,4 +123,34 @@
@@ -138,4 +134,34 @@
{
return p_149646_5_ == 1 ? true : super.func_149646_a(p_149646_1_, p_149646_2_, p_149646_3_, p_149646_4_, p_149646_5_);
return p_149646_5_ == 1 ? true : super.shouldSideBeRendered(p_149646_1_, p_149646_2_, p_149646_3_, p_149646_4_, p_149646_5_);
}
+
+ /**
@ -77,6 +78,6 @@
+ public boolean isReplaceable(IBlockAccess world, int x, int y, int z)
+ {
+ int meta = world.getBlockMetadata(x, y, z);
+ return meta >= 7 ? false : field_149764_J.isReplaceable();
+ return meta >= 7 ? false : blockMaterial.isReplaceable();
+ }
}

View File

@ -16,17 +16,17 @@
public class BlockStem extends BlockBush implements IGrowable
{
@@ -101,7 +103,7 @@
@@ -103,7 +105,7 @@
Block block = p_149674_1_.func_147439_a(j1, p_149674_3_ - 1, k1);
Block block = p_149674_1_.getBlock(j1, p_149674_3_ - 1, k1);
- if (p_149674_1_.func_147439_a(j1, p_149674_3_, k1).field_149764_J == Material.field_151579_a && (block == Blocks.farmland || block == Blocks.dirt || block == Blocks.grass))
+ if (p_149674_1_.func_147437_c(j1, p_149674_3_, k1) && (block.canSustainPlant(p_149674_1_, j1, p_149674_3_ - 1, k1, UP, this) || block == Blocks.dirt || block == Blocks.grass))
- if (p_149674_1_.getBlock(j1, p_149674_3_, k1).blockMaterial == Material.air && (block == Blocks.farmland || block == Blocks.dirt || block == Blocks.grass))
+ if (p_149674_1_.isAirBlock(j1, p_149674_3_, k1) && (block.canSustainPlant(p_149674_1_, j1, p_149674_3_ - 1, k1, UP, this) || block == Blocks.dirt || block == Blocks.grass))
{
p_149674_1_.func_147449_b(j1, p_149674_3_, k1, this.field_149877_a);
p_149674_1_.setBlock(j1, p_149674_3_, k1, this.field_149877_a);
}
@@ -144,11 +146,11 @@
Block block8 = p_149875_1_.func_147439_a(l, p_149875_3_ - 1, i1);
@@ -146,11 +148,11 @@
Block block8 = p_149875_1_.getBlock(l, p_149875_3_ - 1, i1);
float f1 = 0.0F;
- if (block8 == Blocks.farmland)
@ -39,23 +39,23 @@
{
f1 = 3.0F;
}
@@ -215,6 +217,7 @@
@@ -224,6 +226,7 @@
{
super.func_149690_a(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, p_149690_7_);
super.dropBlockAsItemWithChance(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, p_149690_7_);
+ /*
if (!p_149690_1_.isRemote)
{
Item item = null;
@@ -237,6 +240,7 @@
@@ -246,6 +249,7 @@
}
}
}
+ */
}
public Item func_149650_a(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
@@ -282,4 +286,22 @@
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
@@ -293,4 +297,22 @@
{
this.func_149874_m(p_149853_1_, p_149853_3_, p_149853_4_, p_149853_5_);
}

View File

@ -20,30 +20,30 @@
{
private static final String[] field_149871_a = new String[] {"deadbush", "tallgrass", "fern"};
@SideOnly(Side.CLIENT)
@@ -71,7 +74,7 @@
@@ -75,7 +78,7 @@
public Item func_149650_a(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
{
- return p_149650_2_.nextInt(8) == 0 ? Items.wheat_seeds : null;
+ return null;
}
public int func_149679_a(int p_149679_1_, Random p_149679_2_)
@@ -81,13 +84,7 @@
public void func_149636_a(World p_149636_1_, EntityPlayer p_149636_2_, int p_149636_3_, int p_149636_4_, int p_149636_5_, int p_149636_6_)
// JAVADOC METHOD $$ func_149679_a
@@ -87,13 +90,7 @@
// JAVADOC METHOD $$ func_149636_a
public void harvestBlock(World p_149636_1_, EntityPlayer p_149636_2_, int p_149636_3_, int p_149636_4_, int p_149636_5_, int p_149636_6_)
{
- if (!p_149636_1_.isRemote && p_149636_2_.getCurrentEquippedItem() != null && p_149636_2_.getCurrentEquippedItem().getItem() == Items.shears)
{
- p_149636_2_.addStat(StatList.mineBlockStatArray[Block.func_149682_b(this)], 1);
- this.func_149642_a(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, new ItemStack(Blocks.tallgrass, 1, p_149636_6_));
- p_149636_2_.addStat(StatList.mineBlockStatArray[Block.getIdFromBlock(this)], 1);
- this.dropBlockAsItem(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, new ItemStack(Blocks.tallgrass, 1, p_149636_6_));
- }
- else
- {
super.func_149636_a(p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_);
super.harvestBlock(p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_);
}
}
@@ -143,4 +140,28 @@
@@ -151,4 +148,28 @@
Blocks.double_plant.func_149889_c(p_149853_1_, p_149853_3_, p_149853_4_, p_149853_5_, b0, 2);
}
}

View File

@ -8,18 +8,19 @@
public class BlockTorch extends Block
{
@@ -51,13 +52,17 @@
@@ -55,14 +56,18 @@
else
{
Block block = p_150107_1_.func_147439_a(p_150107_2_, p_150107_3_, p_150107_4_);
Block block = p_150107_1_.getBlock(p_150107_2_, p_150107_3_, p_150107_4_);
- return block == Blocks.fence || block == Blocks.nether_brick_fence || block == Blocks.glass || block == Blocks.cobblestone_wall;
+ return block.canPlaceTorchOnTop(p_150107_1_, p_150107_2_, p_150107_3_, p_150107_4_);
}
}
public boolean func_149742_c(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
// JAVADOC METHOD $$ func_149742_c
public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
{
- return p_149742_1_.func_147445_c(p_149742_2_ - 1, p_149742_3_, p_149742_4_, true) ? true : (p_149742_1_.func_147445_c(p_149742_2_ + 1, p_149742_3_, p_149742_4_, true) ? true : (p_149742_1_.func_147445_c(p_149742_2_, p_149742_3_, p_149742_4_ - 1, true) ? true : (p_149742_1_.func_147445_c(p_149742_2_, p_149742_3_, p_149742_4_ + 1, true) ? true : this.func_150107_m(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_))));
- return p_149742_1_.isBlockNormalCubeDefault(p_149742_2_ - 1, p_149742_3_, p_149742_4_, true) ? true : (p_149742_1_.isBlockNormalCubeDefault(p_149742_2_ + 1, p_149742_3_, p_149742_4_, true) ? true : (p_149742_1_.isBlockNormalCubeDefault(p_149742_2_, p_149742_3_, p_149742_4_ - 1, true) ? true : (p_149742_1_.isBlockNormalCubeDefault(p_149742_2_, p_149742_3_, p_149742_4_ + 1, true) ? true : this.func_150107_m(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_))));
+ return p_149742_1_.isSideSolid(p_149742_2_ - 1, p_149742_3_, p_149742_4_, EAST, true) ||
+ p_149742_1_.isSideSolid(p_149742_2_ + 1, p_149742_3_, p_149742_4_, WEST, true) ||
+ p_149742_1_.isSideSolid(p_149742_2_, p_149742_3_, p_149742_4_ - 1, SOUTH, true) ||
@ -27,81 +28,81 @@
+ func_150107_m(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_);
}
public int func_149660_a(World p_149660_1_, int p_149660_2_, int p_149660_3_, int p_149660_4_, int p_149660_5_, float p_149660_6_, float p_149660_7_, float p_149660_8_, int p_149660_9_)
@@ -69,22 +74,22 @@
// JAVADOC METHOD $$ func_149660_a
@@ -75,22 +80,22 @@
j1 = 5;
}
- if (p_149660_5_ == 2 && p_149660_1_.func_147445_c(p_149660_2_, p_149660_3_, p_149660_4_ + 1, true))
- if (p_149660_5_ == 2 && p_149660_1_.isBlockNormalCubeDefault(p_149660_2_, p_149660_3_, p_149660_4_ + 1, true))
+ if (p_149660_5_ == 2 && p_149660_1_.isSideSolid(p_149660_2_, p_149660_3_, p_149660_4_ + 1, NORTH, true))
{
j1 = 4;
}
- if (p_149660_5_ == 3 && p_149660_1_.func_147445_c(p_149660_2_, p_149660_3_, p_149660_4_ - 1, true))
- if (p_149660_5_ == 3 && p_149660_1_.isBlockNormalCubeDefault(p_149660_2_, p_149660_3_, p_149660_4_ - 1, true))
+ if (p_149660_5_ == 3 && p_149660_1_.isSideSolid(p_149660_2_, p_149660_3_, p_149660_4_ - 1, SOUTH, true))
{
j1 = 3;
}
- if (p_149660_5_ == 4 && p_149660_1_.func_147445_c(p_149660_2_ + 1, p_149660_3_, p_149660_4_, true))
- if (p_149660_5_ == 4 && p_149660_1_.isBlockNormalCubeDefault(p_149660_2_ + 1, p_149660_3_, p_149660_4_, true))
+ if (p_149660_5_ == 4 && p_149660_1_.isSideSolid(p_149660_2_ + 1, p_149660_3_, p_149660_4_, WEST, true))
{
j1 = 2;
}
- if (p_149660_5_ == 5 && p_149660_1_.func_147445_c(p_149660_2_ - 1, p_149660_3_, p_149660_4_, true))
- if (p_149660_5_ == 5 && p_149660_1_.isBlockNormalCubeDefault(p_149660_2_ - 1, p_149660_3_, p_149660_4_, true))
+ if (p_149660_5_ == 5 && p_149660_1_.isSideSolid(p_149660_2_ - 1, p_149660_3_, p_149660_4_, EAST, true))
{
j1 = 1;
}
@@ -106,19 +111,19 @@
@@ -114,19 +119,19 @@
{
if (p_149726_1_.getBlockMetadata(p_149726_2_, p_149726_3_, p_149726_4_) == 0)
{
- if (p_149726_1_.func_147445_c(p_149726_2_ - 1, p_149726_3_, p_149726_4_, true))
- if (p_149726_1_.isBlockNormalCubeDefault(p_149726_2_ - 1, p_149726_3_, p_149726_4_, true))
+ if (p_149726_1_.isSideSolid(p_149726_2_ - 1, p_149726_3_, p_149726_4_, EAST, true))
{
p_149726_1_.setBlockMetadataWithNotify(p_149726_2_, p_149726_3_, p_149726_4_, 1, 2);
}
- else if (p_149726_1_.func_147445_c(p_149726_2_ + 1, p_149726_3_, p_149726_4_, true))
- else if (p_149726_1_.isBlockNormalCubeDefault(p_149726_2_ + 1, p_149726_3_, p_149726_4_, true))
+ else if (p_149726_1_.isSideSolid(p_149726_2_ + 1, p_149726_3_, p_149726_4_, WEST, true))
{
p_149726_1_.setBlockMetadataWithNotify(p_149726_2_, p_149726_3_, p_149726_4_, 2, 2);
}
- else if (p_149726_1_.func_147445_c(p_149726_2_, p_149726_3_, p_149726_4_ - 1, true))
- else if (p_149726_1_.isBlockNormalCubeDefault(p_149726_2_, p_149726_3_, p_149726_4_ - 1, true))
+ else if (p_149726_1_.isSideSolid(p_149726_2_, p_149726_3_, p_149726_4_ - 1, SOUTH, true))
{
p_149726_1_.setBlockMetadataWithNotify(p_149726_2_, p_149726_3_, p_149726_4_, 3, 2);
}
- else if (p_149726_1_.func_147445_c(p_149726_2_, p_149726_3_, p_149726_4_ + 1, true))
- else if (p_149726_1_.isBlockNormalCubeDefault(p_149726_2_, p_149726_3_, p_149726_4_ + 1, true))
+ else if (p_149726_1_.isSideSolid(p_149726_2_, p_149726_3_, p_149726_4_ + 1, NORTH, true))
{
p_149726_1_.setBlockMetadataWithNotify(p_149726_2_, p_149726_3_, p_149726_4_, 4, 2);
}
@@ -143,22 +148,22 @@
@@ -152,22 +157,22 @@
int l = p_150108_1_.getBlockMetadata(p_150108_2_, p_150108_3_, p_150108_4_);
boolean flag = false;
- if (!p_150108_1_.func_147445_c(p_150108_2_ - 1, p_150108_3_, p_150108_4_, true) && l == 1)
- if (!p_150108_1_.isBlockNormalCubeDefault(p_150108_2_ - 1, p_150108_3_, p_150108_4_, true) && l == 1)
+ if (!p_150108_1_.isSideSolid(p_150108_2_ - 1, p_150108_3_, p_150108_4_, EAST, true) && l == 1)
{
flag = true;
}
- if (!p_150108_1_.func_147445_c(p_150108_2_ + 1, p_150108_3_, p_150108_4_, true) && l == 2)
- if (!p_150108_1_.isBlockNormalCubeDefault(p_150108_2_ + 1, p_150108_3_, p_150108_4_, true) && l == 2)
+ if (!p_150108_1_.isSideSolid(p_150108_2_ + 1, p_150108_3_, p_150108_4_, WEST, true) && l == 2)
{
flag = true;
}
- if (!p_150108_1_.func_147445_c(p_150108_2_, p_150108_3_, p_150108_4_ - 1, true) && l == 3)
- if (!p_150108_1_.isBlockNormalCubeDefault(p_150108_2_, p_150108_3_, p_150108_4_ - 1, true) && l == 3)
+ if (!p_150108_1_.isSideSolid(p_150108_2_, p_150108_3_, p_150108_4_ - 1, SOUTH, true) && l == 3)
{
flag = true;
}
- if (!p_150108_1_.func_147445_c(p_150108_2_, p_150108_3_, p_150108_4_ + 1, true) && l == 4)
- if (!p_150108_1_.isBlockNormalCubeDefault(p_150108_2_, p_150108_3_, p_150108_4_ + 1, true) && l == 4)
+ if (!p_150108_1_.isSideSolid(p_150108_2_, p_150108_3_, p_150108_4_ + 1, NORTH, true) && l == 4)
{
flag = true;

View File

@ -13,37 +13,37 @@
private static final String __OBFID = "CL_00000327";
protected BlockTrapDoor(Material p_i45434_1_)
@@ -163,7 +166,7 @@
@@ -173,7 +176,7 @@
--i1;
}
- if (!func_150119_a(p_149695_1_.func_147439_a(i1, p_149695_3_, j1)))
+ if (!(func_150119_a(p_149695_1_.func_147439_a(i1, p_149695_3_, j1)) || p_149695_1_.isSideSolid(i1, p_149695_3_, j1, ForgeDirection.getOrientation((l & 3) + 2))))
- if (!func_150119_a(p_149695_1_.getBlock(i1, p_149695_3_, j1)))
+ if (!(func_150119_a(p_149695_1_.getBlock(i1, p_149695_3_, j1)) || p_149695_1_.isSideSolid(i1, p_149695_3_, j1, ForgeDirection.getOrientation((l & 3) + 2))))
{
p_149695_1_.func_147468_f(p_149695_2_, p_149695_3_, p_149695_4_);
this.func_149697_b(p_149695_1_, p_149695_2_, p_149695_3_, p_149695_4_, l, 0);
@@ -218,6 +221,7 @@
public boolean func_149707_d(World p_149707_1_, int p_149707_2_, int p_149707_3_, int p_149707_4_, int p_149707_5_)
p_149695_1_.setBlockToAir(p_149695_2_, p_149695_3_, p_149695_4_);
this.dropBlockAsItem(p_149695_1_, p_149695_2_, p_149695_3_, p_149695_4_, l, 0);
@@ -231,6 +234,7 @@
// JAVADOC METHOD $$ func_149707_d
public boolean canPlaceBlockOnSide(World p_149707_1_, int p_149707_2_, int p_149707_3_, int p_149707_4_, int p_149707_5_)
{
+ if (disableValidation) return true;
if (p_149707_5_ == 0)
{
return false;
@@ -248,7 +252,7 @@
@@ -261,7 +265,7 @@
--p_149707_2_;
}
- return func_150119_a(p_149707_1_.func_147439_a(p_149707_2_, p_149707_3_, p_149707_4_));
+ return func_150119_a(p_149707_1_.func_147439_a(p_149707_2_, p_149707_3_, p_149707_4_)) || p_149707_1_.isSideSolid(p_149707_2_, p_149707_3_, p_149707_4_, ForgeDirection.UP);
- return func_150119_a(p_149707_1_.getBlock(p_149707_2_, p_149707_3_, p_149707_4_));
+ return func_150119_a(p_149707_1_.getBlock(p_149707_2_, p_149707_3_, p_149707_4_)) || p_149707_1_.isSideSolid(p_149707_2_, p_149707_3_, p_149707_4_, ForgeDirection.UP);
}
}
@@ -259,6 +263,7 @@
@@ -272,6 +276,7 @@
private static boolean func_150119_a(Block p_150119_0_)
{
+ if (disableValidation) return true;
return p_150119_0_.field_149764_J.isOpaque() && p_150119_0_.func_149686_d() || p_150119_0_ == Blocks.glowstone || p_150119_0_ instanceof BlockSlab || p_150119_0_ instanceof BlockStairs;
return p_150119_0_.blockMaterial.isOpaque() && p_150119_0_.renderAsNormalBlock() || p_150119_0_ == Blocks.glowstone || p_150119_0_ instanceof BlockSlab || p_150119_0_ instanceof BlockStairs;
}
}

View File

@ -10,11 +10,11 @@
public class BlockTripWireHook extends Block
{
private static final String __OBFID = "CL_00000329";
@@ -47,34 +50,41 @@
public boolean func_149707_d(World p_149707_1_, int p_149707_2_, int p_149707_3_, int p_149707_4_, int p_149707_5_)
@@ -53,13 +56,20 @@
// JAVADOC METHOD $$ func_149707_d
public boolean canPlaceBlockOnSide(World p_149707_1_, int p_149707_2_, int p_149707_3_, int p_149707_4_, int p_149707_5_)
{
- return p_149707_5_ == 2 && p_149707_1_.func_147439_a(p_149707_2_, p_149707_3_, p_149707_4_ + 1).func_149721_r() ? true : (p_149707_5_ == 3 && p_149707_1_.func_147439_a(p_149707_2_, p_149707_3_, p_149707_4_ - 1).func_149721_r() ? true : (p_149707_5_ == 4 && p_149707_1_.func_147439_a(p_149707_2_ + 1, p_149707_3_, p_149707_4_).func_149721_r() ? true : p_149707_5_ == 5 && p_149707_1_.func_147439_a(p_149707_2_ - 1, p_149707_3_, p_149707_4_).func_149721_r()));
- return p_149707_5_ == 2 && p_149707_1_.getBlock(p_149707_2_, p_149707_3_, p_149707_4_ + 1).isNormalCube() ? true : (p_149707_5_ == 3 && p_149707_1_.getBlock(p_149707_2_, p_149707_3_, p_149707_4_ - 1).isNormalCube() ? true : (p_149707_5_ == 4 && p_149707_1_.getBlock(p_149707_2_ + 1, p_149707_3_, p_149707_4_).isNormalCube() ? true : p_149707_5_ == 5 && p_149707_1_.getBlock(p_149707_2_ - 1, p_149707_3_, p_149707_4_).isNormalCube()));
+ ForgeDirection dir = ForgeDirection.getOrientation(p_149707_5_);
+ return (dir == NORTH && p_149707_1_.isSideSolid(p_149707_2_, p_149707_3_, p_149707_4_ + 1, NORTH)) ||
+ (dir == SOUTH && p_149707_1_.isSideSolid(p_149707_2_, p_149707_3_, p_149707_4_ - 1, SOUTH)) ||
@ -22,74 +22,76 @@
+ (dir == EAST && p_149707_1_.isSideSolid(p_149707_2_ - 1, p_149707_3_, p_149707_4_, EAST ));
}
public boolean func_149742_c(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
// JAVADOC METHOD $$ func_149742_c
public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
{
- return p_149742_1_.func_147439_a(p_149742_2_ - 1, p_149742_3_, p_149742_4_).func_149721_r() ? true : (p_149742_1_.func_147439_a(p_149742_2_ + 1, p_149742_3_, p_149742_4_).func_149721_r() ? true : (p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_, p_149742_4_ - 1).func_149721_r() ? true : p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_, p_149742_4_ + 1).func_149721_r()));
- return p_149742_1_.getBlock(p_149742_2_ - 1, p_149742_3_, p_149742_4_).isNormalCube() ? true : (p_149742_1_.getBlock(p_149742_2_ + 1, p_149742_3_, p_149742_4_).isNormalCube() ? true : (p_149742_1_.getBlock(p_149742_2_, p_149742_3_, p_149742_4_ - 1).isNormalCube() ? true : p_149742_1_.getBlock(p_149742_2_, p_149742_3_, p_149742_4_ + 1).isNormalCube()));
+ return p_149742_1_.isSideSolid(p_149742_2_ - 1, p_149742_3_, p_149742_4_, EAST ) ||
+ p_149742_1_.isSideSolid(p_149742_2_ + 1, p_149742_3_, p_149742_4_, WEST ) ||
+ p_149742_1_.isSideSolid(p_149742_2_, p_149742_3_, p_149742_4_ - 1, SOUTH) ||
+ p_149742_1_.isSideSolid(p_149742_2_, p_149742_3_, p_149742_4_ + 1, NORTH);
}
public int func_149660_a(World p_149660_1_, int p_149660_2_, int p_149660_3_, int p_149660_4_, int p_149660_5_, float p_149660_6_, float p_149660_7_, float p_149660_8_, int p_149660_9_)
// JAVADOC METHOD $$ func_149660_a
@@ -67,22 +77,22 @@
{
byte b0 = 0;
- if (p_149660_5_ == 2 && p_149660_1_.func_147445_c(p_149660_2_, p_149660_3_, p_149660_4_ + 1, true))
- if (p_149660_5_ == 2 && p_149660_1_.isBlockNormalCubeDefault(p_149660_2_, p_149660_3_, p_149660_4_ + 1, true))
+ if (p_149660_5_ == 2 && p_149660_1_.isSideSolid(p_149660_2_, p_149660_3_, p_149660_4_ + 1, NORTH, true))
{
b0 = 2;
}
- if (p_149660_5_ == 3 && p_149660_1_.func_147445_c(p_149660_2_, p_149660_3_, p_149660_4_ - 1, true))
- if (p_149660_5_ == 3 && p_149660_1_.isBlockNormalCubeDefault(p_149660_2_, p_149660_3_, p_149660_4_ - 1, true))
+ if (p_149660_5_ == 3 && p_149660_1_.isSideSolid(p_149660_2_, p_149660_3_, p_149660_4_ - 1, SOUTH, true))
{
b0 = 0;
}
- if (p_149660_5_ == 4 && p_149660_1_.func_147445_c(p_149660_2_ + 1, p_149660_3_, p_149660_4_, true))
- if (p_149660_5_ == 4 && p_149660_1_.isBlockNormalCubeDefault(p_149660_2_ + 1, p_149660_3_, p_149660_4_, true))
+ if (p_149660_5_ == 4 && p_149660_1_.isSideSolid(p_149660_2_ + 1, p_149660_3_, p_149660_4_, WEST, true))
{
b0 = 1;
}
- if (p_149660_5_ == 5 && p_149660_1_.func_147445_c(p_149660_2_ - 1, p_149660_3_, p_149660_4_, true))
- if (p_149660_5_ == 5 && p_149660_1_.isBlockNormalCubeDefault(p_149660_2_ - 1, p_149660_3_, p_149660_4_, true))
+ if (p_149660_5_ == 5 && p_149660_1_.isSideSolid(p_149660_2_ - 1, p_149660_3_, p_149660_4_, EAST, true))
{
b0 = 3;
}
@@ -97,22 +107,22 @@
@@ -107,22 +117,22 @@
int i1 = l & 3;
boolean flag = false;
- if (!p_149695_1_.func_147439_a(p_149695_2_ - 1, p_149695_3_, p_149695_4_).func_149721_r() && i1 == 3)
- if (!p_149695_1_.getBlock(p_149695_2_ - 1, p_149695_3_, p_149695_4_).isNormalCube() && i1 == 3)
+ if (!p_149695_1_.isSideSolid(p_149695_2_ - 1, p_149695_3_, p_149695_4_, EAST) && i1 == 3)
{
flag = true;
}
- if (!p_149695_1_.func_147439_a(p_149695_2_ + 1, p_149695_3_, p_149695_4_).func_149721_r() && i1 == 1)
- if (!p_149695_1_.getBlock(p_149695_2_ + 1, p_149695_3_, p_149695_4_).isNormalCube() && i1 == 1)
+ if (!p_149695_1_.isSideSolid(p_149695_2_ + 1, p_149695_3_, p_149695_4_, WEST) && i1 == 1)
{
flag = true;
}
- if (!p_149695_1_.func_147439_a(p_149695_2_, p_149695_3_, p_149695_4_ - 1).func_149721_r() && i1 == 0)
- if (!p_149695_1_.getBlock(p_149695_2_, p_149695_3_, p_149695_4_ - 1).isNormalCube() && i1 == 0)
+ if (!p_149695_1_.isSideSolid(p_149695_2_, p_149695_3_, p_149695_4_ - 1, SOUTH) && i1 == 0)
{
flag = true;
}
- if (!p_149695_1_.func_147439_a(p_149695_2_, p_149695_3_, p_149695_4_ + 1).func_149721_r() && i1 == 2)
- if (!p_149695_1_.getBlock(p_149695_2_, p_149695_3_, p_149695_4_ + 1).isNormalCube() && i1 == 2)
+ if (!p_149695_1_.isSideSolid(p_149695_2_, p_149695_3_, p_149695_4_ + 1, NORTH) && i1 == 2)
{
flag = true;
}
@@ -133,7 +143,7 @@
@@ -143,7 +153,7 @@
boolean flag3 = (p_150136_6_ & 8) == 8;
boolean flag4 = !p_150136_5_;
boolean flag5 = false;
- boolean flag6 = !World.func_147466_a(p_150136_1_, p_150136_2_, p_150136_3_ - 1, p_150136_4_);
- boolean flag6 = !World.doesBlockHaveSolidTopSurface(p_150136_1_, p_150136_2_, p_150136_3_ - 1, p_150136_4_);
+ boolean flag6 = !p_150136_1_.isSideSolid(p_150136_2_, p_150136_3_ - 1, p_150136_4_, UP);
int l1 = Direction.offsetX[k1];
int i2 = Direction.offsetZ[k1];

View File

@ -24,18 +24,18 @@
{
private static final String __OBFID = "CL_00000330";
@@ -375,14 +379,28 @@
public void func_149636_a(World p_149636_1_, EntityPlayer p_149636_2_, int p_149636_3_, int p_149636_4_, int p_149636_5_, int p_149636_6_)
@@ -389,14 +393,28 @@
// JAVADOC METHOD $$ func_149636_a
public void harvestBlock(World p_149636_1_, EntityPlayer p_149636_2_, int p_149636_3_, int p_149636_4_, int p_149636_5_, int p_149636_6_)
{
- if (!p_149636_1_.isRemote && p_149636_2_.getCurrentEquippedItem() != null && p_149636_2_.getCurrentEquippedItem().getItem() == Items.shears)
{
- p_149636_2_.addStat(StatList.mineBlockStatArray[Block.func_149682_b(this)], 1);
- this.func_149642_a(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, new ItemStack(Blocks.vine, 1, 0));
- p_149636_2_.addStat(StatList.mineBlockStatArray[Block.getIdFromBlock(this)], 1);
- this.dropBlockAsItem(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, new ItemStack(Blocks.vine, 1, 0));
- }
- else
- {
super.func_149636_a(p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_);
super.harvestBlock(p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_);
}
}
+

View File

@ -18,9 +18,9 @@
@@ -274,7 +282,7 @@
this.startTimerHackThread();
this.session = par1Session;
field_147123_G.info("Setting user: " + par1Session.getUsername());
- field_147123_G.info("(Session ID is " + par1Session.getSessionID() + ")");
+ //field_147123_G.info("(Session ID is " + par1Session.getSessionID() + ")"); //don't print the session to the console.. that's stupid...
logger.info("Setting user: " + par1Session.getUsername());
- logger.info("(Session ID is " + par1Session.getSessionID() + ")");
+ //logger.info("(Session ID is " + par1Session.getSessionID() + ")"); //don't print the session to the console.. that's stupid...
this.isDemo = par5;
this.displayWidth = par2;
this.displayHeight = par3;
@ -42,19 +42,19 @@
if (this.serverName != null)
{
@@ -733,11 +741,6 @@
public void func_147108_a(GuiScreen p_147108_1_)
@@ -734,11 +742,6 @@
// JAVADOC METHOD $$ func_147108_a
public void displayGuiScreen(GuiScreen p_147108_1_)
{
- if (this.currentScreen != null)
- {
- this.currentScreen.func_146281_b();
- this.currentScreen.onGuiClosed();
- }
-
if (p_147108_1_ == null && this.theWorld == null)
{
p_147108_1_ = new GuiMainMenu();
@@ -747,6 +750,17 @@
@@ -748,6 +751,17 @@
p_147108_1_ = new GuiGameOver();
}
@ -66,13 +66,13 @@
+ p_147108_1_ = event.gui;
+ if (old != null && p_147108_1_ != old)
+ {
+ old.func_146281_b();
+ old.onGuiClosed();
+ }
+
if (p_147108_1_ instanceof GuiMainMenu)
{
this.gameSettings.showDebugInfo = false;
@@ -1337,7 +1351,7 @@
@@ -1339,7 +1353,7 @@
if (this.thePlayer.isCurrentToolAdventureModeExempt(i, j, k))
{
@ -81,12 +81,12 @@
this.thePlayer.swingItem();
}
}
@@ -1418,11 +1432,12 @@
@@ -1420,11 +1434,12 @@
int j = this.objectMouseOver.blockY;
int k = this.objectMouseOver.blockZ;
- if (this.theWorld.func_147439_a(i, j, k).func_149688_o() != Material.field_151579_a)
+ if (!this.theWorld.func_147439_a(i, j, k).isAir(theWorld, i, j, k))
- if (this.theWorld.getBlock(i, j, k).getMaterial() != Material.air)
+ if (!this.theWorld.getBlock(i, j, k).isAir(theWorld, i, j, k))
{
int l = itemstack != null ? itemstack.stackSize : 0;
@ -96,7 +96,7 @@
{
flag = false;
this.thePlayer.swingItem();
@@ -1449,7 +1464,8 @@
@@ -1451,7 +1466,8 @@
{
ItemStack itemstack1 = this.thePlayer.inventory.getCurrentItem();
@ -106,7 +106,7 @@
{
this.entityRenderer.itemRenderer.resetEquippedProgress2();
}
@@ -1651,6 +1667,8 @@
@@ -1653,6 +1669,8 @@
while (Mouse.next())
{
@ -115,7 +115,7 @@
i = Mouse.getEventButton();
if (isRunningOnMac && i == 0 && (Keyboard.isKeyDown(29) || Keyboard.isKeyDown(157)))
@@ -2121,6 +2139,11 @@
@@ -2123,6 +2141,11 @@
// JAVADOC METHOD $$ func_71353_a
public void loadWorld(WorldClient par1WorldClient, String par2Str)
{
@ -126,8 +126,8 @@
+
if (par1WorldClient == null)
{
NetHandlerPlayClient nethandlerplayclient = this.func_147114_u();
@@ -2133,6 +2156,18 @@
NetHandlerPlayClient nethandlerplayclient = this.getNetHandler();
@@ -2135,6 +2158,18 @@
if (this.theIntegratedServer != null)
{
this.theIntegratedServer.initiateShutdown();
@ -146,7 +146,7 @@
}
this.theIntegratedServer = null;
@@ -2288,113 +2323,10 @@
@@ -2290,113 +2325,10 @@
if (this.objectMouseOver != null)
{
boolean flag = this.thePlayer.capabilities.isCreativeMode;
@ -160,14 +160,14 @@
- j = this.objectMouseOver.blockX;
- int k = this.objectMouseOver.blockY;
- int l = this.objectMouseOver.blockZ;
- Block block = this.theWorld.func_147439_a(j, k, l);
- Block block = this.theWorld.getBlock(j, k, l);
-
- if (block.func_149688_o() == Material.field_151579_a)
- if (block.getMaterial() == Material.air)
- {
- return;
- }
-
- item = block.func_149694_d(this.theWorld, j, k, l);
- item = block.getItem(this.theWorld, j, k, l);
-
- if (item == null)
- {
@ -175,8 +175,8 @@
- }
-
- flag1 = item.getHasSubtypes();
- Block block1 = item instanceof ItemBlock && !block.func_149648_K() ? Block.func_149634_a(item) : block;
- i = block1.func_149643_k(this.theWorld, j, k, l);
- Block block1 = item instanceof ItemBlock && !block.isFlowerPot() ? Block.getBlockFromItem(item) : block;
- i = block1.getDamageValue(this.theWorld, j, k, l);
- }
- else
- {
@ -262,7 +262,7 @@
if (flag)
{
j = this.thePlayer.inventoryContainer.inventorySlots.size() - 9 + this.thePlayer.inventory.currentItem;
@@ -2564,9 +2496,16 @@
@@ -2566,9 +2498,16 @@
par1PlayerUsageSnooper.addData("gl_max_texture_size", Integer.valueOf(getGLMaximumTextureSize()));
}
@ -279,7 +279,7 @@
for (int i = 16384; i > 0; i >>= 1)
{
GL11.glTexImage2D(GL11.GL_PROXY_TEXTURE_2D, 0, GL11.GL_RGBA, i, i, 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, (ByteBuffer)null);
@@ -2574,6 +2513,7 @@
@@ -2576,6 +2515,7 @@
if (j != 0)
{

View File

@ -12,7 +12,7 @@
@SideOnly(Side.CLIENT)
public class SoundManager
{
@@ -69,6 +74,7 @@
@@ -81,6 +86,7 @@
{
SoundSystemConfig.addLibrary(LibraryLWJGLOpenAL.class);
SoundSystemConfig.setCodec("ogg", CodecJOrbis.class);
@ -20,11 +20,11 @@
}
catch (SoundSystemException soundsystemexception)
{
@@ -80,6 +86,7 @@
@@ -92,6 +98,7 @@
{
this.func_148613_b();
this.func_148608_i();
this.unloadSoundSystem();
this.loadSoundSystem();
+ MinecraftForge.EVENT_BUS.post(new SoundLoadEvent(this));
}
private synchronized void func_148608_i()
// JAVADOC METHOD $$ func_148608_i

View File

@ -20,7 +20,7 @@
// JAVADOC METHOD $$ func_71053_j
@@ -494,20 +497,45 @@
return this.worldObj.func_147439_a(par1, par2, par3).func_149721_r();
return this.worldObj.getBlock(par1, par2, par3).isNormalCube();
}
+ private boolean isHeadspaceFree(int x, int y, int z, int height)
@ -70,7 +70,7 @@
byte b0 = -1;
double d5 = 9999.0D;
@@ -595,6 +623,12 @@
@@ -596,6 +624,12 @@
public void playSound(String par1Str, float par2, float par3)
{

View File

@ -16,20 +16,20 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.lwjgl.input.Keyboard;
@@ -134,6 +136,7 @@
@@ -139,6 +141,7 @@
public void func_146403_a(String p_146403_1_)
{
this.field_146297_k.ingameGUI.func_146158_b().func_146239_a(p_146403_1_);
+ if (ClientCommandHandler.instance.executeCommand(field_146297_k.thePlayer, p_146403_1_) == 1) return;
this.field_146297_k.thePlayer.sendChatMessage(p_146403_1_);
this.mc.ingameGUI.getChatGUI().addToSentMessages(p_146403_1_);
+ if (ClientCommandHandler.instance.executeCommand(mc.thePlayer, p_146403_1_) == 1) return;
this.mc.thePlayer.sendChatMessage(p_146403_1_);
}
@@ -309,13 +312,14 @@
this.field_146297_k.ingameGUI.func_146158_b().func_146234_a(new ChatComponentText(stringbuilder.toString()), 1);
@@ -315,13 +318,14 @@
this.mc.ingameGUI.getChatGUI().printChatMessageWithOptionalDeletion(new ChatComponentText(stringbuilder.toString()), 1);
}
- this.field_146415_a.func_146191_b((String)this.field_146412_t.get(this.field_146413_s++));
+ this.field_146415_a.func_146191_b(EnumChatFormatting.func_110646_a((String)this.field_146412_t.get(this.field_146413_s++)));
- this.inputField.writeText((String)this.field_146412_t.get(this.field_146413_s++));
+ this.inputField.writeText(EnumChatFormatting.getTextWithoutFormattingCodes((String)this.field_146412_t.get(this.field_146413_s++)));
}
private void func_146405_a(String p_146405_1_, String p_146405_2_)
@ -37,10 +37,10 @@
if (p_146405_1_.length() >= 1)
{
+ ClientCommandHandler.instance.autoComplete(p_146405_1_, p_146405_2_);
this.field_146297_k.thePlayer.sendQueue.func_147297_a(new C14PacketTabComplete(p_146405_1_));
this.mc.thePlayer.sendQueue.addToSendQueue(new C14PacketTabComplete(p_146405_1_));
this.field_146414_r = true;
}
@@ -438,6 +442,13 @@
@@ -445,6 +449,13 @@
String[] astring1 = p_146406_1_;
int i = p_146406_1_.length;

View File

@ -1,20 +1,20 @@
--- ../src-base/minecraft/net/minecraft/client/gui/GuiCreateWorld.java
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiCreateWorld.java
@@ -322,7 +322,7 @@
@@ -323,7 +323,7 @@
}
else if (p_146284_1_.field_146127_k == 8)
else if (p_146284_1_.id == 8)
{
- this.field_146297_k.func_147108_a(new GuiCreateFlatWorld(this, this.field_146334_a));
+ WorldType.worldTypes[field_146331_K].onCustomizeButton(field_146297_k, this);
- this.mc.displayGuiScreen(new GuiCreateFlatWorld(this, this.field_146334_a));
+ WorldType.worldTypes[field_146331_K].onCustomizeButton(mc, this);
}
}
}
@@ -340,7 +340,7 @@
this.field_146326_C.field_146125_m = this.field_146344_y;
this.field_146320_D.field_146125_m = this.field_146344_y;
this.field_146321_E.field_146125_m = this.field_146344_y;
- this.field_146322_F.field_146125_m = this.field_146344_y && WorldType.worldTypes[this.field_146331_K] == WorldType.FLAT;
+ this.field_146322_F.field_146125_m = this.field_146344_y && WorldType.worldTypes[this.field_146331_K].isCustomizable();
@@ -341,7 +341,7 @@
this.field_146326_C.visible = this.field_146344_y;
this.field_146320_D.visible = this.field_146344_y;
this.field_146321_E.visible = this.field_146344_y;
- this.field_146322_F.visible = this.field_146344_y && WorldType.worldTypes[this.field_146331_K] == WorldType.FLAT;
+ this.field_146322_F.visible = this.field_146344_y && WorldType.worldTypes[this.field_146331_K].isCustomizable();
if (this.field_146344_y)
{

View File

@ -9,10 +9,10 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -630,6 +631,7 @@
this.drawString(this.field_146289_q, brd, 2, this.field_146295_m - ( 10 + i * (this.field_146289_q.FONT_HEIGHT + 1)), 16777215);
this.drawString(this.fontRendererObj, brd, 2, this.height - ( 10 + i * (this.fontRendererObj.FONT_HEIGHT + 1)), 16777215);
}
}
+ ForgeHooksClient.renderMainMenu(this, field_146289_q, field_146294_l, field_146295_m);
+ ForgeHooksClient.renderMainMenu(this, fontRendererObj, width, height);
String s1 = "Copyright Mojang AB. Do not distribute!";
this.drawString(this.field_146289_q, s1, this.field_146294_l - this.field_146289_q.getStringWidth(s1) - 2, this.field_146295_m - 10, -1);
this.drawString(this.fontRendererObj, s1, this.width - this.fontRendererObj.getStringWidth(s1) - 2, this.height - 10, -1);

View File

@ -1,20 +1,20 @@
--- ../src-base/minecraft/net/minecraft/client/gui/GuiScreen.java
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiScreen.java
@@ -113,7 +113,9 @@
@@ -123,7 +123,9 @@
}
}
+ FontRenderer font = p_146285_1_.getItem().getFontRenderer(p_146285_1_);
this.func_146283_a(list, p_146285_2_, p_146285_3_);
+ drawHoveringText(list, p_146285_2_, p_146285_3_, (font == null ? field_146289_q : font));
+ drawHoveringText(list, p_146285_2_, p_146285_3_, (font == null ? fontRendererObj : font));
}
protected void func_146279_a(String p_146279_1_, int p_146279_2_, int p_146279_3_)
@@ -123,6 +125,11 @@
// JAVADOC METHOD $$ func_146279_a
@@ -134,6 +136,11 @@
protected void func_146283_a(List p_146283_1_, int p_146283_2_, int p_146283_3_)
{
+ drawHoveringText(p_146283_1_, p_146283_2_, p_146283_3_, field_146289_q);
+ drawHoveringText(p_146283_1_, p_146283_2_, p_146283_3_, fontRendererObj);
+ }
+
+ protected void drawHoveringText(List p_146283_1_, int p_146283_2_, int p_146283_3_, FontRenderer font)
@ -22,20 +22,20 @@
if (!p_146283_1_.isEmpty())
{
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
@@ -135,7 +142,7 @@
@@ -146,7 +153,7 @@
while (iterator.hasNext())
{
String s = (String)iterator.next();
- int l = this.field_146289_q.getStringWidth(s);
- int l = this.fontRendererObj.getStringWidth(s);
+ int l = font.getStringWidth(s);
if (l > k)
{
@@ -180,7 +187,7 @@
@@ -191,7 +198,7 @@
for (int i2 = 0; i2 < p_146283_1_.size(); ++i2)
{
String s1 = (String)p_146283_1_.get(i2);
- this.field_146289_q.drawStringWithShadow(s1, j2, k2, -1);
- this.fontRendererObj.drawStringWithShadow(s1, j2, k2, -1);
+ font.drawStringWithShadow(s1, j2, k2, -1);
if (i2 == 0)

View File

@ -1,39 +1,39 @@
--- ../src-base/minecraft/net/minecraft/client/gui/GuiSlot.java
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiSlot.java
@@ -294,16 +294,7 @@
@@ -314,16 +314,7 @@
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_FOG);
Tessellator tessellator = Tessellator.instance;
- this.field_148161_k.getTextureManager().bindTexture(Gui.optionsBackground);
- this.mc.getTextureManager().bindTexture(Gui.optionsBackground);
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- float f1 = 32.0F;
- tessellator.startDrawingQuads();
- tessellator.setColorOpaque_I(2105376);
- tessellator.addVertexWithUV((double)this.field_148152_e, (double)this.field_148154_c, 0.0D, (double)((float)this.field_148152_e / f1), (double)((float)(this.field_148154_c + (int)this.field_148169_q) / f1));
- tessellator.addVertexWithUV((double)this.field_148151_d, (double)this.field_148154_c, 0.0D, (double)((float)this.field_148151_d / f1), (double)((float)(this.field_148154_c + (int)this.field_148169_q) / f1));
- tessellator.addVertexWithUV((double)this.field_148151_d, (double)this.field_148153_b, 0.0D, (double)((float)this.field_148151_d / f1), (double)((float)(this.field_148153_b + (int)this.field_148169_q) / f1));
- tessellator.addVertexWithUV((double)this.field_148152_e, (double)this.field_148153_b, 0.0D, (double)((float)this.field_148152_e / f1), (double)((float)(this.field_148153_b + (int)this.field_148169_q) / f1));
- tessellator.addVertexWithUV((double)this.left, (double)this.bottom, 0.0D, (double)((float)this.left / f1), (double)((float)(this.bottom + (int)this.amountScrolled) / f1));
- tessellator.addVertexWithUV((double)this.right, (double)this.bottom, 0.0D, (double)((float)this.right / f1), (double)((float)(this.bottom + (int)this.amountScrolled) / f1));
- tessellator.addVertexWithUV((double)this.right, (double)this.top, 0.0D, (double)((float)this.right / f1), (double)((float)(this.top + (int)this.amountScrolled) / f1));
- tessellator.addVertexWithUV((double)this.left, (double)this.top, 0.0D, (double)((float)this.left / f1), (double)((float)(this.top + (int)this.amountScrolled) / f1));
- tessellator.draw();
+ drawContainerBackground(tessellator);
l1 = this.field_148152_e + this.field_148155_a / 2 - this.func_148139_c() / 2 + 2;
i2 = this.field_148153_b + 4 - (int)this.field_148169_q;
l1 = this.left + this.width / 2 - this.getListWidth() / 2 + 2;
i2 = this.top + 4 - (int)this.amountScrolled;
@@ -475,4 +466,18 @@
@@ -499,4 +490,18 @@
{
return this.field_148149_f;
return this.slotHeight;
}
+
+ protected void drawContainerBackground(Tessellator tessellator)
+ {
+ this.field_148161_k.getTextureManager().bindTexture(Gui.optionsBackground);
+ this.mc.getTextureManager().bindTexture(Gui.optionsBackground);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ float f1 = 32.0F;
+ tessellator.startDrawingQuads();
+ tessellator.setColorOpaque_I(2105376);
+ tessellator.addVertexWithUV((double)this.field_148152_e, (double)this.field_148154_c, 0.0D, (double)((float)this.field_148152_e / f1), (double)((float)(this.field_148154_c + (int)this.field_148169_q) / f1));
+ tessellator.addVertexWithUV((double)this.field_148151_d, (double)this.field_148154_c, 0.0D, (double)((float)this.field_148151_d / f1), (double)((float)(this.field_148154_c + (int)this.field_148169_q) / f1));
+ tessellator.addVertexWithUV((double)this.field_148151_d, (double)this.field_148153_b, 0.0D, (double)((float)this.field_148151_d / f1), (double)((float)(this.field_148153_b + (int)this.field_148169_q) / f1));
+ tessellator.addVertexWithUV((double)this.field_148152_e, (double)this.field_148153_b, 0.0D, (double)((float)this.field_148152_e / f1), (double)((float)(this.field_148153_b + (int)this.field_148169_q) / f1));
+ tessellator.addVertexWithUV((double)this.left, (double)this.bottom, 0.0D, (double)((float)this.left / f1), (double)((float)(this.bottom + (int)this.amountScrolled) / f1));
+ tessellator.addVertexWithUV((double)this.right, (double)this.bottom, 0.0D, (double)((float)this.right / f1), (double)((float)(this.bottom + (int)this.amountScrolled) / f1));
+ tessellator.addVertexWithUV((double)this.right, (double)this.top, 0.0D, (double)((float)this.right / f1), (double)((float)(this.top + (int)this.amountScrolled) / f1));
+ tessellator.addVertexWithUV((double)this.left, (double)this.top, 0.0D, (double)((float)this.left / f1), (double)((float)(this.top + (int)this.amountScrolled) / f1));
+ tessellator.draw();
+ }
}

View File

@ -37,26 +37,26 @@
// JAVADOC METHOD $$ func_73866_w_
@@ -66,6 +81,7 @@
this.field_146297_k.func_147114_u().func_147297_a(new C16PacketClientStatus(C16PacketClientStatus.EnumState.REQUEST_STATS));
this.field_146292_n.clear();
this.field_146292_n.add(new GuiOptionButton(1, this.field_146294_l / 2 + 24, this.field_146295_m / 2 + 74, 80, 20, I18n.getStringParams("gui.done", new Object[0])));
+ this.field_146292_n.add(button = new GuiButton(2, (field_146294_l - field_146555_f) / 2 + 24, field_146295_m / 2 + 74, 125, 20, AchievementPage.getTitle(currentPage)));
this.mc.getNetHandler().addToSendQueue(new C16PacketClientStatus(C16PacketClientStatus.EnumState.REQUEST_STATS));
this.buttonList.clear();
this.buttonList.add(new GuiOptionButton(1, this.width / 2 + 24, this.height / 2 + 74, 80, 20, I18n.format("gui.done", new Object[0])));
+ this.buttonList.add(button = new GuiButton(2, (width - field_146555_f) / 2 + 24, height / 2 + 74, 125, 20, AchievementPage.getTitle(currentPage)));
}
protected void func_146284_a(GuiButton p_146284_1_)
protected void actionPerformed(GuiButton p_146284_1_)
@@ -76,6 +92,16 @@
{
this.field_146297_k.func_147108_a(this.field_146562_a);
this.mc.displayGuiScreen(this.field_146562_a);
}
+
+ if (p_146284_1_.field_146127_k == 2)
+ if (p_146284_1_.id == 2)
+ {
+ currentPage++;
+ if (currentPage >= AchievementPage.getAchievementPages().size())
+ {
+ currentPage = -1;
+ }
+ button.field_146126_j = AchievementPage.getTitle(currentPage);
+ button.displayString = AchievementPage.getTitle(currentPage);
+ }
}
}

View File

@ -8,29 +8,29 @@
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderHelper;
@@ -114,7 +115,11 @@
@@ -123,7 +124,11 @@
}
}
+ //Forge: Force lighting to be disabled as there are some issue where lighting would
+ //incorrectly be applied based on items that are in the inventory.
+ GL11.glDisable(GL11.GL_LIGHTING);
this.func_146979_b(par1, par2);
this.drawGuiContainerForegroundLayer(par1, par2);
+ GL11.glEnable(GL11.GL_LIGHTING);
InventoryPlayer inventoryplayer = this.field_146297_k.thePlayer.inventory;
ItemStack itemstack = this.field_147012_x == null ? inventoryplayer.getItemStack() : this.field_147012_x;
InventoryPlayer inventoryplayer = this.mc.thePlayer.inventory;
ItemStack itemstack = this.draggedStack == null ? inventoryplayer.getItemStack() : this.draggedStack;
@@ -178,8 +183,11 @@
@@ -187,8 +192,11 @@
GL11.glTranslatef(0.0F, 0.0F, 32.0F);
this.zLevel = 200.0F;
field_146296_j.zLevel = 200.0F;
- field_146296_j.renderItemAndEffectIntoGUI(this.field_146289_q, this.field_146297_k.getTextureManager(), p_146982_1_, p_146982_2_, p_146982_3_);
- field_146296_j.renderItemOverlayIntoGUI(this.field_146289_q, this.field_146297_k.getTextureManager(), p_146982_1_, p_146982_2_, p_146982_3_ - (this.field_147012_x == null ? 0 : 8), p_146982_4_);
itemRender.zLevel = 200.0F;
- itemRender.renderItemAndEffectIntoGUI(this.fontRendererObj, this.mc.getTextureManager(), p_146982_1_, p_146982_2_, p_146982_3_);
- itemRender.renderItemOverlayIntoGUI(this.fontRendererObj, this.mc.getTextureManager(), p_146982_1_, p_146982_2_, p_146982_3_ - (this.draggedStack == null ? 0 : 8), p_146982_4_);
+ FontRenderer font = null;
+ if (p_146982_1_ != null) font = p_146982_1_.getItem().getFontRenderer(p_146982_1_);
+ if (font == null) font = field_146289_q;
+ field_146296_j.renderItemAndEffectIntoGUI(font, this.field_146297_k.getTextureManager(), p_146982_1_, p_146982_2_, p_146982_3_);
+ field_146296_j.renderItemOverlayIntoGUI(font, this.field_146297_k.getTextureManager(), p_146982_1_, p_146982_2_, p_146982_3_ - (this.field_147012_x == null ? 0 : 8), p_146982_4_);
+ if (font == null) font = fontRendererObj;
+ itemRender.renderItemAndEffectIntoGUI(font, this.mc.getTextureManager(), p_146982_1_, p_146982_2_, p_146982_3_);
+ itemRender.renderItemOverlayIntoGUI(font, this.mc.getTextureManager(), p_146982_1_, p_146982_2_, p_146982_3_ - (this.draggedStack == null ? 0 : 8), p_146982_4_);
this.zLevel = 0.0F;
field_146296_j.zLevel = 0.0F;
itemRender.zLevel = 0.0F;
}

View File

@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java
+++ ../src-work/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java
@@ -49,6 +49,8 @@
@@ -53,6 +53,8 @@
private boolean field_147057_D;
private CreativeCrafting field_147059_E;
private static final String __OBFID = "CL_00000752";
@ -9,7 +9,7 @@
public GuiContainerCreative(EntityPlayer par1EntityPlayer)
{
@@ -186,7 +188,7 @@
@@ -190,7 +192,7 @@
return;
}
@ -18,47 +18,47 @@
{
if (p_146984_3_ == 0)
{
@@ -262,6 +264,13 @@
this.func_147050_b(CreativeTabs.creativeTabArray[i]);
this.field_147059_E = new CreativeCrafting(this.field_146297_k);
this.field_146297_k.thePlayer.inventoryContainer.addCraftingToCrafters(this.field_147059_E);
@@ -266,6 +268,13 @@
this.setCurrentCreativeTab(CreativeTabs.creativeTabArray[i]);
this.field_147059_E = new CreativeCrafting(this.mc);
this.mc.thePlayer.inventoryContainer.addCraftingToCrafters(this.field_147059_E);
+ int tabCount = CreativeTabs.creativeTabArray.length;
+ if (tabCount > 12)
+ {
+ field_146292_n.add(new GuiButton(101, field_147003_i, field_147009_r - 50, 20, 20, "<"));
+ field_146292_n.add(new GuiButton(102, field_147003_i + field_146999_f - 20, field_147009_r - 50, 20, 20, ">"));
+ buttonList.add(new GuiButton(101, guiLeft, guiTop - 50, 20, 20, "<"));
+ buttonList.add(new GuiButton(102, guiLeft + xSize - 20, guiTop - 50, 20, 20, ">"));
+ maxPages = ((tabCount - 12) / 10) + 1;
+ }
}
else
{
@@ -284,7 +293,7 @@
@@ -289,7 +298,7 @@
// JAVADOC METHOD $$ func_73869_a
protected void keyTyped(char par1, int par2)
{
- if (field_147058_w != CreativeTabs.tabAllSearch.getTabIndex())
+ if (!CreativeTabs.creativeTabArray[field_147058_w].hasSearchBar())
- if (selectedTabIndex != CreativeTabs.tabAllSearch.getTabIndex())
+ if (!CreativeTabs.creativeTabArray[selectedTabIndex].hasSearchBar())
{
if (GameSettings.isKeyDown(this.field_146297_k.gameSettings.keyBindChat))
if (GameSettings.isKeyDown(this.mc.gameSettings.keyBindChat))
{
@@ -321,6 +330,15 @@
@@ -326,6 +335,15 @@
{
GuiContainerCreative.ContainerCreative containercreative = (GuiContainerCreative.ContainerCreative)this.field_147002_h;
containercreative.field_148330_a.clear();
GuiContainerCreative.ContainerCreative containercreative = (GuiContainerCreative.ContainerCreative)this.inventorySlots;
containercreative.itemList.clear();
+
+ CreativeTabs tab = CreativeTabs.creativeTabArray[field_147058_w];
+ CreativeTabs tab = CreativeTabs.creativeTabArray[selectedTabIndex];
+ if (tab.hasSearchBar() && tab != CreativeTabs.tabAllSearch)
+ {
+ tab.displayAllReleventItems(containercreative.field_148330_a);
+ tab.displayAllReleventItems(containercreative.itemList);
+ updateFilteredItems(containercreative);
+ return;
+ }
+
Iterator iterator = Item.field_150901_e.iterator();
Iterator iterator = Item.itemRegistry.iterator();
while (iterator.hasNext())
@@ -332,7 +350,13 @@
item.func_150895_a(item, (CreativeTabs)null, containercreative.field_148330_a);
@@ -337,7 +355,13 @@
item.getSubItems(item, (CreativeTabs)null, containercreative.itemList);
}
}
+ updateFilteredItems(containercreative);
@ -71,16 +71,16 @@
Enchantment[] aenchantment = Enchantment.enchantmentsList;
int j = aenchantment.length;
@@ -386,7 +410,7 @@
@@ -392,7 +416,7 @@
{
CreativeTabs creativetabs = CreativeTabs.creativeTabArray[field_147058_w];
CreativeTabs creativetabs = CreativeTabs.creativeTabArray[selectedTabIndex];
- if (creativetabs.drawInForegroundOfTab())
+ if (creativetabs != null && creativetabs.drawInForegroundOfTab())
{
GL11.glDisable(GL11.GL_BLEND);
this.field_146289_q.drawString(I18n.getStringParams(creativetabs.getTranslatedTabLabel(), new Object[0]), 8, 6, 4210752);
@@ -407,7 +431,7 @@
this.fontRendererObj.drawString(I18n.format(creativetabs.getTranslatedTabLabel(), new Object[0]), 8, 6, 4210752);
@@ -413,7 +437,7 @@
{
CreativeTabs creativetabs = acreativetabs[k1];
@ -89,39 +89,39 @@
{
return;
}
@@ -430,7 +454,7 @@
@@ -437,7 +461,7 @@
{
CreativeTabs creativetabs = acreativetabs[k1];
- if (this.func_147049_a(creativetabs, l, i1))
+ if (creativetabs != null && this.func_147049_a(creativetabs, l, i1))
{
this.func_147050_b(creativetabs);
this.setCurrentCreativeTab(creativetabs);
return;
@@ -443,11 +467,13 @@
private boolean func_147055_p()
@@ -451,11 +475,13 @@
// JAVADOC METHOD $$ func_147055_p
private boolean needsScrollBars()
{
+ if (CreativeTabs.creativeTabArray[field_147058_w] == null) return false;
return field_147058_w != CreativeTabs.tabInventory.getTabIndex() && CreativeTabs.creativeTabArray[field_147058_w].shouldHidePlayerInventory() && ((GuiContainerCreative.ContainerCreative)this.field_147002_h).func_148328_e();
+ if (CreativeTabs.creativeTabArray[selectedTabIndex] == null) return false;
return selectedTabIndex != CreativeTabs.tabInventory.getTabIndex() && CreativeTabs.creativeTabArray[selectedTabIndex].shouldHidePlayerInventory() && ((GuiContainerCreative.ContainerCreative)this.inventorySlots).func_148328_e();
}
private void func_147050_b(CreativeTabs p_147050_1_)
private void setCurrentCreativeTab(CreativeTabs p_147050_1_)
{
+ if (p_147050_1_ == null) return;
int i = field_147058_w;
field_147058_w = p_147050_1_.getTabIndex();
GuiContainerCreative.ContainerCreative containercreative = (GuiContainerCreative.ContainerCreative)this.field_147002_h;
@@ -516,7 +542,7 @@
int i = selectedTabIndex;
selectedTabIndex = p_147050_1_.getTabIndex();
GuiContainerCreative.ContainerCreative containercreative = (GuiContainerCreative.ContainerCreative)this.inventorySlots;
@@ -524,7 +550,7 @@
if (this.field_147062_A != null)
if (this.searchField != null)
{
- if (p_147050_1_ == CreativeTabs.tabAllSearch)
+ if (p_147050_1_.hasSearchBar())
{
this.field_147062_A.func_146189_e(true);
this.field_147062_A.func_146205_d(false);
@@ -613,23 +639,45 @@
this.searchField.setVisible(true);
this.searchField.setCanLoseFocus(false);
@@ -622,23 +648,45 @@
super.drawScreen(par1, par2, par3);
CreativeTabs[] acreativetabs = CreativeTabs.creativeTabArray;
@ -137,39 +137,39 @@
CreativeTabs creativetabs = acreativetabs[j2];
+ if (creativetabs == null) continue;
if (this.func_147052_b(creativetabs, par1, par2))
if (this.renderCreativeInventoryHoveringText(creativetabs, par1, par2))
{
+ rendered = true;
break;
}
}
+ if (!rendered && func_147052_b(CreativeTabs.tabAllSearch, par1, par2))
+ if (!rendered && renderCreativeInventoryHoveringText(CreativeTabs.tabAllSearch, par1, par2))
+ {
+ func_147052_b(CreativeTabs.tabInventory, par1, par2);
+ renderCreativeInventoryHoveringText(CreativeTabs.tabInventory, par1, par2);
+ }
+
if (this.field_147064_C != null && field_147058_w == CreativeTabs.tabInventory.getTabIndex() && this.func_146978_c(this.field_147064_C.xDisplayPosition, this.field_147064_C.yDisplayPosition, 16, 16, par1, par2))
if (this.field_147064_C != null && selectedTabIndex == CreativeTabs.tabInventory.getTabIndex() && this.func_146978_c(this.field_147064_C.xDisplayPosition, this.field_147064_C.yDisplayPosition, 16, 16, par1, par2))
{
this.func_146279_a(I18n.getStringParams("inventory.binSlot", new Object[0]), par1, par2);
this.drawCreativeTabHoveringText(I18n.format("inventory.binSlot", new Object[0]), par1, par2);
}
+ if (maxPages != 0)
+ {
+ String page = String.format("%d / %d", tabPage + 1, maxPages + 1);
+ int width = field_146289_q.getStringWidth(page);
+ int width = fontRendererObj.getStringWidth(page);
+ GL11.glDisable(GL11.GL_LIGHTING);
+ this.zLevel = 300.0F;
+ field_146296_j.zLevel = 300.0F;
+ field_146289_q.drawString(page, field_147003_i + (field_146999_f / 2) - (width / 2), field_147009_r - 44, -1);
+ itemRender.zLevel = 300.0F;
+ fontRendererObj.drawString(page, guiLeft + (xSize / 2) - (width / 2), guiTop - 44, -1);
+ this.zLevel = 0.0F;
+ field_146296_j.zLevel = 0.0F;
+ itemRender.zLevel = 0.0F;
+ }
+
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glDisable(GL11.GL_LIGHTING);
}
@@ -698,17 +746,37 @@
@@ -707,17 +755,37 @@
int k = acreativetabs.length;
int l;
@ -181,11 +181,11 @@
+ for (l = start; l < k; ++l)
{
CreativeTabs creativetabs1 = acreativetabs[l];
this.field_146297_k.getTextureManager().bindTexture(field_147061_u);
this.mc.getTextureManager().bindTexture(field_147061_u);
+ if (creativetabs1 == null) continue;
+
if (creativetabs1.getTabIndex() != field_147058_w)
if (creativetabs1.getTabIndex() != selectedTabIndex)
{
this.func_147051_a(creativetabs1);
}
@ -195,21 +195,21 @@
+ {
+ if (creativetabs != CreativeTabs.tabAllSearch)
+ {
+ this.field_146297_k.getTextureManager().bindTexture(field_147061_u);
+ this.mc.getTextureManager().bindTexture(field_147061_u);
+ func_147051_a(CreativeTabs.tabAllSearch);
+ }
+ if (creativetabs != CreativeTabs.tabInventory)
+ {
+ this.field_146297_k.getTextureManager().bindTexture(field_147061_u);
+ this.mc.getTextureManager().bindTexture(field_147061_u);
+ func_147051_a(CreativeTabs.tabInventory);
+ }
+ }
+
this.field_146297_k.getTextureManager().bindTexture(new ResourceLocation("textures/gui/container/creative_inventory/tab_" + creativetabs.getBackgroundImageName()));
this.drawTexturedModalRect(this.field_147003_i, this.field_147009_r, 0, 0, this.field_146999_f, this.field_147000_g);
this.field_147062_A.func_146194_f();
@@ -723,6 +791,14 @@
this.drawTexturedModalRect(i1, k + (int)((float)(l - k - 17) * this.field_147067_x), 232 + (this.func_147055_p() ? 0 : 12), 0, 12, 15);
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();
@@ -732,6 +800,14 @@
this.drawTexturedModalRect(i1, k + (int)((float)(l - k - 17) * this.currentScroll), 232 + (this.needsScrollBars() ? 0 : 12), 0, 12, 15);
}
+ if (creativetabs == null || creativetabs.getTabPage() != tabPage)
@ -223,7 +223,7 @@
this.func_147051_a(creativetabs);
if (creativetabs == CreativeTabs.tabInventory)
@@ -733,6 +809,15 @@
@@ -742,6 +818,15 @@
protected boolean func_147049_a(CreativeTabs p_147049_1_, int p_147049_2_, int p_147049_3_)
{
@ -239,24 +239,24 @@
int k = p_147049_1_.getTabColumn();
int l = 28 * k;
byte b0 = 0;
@@ -833,6 +918,7 @@
@@ -843,6 +928,7 @@
}
GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glColor3f(1F, 1F, 1F); //Forge: Reset color in case Items change it.
this.drawTexturedModalRect(l, i1, j, k, 28, b0);
this.zLevel = 100.0F;
field_146296_j.zLevel = 100.0F;
@@ -859,6 +945,15 @@
itemRender.zLevel = 100.0F;
@@ -869,6 +955,15 @@
{
this.field_146297_k.func_147108_a(new GuiStats(this, this.field_146297_k.thePlayer.func_146107_m()));
this.mc.displayGuiScreen(new GuiStats(this, this.mc.thePlayer.getStatFileWriter()));
}
+
+ if (p_146284_1_.field_146127_k == 101)
+ if (p_146284_1_.id == 101)
+ {
+ tabPage = Math.max(tabPage - 1, 0);
+ }
+ else if (p_146284_1_.field_146127_k == 102)
+ else if (p_146284_1_.id == 102)
+ {
+ tabPage = Math.min(tabPage + 1, maxPages);
+ }

View File

@ -1,11 +1,11 @@
--- ../src-base/minecraft/net/minecraft/client/gui/mco/GuiScreenCreateOnlineWorld.java
+++ ../src-work/minecraft/net/minecraft/client/gui/mco/GuiScreenCreateOnlineWorld.java
@@ -207,7 +207,7 @@
GuiScreenCreateOnlineWorld.field_146765_a.error("Couldn\'t create world");
@@ -208,7 +208,7 @@
GuiScreenCreateOnlineWorld.logger.error("Couldn\'t create world");
this.func_148416_a(unsupportedencodingexception.getLocalizedMessage());
}
- catch (IOException ioexception)
+ catch (@SuppressWarnings("hiding") IOException ioexception)
{
GuiScreenCreateOnlineWorld.field_146765_a.error("Could not parse response creating world");
GuiScreenCreateOnlineWorld.logger.error("Could not parse response creating world");
this.func_148416_a(ioexception.getLocalizedMessage());

View File

@ -11,7 +11,7 @@
@SideOnly(Side.CLIENT)
public class PlayerControllerMP
{
@@ -104,6 +108,12 @@
@@ -105,6 +109,12 @@
// JAVADOC METHOD $$ func_78751_a
public boolean onPlayerDestroyBlock(int par1, int par2, int par3, int par4)
{
@ -24,20 +24,20 @@
if (this.currentGameType.isAdventure() && !this.mc.thePlayer.isCurrentToolAdventureModeExempt(par1, par2, par3))
{
return false;
@@ -125,7 +135,7 @@
@@ -126,7 +136,7 @@
{
worldclient.playAuxSFX(2001, par1, par2, par3, Block.func_149682_b(block) + (worldclient.getBlockMetadata(par1, par2, par3) << 12));
worldclient.playAuxSFX(2001, par1, par2, par3, Block.getIdFromBlock(block) + (worldclient.getBlockMetadata(par1, par2, par3) << 12));
int i1 = worldclient.getBlockMetadata(par1, par2, par3);
- boolean flag = worldclient.func_147468_f(par1, par2, par3);
- boolean flag = worldclient.setBlockToAir(par1, par2, par3);
+ boolean flag = block.removedByPlayer(worldclient, mc.thePlayer, par1, par2, par3);
if (flag)
{
@@ -326,11 +336,18 @@
@@ -327,11 +337,18 @@
float f2 = (float)par8Vec3.zCoord - (float)par6;
boolean flag = false;
- if ((!par1EntityPlayer.isSneaking() || par1EntityPlayer.getHeldItem() == null) && par2World.func_147439_a(par4, par5, par6).func_149727_a(par2World, par4, par5, par6, par1EntityPlayer, par7, f, f1, f2))
- if ((!par1EntityPlayer.isSneaking() || par1EntityPlayer.getHeldItem() == null) && par2World.getBlock(par4, par5, par6).onBlockActivated(par2World, par4, par5, par6, par1EntityPlayer, par7, f, f1, f2))
+ if (par3ItemStack != null &&
+ par3ItemStack.getItem() != null &&
+ par3ItemStack.getItem().onItemUseFirst(par3ItemStack, par1EntityPlayer, par2World, par4, par5, par6, par7, f, f1, f2))
@ -48,13 +48,13 @@
+ if (!par1EntityPlayer.isSneaking() || par1EntityPlayer.getHeldItem() == null || par1EntityPlayer.getHeldItem().getItem().doesSneakBypassUse(par2World, par4, par5, par6, par1EntityPlayer))
+ {
+ flag = par2World.func_147439_a(par4, par5, par6).func_149727_a(par2World, par4, par5, par6, par1EntityPlayer, par7, f, f1, f2);
+ flag = par2World.getBlock(par4, par5, par6).onBlockActivated(par2World, par4, par5, par6, par1EntityPlayer, par7, f, f1, f2);
+ }
+
if (!flag && par3ItemStack != null && par3ItemStack.getItem() instanceof ItemBlock)
{
ItemBlock itemblock = (ItemBlock)par3ItemStack.getItem();
@@ -362,7 +379,15 @@
@@ -363,7 +380,15 @@
}
else
{
@ -71,7 +71,7 @@
}
}
@@ -382,9 +407,10 @@
@@ -383,9 +408,10 @@
{
par1EntityPlayer.inventory.mainInventory[par1EntityPlayer.inventory.currentItem] = itemstack1;

View File

@ -15,7 +15,7 @@
this.sendQueue = p_i45063_1_;
this.difficultySetting = p_i45063_4_;
- this.setSpawnLocation(8, 64, 8);
this.mapStorage = p_i45063_1_.field_147305_a;
this.mapStorage = p_i45063_1_.mapStorageOrigin;
+ this.isRemote = true;
+ this.finishSetup();
+ this.setSpawnLocation(8, 64, 8);

View File

@ -9,26 +9,26 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -675,7 +677,11 @@
public void func_147251_a(S02PacketChat p_147251_1_)
@@ -706,7 +708,11 @@
// JAVADOC METHOD $$ func_147251_a
public void handleChat(S02PacketChat p_147251_1_)
{
- this.field_147299_f.ingameGUI.func_146158_b().func_146227_a(p_147251_1_.func_148915_c());
- this.gameController.ingameGUI.getChatGUI().printChatMessage(p_147251_1_.func_148915_c());
+ ClientChatReceivedEvent event = new ClientChatReceivedEvent(p_147251_1_.func_148915_c());
+ if (!MinecraftForge.EVENT_BUS.post(event) && event.message != null)
+ {
+ this.field_147299_f.ingameGUI.func_146158_b().func_146227_a(event.message);
+ this.gameController.ingameGUI.getChatGUI().printChatMessage(event.message);
+ }
}
public void func_147279_a(S0BPacketAnimation p_147279_1_)
@@ -1115,6 +1121,10 @@
// JAVADOC METHOD $$ func_147279_a
@@ -1160,6 +1166,10 @@
{
tileentity.func_145839_a(p_147273_1_.func_148857_g());
tileentity.readFromNBT(p_147273_1_.func_148857_g());
}
+ else
+ {
+ tileentity.onDataPacket(field_147302_e, p_147273_1_);
+ tileentity.onDataPacket(netManager, p_147273_1_);
+ }
}
}

View File

@ -51,9 +51,9 @@
}
@@ -221,7 +228,7 @@
public void func_147215_a(int p_147215_1_, int p_147215_2_, int p_147215_3_, Block p_147215_4_, int p_147215_5_)
public void addBlockDestroyEffects(int p_147215_1_, int p_147215_2_, int p_147215_3_, Block p_147215_4_, int p_147215_5_)
{
- if (p_147215_4_.func_149688_o() != Material.field_151579_a)
- if (p_147215_4_.getMaterial() != Material.air)
+ if (!p_147215_4_.isAir(worldObj, p_147215_1_, p_147215_2_, p_147215_3_) && !p_147215_4_.addDestroyEffects(worldObj, p_147215_1_, p_147215_2_, p_147215_3_, p_147215_5_, this))
{
byte b0 = 4;
@ -65,7 +65,7 @@
+
+ public void addBlockHitEffects(int x, int y, int z, MovingObjectPosition target)
+ {
+ Block block = worldObj.func_147439_a(x, y, z);
+ Block block = worldObj.getBlock(x, y, z);
+ if (block != null && !block.addHitEffects(worldObj, target, this))
+ {
+ addBlockHitEffects(x, y, z, target.sideHit);

View File

@ -15,9 +15,9 @@
+ {
super(par1World, par2, par4, par6, par8, par10, par12);
this.field_145784_a = par14Block;
- this.setParticleIcon(par14Block.func_149691_a(0, par15));
+ this.setParticleIcon(par14Block.func_149691_a(side, par15));
this.particleGravity = par14Block.field_149763_I;
- this.setParticleIcon(par14Block.getIcon(0, par15));
+ this.setParticleIcon(par14Block.getIcon(side, par15));
this.particleGravity = par14Block.blockParticleGravity;
this.particleRed = this.particleGreen = this.particleBlue = 0.6F;
this.particleScale /= 2.0F;
+ this.side = side;

View File

@ -52,7 +52,7 @@
if (!this.mc.gameSettings.debugCamEnable)
{
- Block block = this.mc.theWorld.func_147439_a(MathHelper.floor_double(entitylivingbase.posX), MathHelper.floor_double(entitylivingbase.posY), MathHelper.floor_double(entitylivingbase.posZ));
- Block block = this.mc.theWorld.getBlock(MathHelper.floor_double(entitylivingbase.posX), MathHelper.floor_double(entitylivingbase.posY), MathHelper.floor_double(entitylivingbase.posZ));
-
- if (block == Blocks.bed)
- {
@ -70,7 +70,7 @@
RenderHelper.enableStandardItemLighting();
this.mc.mcProfiler.endStartSection("entities");
+ ForgeHooksClient.setRenderPass(0);
renderglobal.func_147589_a(entitylivingbase, frustrum, par1);
renderglobal.renderEntities(entitylivingbase, frustrum, par1);
+ ForgeHooksClient.setRenderPass(0);
+ // ToDo: Try and figure out how to make particles render sorted correctly.. {They render behind water}
this.enableLightmap((double)par1);
@ -102,7 +102,7 @@
this.mc.mcProfiler.endStartSection("destroyProgress");
GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.func_148821_a(770, 1, 1, 0);
OpenGlHelper.glBlendFunc(770, 1, 1, 0);
- renderglobal.drawBlockDamageTexture(Tessellator.instance, (EntityPlayer)entitylivingbase, par1);
+ renderglobal.drawBlockDamageTexture(Tessellator.instance, entitylivingbase, par1);
GL11.glDisable(GL11.GL_BLEND);
@ -117,7 +117,7 @@
+ RenderHelper.enableStandardItemLighting();
+ this.mc.mcProfiler.endStartSection("entities");
+ ForgeHooksClient.setRenderPass(1);
+ renderglobal.func_147589_a(entitylivingbase, frustrum, par1);
+ renderglobal.renderEntities(entitylivingbase, frustrum, par1);
+ ForgeHooksClient.setRenderPass(-1);
+ RenderHelper.disableStandardItemLighting();
+ }

View File

@ -29,22 +29,22 @@
+ this.renderItem(par1EntityLivingBase, par2ItemStack, par3, EQUIPPED);
+ }
+
+ // JAVADOC METHOD $$ func_78443_a
+ // JAVADOC METHOD $$ renderItem
+ public void renderItem(EntityLivingBase par1EntityLivingBase, ItemStack par2ItemStack, int par3, ItemRenderType type)
+ {
GL11.glPushMatrix();
TextureManager texturemanager = this.mc.getTextureManager();
Item item = par2ItemStack.getItem();
Block block = Block.func_149634_a(item);
Block block = Block.getBlockFromItem(item);
- if (par2ItemStack.getItemSpriteNumber() == 0 && item instanceof ItemBlock && RenderBlocks.func_147739_a(block.func_149645_b()))
- if (par2ItemStack.getItemSpriteNumber() == 0 && item instanceof ItemBlock && RenderBlocks.renderItemIn3d(block.getRenderType()))
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(par2ItemStack, type);
+ if (customRenderer != null)
{
+ texturemanager.bindTexture(texturemanager.getResourceLocation(par2ItemStack.getItemSpriteNumber()));
+ ForgeHooksClient.renderEquippedItem(type, customRenderer, field_147720_h, par1EntityLivingBase, par2ItemStack);
+ ForgeHooksClient.renderEquippedItem(type, customRenderer, renderBlocksIr, par1EntityLivingBase, par2ItemStack);
+ }
+ else if (par2ItemStack.getItemSpriteNumber() == 0 && item instanceof ItemBlock && RenderBlocks.func_147739_a(block.func_149645_b()))
+ else if (par2ItemStack.getItemSpriteNumber() == 0 && item instanceof ItemBlock && RenderBlocks.renderItemIn3d(block.getRenderType()))
+ {
texturemanager.bindTexture(texturemanager.getResourceLocation(0));
@ -79,10 +79,10 @@
+
+ if (custom == null)
{
- this.mc.entityRenderer.func_147701_i().func_148250_a(mapdata, false);
- this.mc.entityRenderer.getMapItemRenderer().func_148250_a(mapdata, false);
+ if (mapdata != null)
+ {
+ this.mc.entityRenderer.func_147701_i().func_148250_a(mapdata, false);
+ this.mc.entityRenderer.getMapItemRenderer().func_148250_a(mapdata, false);
+ }
}
+ else

View File

@ -1,7 +1,7 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/OpenGlHelper.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/OpenGlHelper.java
@@ -27,6 +27,10 @@
public static boolean field_148824_g;
public static boolean shadersSupported;
private static final String __OBFID = "CL_00001179";
+ /* Stores the last values sent into setLightmapTextureCoords */
@ -23,4 +23,4 @@
+ }
}
public static void func_148821_a(int p_148821_0_, int p_148821_1_, int p_148821_2_, int p_148821_3_)
public static void glBlendFunc(int p_148821_0_, int p_148821_1_, int p_148821_2_, int p_148821_3_)

View File

@ -9,101 +9,101 @@
@SideOnly(Side.CLIENT)
public class RenderBlocks
{
@@ -336,9 +338,9 @@
public boolean func_147773_v(Block p_147773_1_, int p_147773_2_, int p_147773_3_, int p_147773_4_)
@@ -414,9 +416,9 @@
public boolean renderBlockBed(Block p_147773_1_, int p_147773_2_, int p_147773_3_, int p_147773_4_)
{
Tessellator tessellator = Tessellator.instance;
- int l = this.field_147845_a.getBlockMetadata(p_147773_2_, p_147773_3_, p_147773_4_);
- int i1 = BlockBed.func_149895_l(l);
- boolean flag = BlockBed.func_149975_b(l);
+ Block bed = this.field_147845_a.func_147439_a(p_147773_2_, p_147773_3_, p_147773_4_);
+ int i1 = bed.getBedDirection(field_147845_a, p_147773_2_, p_147773_3_, p_147773_4_);
+ boolean flag = bed.isBedFoot(field_147845_a, p_147773_2_, p_147773_3_, p_147773_4_);
- int l = this.blockAccess.getBlockMetadata(p_147773_2_, p_147773_3_, p_147773_4_);
- int i1 = BlockBed.getDirection(l);
- boolean flag = BlockBed.isBlockHeadOfBed(l);
+ Block bed = this.blockAccess.getBlock(p_147773_2_, p_147773_3_, p_147773_4_);
+ int i1 = bed.getBedDirection(blockAccess, p_147773_2_, p_147773_3_, p_147773_4_);
+ boolean flag = bed.isBedFoot(blockAccess, p_147773_2_, p_147773_3_, p_147773_4_);
float f = 0.5F;
float f1 = 1.0F;
float f2 = 0.8F;
@@ -347,6 +349,7 @@
@@ -425,6 +427,7 @@
tessellator.setBrightness(j1);
tessellator.setColorOpaque_F(f, f, f);
IIcon iicon = this.func_147793_a(p_147773_1_, this.field_147845_a, p_147773_2_, p_147773_3_, p_147773_4_, 0);
+ if (func_147744_b()) iicon = field_147840_d; //BugFix Proper breaking texture on underside
IIcon iicon = this.getBlockIcon(p_147773_1_, this.blockAccess, p_147773_2_, p_147773_3_, p_147773_4_, 0);
+ if (hasOverrideBlockTexture()) iicon = overrideBlockTexture; //BugFix Proper breaking texture on underside
double d0 = (double)iicon.getMinU();
double d1 = (double)iicon.getMaxU();
double d2 = (double)iicon.getMinV();
@@ -363,6 +366,7 @@
tessellator.setBrightness(p_147773_1_.func_149677_c(this.field_147845_a, p_147773_2_, p_147773_3_ + 1, p_147773_4_));
@@ -441,6 +444,7 @@
tessellator.setBrightness(p_147773_1_.getMixedBrightnessForBlock(this.blockAccess, p_147773_2_, p_147773_3_ + 1, p_147773_4_));
tessellator.setColorOpaque_F(f1, f1, f1);
iicon = this.func_147793_a(p_147773_1_, this.field_147845_a, p_147773_2_, p_147773_3_, p_147773_4_, 1);
+ if (func_147744_b()) iicon = field_147840_d; //BugFix Proper breaking texture on underside
iicon = this.getBlockIcon(p_147773_1_, this.blockAccess, p_147773_2_, p_147773_3_, p_147773_4_, 1);
+ if (hasOverrideBlockTexture()) iicon = overrideBlockTexture; //BugFix Proper breaking texture on underside
d0 = (double)iicon.getMinU();
d1 = (double)iicon.getMaxU();
d2 = (double)iicon.getMinV();
@@ -2037,7 +2041,7 @@
@@ -2135,7 +2139,7 @@
double d9;
double d10;
- if (!World.func_147466_a(this.field_147845_a, p_147801_2_, p_147801_3_ - 1, p_147801_4_) && !Blocks.fire.func_149844_e(this.field_147845_a, p_147801_2_, p_147801_3_ - 1, p_147801_4_))
+ if (!World.func_147466_a(this.field_147845_a, p_147801_2_, p_147801_3_ - 1, p_147801_4_) && !Blocks.fire.canCatchFire(this.field_147845_a, p_147801_2_, p_147801_3_ - 1, p_147801_4_, UP))
- if (!World.doesBlockHaveSolidTopSurface(this.blockAccess, p_147801_2_, p_147801_3_ - 1, p_147801_4_) && !Blocks.fire.canBlockCatchFire(this.blockAccess, p_147801_2_, p_147801_3_ - 1, p_147801_4_))
+ if (!World.doesBlockHaveSolidTopSurface(this.blockAccess, p_147801_2_, p_147801_3_ - 1, p_147801_4_) && !Blocks.fire.canCatchFire(this.blockAccess, p_147801_2_, p_147801_3_ - 1, p_147801_4_, UP))
{
float f2 = 0.2F;
float f1 = 0.0625F;
@@ -2057,7 +2061,7 @@
@@ -2155,7 +2159,7 @@
d0 = d5;
}
- if (Blocks.fire.func_149844_e(this.field_147845_a, p_147801_2_ - 1, p_147801_3_, p_147801_4_))
+ if (Blocks.fire.canCatchFire(this.field_147845_a, p_147801_2_ - 1, p_147801_3_, p_147801_4_, EAST))
- if (Blocks.fire.canBlockCatchFire(this.blockAccess, p_147801_2_ - 1, p_147801_3_, p_147801_4_))
+ if (Blocks.fire.canCatchFire(this.blockAccess, p_147801_2_ - 1, p_147801_3_, p_147801_4_, EAST))
{
tessellator.addVertexWithUV((double)((float)p_147801_2_ + f2), (double)((float)p_147801_3_ + f + f1), (double)(p_147801_4_ + 1), d2, d1);
tessellator.addVertexWithUV((double)(p_147801_2_ + 0), (double)((float)(p_147801_3_ + 0) + f1), (double)(p_147801_4_ + 1), d2, d3);
@@ -2069,7 +2073,7 @@
@@ -2167,7 +2171,7 @@
tessellator.addVertexWithUV((double)((float)p_147801_2_ + f2), (double)((float)p_147801_3_ + f + f1), (double)(p_147801_4_ + 1), d2, d1);
}
- if (Blocks.fire.func_149844_e(this.field_147845_a, p_147801_2_ + 1, p_147801_3_, p_147801_4_))
+ if (Blocks.fire.canCatchFire(this.field_147845_a, p_147801_2_ + 1, p_147801_3_, p_147801_4_, WEST))
- if (Blocks.fire.canBlockCatchFire(this.blockAccess, p_147801_2_ + 1, p_147801_3_, p_147801_4_))
+ if (Blocks.fire.canCatchFire(this.blockAccess, p_147801_2_ + 1, p_147801_3_, p_147801_4_, WEST))
{
tessellator.addVertexWithUV((double)((float)(p_147801_2_ + 1) - f2), (double)((float)p_147801_3_ + f + f1), (double)(p_147801_4_ + 0), d0, d1);
tessellator.addVertexWithUV((double)(p_147801_2_ + 1 - 0), (double)((float)(p_147801_3_ + 0) + f1), (double)(p_147801_4_ + 0), d0, d3);
@@ -2081,7 +2085,7 @@
@@ -2179,7 +2183,7 @@
tessellator.addVertexWithUV((double)((float)(p_147801_2_ + 1) - f2), (double)((float)p_147801_3_ + f + f1), (double)(p_147801_4_ + 0), d0, d1);
}
- if (Blocks.fire.func_149844_e(this.field_147845_a, p_147801_2_, p_147801_3_, p_147801_4_ - 1))
+ if (Blocks.fire.canCatchFire(this.field_147845_a, p_147801_2_, p_147801_3_, p_147801_4_ - 1, SOUTH))
- if (Blocks.fire.canBlockCatchFire(this.blockAccess, p_147801_2_, p_147801_3_, p_147801_4_ - 1))
+ if (Blocks.fire.canCatchFire(this.blockAccess, p_147801_2_, p_147801_3_, p_147801_4_ - 1, SOUTH))
{
tessellator.addVertexWithUV((double)(p_147801_2_ + 0), (double)((float)p_147801_3_ + f + f1), (double)((float)p_147801_4_ + f2), d2, d1);
tessellator.addVertexWithUV((double)(p_147801_2_ + 0), (double)((float)(p_147801_3_ + 0) + f1), (double)(p_147801_4_ + 0), d2, d3);
@@ -2093,7 +2097,7 @@
@@ -2191,7 +2195,7 @@
tessellator.addVertexWithUV((double)(p_147801_2_ + 0), (double)((float)p_147801_3_ + f + f1), (double)((float)p_147801_4_ + f2), d2, d1);
}
- if (Blocks.fire.func_149844_e(this.field_147845_a, p_147801_2_, p_147801_3_, p_147801_4_ + 1))
+ if (Blocks.fire.canCatchFire(this.field_147845_a, p_147801_2_, p_147801_3_, p_147801_4_ + 1, NORTH))
- if (Blocks.fire.canBlockCatchFire(this.blockAccess, p_147801_2_, p_147801_3_, p_147801_4_ + 1))
+ if (Blocks.fire.canCatchFire(this.blockAccess, p_147801_2_, p_147801_3_, p_147801_4_ + 1, NORTH))
{
tessellator.addVertexWithUV((double)(p_147801_2_ + 1), (double)((float)p_147801_3_ + f + f1), (double)((float)(p_147801_4_ + 1) - f2), d0, d1);
tessellator.addVertexWithUV((double)(p_147801_2_ + 1), (double)((float)(p_147801_3_ + 0) + f1), (double)(p_147801_4_ + 1 - 0), d0, d3);
@@ -2105,7 +2109,7 @@
@@ -2203,7 +2207,7 @@
tessellator.addVertexWithUV((double)(p_147801_2_ + 1), (double)((float)p_147801_3_ + f + f1), (double)((float)(p_147801_4_ + 1) - f2), d0, d1);
}
- if (Blocks.fire.func_149844_e(this.field_147845_a, p_147801_2_, p_147801_3_ + 1, p_147801_4_))
+ if (Blocks.fire.canCatchFire(this.field_147845_a, p_147801_2_, p_147801_3_ + 1, p_147801_4_, DOWN))
- if (Blocks.fire.canBlockCatchFire(this.blockAccess, p_147801_2_, p_147801_3_ + 1, p_147801_4_))
+ if (Blocks.fire.canCatchFire(this.blockAccess, p_147801_2_, p_147801_3_ + 1, p_147801_4_, DOWN))
{
d5 = (double)p_147801_2_ + 0.5D + 0.5D;
d6 = (double)p_147801_2_ + 0.5D - 0.5D;
@@ -3118,10 +3122,10 @@
@@ -3217,10 +3221,10 @@
double d16 = (double)p_147767_2_ + 0.5D + 0.0625D;
double d17 = (double)p_147767_4_ + 0.5D - 0.0625D;
double d18 = (double)p_147767_4_ + 0.5D + 0.0625D;
- boolean flag = p_147767_1_.func_150098_a(this.field_147845_a.func_147439_a(p_147767_2_, p_147767_3_, p_147767_4_ - 1));
- boolean flag1 = p_147767_1_.func_150098_a(this.field_147845_a.func_147439_a(p_147767_2_, p_147767_3_, p_147767_4_ + 1));
- boolean flag2 = p_147767_1_.func_150098_a(this.field_147845_a.func_147439_a(p_147767_2_ - 1, p_147767_3_, p_147767_4_));
- boolean flag3 = p_147767_1_.func_150098_a(this.field_147845_a.func_147439_a(p_147767_2_ + 1, p_147767_3_, p_147767_4_));
+ boolean flag = p_147767_1_.canPaneConnectTo(this.field_147845_a, p_147767_2_, p_147767_3_, p_147767_4_ - 1, NORTH);
+ boolean flag1 = p_147767_1_.canPaneConnectTo(this.field_147845_a, p_147767_2_, p_147767_3_, p_147767_4_ + 1, SOUTH);
+ boolean flag2 = p_147767_1_.canPaneConnectTo(this.field_147845_a, p_147767_2_ - 1, p_147767_3_, p_147767_4_, WEST );
+ boolean flag3 = p_147767_1_.canPaneConnectTo(this.field_147845_a, p_147767_2_ + 1, p_147767_3_, p_147767_4_, EAST );
boolean flag4 = p_147767_1_.func_149646_a(this.field_147845_a, p_147767_2_, p_147767_3_ + 1, p_147767_4_, 1);
boolean flag5 = p_147767_1_.func_149646_a(this.field_147845_a, p_147767_2_, p_147767_3_ - 1, p_147767_4_, 0);
- boolean flag = p_147767_1_.canPaneConnectToBlock(this.blockAccess.getBlock(p_147767_2_, p_147767_3_, p_147767_4_ - 1));
- boolean flag1 = p_147767_1_.canPaneConnectToBlock(this.blockAccess.getBlock(p_147767_2_, p_147767_3_, p_147767_4_ + 1));
- boolean flag2 = p_147767_1_.canPaneConnectToBlock(this.blockAccess.getBlock(p_147767_2_ - 1, p_147767_3_, p_147767_4_));
- boolean flag3 = p_147767_1_.canPaneConnectToBlock(this.blockAccess.getBlock(p_147767_2_ + 1, p_147767_3_, p_147767_4_));
+ boolean flag = p_147767_1_.canPaneConnectTo(this.blockAccess, p_147767_2_, p_147767_3_, p_147767_4_ - 1, NORTH);
+ boolean flag1 = p_147767_1_.canPaneConnectTo(this.blockAccess, p_147767_2_, p_147767_3_, p_147767_4_ + 1, SOUTH);
+ boolean flag2 = p_147767_1_.canPaneConnectTo(this.blockAccess, p_147767_2_ - 1, p_147767_3_, p_147767_4_, WEST );
+ boolean flag3 = p_147767_1_.canPaneConnectTo(this.blockAccess, p_147767_2_ + 1, p_147767_3_, p_147767_4_, EAST );
boolean flag4 = p_147767_1_.shouldSideBeRendered(this.blockAccess, p_147767_2_, p_147767_3_ + 1, p_147767_4_, 1);
boolean flag5 = p_147767_1_.shouldSideBeRendered(this.blockAccess, p_147767_2_, p_147767_3_ - 1, p_147767_4_, 0);
double d19 = 0.01D;

View File

@ -10,9 +10,9 @@
@SideOnly(Side.CLIENT)
public class RenderGlobal implements IWorldAccess
{
@@ -411,8 +414,10 @@
public void func_147589_a(EntityLivingBase p_147589_1_, ICamera p_147589_2_, float p_147589_3_)
@@ -413,8 +416,10 @@
// JAVADOC METHOD $$ func_147589_a
public void renderEntities(EntityLivingBase p_147589_1_, ICamera p_147589_2_, float p_147589_3_)
{
+ int pass = MinecraftForgeClient.getRenderPass();
if (this.renderEntitiesStartupCounter > 0)
@ -21,10 +21,10 @@
--this.renderEntitiesStartupCounter;
}
else
@@ -423,9 +428,12 @@
@@ -425,9 +430,12 @@
this.theWorld.theProfiler.startSection("prepare");
TileEntityRendererDispatcher.field_147556_a.func_147542_a(this.theWorld, this.mc.getTextureManager(), this.mc.fontRenderer, this.mc.renderViewEntity, p_147589_3_);
RenderManager.instance.func_147938_a(this.theWorld, this.mc.getTextureManager(), this.mc.fontRenderer, this.mc.renderViewEntity, this.mc.field_147125_j, this.mc.gameSettings, p_147589_3_);
TileEntityRendererDispatcher.instance.cacheActiveRenderInfo(this.theWorld, this.mc.getTextureManager(), this.mc.fontRenderer, this.mc.renderViewEntity, p_147589_3_);
RenderManager.instance.cacheActiveRenderInfo(this.theWorld, this.mc.getTextureManager(), this.mc.fontRenderer, this.mc.renderViewEntity, this.mc.pointedEntity, this.mc.gameSettings, p_147589_3_);
+ if (pass == 0) // no indentation to shrink patch
+ {
this.countEntitiesTotal = 0;
@ -34,7 +34,7 @@
EntityLivingBase entitylivingbase1 = this.mc.renderViewEntity;
double d3 = entitylivingbase1.lastTickPosX + (entitylivingbase1.posX - entitylivingbase1.lastTickPosX) * (double)p_147589_3_;
double d4 = entitylivingbase1.lastTickPosY + (entitylivingbase1.posY - entitylivingbase1.lastTickPosY) * (double)p_147589_3_;
@@ -454,13 +462,17 @@
@@ -456,13 +464,17 @@
this.mc.entityRenderer.enableLightmap((double)p_147589_3_);
this.theWorld.theProfiler.endStartSection("global");
List list = this.theWorld.getLoadedEntityList();
@ -51,29 +51,29 @@
+ if (!entity.shouldRenderInPass(pass)) continue;
++this.countEntitiesRendered;
if (entity.func_145770_h(d0, d1, d2))
@@ -474,6 +486,7 @@
if (entity.isInRangeToRender3d(d0, d1, d2))
@@ -476,6 +488,7 @@
for (i = 0; i < list.size(); ++i)
{
entity = (Entity)list.get(i);
+ if (!entity.shouldRenderInPass(pass)) continue;
boolean flag = entity.func_145770_h(d0, d1, d2) && (entity.ignoreFrustumCheck || p_147589_2_.isBoundingBoxInFrustum(entity.boundingBox) || entity.riddenByEntity == this.mc.thePlayer);
boolean flag = entity.isInRangeToRender3d(d0, d1, d2) && (entity.ignoreFrustumCheck || p_147589_2_.isBoundingBoxInFrustum(entity.boundingBox) || entity.riddenByEntity == this.mc.thePlayer);
if (!flag && entity instanceof EntityLiving)
@@ -499,7 +512,11 @@
@@ -501,7 +514,11 @@
for (i = 0; i < this.field_147598_a.size(); ++i)
for (i = 0; i < this.tileEntities.size(); ++i)
{
- TileEntityRendererDispatcher.field_147556_a.func_147544_a((TileEntity)this.field_147598_a.get(i), p_147589_3_);
+ TileEntity tile = (TileEntity)this.field_147598_a.get(i);
- TileEntityRendererDispatcher.instance.renderTileEntity((TileEntity)this.tileEntities.get(i), p_147589_3_);
+ TileEntity tile = (TileEntity)this.tileEntities.get(i);
+ if (tile.shouldRenderInPass(pass) && p_147589_2_.isBoundingBoxInFrustum(tile.getRenderBoundingBox()))
+ {
+ TileEntityRendererDispatcher.field_147556_a.func_147544_a(tile, p_147589_3_);
+ TileEntityRendererDispatcher.instance.renderTileEntity(tile, p_147589_3_);
+ }
}
this.mc.entityRenderer.disableLightmap((double)p_147589_3_);
@@ -976,6 +993,12 @@
@@ -978,6 +995,12 @@
// JAVADOC METHOD $$ func_72714_a
public void renderSky(float par1)
{
@ -86,7 +86,7 @@
if (this.mc.theWorld.provider.dimensionId == 1)
{
GL11.glDisable(GL11.GL_FOG);
@@ -1214,6 +1237,12 @@
@@ -1216,6 +1239,12 @@
public void renderClouds(float par1)
{
@ -99,7 +99,7 @@
if (this.mc.theWorld.provider.isSurfaceWorld())
{
if (this.mc.gameSettings.fancyGraphics)
@@ -1617,6 +1646,11 @@
@@ -1619,6 +1648,11 @@
public void drawBlockDamageTexture(Tessellator par1Tessellator, EntityPlayer par2EntityPlayer, float par3)
{
@ -111,20 +111,20 @@
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;
@@ -1839,12 +1873,15 @@
@@ -1845,12 +1879,15 @@
{
ItemRecord itemrecord = ItemRecord.func_150926_b(par1Str);
ItemRecord itemrecord = ItemRecord.getRecord(par1Str);
+ ResourceLocation resource = null;
if (itemrecord != null)
{
this.mc.ingameGUI.setRecordPlayingMessage(itemrecord.func_150927_i());
this.mc.ingameGUI.setRecordPlayingMessage(itemrecord.getRecordNameLocal());
+ resource = itemrecord.getRecordResource(par1Str);
}
- PositionedSoundRecord positionedsoundrecord = PositionedSoundRecord.func_147675_a(new ResourceLocation(par1Str), (float)par2, (float)par3, (float)par4);
+ if (resource == null) resource = new ResourceLocation(par1Str);
+ PositionedSoundRecord positionedsoundrecord = PositionedSoundRecord.func_147675_a(resource, (float)par2, (float)par3, (float)par4);
this.field_147593_P.put(chunkcoordinates, positionedsoundrecord);
this.mc.func_147118_V().func_147682_a(positionedsoundrecord);
this.mapSoundPositions.put(chunkcoordinates, positionedsoundrecord);
this.mc.getSoundHandler().playSound(positionedsoundrecord);
}

View File

@ -8,7 +8,7 @@
import java.util.PriorityQueue;
import net.minecraft.client.shader.TesselatorVertexState;
import net.minecraft.client.util.QuadComparator;
@@ -15,11 +16,18 @@
@@ -15,14 +16,21 @@
@SideOnly(Side.CLIENT)
public class Tessellator
{
@ -21,25 +21,28 @@
+
// JAVADOC FIELD $$ field_78394_d
- private ByteBuffer byteBuffer;
- private IntBuffer field_147568_c;
- private FloatBuffer field_147566_d;
- private ShortBuffer field_147567_e;
+ private static ByteBuffer byteBuffer = GLAllocation.createDirectByteBuffer(nativeBufferSize * 4);
+ private static IntBuffer field_147568_c = byteBuffer.asIntBuffer();
+ private static FloatBuffer field_147566_d = byteBuffer.asFloatBuffer();
+ private static ShortBuffer field_147567_e = byteBuffer.asShortBuffer();
// JAVADOC FIELD $$ field_147568_c
- private IntBuffer intBuffer;
+ private static IntBuffer intBuffer = byteBuffer.asIntBuffer();
// JAVADOC FIELD $$ field_147566_d
- private FloatBuffer floatBuffer;
+ private static FloatBuffer floatBuffer = byteBuffer.asFloatBuffer();
// JAVADOC FIELD $$ field_147567_e
- private ShortBuffer shortBuffer;
+ private static ShortBuffer shortBuffer = byteBuffer.asShortBuffer();
// JAVADOC FIELD $$ field_78405_h
private int[] rawBuffer;
// JAVADOC FIELD $$ field_78406_i
@@ -63,14 +71,17 @@
@@ -67,14 +75,17 @@
private Tessellator(int par1)
{
- this.bufferSize = par1;
- this.byteBuffer = GLAllocation.createDirectByteBuffer(par1 * 4);
- this.field_147568_c = this.byteBuffer.asIntBuffer();
- this.field_147566_d = this.byteBuffer.asFloatBuffer();
- this.field_147567_e = this.byteBuffer.asShortBuffer();
- this.intBuffer = this.byteBuffer.asIntBuffer();
- this.floatBuffer = this.byteBuffer.asFloatBuffer();
- this.shortBuffer = this.byteBuffer.asShortBuffer();
- this.rawBuffer = new int[par1];
}
@ -55,7 +58,7 @@
// JAVADOC METHOD $$ func_78381_a
public int draw()
{
@@ -82,12 +93,15 @@
@@ -86,12 +97,15 @@
{
this.isDrawing = false;
@ -64,43 +67,43 @@
+ while (offs < vertexCount)
{
+ int vtc = Math.min(vertexCount - offs, nativeBufferSize >> 5);
this.field_147568_c.clear();
- this.field_147568_c.put(this.rawBuffer, 0, this.field_147569_p);
+ this.field_147568_c.put(this.rawBuffer, offs * 8, vtc * 8);
this.intBuffer.clear();
- this.intBuffer.put(this.rawBuffer, 0, this.rawBufferIndex);
+ this.intBuffer.put(this.rawBuffer, offs * 8, vtc * 8);
this.byteBuffer.position(0);
- this.byteBuffer.limit(this.field_147569_p * 4);
- this.byteBuffer.limit(this.rawBufferIndex * 4);
+ this.byteBuffer.limit(vtc * 32);
+ offs += vtc;
if (this.hasTexture)
{
@@ -122,7 +136,7 @@
this.field_147566_d.position(0);
GL11.glVertexPointer(3, 32, this.field_147566_d);
@@ -126,7 +140,7 @@
this.floatBuffer.position(0);
GL11.glVertexPointer(3, 32, this.floatBuffer);
GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY);
- GL11.glDrawArrays(this.drawMode, 0, this.vertexCount);
+ GL11.glDrawArrays(this.drawMode, 0, vtc);
GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY);
if (this.hasTexture)
@@ -148,6 +162,12 @@
@@ -152,6 +166,12 @@
}
}
+ if (rawBufferSize > 0x20000 && field_147569_p < (rawBufferSize << 3))
+ if (rawBufferSize > 0x20000 && rawBufferIndex < (rawBufferSize << 3))
+ {
+ rawBufferSize = 0x10000;
+ rawBuffer = new int[rawBufferSize];
+ }
+
int i = this.field_147569_p * 4;
int i = this.rawBufferIndex * 4;
this.reset();
return i;
@@ -182,6 +202,14 @@
@@ -186,6 +206,14 @@
public void func_147565_a(TesselatorVertexState p_147565_1_)
public void setVertexState(TesselatorVertexState p_147565_1_)
{
+ while (p_147565_1_.func_147572_a().length > rawBufferSize && rawBufferSize > 0)
+ while (p_147565_1_.getRawBuffer().length > rawBufferSize && rawBufferSize > 0)
+ {
+ rawBufferSize <<= 1;
+ }
@ -108,14 +111,14 @@
+ {
+ rawBuffer = new int[rawBufferSize];
+ }
System.arraycopy(p_147565_1_.func_147572_a(), 0, this.rawBuffer, 0, p_147565_1_.func_147572_a().length);
this.field_147569_p = p_147565_1_.func_147576_b();
this.vertexCount = p_147565_1_.func_147575_c();
@@ -326,6 +354,19 @@
System.arraycopy(p_147565_1_.getRawBuffer(), 0, this.rawBuffer, 0, p_147565_1_.getRawBuffer().length);
this.rawBufferIndex = p_147565_1_.getRawBufferIndex();
this.vertexCount = p_147565_1_.getVertexCount();
@@ -330,6 +358,19 @@
// JAVADOC METHOD $$ func_78377_a
public void addVertex(double par1, double par3, double par5)
{
+ if (field_147569_p >= rawBufferSize - 32)
+ if (rawBufferIndex >= rawBufferSize - 32)
+ {
+ if (rawBufferSize == 0)
+ {
@ -131,12 +134,12 @@
++this.addedVertices;
if (this.hasTexture)
@@ -354,12 +395,6 @@
this.rawBuffer[this.field_147569_p + 2] = Float.floatToRawIntBits((float)(par5 + this.zOffset));
this.field_147569_p += 8;
@@ -358,12 +399,6 @@
this.rawBuffer[this.rawBufferIndex + 2] = Float.floatToRawIntBits((float)(par5 + this.zOffset));
this.rawBufferIndex += 8;
++this.vertexCount;
-
- if (this.vertexCount % 4 == 0 && this.field_147569_p >= this.bufferSize - 32)
- if (this.vertexCount % 4 == 0 && this.rawBufferIndex >= this.bufferSize - 32)
- {
- this.draw();
- this.isDrawing = true;

View File

@ -9,16 +9,16 @@
public static int chunksUpdated;
public int posX;
public int posY;
@@ -177,7 +177,7 @@
this.func_147890_b(k2);
@@ -179,7 +179,7 @@
this.preRenderBlocks(k2);
}
- if (k2 == 0 && block.func_149716_u())
- if (k2 == 0 && block.hasTileEntity())
+ if (k2 == 0 && block.hasTileEntity(chunkcache.getBlockMetadata(j3, l2, i3)))
{
TileEntity tileentity = chunkcache.func_147438_o(j3, l2, i3);
TileEntity tileentity = chunkcache.getTileEntity(j3, l2, i3);
@@ -193,7 +193,9 @@
@@ -195,7 +195,9 @@
{
flag = true;
}
@ -27,9 +27,9 @@
+ if (!block.canRenderInPass(k2)) continue;
+
{
flag1 |= renderblocks.func_147805_b(block, j3, l2, i3);
flag1 |= renderblocks.renderBlockByRenderType(block, j3, l2, i3);
@@ -252,21 +254,22 @@
@@ -254,21 +256,22 @@
GL11.glTranslatef(-8.0F, -8.0F, -8.0F);
GL11.glScalef(f, f, f);
GL11.glTranslatef(8.0F, 8.0F, 8.0F);
@ -39,12 +39,12 @@
+ Tessellator.instance.setTranslation((double)(-this.posX), (double)(-this.posY), (double)(-this.posZ));
}
private void func_147891_a(int p_147891_1_, EntityLivingBase p_147891_2_)
private void postRenderBlocks(int p_147891_1_, EntityLivingBase p_147891_2_)
{
if (p_147891_1_ == 1 && !this.skipRenderPass[p_147891_1_])
{
- this.field_147894_y = tessellator.func_147564_a((float)p_147891_2_.posX, (float)p_147891_2_.posY, (float)p_147891_2_.posZ);
+ this.field_147894_y = Tessellator.instance.func_147564_a((float)p_147891_2_.posX, (float)p_147891_2_.posY, (float)p_147891_2_.posZ);
- this.vertexState = tessellator.getVertexState((float)p_147891_2_.posX, (float)p_147891_2_.posY, (float)p_147891_2_.posZ);
+ this.vertexState = Tessellator.instance.getVertexState((float)p_147891_2_.posX, (float)p_147891_2_.posY, (float)p_147891_2_.posZ);
}
- this.bytesDrawn += tessellator.draw();
@ -56,13 +56,13 @@
+ Tessellator.instance.setTranslation(0.0D, 0.0D, 0.0D);
}
public void func_147889_b(EntityLivingBase p_147889_1_)
@@ -274,7 +277,7 @@
if (this.field_147894_y != null && !this.skipRenderPass[1])
public void updateRendererSort(EntityLivingBase p_147889_1_)
@@ -276,7 +279,7 @@
if (this.vertexState != null && !this.skipRenderPass[1])
{
this.func_147890_b(1);
- tessellator.func_147565_a(this.field_147894_y);
+ Tessellator.instance.func_147565_a(this.field_147894_y);
this.func_147891_a(1, p_147889_1_);
this.preRenderBlocks(1);
- tessellator.setVertexState(this.vertexState);
+ Tessellator.instance.setVertexState(this.vertexState);
this.postRenderBlocks(1, p_147889_1_);
}
}

View File

@ -76,8 +76,8 @@
+
if (item instanceof ItemBlock)
{
- if (RenderBlocks.func_147739_a(Block.func_149634_a(item).func_149645_b()))
+ if (is3D || RenderBlocks.func_147739_a(Block.func_149634_a(item).func_149645_b()))
- if (RenderBlocks.renderItemIn3d(Block.getBlockFromItem(item).getRenderType()))
+ if (is3D || RenderBlocks.renderItemIn3d(Block.getBlockFromItem(item).getRenderType()))
{
f1 = 0.625F;
GL11.glTranslatef(0.0F, -0.25F, 0.0F);
@ -85,11 +85,11 @@
this.modelBipedMain.bipedRightArm.postRender(0.0625F);
GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F);
- if (item instanceof ItemBlock && RenderBlocks.func_147739_a(Block.func_149634_a(item).func_149645_b()))
- if (item instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(item).getRenderType()))
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack, EQUIPPED);
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack, BLOCK_3D));
+
+ if (item instanceof ItemBlock && (is3D || RenderBlocks.func_147739_a(Block.func_149634_a(item).func_149645_b())))
+ if (item instanceof ItemBlock && (is3D || RenderBlocks.renderItemIn3d(Block.getBlockFromItem(item).getRenderType())))
{
f1 = 0.5F;
GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);

View File

@ -43,9 +43,9 @@
+ ;
+ }
+ else // Code Style break here to prevent the patch from editing this line
if (itemstack.getItemSpriteNumber() == 0 && itemstack.getItem() instanceof ItemBlock && RenderBlocks.func_147739_a(Block.func_149634_a(itemstack.getItem()).func_149645_b()))
if (itemstack.getItemSpriteNumber() == 0 && itemstack.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemstack.getItem()).getRenderType()))
{
Block block = Block.func_149634_a(itemstack.getItem());
Block block = Block.getBlockFromItem(itemstack.getItem());
@@ -140,7 +150,7 @@
{
float f5;
@ -89,7 +89,7 @@
+ this.renderDroppedItem(par1EntityItem, par2Icon, par3, par4, par5, par6, par7, 0);
+ }
+
+ // JAVADOC METHOD $$ func_77020_a
+ // JAVADOC METHOD $$ renderDroppedItem
+ private void renderDroppedItem(EntityItem par1EntityItem, IIcon par2Icon, int par3, float par4, float par5, float par6, float par7, int pass)
+ {
Tessellator tessellator = Tessellator.instance;
@ -137,7 +137,7 @@
+ this.renderItemIntoGUI(par1FontRenderer, par2TextureManager, par3ItemStack, par4, par5, false);
+ }
+
+ // JAVADOC METHOD $$ func_77015_a
+ // JAVADOC METHOD $$ renderItemIntoGUI
+ public void renderItemIntoGUI(FontRenderer par1FontRenderer, TextureManager par2TextureManager, ItemStack par3ItemStack, int par4, int par5, boolean renderEffect)
+ {
int k = par3ItemStack.getItemDamage();
@ -147,14 +147,14 @@
GL11.glColorMask(true, true, true, true);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL11.GL_ALPHA_TEST);
- OpenGlHelper.func_148821_a(770, 771, 1, 0);
- OpenGlHelper.glBlendFunc(770, 771, 1, 0);
- for (l = 0; l <= 1; ++l)
+ Item item = par3ItemStack.getItem();
+ for (l = 0; l < item.getRenderPasses(k); ++l)
{
- IIcon iicon = par3ItemStack.getItem().getIconFromDamageForRenderPass(k, l);
+ OpenGlHelper.func_148821_a(770, 771, 1, 0);
+ OpenGlHelper.glBlendFunc(770, 771, 1, 0);
+ par2TextureManager.bindTexture(item.getSpriteNumber() == 0 ? TextureMap.locationBlocksTexture : TextureMap.locationItemsTexture);
+ IIcon iicon = item.getIcon(par3ItemStack, l);
int i1 = par3ItemStack.getItem().getColorFromItemStack(par3ItemStack, l);

View File

@ -1,9 +1,9 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
@@ -218,11 +218,13 @@
@@ -219,11 +219,13 @@
if (p_147938_4_.isPlayerSleeping())
{
Block block = p_147938_1_.func_147439_a(MathHelper.floor_double(p_147938_4_.posX), MathHelper.floor_double(p_147938_4_.posY), MathHelper.floor_double(p_147938_4_.posZ));
Block block = p_147938_1_.getBlock(MathHelper.floor_double(p_147938_4_.posX), MathHelper.floor_double(p_147938_4_.posY), MathHelper.floor_double(p_147938_4_.posZ));
+ int x = MathHelper.floor_double(p_147938_4_.posX);
+ int y = MathHelper.floor_double(p_147938_4_.posY);
+ int z = MathHelper.floor_double(p_147938_4_.posZ);

View File

@ -114,11 +114,11 @@
if (itemstack.getItem() instanceof ItemBlock)
{
- if (RenderBlocks.func_147739_a(Block.func_149634_a(itemstack.getItem()).func_149645_b()))
- if (RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemstack.getItem()).getRenderType()))
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack, EQUIPPED);
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack, BLOCK_3D));
+
+ if (is3D || RenderBlocks.func_147739_a(Block.func_149634_a(itemstack.getItem()).func_149645_b()))
+ if (is3D || RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemstack.getItem()).getRenderType()))
{
f1 = 0.625F;
GL11.glTranslatef(0.0F, -0.25F, 0.0F);
@ -143,11 +143,11 @@
enumaction = itemstack1.getItemUseAction();
}
- if (itemstack1.getItem() instanceof ItemBlock && RenderBlocks.func_147739_a(Block.func_149634_a(itemstack1.getItem()).func_149645_b()))
- if (itemstack1.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemstack1.getItem()).getRenderType()))
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack1, EQUIPPED);
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack1, BLOCK_3D));
+
+ if (is3D || itemstack1.getItem() instanceof ItemBlock && RenderBlocks.func_147739_a(Block.func_149634_a(itemstack1.getItem()).func_149645_b()))
+ if (is3D || itemstack1.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemstack1.getItem()).getRenderType()))
{
f3 = 0.5F;
GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);

View File

@ -15,11 +15,11 @@
GL11.glPushMatrix();
this.snowmanModel.head.postRender(0.0625F);
- if (RenderBlocks.func_147739_a(Block.func_149634_a(itemstack.getItem()).func_149645_b()))
- if (RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemstack.getItem()).getRenderType()))
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack, EQUIPPED);
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack, BLOCK_3D));
+
+ if (is3D || RenderBlocks.func_147739_a(Block.func_149634_a(itemstack.getItem()).func_149645_b()))
+ if (is3D || RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemstack.getItem()).getRenderType()))
{
float f1 = 0.625F;
GL11.glTranslatef(0.0F, -0.34375F, 0.0F);

View File

@ -15,7 +15,7 @@
+ registerIcons(); //Re-gather list of Icons, allows for addition/removal of blocks/items after this map was initially constructed.
+
int i = Minecraft.getGLMaximumTextureSize();
Stitcher stitcher = new Stitcher(i, i, true, 0, this.field_147636_j);
Stitcher stitcher = new Stitcher(i, i, true, 0, this.mipmapLevels);
this.mapUploadedSprites.clear();
this.listAnimatedSprites.clear();
int j = Integer.MAX_VALUE;
@ -25,7 +25,7 @@
@@ -107,6 +111,16 @@
textureatlassprite = (TextureAtlasSprite)entry.getValue();
ResourceLocation resourcelocation1 = this.func_147634_a(resourcelocation, 0);
ResourceLocation resourcelocation1 = this.completeResourceLocation(resourcelocation, 0);
+ if (textureatlassprite.hasCustomLoader(par1ResourceManager, resourcelocation))
+ {
@ -47,7 +47,7 @@
+ ForgeHooksClient.onTextureStitchedPost(this);
}
private ResourceLocation func_147634_a(ResourceLocation p_147634_1_, int p_147634_2_)
private ResourceLocation completeResourceLocation(ResourceLocation p_147634_1_, int p_147634_2_)
@@ -348,7 +363,7 @@
{
throw new IllegalArgumentException("Name cannot be null!");
@ -59,7 +59,7 @@
@@ -404,4 +419,37 @@
{
this.field_147637_k = p_147632_1_;
this.anisotropicFiltering = p_147632_1_;
}
+
+ //===================================================================================================

View File

@ -13,12 +13,12 @@
{
+ try
+ {
((BlockChest)block).func_149954_e(p_147502_1_.func_145831_w(), p_147502_1_.field_145851_c, p_147502_1_.field_145848_d, p_147502_1_.field_145849_e);
((BlockChest)block).func_149954_e(p_147502_1_.getWorldObj(), p_147502_1_.xCoord, p_147502_1_.yCoord, p_147502_1_.zCoord);
+ }
+ catch (ClassCastException e)
+ {
+ FMLLog.severe("Attempted to render a chest at %d, %d, %d that was not a chest", p_147502_1_.field_145851_c, p_147502_1_.field_145848_d, p_147502_1_.field_145849_e);
+ FMLLog.severe("Attempted to render a chest at %d, %d, %d that was not a chest", p_147502_1_.xCoord, p_147502_1_.yCoord, p_147502_1_.zCoord);
+ }
i = p_147502_1_.func_145832_p();
i = p_147502_1_.getBlockMetadata();
}

View File

@ -9,7 +9,7 @@
+
public class CommandHandler implements ICommandManager
{
private static final Logger field_147175_a = LogManager.getLogger();
private static final Logger logger = LogManager.getLogger();
@@ -49,6 +52,16 @@
if (icommand.canCommandSenderUseCommand(par1ICommandSender))

View File

@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/crash/CrashReport.java
+++ ../src-work/minecraft/net/minecraft/crash/CrashReport.java
@@ -328,7 +328,8 @@
@@ -330,7 +330,8 @@
StackTraceElement stacktraceelement = null;
StackTraceElement stacktraceelement1 = null;

View File

@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/crash/CrashReportCategory.java
+++ ../src-work/minecraft/net/minecraft/crash/CrashReportCategory.java
@@ -131,8 +131,11 @@
@@ -132,8 +132,11 @@
}
else
{

View File

@ -52,7 +52,7 @@
- if (item != null && item.getCreativeTab() == this)
+ if (item == null)
{
- item.func_150895_a(item, this, par1List);
- item.getSubItems(item, this, par1List);
+ continue;
}
+
@ -60,7 +60,7 @@
+ {
+ if (tab == this)
+ {
+ item.func_150895_a(item, this, par1List);
+ item.getSubItems(item, this, par1List);
+ }
+ }
}

View File

@ -56,9 +56,9 @@
+ private HashMap<String, IExtendedEntityProperties> extendedProperties;
+
public int func_145782_y()
public int getEntityId()
{
return this.field_145783_c;
return this.entityId;
@@ -189,6 +209,15 @@
this.dataWatcher.addObject(0, Byte.valueOf((byte)0));
this.dataWatcher.addObject(1, Short.valueOf((short)300));
@ -77,9 +77,9 @@
protected abstract void entityInit();
@@ -1051,9 +1080,22 @@
if (block.func_149688_o() == par1Material)
if (block.getMaterial() == par1Material)
{
- float f = BlockLiquid.func_149801_b(this.worldObj.getBlockMetadata(i, j, k)) - 0.11111111F;
- float f = BlockLiquid.getLiquidHeightPercent(this.worldObj.getBlockMetadata(i, j, k)) - 0.11111111F;
- float f1 = (float)(j + 1) - f;
- return d0 < (double)f1;
+ double filled = 1.0f; //If it's not a liquid assume it's a solid block
@ -164,7 +164,7 @@
@@ -1512,7 +1597,14 @@
{
EntityItem entityitem = new EntityItem(this.worldObj, this.posX, this.posY + (double)par2, this.posZ, par1ItemStack);
entityitem.field_145804_b = 10;
entityitem.delayBeforeCanPickup = 10;
- this.worldObj.spawnEntityInWorld(entityitem);
+ if (captureDrops)
+ {
@ -190,12 +190,12 @@
public float func_145772_a(Explosion p_145772_1_, World p_145772_2_, int p_145772_3_, int p_145772_4_, int p_145772_5_, Block p_145772_6_)
{
- return p_145772_6_.func_149638_a(this);
- return p_145772_6_.getExplosionResistance(this);
+ return p_145772_6_.getExplosionResistance(this, p_145772_2_, p_145772_3_, p_145772_3_, p_145772_4_, posX, posY + getEyeHeight(), posZ);
}
public boolean func_145774_a(Explosion p_145774_1_, World p_145774_2_, int p_145774_3_, int p_145774_4_, int p_145774_5_, Block p_145774_6_, float p_145774_7_)
@@ -2175,6 +2267,174 @@
@@ -2176,6 +2268,174 @@
public void func_145781_i(int p_145781_1_) {}
@ -280,7 +280,7 @@
+ */
+ public final void resetEntityId()
+ {
+ this.field_145783_c = nextEntityID++;
+ this.entityId = nextEntityID++;
+ }
+
+ public boolean shouldRenderInPass(int pass)

View File

@ -97,7 +97,7 @@
@@ -1021,7 +1039,7 @@
int j = MathHelper.floor_double(this.boundingBox.minY);
int k = MathHelper.floor_double(this.posZ);
Block block = this.worldObj.func_147439_a(i, j, k);
Block block = this.worldObj.getBlock(i, j, k);
- return block == Blocks.ladder || block == Blocks.vine;
+ return ForgeHooks.isLivingOnLadder(block, worldObj, i, j, k, this);
}

View File

@ -2,13 +2,13 @@
+++ ../src-work/minecraft/net/minecraft/entity/boss/EntityDragon.java
@@ -495,9 +495,9 @@
{
Block block = this.worldObj.func_147439_a(k1, l1, i2);
Block block = this.worldObj.getBlock(k1, l1, i2);
- if (block.func_149688_o() != Material.field_151579_a)
- if (block.getMaterial() != Material.air)
+ if (!block.isAir(worldObj, k1, l1, i2))
{
- if (block != Blocks.obsidian && block != Blocks.end_stone && block != Blocks.bedrock && this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing"))
+ if (block.canEntityDestroy(worldObj, k1, l1, i2, this) && this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing"))
{
flag1 = this.worldObj.func_147468_f(k1, l1, i2) || flag1;
flag1 = this.worldObj.setBlockToAir(k1, l1, i2) || flag1;
}

View File

@ -2,9 +2,9 @@
+++ ../src-work/minecraft/net/minecraft/entity/boss/EntityWither.java
@@ -355,7 +355,7 @@
int l = j1 + i2;
Block block = this.worldObj.func_147439_a(j2, k, l);
Block block = this.worldObj.getBlock(j2, k, l);
- if (block.func_149688_o() != Material.field_151579_a && block != Blocks.bedrock && block != Blocks.end_portal && block != Blocks.end_portal_frame && block != Blocks.command_block)
- if (block.getMaterial() != Material.air && block != Blocks.bedrock && block != Blocks.end_portal && block != Blocks.end_portal_frame && block != Blocks.command_block)
+ if (!block.isAir(worldObj, j2, k, l) && block.canEntityDestroy(worldObj, j2, k, l, this))
{
flag = this.worldObj.func_147480_a(j2, k, l, true) || flag;

View File

@ -11,7 +11,7 @@
{
@@ -51,6 +53,9 @@
if (entityplayermp.playerNetServerHandler.func_147362_b().func_150724_d() && entityplayermp.worldObj == this.worldObj)
if (entityplayermp.playerNetServerHandler.func_147362_b().isChannelOpen() && entityplayermp.worldObj == this.worldObj)
{
+ EnderTeleportEvent event = new EnderTeleportEvent(entityplayermp, this.posX, this.posY, this.posZ, 5.0F);
+ if (!MinecraftForge.EVENT_BUS.post(event))

View File

@ -117,7 +117,7 @@
{
if (!this.worldObj.isRemote)
{
+ if (this.field_145804_b > 0)
+ if (this.delayBeforeCanPickup > 0)
+ {
+ return;
+ }
@ -132,8 +132,8 @@
ItemStack itemstack = this.getEntityItem();
int i = itemstack.stackSize;
- if (this.field_145804_b == 0 && (this.field_145802_g == null || 6000 - this.age <= 200 || this.field_145802_g.equals(par1EntityPlayer.getCommandSenderName())) && par1EntityPlayer.inventory.addItemStackToInventory(itemstack))
+ if (this.field_145804_b <= 0 && (this.field_145802_g == null || lifespan - this.age <= 200 || this.field_145802_g.equals(par1EntityPlayer.getCommandSenderName())) && (event.getResult() == Result.ALLOW || i <= 0 || par1EntityPlayer.inventory.addItemStackToInventory(itemstack)))
- if (this.delayBeforeCanPickup == 0 && (this.field_145802_g == null || 6000 - this.age <= 200 || this.field_145802_g.equals(par1EntityPlayer.getCommandSenderName())) && par1EntityPlayer.inventory.addItemStackToInventory(itemstack))
+ if (this.delayBeforeCanPickup <= 0 && (this.field_145802_g == null || lifespan - this.age <= 200 || this.field_145802_g.equals(par1EntityPlayer.getCommandSenderName())) && (event.getResult() == Result.ALLOW || i <= 0 || par1EntityPlayer.inventory.addItemStackToInventory(itemstack)))
{
if (itemstack.getItem() == Item.func_150898_a(Blocks.log))
if (itemstack.getItem() == Item.getItemFromBlock(Blocks.log))
{

View File

@ -63,7 +63,7 @@
public EntityMinecart(World par1World, double par2, double par4, double par6)
@@ -315,19 +341,20 @@
double d2 = 0.0078125D;
Block block = this.worldObj.func_147439_a(l, i, i1);
Block block = this.worldObj.getBlock(l, i, i1);
- if (BlockRailBase.func_150051_a(block))
+ if (canUseRail() && BlockRailBase.func_150051_a(block))
@ -232,7 +232,7 @@
- int l = this.worldObj.getBlockMetadata(i, j, k);
+ int l = ((BlockRailBase)block).getBasicRailMetadata(worldObj, this, i, j, k);
- if (((BlockRailBase)block).func_150050_e())
- if (((BlockRailBase)block).isPowered())
- {
- l &= 7;
- }
@ -248,7 +248,7 @@
+ int l = ((BlockRailBase)block).getBasicRailMetadata(worldObj, this, i, j, k);
par3 = (double)j;
- if (((BlockRailBase)block).func_150050_e())
- if (((BlockRailBase)block).isPowered())
- {
- l &= 7;
- }
@ -293,7 +293,7 @@
{
par1Entity.motionX *= 0.20000000298023224D;
par1Entity.motionZ *= 0.20000000298023224D;
@@ -1092,4 +1116,216 @@
@@ -1093,4 +1117,216 @@
{
return this.entityName;
}

View File

@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java
+++ ../src-work/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java
@@ -248,6 +248,7 @@
@@ -249,6 +249,7 @@
// JAVADOC METHOD $$ func_130002_c
public boolean interactFirst(EntityPlayer par1EntityPlayer)
{

View File

@ -12,11 +12,11 @@
public class EntityZombie extends EntityMob
{
@@ -75,7 +79,7 @@
this.getEntityAttribute(SharedMonsterAttributes.followRange).setAttribute(40.0D);
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setAttribute(0.23000000417232513D);
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setAttribute(3.0D);
- this.getAttributeMap().func_111150_b(field_110186_bp).setAttribute(this.rand.nextDouble() * 0.10000000149011612D);
+ this.getAttributeMap().func_111150_b(field_110186_bp).setAttribute(this.rand.nextDouble() * ForgeModContainer.zombieSummonBaseChance);
this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(40.0D);
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.23000000417232513D);
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(3.0D);
- this.getAttributeMap().registerAttribute(field_110186_bp).setBaseValue(this.rand.nextDouble() * 0.10000000149011612D);
+ this.getAttributeMap().registerAttribute(field_110186_bp).setBaseValue(this.rand.nextDouble() * ForgeModContainer.zombieSummonBaseChance);
}
protected void entityInit()

View File

@ -2,9 +2,9 @@
+++ ../src-work/minecraft/net/minecraft/entity/passive/EntityOcelot.java
@@ -298,7 +298,7 @@
Block block = this.worldObj.func_147439_a(i, j - 1, k);
Block block = this.worldObj.getBlock(i, j - 1, k);
- if (block == Blocks.grass || block.func_149688_o() == Material.field_151584_j)
- if (block == Blocks.grass || block.getMaterial() == Material.leaves)
+ if (block == Blocks.grass || block.isLeaves(worldObj, i, j - 1, k))
{
return true;

View File

@ -36,7 +36,7 @@
-
- for (int j = 0; j < i; ++j)
- {
- EntityItem entityitem = this.entityDropItem(new ItemStack(Item.func_150898_a(Blocks.wool), 1, this.getFleeceColor()), 1.0F);
- EntityItem entityitem = this.entityDropItem(new ItemStack(Item.getItemFromBlock(Blocks.wool), 1, this.getFleeceColor()), 1.0F);
- entityitem.motionY += (double)(this.rand.nextFloat() * 0.05F);
- entityitem.motionX += (double)((this.rand.nextFloat() - this.rand.nextFloat()) * 0.1F);
- entityitem.motionZ += (double)((this.rand.nextFloat() - this.rand.nextFloat()) * 0.1F);

View File

@ -189,7 +189,7 @@
}
public EntityItem func_146097_a(ItemStack p_146097_1_, boolean p_146097_2_, boolean p_146097_3_)
@@ -765,13 +828,25 @@
@@ -765,14 +828,26 @@
// JAVADOC METHOD $$ func_71012_a
public void joinEntityItemWithWorld(EntityItem par1EntityItem)
{
@ -201,8 +201,9 @@
this.worldObj.spawnEntityInWorld(par1EntityItem);
}
+ @Deprecated //Metadata sensitive version
public float func_146096_a(Block p_146096_1_, boolean p_146096_2_)
// JAVADOC METHOD $$ func_146096_a
+ @Deprecated //Metadata sensitive version, named getBreakSpeed
public float getCurrentPlayerStrVsBlock(Block p_146096_1_, boolean p_146096_2_)
{
- float f = this.inventory.func_146023_a(p_146096_1_);
+ return getBreakSpeed(p_146096_1_, p_146096_2_, 0);
@ -216,7 +217,7 @@
if (f > 1.0F)
{
int i = EnchantmentHelper.getEfficiencyModifier(this);
@@ -781,7 +856,9 @@
@@ -782,7 +857,9 @@
{
float f1 = (float)(i * i + 1);
@ -227,7 +228,7 @@
{
f += f1 * 0.08F;
}
@@ -812,12 +889,13 @@
@@ -813,13 +890,14 @@
f /= 5.0F;
}
@ -236,22 +237,23 @@
+ return (f < 0 ? 0 : f);
}
public boolean func_146099_a(Block p_146099_1_)
// JAVADOC METHOD $$ func_146099_a
public boolean canHarvestBlock(Block p_146099_1_)
{
- return this.inventory.func_146025_b(p_146099_1_);
+ return ForgeEventFactory.doPlayerHarvestCheck(this, p_146099_1_, this.inventory.func_146025_b(p_146099_1_));
}
// JAVADOC METHOD $$ func_70037_a
@@ -847,6 +925,16 @@
@@ -849,6 +927,16 @@
this.spawnForced = par1NBTTagCompound.getBoolean("SpawnForced");
}
+ NBTTagList spawnlist = null;
+ spawnlist = par1NBTTagCompound.func_150295_c("Spawns", 10);
+ spawnlist = par1NBTTagCompound.getTagList("Spawns", 10);
+ for (int i = 0; i < spawnlist.tagCount(); i++)
+ {
+ NBTTagCompound spawndata = (NBTTagCompound)spawnlist.func_150305_b(i);
+ NBTTagCompound spawndata = (NBTTagCompound)spawnlist.getCompoundTagAt(i);
+ int spawndim = spawndata.getInteger("Dim");
+ this.spawnChunkMap.put(spawndim, new ChunkCoordinates(spawndata.getInteger("SpawnX"), spawndata.getInteger("SpawnY"), spawndata.getInteger("SpawnZ")));
+ this.spawnForcedMap.put(spawndim, spawndata.getBoolean("SpawnForced"));
@ -260,7 +262,7 @@
this.foodStats.readNBT(par1NBTTagCompound);
this.capabilities.readCapabilitiesFromNBT(par1NBTTagCompound);
@@ -878,6 +966,23 @@
@@ -880,6 +968,23 @@
par1NBTTagCompound.setBoolean("SpawnForced", this.spawnForced);
}
@ -284,7 +286,7 @@
this.foodStats.writeNBT(par1NBTTagCompound);
this.capabilities.writeCapabilitiesToNBT(par1NBTTagCompound);
par1NBTTagCompound.setTag("EnderItems", this.theInventoryEnderChest.saveInventoryToNBT());
@@ -902,7 +1007,7 @@
@@ -904,7 +1009,7 @@
public float getEyeHeight()
{
@ -293,7 +295,7 @@
}
// JAVADOC METHOD $$ func_71061_d_
@@ -914,6 +1019,7 @@
@@ -916,6 +1021,7 @@
// JAVADOC METHOD $$ func_70097_a
public boolean attackEntityFrom(DamageSource par1DamageSource, float par2)
{
@ -301,7 +303,7 @@
if (this.isEntityInvulnerable())
{
return false;
@@ -1018,12 +1124,15 @@
@@ -1020,12 +1126,15 @@
{
if (!this.isEntityInvulnerable())
{
@ -318,7 +320,7 @@
par2 = this.applyPotionDamageCalculations(par1DamageSource, par2);
float f1 = par2;
par2 = Math.max(par2 - this.getAbsorptionAmount(), 0.0F);
@@ -1058,6 +1167,7 @@
@@ -1060,6 +1169,7 @@
public boolean interactWith(Entity par1Entity)
{
@ -326,7 +328,7 @@
ItemStack itemstack = this.getCurrentEquippedItem();
ItemStack itemstack1 = itemstack != null ? itemstack.copy() : null;
@@ -1110,7 +1220,9 @@
@@ -1112,7 +1222,9 @@
// JAVADOC METHOD $$ func_71028_bD
public void destroyCurrentEquippedItem()
{
@ -336,7 +338,7 @@
}
// JAVADOC METHOD $$ func_70033_W
@@ -1122,6 +1234,15 @@
@@ -1124,6 +1236,15 @@
// JAVADOC METHOD $$ func_71059_n
public void attackTargetEntityWithCurrentItem(Entity par1Entity)
{
@ -352,7 +354,7 @@
if (par1Entity.canAttackWithItem())
{
if (!par1Entity.hitByEntity(this))
@@ -1273,6 +1394,12 @@
@@ -1276,6 +1397,12 @@
// JAVADOC METHOD $$ func_71018_a
public EntityPlayer.EnumStatus sleepInBedAt(int par1, int par2, int par3)
{
@ -365,23 +367,23 @@
if (!this.worldObj.isRemote)
{
if (this.isPlayerSleeping() || !this.isEntityAlive())
@@ -1315,8 +1442,7 @@
@@ -1318,8 +1445,7 @@
if (this.worldObj.blockExists(par1, par2, par3))
{
- int i1 = this.worldObj.getBlockMetadata(par1, par2, par3);
- int l = BlockBed.func_149895_l(i1);
+ int l = worldObj.func_147439_a(par1, par2, par3).getBedDirection(worldObj, par1, par2, par3);
- int l = BlockBed.getDirection(i1);
+ int l = worldObj.getBlock(par1, par2, par3).getBedDirection(worldObj, par1, par2, par3);
float f1 = 0.5F;
float f = 0.5F;
@@ -1384,11 +1510,12 @@
@@ -1387,11 +1513,12 @@
this.resetHeight();
ChunkCoordinates chunkcoordinates = this.playerLocation;
ChunkCoordinates chunkcoordinates1 = this.playerLocation;
+ Block block = (chunkcoordinates == null ? null : worldObj.func_147439_a(chunkcoordinates.posX, chunkcoordinates.posY, chunkcoordinates.posZ));
+ Block block = (chunkcoordinates == null ? null : worldObj.getBlock(chunkcoordinates.posX, chunkcoordinates.posY, chunkcoordinates.posZ));
- if (chunkcoordinates != null && this.worldObj.func_147439_a(chunkcoordinates.posX, chunkcoordinates.posY, chunkcoordinates.posZ) == Blocks.bed)
- if (chunkcoordinates != null && this.worldObj.getBlock(chunkcoordinates.posX, chunkcoordinates.posY, chunkcoordinates.posZ) == Blocks.bed)
+ if (chunkcoordinates != null && block.isBed(worldObj, chunkcoordinates.posX, chunkcoordinates.posY, chunkcoordinates.posZ, this))
{
- BlockBed.func_149979_a(this.worldObj, chunkcoordinates.posX, chunkcoordinates.posY, chunkcoordinates.posZ, false);
@ -391,42 +393,42 @@
if (chunkcoordinates1 == null)
{
@@ -1423,7 +1550,7 @@
@@ -1426,7 +1553,7 @@
// JAVADOC METHOD $$ func_71065_l
private boolean isInBed()
{
- return this.worldObj.func_147439_a(this.playerLocation.posX, this.playerLocation.posY, this.playerLocation.posZ) == Blocks.bed;
+ return this.worldObj.func_147439_a(this.playerLocation.posX, this.playerLocation.posY, this.playerLocation.posZ).isBed(worldObj, playerLocation.posX, playerLocation.posY, playerLocation.posZ, this);
- return this.worldObj.getBlock(this.playerLocation.posX, this.playerLocation.posY, this.playerLocation.posZ) == Blocks.bed;
+ return this.worldObj.getBlock(this.playerLocation.posX, this.playerLocation.posY, this.playerLocation.posZ).isBed(worldObj, playerLocation.posX, playerLocation.posY, playerLocation.posZ, this);
}
// JAVADOC METHOD $$ func_71056_a
@@ -1435,9 +1562,9 @@
@@ -1438,9 +1565,9 @@
ichunkprovider.loadChunk(par1ChunkCoordinates.posX - 3 >> 4, par1ChunkCoordinates.posZ + 3 >> 4);
ichunkprovider.loadChunk(par1ChunkCoordinates.posX + 3 >> 4, par1ChunkCoordinates.posZ + 3 >> 4);
- if (par0World.func_147439_a(par1ChunkCoordinates.posX, par1ChunkCoordinates.posY, par1ChunkCoordinates.posZ) == Blocks.bed)
+ if (par0World.func_147439_a(par1ChunkCoordinates.posX, par1ChunkCoordinates.posY, par1ChunkCoordinates.posZ).isBed(par0World, par1ChunkCoordinates.posX, par1ChunkCoordinates.posY, par1ChunkCoordinates.posZ, null))
- if (par0World.getBlock(par1ChunkCoordinates.posX, par1ChunkCoordinates.posY, par1ChunkCoordinates.posZ) == Blocks.bed)
+ if (par0World.getBlock(par1ChunkCoordinates.posX, par1ChunkCoordinates.posY, par1ChunkCoordinates.posZ).isBed(par0World, par1ChunkCoordinates.posX, par1ChunkCoordinates.posY, par1ChunkCoordinates.posZ, null))
{
- ChunkCoordinates chunkcoordinates1 = BlockBed.func_149977_a(par0World, par1ChunkCoordinates.posX, par1ChunkCoordinates.posY, par1ChunkCoordinates.posZ, 0);
+ ChunkCoordinates chunkcoordinates1 = par0World.func_147439_a(par1ChunkCoordinates.posX, par1ChunkCoordinates.posY, par1ChunkCoordinates.posZ).getBedSpawnPosition(par0World, par1ChunkCoordinates.posX, par1ChunkCoordinates.posY, par1ChunkCoordinates.posZ, null);
+ ChunkCoordinates chunkcoordinates1 = par0World.getBlock(par1ChunkCoordinates.posX, par1ChunkCoordinates.posY, par1ChunkCoordinates.posZ).getBedSpawnPosition(par0World, par1ChunkCoordinates.posX, par1ChunkCoordinates.posY, par1ChunkCoordinates.posZ, null);
return chunkcoordinates1;
}
else
@@ -1456,8 +1583,10 @@
@@ -1459,8 +1586,10 @@
{
if (this.playerLocation != null)
{
- int i = this.worldObj.getBlockMetadata(this.playerLocation.posX, this.playerLocation.posY, this.playerLocation.posZ);
- int j = BlockBed.func_149895_l(i);
- int j = BlockBed.getDirection(i);
+ int x = playerLocation.posX;
+ int y = playerLocation.posY;
+ int z = playerLocation.posZ;
+ int j = worldObj.func_147439_a(x, y, z).getBedDirection(worldObj, x, y, z);
+ int j = worldObj.getBlock(x, y, z).getBedDirection(worldObj, x, y, z);
switch (j)
{
@@ -1516,19 +1645,26 @@
public void func_146105_b(IChatComponent p_146105_1_) {}
@@ -1519,19 +1648,26 @@
public void addChatComponentMessage(IChatComponent p_146105_1_) {}
// JAVADOC METHOD $$ func_70997_bJ
+ @Deprecated
@ -454,7 +456,7 @@
if (par1ChunkCoordinates != null)
{
this.spawnChunk = new ChunkCoordinates(par1ChunkCoordinates);
@@ -1710,6 +1846,10 @@
@@ -1713,6 +1849,10 @@
super.fall(par1);
}
@ -465,7 +467,7 @@
}
protected String func_146067_o(int p_146067_1_)
@@ -1755,11 +1895,6 @@
@@ -1758,11 +1898,6 @@
}
else
{
@ -477,7 +479,7 @@
if (this.itemInUse != null && par1ItemStack.getItem() == Items.bow)
{
int j = par1ItemStack.getMaxItemUseDuration() - this.itemInUseCount;
@@ -1779,6 +1914,7 @@
@@ -1782,6 +1917,7 @@
return Items.bow.getItemIconForUseDuration(0);
}
}
@ -485,7 +487,7 @@
}
return iicon;
@@ -1869,6 +2005,8 @@
@@ -1872,6 +2008,8 @@
{
if (par1ItemStack != this.itemInUse)
{
@ -494,7 +496,7 @@
this.itemInUse = par1ItemStack;
this.itemInUseCount = par2;
@@ -1967,6 +2105,17 @@
@@ -1970,6 +2108,17 @@
}
this.theInventoryEnderChest = par1EntityPlayer.theInventoryEnderChest;
@ -512,7 +514,7 @@
}
// JAVADOC METHOD $$ func_70041_e_
@@ -2013,7 +2162,14 @@
@@ -2016,7 +2165,14 @@
// JAVADOC METHOD $$ func_70062_b
public void setCurrentItemOrArmor(int par1, ItemStack par2ItemStack)
{
@ -528,21 +530,21 @@
}
// JAVADOC METHOD $$ func_98034_c
@@ -2059,7 +2215,7 @@
@@ -2062,7 +2218,7 @@
public IChatComponent func_145748_c_()
{
- ChatComponentText chatcomponenttext = new ChatComponentText(ScorePlayerTeam.formatPlayerName(this.getTeam(), this.getCommandSenderName()));
+ ChatComponentText chatcomponenttext = new ChatComponentText(ScorePlayerTeam.formatPlayerName(this.getTeam(), this.getDisplayName()));
chatcomponenttext.func_150256_b().func_150241_a(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/msg " + this.getCommandSenderName() + " "));
chatcomponenttext.getChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/msg " + this.getCommandSenderName() + " "));
return chatcomponenttext;
}
@@ -2096,6 +2252,119 @@
@@ -2099,6 +2255,119 @@
FMLNetworkHandler.openGui(this, mod, modGuiId, world, x, y, z);
}
+ /* ======================================== FORGE START =====================================*/
+ // JAVADOC METHOD $$ func_70666_h
+ // JAVADOC METHOD $$ getPosition
+ @SideOnly(Side.CLIENT)
+ @Override
+ public Vec3 getPosition(float par1)

View File

@ -12,7 +12,7 @@
+
public class EntityPlayerMP extends EntityPlayer implements ICrafting
{
private static final Logger field_147102_bM = LogManager.getLogger();
private static final Logger logger = LogManager.getLogger();
@@ -148,19 +154,11 @@
p_i45285_4_.thisPlayerMP = this;
this.theItemInWorldManager = p_i45285_4_;
@ -77,7 +77,7 @@
public void onDeath(DamageSource par1DamageSource)
{
+ if (ForgeHooks.onLivingDeath(this, par1DamageSource)) return;
this.mcServer.getConfigurationManager().func_148539_a(this.func_110142_aN().func_151521_b());
this.mcServer.getConfigurationManager().sendChatMsg(this.func_110142_aN().func_151521_b());
if (!this.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory"))
{
@ -98,7 +98,7 @@
}
Collection collection = this.worldObj.getScoreboard().func_96520_a(IScoreObjectiveCriteria.deathCount);
@@ -1034,4 +1048,15 @@
@@ -1037,4 +1051,15 @@
{
return this.field_147103_bO;
}

View File

@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/entity/player/InventoryPlayer.java
+++ ../src-work/minecraft/net/minecraft/entity/player/InventoryPlayer.java
@@ -324,6 +324,14 @@
@@ -325,6 +325,14 @@
this.mainInventory[i].updateAnimation(this.player.worldObj, this.player, i, this.currentItem == i);
}
}
@ -14,4 +14,4 @@
+ }
}
public boolean func_146026_a(Item p_146026_1_)
// JAVADOC METHOD $$ func_146026_a

View File

@ -18,38 +18,38 @@
{
@@ -132,37 +134,15 @@
{
if ((j != 0 || k != 0) && this.worldPointer.func_147437_c(this.posX + k, this.posY, this.posZ + j) && this.worldPointer.func_147437_c(this.posX + k, this.posY + 1, this.posZ + j))
if ((j != 0 || k != 0) && this.worldPointer.isAirBlock(this.posX + k, this.posY, this.posZ + j) && this.worldPointer.isAirBlock(this.posX + k, this.posY + 1, this.posZ + j))
{
- if (this.worldPointer.func_147439_a(this.posX + k * 2, this.posY, this.posZ + j * 2) == Blocks.bookshelf)
- if (this.worldPointer.getBlock(this.posX + k * 2, this.posY, this.posZ + j * 2) == Blocks.bookshelf)
- {
- ++i;
- }
+ power += ForgeHooks.getEnchantPower(worldPointer, posX + k * 2, posY, posZ + j * 2);
+ power += ForgeHooks.getEnchantPower(worldPointer, posX + k * 2, posY + 1, posZ + j * 2);
- if (this.worldPointer.func_147439_a(this.posX + k * 2, this.posY + 1, this.posZ + j * 2) == Blocks.bookshelf)
- if (this.worldPointer.getBlock(this.posX + k * 2, this.posY + 1, this.posZ + j * 2) == Blocks.bookshelf)
- {
- ++i;
- }
-
if (k != 0 && j != 0)
{
- if (this.worldPointer.func_147439_a(this.posX + k * 2, this.posY, this.posZ + j) == Blocks.bookshelf)
- if (this.worldPointer.getBlock(this.posX + k * 2, this.posY, this.posZ + j) == Blocks.bookshelf)
- {
- ++i;
- }
-
- if (this.worldPointer.func_147439_a(this.posX + k * 2, this.posY + 1, this.posZ + j) == Blocks.bookshelf)
- if (this.worldPointer.getBlock(this.posX + k * 2, this.posY + 1, this.posZ + j) == Blocks.bookshelf)
- {
- ++i;
- }
-
- if (this.worldPointer.func_147439_a(this.posX + k, this.posY, this.posZ + j * 2) == Blocks.bookshelf)
- if (this.worldPointer.getBlock(this.posX + k, this.posY, this.posZ + j * 2) == Blocks.bookshelf)
- {
- ++i;
- }
-
- if (this.worldPointer.func_147439_a(this.posX + k, this.posY + 1, this.posZ + j * 2) == Blocks.bookshelf)
- if (this.worldPointer.getBlock(this.posX + k, this.posY + 1, this.posZ + j * 2) == Blocks.bookshelf)
- {
- ++i;
- }

View File

@ -4,7 +4,7 @@
// JAVADOC METHOD $$ func_75214_a
public boolean isItemValid(ItemStack par1ItemStack)
{
- return par1ItemStack == null ? false : (par1ItemStack.getItem() instanceof ItemArmor ? ((ItemArmor)par1ItemStack.getItem()).armorType == k : (par1ItemStack.getItem() != Item.func_150898_a(Blocks.pumpkin) && par1ItemStack.getItem() != Items.skull ? false : k == 0));
- return par1ItemStack == null ? false : (par1ItemStack.getItem() instanceof ItemArmor ? ((ItemArmor)par1ItemStack.getItem()).armorType == k : (par1ItemStack.getItem() != Item.getItemFromBlock(Blocks.pumpkin) && par1ItemStack.getItem() != Items.skull ? false : k == 0));
+ if (par1ItemStack == null) return false;
+ return par1ItemStack.getItem().isValidArmor(par1ItemStack, k, thePlayer);
}

View File

@ -59,7 +59,7 @@
public boolean hasContainerItem()
{
return this.containerItem != null;
@@ -660,6 +672,7 @@
@@ -662,6 +674,7 @@
}
@SideOnly(Side.CLIENT)
@ -67,7 +67,7 @@
public boolean hasEffect(ItemStack par1ItemStack)
{
return par1ItemStack.isItemEnchanted();
@@ -674,7 +687,7 @@
@@ -676,7 +689,7 @@
// JAVADOC METHOD $$ func_77616_k
public boolean isItemTool(ItemStack par1ItemStack)
{
@ -76,7 +76,7 @@
}
protected MovingObjectPosition getMovingObjectPositionFromPlayer(World par1World, EntityPlayer par2EntityPlayer, boolean par3)
@@ -683,7 +696,7 @@
@@ -685,7 +698,7 @@
float f1 = par2EntityPlayer.prevRotationPitch + (par2EntityPlayer.rotationPitch - par2EntityPlayer.prevRotationPitch) * f;
float f2 = par2EntityPlayer.prevRotationYaw + (par2EntityPlayer.rotationYaw - par2EntityPlayer.prevRotationYaw) * f;
double d0 = par2EntityPlayer.prevPosX + (par2EntityPlayer.posX - par2EntityPlayer.prevPosX) * (double)f;
@ -85,7 +85,7 @@
double d2 = par2EntityPlayer.prevPosZ + (par2EntityPlayer.posZ - par2EntityPlayer.prevPosZ) * (double)f;
Vec3 vec3 = par1World.getWorldVec3Pool().getVecFromPool(d0, d1, d2);
float f3 = MathHelper.cos(-f2 * 0.017453292F - (float)Math.PI);
@@ -693,6 +706,10 @@
@@ -695,6 +708,10 @@
float f7 = f4 * f5;
float f8 = f3 * f5;
double d3 = 5.0D;
@ -96,8 +96,8 @@
Vec3 vec31 = vec3.addVector((double)f7 * d3, (double)f6 * d3, (double)f8 * d3);
return par1World.func_147447_a(vec3, vec31, par3, !par3, false);
}
@@ -773,6 +790,542 @@
return this.iconString == null ? "MISSING_ICON_ITEM_" + field_150901_e.func_148757_b(this) + "_" + this.unlocalizedName : this.iconString;
@@ -776,6 +793,542 @@
return this.iconString == null ? "MISSING_ICON_ITEM_" + itemRegistry.getIDForObject(this) + "_" + this.unlocalizedName : this.iconString;
}
+ /* ======================================== FORGE START =====================================*/
@ -415,7 +415,7 @@
+
+ if (armorType == 0)
+ {
+ return this == Item.func_150898_a(Blocks.pumpkin) || this == Items.skull;
+ return this == Item.getItemFromBlock(Blocks.pumpkin) || this == Items.skull;
+ }
+
+ return false;
@ -639,7 +639,7 @@
public static enum ToolMaterial
{
WOOD(0, 59, 2.0F, 0.0F, 15),
@@ -793,6 +1346,9 @@
@@ -796,6 +1349,9 @@
private static final String __OBFID = "CL_00000042";
@ -649,15 +649,15 @@
private ToolMaterial(int par3, int par4, float par5, float par6, int par7)
{
this.harvestLevel = par3;
@@ -834,7 +1390,15 @@
@@ -837,7 +1393,15 @@
public Item func_150995_f()
{
- return this == WOOD ? Item.func_150898_a(Blocks.planks) : (this == STONE ? Item.func_150898_a(Blocks.cobblestone) : (this == GOLD ? Items.gold_ingot : (this == IRON ? Items.iron_ingot : (this == EMERALD ? Items.diamond : null))));
- return this == WOOD ? Item.getItemFromBlock(Blocks.planks) : (this == STONE ? Item.getItemFromBlock(Blocks.cobblestone) : (this == GOLD ? Items.gold_ingot : (this == IRON ? Items.iron_ingot : (this == EMERALD ? Items.diamond : null))));
+ switch (this)
+ {
+ case WOOD: return Item.func_150898_a(Blocks.planks);
+ case STONE: return Item.func_150898_a(Blocks.cobblestone);
+ case WOOD: return Item.getItemFromBlock(Blocks.planks);
+ case STONE: return Item.getItemFromBlock(Blocks.cobblestone);
+ case GOLD: return Items.gold_ingot;
+ case IRON: return Items.iron_ingot;
+ case EMERALD: return Items.diamond;

View File

@ -11,18 +11,18 @@
{
@@ -104,14 +104,8 @@
int i1 = this.getMetadata(par1ItemStack.getItemDamage());
int j1 = this.field_150939_a.func_149660_a(par3World, par4, par5, par6, par7, par8, par9, par10, i1);
int j1 = this.field_150939_a.onBlockPlaced(par3World, par4, par5, par6, par7, par8, par9, par10, i1);
- if (par3World.func_147465_d(par4, par5, par6, this.field_150939_a, j1, 3))
- if (par3World.setBlock(par4, par5, par6, this.field_150939_a, j1, 3))
+ if (placeBlockAt(par1ItemStack, par2EntityPlayer, par3World, par4, par5, par6, par7, par8, par9, par10, j1))
{
- if (par3World.func_147439_a(par4, par5, par6) == this.field_150939_a)
- if (par3World.getBlock(par4, par5, par6) == this.field_150939_a)
- {
- this.field_150939_a.func_149689_a(par3World, par4, par5, par6, par2EntityPlayer, par1ItemStack);
- this.field_150939_a.func_149714_e(par3World, par4, par5, par6, j1);
- this.field_150939_a.onBlockPlacedBy(par3World, par4, par5, par6, par2EntityPlayer, par1ItemStack);
- this.field_150939_a.onPostBlockPlaced(par3World, par4, par5, par6, j1);
- }
-
par3World.playSoundEffect((double)((float)par4 + 0.5F), (double)((float)par5 + 0.5F), (double)((float)par6 + 0.5F), this.field_150939_a.field_149762_H.func_150496_b(), (this.field_150939_a.field_149762_H.func_150497_c() + 1.0F) / 2.0F, this.field_150939_a.field_149762_H.func_150494_d() * 0.8F);
par3World.playSoundEffect((double)((float)par4 + 0.5F), (double)((float)par5 + 0.5F), (double)((float)par6 + 0.5F), this.field_150939_a.stepSound.func_150496_b(), (this.field_150939_a.stepSound.getVolume() + 1.0F) / 2.0F, this.field_150939_a.stepSound.getPitch() * 0.8F);
--par1ItemStack.stackSize;
}
@@ -133,7 +127,7 @@
@ -34,7 +34,7 @@
{
if (p_150936_5_ == 0)
{
@@ -204,4 +198,29 @@
@@ -205,4 +199,29 @@
this.field_150938_b = par1IconRegister.registerIcon(s);
}
}
@ -50,15 +50,15 @@
+ public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata)
+ {
+
+ if (!world.func_147465_d(x, y, z, field_150939_a, metadata, 3))
+ if (!world.setBlock(x, y, z, field_150939_a, metadata, 3))
+ {
+ return false;
+ }
+
+ if (world.func_147439_a(x, y, z) == field_150939_a)
+ if (world.getBlock(x, y, z) == field_150939_a)
+ {
+ field_150939_a.func_149689_a(world, x, y, z, player, stack);
+ field_150939_a.func_149714_e(world, x, y, z, metadata);
+ field_150939_a.onBlockPlacedBy(world, x, y, z, player, stack);
+ field_150939_a.onPostBlockPlaced(world, x, y, z, metadata);
+ }
+
+ return true;

View File

@ -26,7 +26,7 @@
+
boolean flag = par3EntityPlayer.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, par1ItemStack) > 0;
if (flag || par3EntityPlayer.inventory.func_146028_b(Items.arrow))
if (flag || par3EntityPlayer.inventory.hasItem(Items.arrow))
{
- int j = this.getMaxItemUseDuration(par1ItemStack) - par4;
float f = (float)j / 20.0F;
@ -43,6 +43,6 @@
+ return event.result;
+ }
+
if (par3EntityPlayer.capabilities.isCreativeMode || par3EntityPlayer.inventory.func_146028_b(Items.arrow))
if (par3EntityPlayer.capabilities.isCreativeMode || par3EntityPlayer.inventory.hasItem(Items.arrow))
{
par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack));

View File

@ -38,7 +38,7 @@
+
+ public static boolean applyBonemeal(ItemStack p_150919_0_, World p_150919_1_, int p_150919_2_, int p_150919_3_, int p_150919_4_, EntityPlayer player)
+ {
Block block = p_150919_1_.func_147439_a(p_150919_2_, p_150919_3_, p_150919_4_);
Block block = p_150919_1_.getBlock(p_150919_2_, p_150919_3_, p_150919_4_);
+ BonemealEvent event = new BonemealEvent(player, p_150919_1_, block, p_150919_2_, p_150919_3_, p_150919_4_);
+ if (MinecraftForge.EVENT_BUS.post(event))
@ -59,7 +59,7 @@
{
IGrowable igrowable = (IGrowable)block;
@@ -175,6 +202,16 @@
p_150918_0_.spawnParticle("happyVillager", (double)((float)p_150918_1_ + itemRand.nextFloat()), (double)p_150918_2_ + (double)itemRand.nextFloat() * block.func_149669_A(), (double)((float)p_150918_3_ + itemRand.nextFloat()), d0, d1, d2);
p_150918_0_.spawnParticle("happyVillager", (double)((float)p_150918_1_ + itemRand.nextFloat()), (double)p_150918_2_ + (double)itemRand.nextFloat() * block.getBlockBoundsMaxY(), (double)((float)p_150918_3_ + itemRand.nextFloat()), d0, d1, d2);
}
}
+ else

View File

@ -4,8 +4,8 @@
}
else
{
- if (par3World.func_147439_a(par4, par5, par6).func_149688_o() == Material.field_151579_a)
+ if (par3World.func_147437_c(par4, par5, par6))
- if (par3World.getBlock(par4, par5, par6).getMaterial() == Material.air)
+ if (par3World.isAirBlock(par4, par5, par6))
{
par3World.playSoundEffect((double)par4 + 0.5D, (double)par5 + 0.5D, (double)par6 + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
par3World.func_147449_b(par4, par5, par6, Blocks.fire);
par3World.setBlock(par4, par5, par6, Blocks.fire);

View File

@ -32,10 +32,10 @@
+ return true;
+ }
+
Block block = par3World.func_147439_a(par4, par5, par6);
Block block = par3World.getBlock(par4, par5, par6);
- if (par7 != 0 && par3World.func_147439_a(par4, par5 + 1, par6).func_149688_o() == Material.field_151579_a && (block == Blocks.grass || block == Blocks.dirt))
+ if (par7 != 0 && par3World.func_147439_a(par4, par5 + 1, par6).isAir(par3World, par4, par5 + 1, par6) && (block == Blocks.grass || block == Blocks.dirt))
- if (par7 != 0 && par3World.getBlock(par4, par5 + 1, par6).getMaterial() == Material.air && (block == Blocks.grass || block == Blocks.dirt))
+ if (par7 != 0 && par3World.getBlock(par4, par5 + 1, par6).isAir(par3World, par4, par5 + 1, par6) && (block == Blocks.grass || block == Blocks.dirt))
{
Block block1 = Blocks.farmland;
par3World.playSoundEffect((double)((float)par4 + 0.5F), (double)((float)par5 + 0.5F), (double)((float)par6 + 0.5F), block1.field_149762_H.func_150498_e(), (block1.field_149762_H.func_150497_c() + 1.0F) / 2.0F, block1.field_149762_H.func_150494_d() * 0.8F);
par3World.playSoundEffect((double)((float)par4 + 0.5F), (double)((float)par5 + 0.5F), (double)((float)par6 + 0.5F), block1.stepSound.getStepResourcePath(), (block1.stepSound.getVolume() + 1.0F) / 2.0F, block1.stepSound.getPitch() * 0.8F);

View File

@ -8,8 +8,8 @@
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
@@ -24,7 +25,7 @@
this.field_150929_a = p_i45350_1_;
@@ -25,7 +26,7 @@
this.recordName = p_i45350_1_;
this.maxStackSize = 1;
this.setCreativeTab(CreativeTabs.tabMisc);
- field_150928_b.put(p_i45350_1_, this);
@ -17,7 +17,7 @@
}
// JAVADOC METHOD $$ func_77617_a
@@ -81,4 +82,15 @@
@@ -83,4 +84,15 @@
{
return (ItemRecord)field_150928_b.get(p_150926_0_);
}

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