Merge pull request #1012 from AbrarSyed/master
Updated for ForgeGradle 1.2
This commit is contained in:
commit
8576fe6dbe
214 changed files with 5086 additions and 5103 deletions
|
@ -12,7 +12,7 @@ buildscript {
|
|||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:1.1-SNAPSHOT'
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
2
fml
2
fml
|
@ -1 +1 @@
|
|||
Subproject commit ef07de4f65ea16e1db1467845e316cb4c7d01a1f
|
||||
Subproject commit 89cda92561eb38876a68ecc2814fdf2df38df5ab
|
|
@ -53,142 +53,141 @@
|
|||
|
||||
public class Block
|
||||
{
|
||||
@@ -132,7 +153,8 @@
|
||||
@@ -110,7 +131,8 @@
|
||||
|
||||
public static Block getBlockById(int p_149729_0_)
|
||||
public static Block func_149729_e(int p_149729_0_)
|
||||
{
|
||||
- return (Block)blockRegistry.getObjectById(p_149729_0_);
|
||||
+ Block ret = (Block)blockRegistry.getObjectById(p_149729_0_);
|
||||
+ return ret == null ? Blocks.air : ret;
|
||||
- return (Block)field_149771_c.func_148754_a(p_149729_0_);
|
||||
+ Block ret = (Block)field_149771_c.func_148754_a(p_149729_0_);
|
||||
+ return ret == null ? Blocks.field_150350_a : ret;
|
||||
}
|
||||
|
||||
public static Block getBlockFromItem(Item p_149634_0_)
|
||||
@@ -517,9 +539,10 @@
|
||||
return this.needsRandomTick;
|
||||
public static Block func_149634_a(Item p_149634_0_)
|
||||
@@ -481,9 +503,10 @@
|
||||
return this.field_149789_z;
|
||||
}
|
||||
|
||||
+ @Deprecated //Forge: New Metadata sensitive version.
|
||||
public boolean hasTileEntity()
|
||||
public boolean func_149716_u()
|
||||
{
|
||||
- return this.isBlockContainer;
|
||||
- return this.field_149758_A;
|
||||
+ return hasTileEntity(0);
|
||||
}
|
||||
|
||||
// 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_)
|
||||
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_)
|
||||
{
|
||||
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_));
|
||||
Block block = p_149677_1_.func_147439_a(p_149677_2_, p_149677_3_, p_149677_4_);
|
||||
- int l = p_149677_1_.func_72802_i(p_149677_2_, p_149677_3_, p_149677_4_, block.func_149750_m());
|
||||
+ int l = p_149677_1_.func_72802_i(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_.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_));
|
||||
block = p_149677_1_.func_147439_a(p_149677_2_, p_149677_3_, p_149677_4_);
|
||||
- return p_149677_1_.func_72802_i(p_149677_2_, p_149677_3_, p_149677_4_, block.func_149750_m());
|
||||
+ return p_149677_1_.func_72802_i(p_149677_2_, p_149677_3_, p_149677_4_, block.getLightValue(p_149677_1_, p_149677_2_, p_149677_3_, p_149677_4_));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -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_) {}
|
||||
@@ -595,7 +618,13 @@
|
||||
|
||||
- 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_)
|
||||
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_)
|
||||
+ {
|
||||
+ if (hasTileEntity(p_149749_6_) && !(this instanceof BlockContainer))
|
||||
+ {
|
||||
+ p_149749_1_.removeTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
|
||||
+ p_149749_1_.func_147475_p(p_149749_2_, p_149749_3_, p_149749_4_);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
// 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_)
|
||||
public int func_149745_a(Random p_149745_1_)
|
||||
{
|
||||
- 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);
|
||||
@@ -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);
|
||||
+ return ForgeHooks.blockStrength(this, p_149737_1_, p_149737_2_, p_149737_3_, p_149737_4_, p_149737_5_);
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149697_b
|
||||
@@ -680,18 +708,14 @@
|
||||
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 @@
|
||||
{
|
||||
if (!p_149690_1_.isRemote)
|
||||
if (!p_149690_1_.field_72995_K)
|
||||
{
|
||||
- int j1 = this.quantityDroppedWithBonus(p_149690_7_, p_149690_1_.rand);
|
||||
- int j1 = this.func_149679_a(p_149690_7_, p_149690_1_.field_73012_v);
|
||||
+ 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());
|
||||
|
||||
- for (int k1 = 0; k1 < j1; ++k1)
|
||||
+ for (ItemStack item : items)
|
||||
{
|
||||
if (p_149690_1_.rand.nextFloat() <= p_149690_6_)
|
||||
if (p_149690_1_.field_73012_v.nextFloat() <= p_149690_6_)
|
||||
{
|
||||
- Item item = this.getItemDropped(p_149690_5_, p_149690_1_.rand, p_149690_7_);
|
||||
- Item item = this.func_149650_a(p_149690_5_, p_149690_1_.field_73012_v, p_149690_7_);
|
||||
-
|
||||
- if (item != null)
|
||||
- {
|
||||
- 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_, 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_, item);
|
||||
+ this.func_149642_a(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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_)
|
||||
@@ -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_)
|
||||
{
|
||||
- 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_);
|
||||
- return p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_, p_149742_4_).field_149764_J.func_76222_j();
|
||||
+ 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_);
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149727_a
|
||||
@@ -1008,26 +1032,36 @@
|
||||
p_149636_2_.addStat(StatList.mineBlockStatArray[getIdFromBlock(this)], 1);
|
||||
p_149636_2_.addExhaustion(0.025F);
|
||||
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_.func_71064_a(StatList.field_75934_C[func_149682_b(this)], 1);
|
||||
p_149636_2_.func_71020_j(0.025F);
|
||||
|
||||
- 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_))
|
||||
- if (this.func_149700_E() && EnchantmentHelper.func_77502_d(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.func_77502_d(p_149636_2_))
|
||||
{
|
||||
+ ArrayList<ItemStack> items = new ArrayList<ItemStack>();
|
||||
ItemStack itemstack = this.createStackedBlock(p_149636_6_);
|
||||
ItemStack itemstack = this.func_149644_j(p_149636_6_);
|
||||
|
||||
if (itemstack != null)
|
||||
{
|
||||
- this.dropBlockAsItem(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, itemstack);
|
||||
- this.func_149642_a(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.dropBlockAsItem(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, is);
|
||||
+ this.func_149642_a(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.dropBlockAsItem(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_, i1);
|
||||
int i1 = EnchantmentHelper.func_77517_e(p_149636_2_);
|
||||
this.func_149697_b(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_, i1);
|
||||
+ harvesters.set(null);
|
||||
}
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149700_E
|
||||
protected boolean canSilkHarvest()
|
||||
protected boolean func_149700_E()
|
||||
{
|
||||
- return this.renderAsNormalBlock() && !this.isBlockContainer;
|
||||
- return this.func_149686_d() && !this.field_149758_A;
|
||||
+ Integer meta = silk_check_meta.get();
|
||||
+ return this.renderAsNormalBlock() && !this.hasTileEntity(meta == null ? 0 : meta);
|
||||
+ return this.func_149686_d() && !this.hasTileEntity(meta == null ? 0 : meta);
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149644_j
|
||||
@@ -1228,6 +1262,1065 @@
|
||||
protected ItemStack func_149644_j(int p_149644_1_)
|
||||
@@ -1114,6 +1148,1065 @@
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -206,12 +205,12 @@
|
|||
+ */
|
||||
+ public int getLightValue(IBlockAccess world, int x, int y, int z)
|
||||
+ {
|
||||
+ Block block = world.getBlock(x, y, z);
|
||||
+ Block block = world.func_147439_a(x, y, z);
|
||||
+ if (block != this)
|
||||
+ {
|
||||
+ return block.getLightValue(world, x, y, z);
|
||||
+ }
|
||||
+ return getLightValue();
|
||||
+ return func_149750_m();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -242,7 +241,7 @@
|
|||
+ */
|
||||
+ public boolean isNormalCube(IBlockAccess world, int x, int y, int z)
|
||||
+ {
|
||||
+ return getMaterial().isOpaque() && renderAsNormalBlock() && !canProvidePower();
|
||||
+ return func_149688_o().func_76218_k() && func_149686_d() && !func_149744_f();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -257,7 +256,7 @@
|
|||
+ */
|
||||
+ public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side)
|
||||
+ {
|
||||
+ int meta = world.getBlockMetadata(x, y, z);
|
||||
+ int meta = world.func_72805_g(x, y, z);
|
||||
+
|
||||
+ if (this instanceof BlockSlab)
|
||||
+ {
|
||||
|
@ -299,7 +298,7 @@
|
|||
+ */
|
||||
+ public boolean isReplaceable(IBlockAccess world, int x, int y, int z)
|
||||
+ {
|
||||
+ return blockMaterial.isReplaceable();
|
||||
+ return field_149764_J.func_76222_j();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -331,7 +330,7 @@
|
|||
+ */
|
||||
+ public boolean isAir(IBlockAccess world, int x, int y, int z)
|
||||
+ {
|
||||
+ return getMaterial() == Material.air;
|
||||
+ return func_149688_o() == Material.field_151579_a;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -366,7 +365,7 @@
|
|||
+ */
|
||||
+ public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z)
|
||||
+ {
|
||||
+ return world.setBlockToAir(x, y, z);
|
||||
+ return world.func_147468_f(x, y, z);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -382,7 +381,7 @@
|
|||
+ */
|
||||
+ public int getFlammability(IBlockAccess world, int x, int y, int z, ForgeDirection face)
|
||||
+ {
|
||||
+ return Blocks.fire.getFlammability(this);
|
||||
+ return Blocks.field_150480_ab.getFlammability(this);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -414,7 +413,7 @@
|
|||
+ */
|
||||
+ public int getFireSpreadSpeed(IBlockAccess world, int x, int y, int z, ForgeDirection face)
|
||||
+ {
|
||||
+ return Blocks.fire.getEncouragement(this);
|
||||
+ return Blocks.field_150480_ab.getEncouragement(this);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -432,11 +431,11 @@
|
|||
+ */
|
||||
+ public boolean isFireSource(World world, int x, int y, int z, ForgeDirection side)
|
||||
+ {
|
||||
+ if (this == Blocks.netherrack && side == UP)
|
||||
+ if (this == Blocks.field_150424_aL && side == UP)
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+ if ((world.provider instanceof WorldProviderEnd) && this == Blocks.bedrock && side == UP)
|
||||
+ if ((world.field_73011_w instanceof WorldProviderEnd) && this == Blocks.field_150357_h && side == UP)
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
|
@ -471,7 +470,7 @@
|
|||
+ {
|
||||
+ if (isTileProvider)
|
||||
+ {
|
||||
+ return ((ITileEntityProvider)this).createNewTileEntity(world, metadata);
|
||||
+ return ((ITileEntityProvider)this).func_149915_a(world, metadata);
|
||||
+ }
|
||||
+ return null;
|
||||
+ }
|
||||
|
@ -487,7 +486,7 @@
|
|||
+ */
|
||||
+ public int quantityDropped(int meta, int fortune, Random random)
|
||||
+ {
|
||||
+ return quantityDroppedWithBonus(fortune, random);
|
||||
+ return func_149679_a(fortune, random);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -505,13 +504,13 @@
|
|||
+ {
|
||||
+ ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
+
|
||||
+ int count = quantityDropped(metadata, fortune, world.rand);
|
||||
+ int count = quantityDropped(metadata, fortune, world.field_73012_v);
|
||||
+ for(int i = 0; i < count; i++)
|
||||
+ {
|
||||
+ Item item = getItemDropped(metadata, world.rand, fortune);
|
||||
+ Item item = func_149650_a(metadata, world.field_73012_v, fortune);
|
||||
+ if (item != null)
|
||||
+ {
|
||||
+ ret.add(new ItemStack(item, 1, damageDropped(metadata)));
|
||||
+ ret.add(new ItemStack(item, 1, func_149692_a(metadata)));
|
||||
+ }
|
||||
+ }
|
||||
+ return ret;
|
||||
|
@ -531,7 +530,7 @@
|
|||
+ public boolean canSilkHarvest(World world, EntityPlayer player, int x, int y, int z, int metadata)
|
||||
+ {
|
||||
+ silk_check_meta.set(metadata);;
|
||||
+ boolean ret = this.canSilkHarvest();
|
||||
+ boolean ret = this.func_149700_E();
|
||||
+ silk_check_meta.set(null);
|
||||
+ return ret;
|
||||
+ }
|
||||
|
@ -549,7 +548,7 @@
|
|||
+ */
|
||||
+ public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z)
|
||||
+ {
|
||||
+ int meta = world.getBlockMetadata(x, y, z);
|
||||
+ int meta = world.func_72805_g(x, y, z);
|
||||
+ if (this instanceof BlockSlab)
|
||||
+ {
|
||||
+ return (((meta & 8) == 8) || func_149730_j());
|
||||
|
@ -575,7 +574,7 @@
|
|||
+ */
|
||||
+ public boolean isBed(IBlockAccess world, int x, int y, int z, EntityLivingBase player)
|
||||
+ {
|
||||
+ return this == Blocks.bed;
|
||||
+ return this == Blocks.field_150324_C;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -624,7 +623,7 @@
|
|||
+ */
|
||||
+ public int getBedDirection(IBlockAccess world, int x, int y, int z)
|
||||
+ {
|
||||
+ return BlockBed.getDirection(world.getBlockMetadata(x, y, z));
|
||||
+ return BlockBed.func_149895_l(world.func_72805_g(x, y, z));
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -638,7 +637,7 @@
|
|||
+ */
|
||||
+ public boolean isBedFoot(IBlockAccess world, int x, int y, int z)
|
||||
+ {
|
||||
+ return BlockBed.isBlockHeadOfBed(world.getBlockMetadata(x, y, z));
|
||||
+ return BlockBed.func_149975_b(world.func_72805_g(x, y, z));
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -676,7 +675,7 @@
|
|||
+ */
|
||||
+ public boolean isLeaves(IBlockAccess world, int x, int y, int z)
|
||||
+ {
|
||||
+ return getMaterial() == Material.leaves;
|
||||
+ return func_149688_o() == Material.field_151584_j;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -737,7 +736,7 @@
|
|||
+ */
|
||||
+ public float getExplosionResistance(Entity par1Entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ)
|
||||
+ {
|
||||
+ return getExplosionResistance(par1Entity);
|
||||
+ return func_149638_a(par1Entity);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -753,8 +752,8 @@
|
|||
+ */
|
||||
+ public void onBlockExploded(World world, int x, int y, int z, Explosion explosion)
|
||||
+ {
|
||||
+ world.setBlockToAir(x, y, z);
|
||||
+ onBlockDestroyedByExplosion(world, x, y, z, explosion);
|
||||
+ world.func_147468_f(x, y, z);
|
||||
+ func_149723_a(world, x, y, z, explosion);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -777,7 +776,7 @@
|
|||
+ */
|
||||
+ public boolean canConnectRedstone(IBlockAccess world, int x, int y, int z, int side)
|
||||
+ {
|
||||
+ return canProvidePower() && side != -1;
|
||||
+ return func_149744_f() && side != -1;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -798,7 +797,7 @@
|
|||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ return this == Blocks.fence || this == Blocks.nether_brick_fence || this == Blocks.glass || this == Blocks.cobblestone_wall;
|
||||
+ return this == Blocks.field_150422_aJ || this == Blocks.field_150386_bk || this == Blocks.field_150359_w || this == Blocks.field_150463_bK;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
@ -810,7 +809,7 @@
|
|||
+ */
|
||||
+ public boolean canRenderInPass(int pass)
|
||||
+ {
|
||||
+ return pass == getRenderBlockPass();
|
||||
+ return pass == func_149701_w();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -821,15 +820,15 @@
|
|||
+ */
|
||||
+ public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z)
|
||||
+ {
|
||||
+ Item item = getItem(world, x, y, z);
|
||||
+ Item item = func_149694_d(world, x, y, z);
|
||||
+
|
||||
+ if (item == null)
|
||||
+ {
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ Block block = item instanceof ItemBlock && !isFlowerPot() ? Block.getBlockFromItem(item) : this;
|
||||
+ return new ItemStack(item, 1, block.getDamageValue(world, x, y, z));
|
||||
+ 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));
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -904,35 +903,35 @@
|
|||
+ Block plant = plantable.getPlant(world, x, y + 1, z);
|
||||
+ EnumPlantType plantType = plantable.getPlantType(world, x, y + 1, z);
|
||||
+
|
||||
+ if (plant == Blocks.cactus && this == Blocks.cactus)
|
||||
+ if (plant == Blocks.field_150434_aF && this == Blocks.field_150434_aF)
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ if (plant == Blocks.reeds && this == Blocks.reeds)
|
||||
+ if (plant == Blocks.field_150436_aH && this == Blocks.field_150436_aH)
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ if (plantable instanceof BlockBush && ((BlockBush)plantable).canPlaceBlockOn(this))
|
||||
+ if (plantable instanceof BlockBush && ((BlockBush)plantable).func_149854_a(this))
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ switch (plantType)
|
||||
+ {
|
||||
+ case Desert: return this == Blocks.sand;
|
||||
+ case Nether: return this == Blocks.soul_sand;
|
||||
+ case Crop: return this == Blocks.farmland;
|
||||
+ case Desert: return this == Blocks.field_150354_m;
|
||||
+ case Nether: return this == Blocks.field_150425_aM;
|
||||
+ case Crop: return this == Blocks.field_150458_ak;
|
||||
+ case Cave: return isSideSolid(world, x, y, z, UP);
|
||||
+ case Plains: return this == Blocks.grass || this == Blocks.dirt;
|
||||
+ case Water: return world.getBlock(x, y, z).getMaterial() == Material.water && world.getBlockMetadata(x, y, z) == 0;
|
||||
+ case Plains: return this == Blocks.field_150349_c || this == Blocks.field_150346_d;
|
||||
+ case Water: return world.func_147439_a(x, y, z).func_149688_o() == Material.field_151586_h && world.func_72805_g(x, y, z) == 0;
|
||||
+ case Beach:
|
||||
+ boolean isBeach = this == Blocks.grass || this == Blocks.dirt || this == Blocks.sand;
|
||||
+ 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);
|
||||
+ boolean isBeach = this == Blocks.field_150349_c || this == Blocks.field_150346_d || this == Blocks.field_150354_m;
|
||||
+ 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);
|
||||
+ return isBeach && hasWater;
|
||||
+ }
|
||||
+
|
||||
|
@ -958,9 +957,9 @@
|
|||
+ */
|
||||
+ public void onPlantGrow(World world, int x, int y, int z, int sourceX, int sourceY, int sourceZ)
|
||||
+ {
|
||||
+ if (this == Blocks.grass || this == Blocks.farmland)
|
||||
+ if (this == Blocks.field_150349_c || this == Blocks.field_150458_ak)
|
||||
+ {
|
||||
+ world.setBlock(x, y, z, Blocks.dirt, 0, 2);
|
||||
+ world.func_147465_d(x, y, z, Blocks.field_150346_d, 0, 2);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
@ -977,9 +976,9 @@
|
|||
+ */
|
||||
+ public boolean isFertile(World world, int x, int y, int z)
|
||||
+ {
|
||||
+ if (this == Blocks.farmland)
|
||||
+ if (this == Blocks.field_150458_ak)
|
||||
+ {
|
||||
+ return world.getBlockMetadata(x, y, z) > 0;
|
||||
+ return world.func_72805_g(x, y, z) > 0;
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
|
@ -1001,7 +1000,7 @@
|
|||
+ */
|
||||
+ public int getLightOpacity(IBlockAccess world, int x, int y, int z)
|
||||
+ {
|
||||
+ return getLightOpacity();
|
||||
+ return func_149717_k();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -1017,11 +1016,11 @@
|
|||
+ {
|
||||
+ if (entity instanceof EntityWither)
|
||||
+ {
|
||||
+ return this != Blocks.bedrock && this != Blocks.end_portal && this != Blocks.end_portal_frame && this != Blocks.command_block;
|
||||
+ return this != Blocks.field_150357_h && this != Blocks.field_150384_bq && this != Blocks.field_150378_br && this != Blocks.field_150483_bI;
|
||||
+ }
|
||||
+ else if (entity instanceof EntityDragon)
|
||||
+ {
|
||||
+ return this != Blocks.obsidian && this != Blocks.end_stone && this != Blocks.bedrock;
|
||||
+ return this != Blocks.field_150343_Z && this != Blocks.field_150377_bs && this != Blocks.field_150357_h;
|
||||
+ }
|
||||
+
|
||||
+ return true;
|
||||
|
@ -1041,7 +1040,7 @@
|
|||
+ */
|
||||
+ public boolean isBeaconBase(IBlockAccess worldObj, int x, int y, int z, int beaconX, int beaconY, int beaconZ)
|
||||
+ {
|
||||
+ return this == Blocks.emerald_block || this == Blocks.gold_block || this == Blocks.diamond_block || this == Blocks.iron_block;
|
||||
+ return this == Blocks.field_150475_bE || this == Blocks.field_150340_R || this == Blocks.field_150484_ah || this == Blocks.field_150339_S;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -1086,7 +1085,7 @@
|
|||
+ */
|
||||
+ public float getEnchantPowerBonus(World world, int x, int y, int z)
|
||||
+ {
|
||||
+ return this == Blocks.bookshelf ? 1 : 0;
|
||||
+ return this == Blocks.field_150342_X ? 1 : 0;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -1101,12 +1100,12 @@
|
|||
+ */
|
||||
+ public boolean recolourBlock(World world, int x, int y, int z, ForgeDirection side, int colour)
|
||||
+ {
|
||||
+ if (this == Blocks.wool)
|
||||
+ if (this == Blocks.field_150325_L)
|
||||
+ {
|
||||
+ int meta = world.getBlockMetadata(x, y, z);
|
||||
+ int meta = world.func_72805_g(x, y, z);
|
||||
+ if (meta != colour)
|
||||
+ {
|
||||
+ world.setBlockMetadataWithNotify(x, y, z, colour, 3);
|
||||
+ world.func_72921_c(x, y, z, colour, 3);
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
|
@ -1151,7 +1150,7 @@
|
|||
+ */
|
||||
+ public boolean shouldCheckWeakPower(IBlockAccess world, int x, int y, int z, int side)
|
||||
+ {
|
||||
+ return isNormalCube();
|
||||
+ return func_149721_r();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -1244,7 +1243,7 @@
|
|||
+ */
|
||||
+ public boolean isToolEffective(String type, int metadata)
|
||||
+ {
|
||||
+ if ("pickaxe".equals(type) && (this == Blocks.redstone_ore || this == Blocks.lit_redstone_ore || this == Blocks.obsidian))
|
||||
+ if ("pickaxe".equals(type) && (this == Blocks.field_150450_ax || this == Blocks.field_150439_ay || this == Blocks.field_150343_Z))
|
||||
+ return false;
|
||||
+ if (harvestTool[metadata] == null) return false;
|
||||
+ return harvestTool[metadata].equals(type);
|
||||
|
@ -1253,4 +1252,4 @@
|
|||
+
|
||||
public static class SoundType
|
||||
{
|
||||
public final String soundName;
|
||||
public final String field_150501_a;
|
||||
|
|
|
@ -15,25 +15,25 @@
|
|||
{
|
||||
private static final String __OBFID = "CL_00000208";
|
||||
|
||||
@@ -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_)
|
||||
@@ -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_)
|
||||
{
|
||||
- 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_);
|
||||
- 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_);
|
||||
}
|
||||
|
||||
// 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_)
|
||||
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_)
|
||||
{
|
||||
- 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);
|
||||
- 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);
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149668_a
|
||||
@@ -89,4 +94,37 @@
|
||||
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 @@
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -41,21 +41,21 @@
|
|||
+ @Override
|
||||
+ public EnumPlantType getPlantType(IBlockAccess world, int x, int y, int z)
|
||||
+ {
|
||||
+ if (this == Blocks.wheat) return Crop;
|
||||
+ if (this == Blocks.carrots) return Crop;
|
||||
+ if (this == Blocks.potatoes) return Crop;
|
||||
+ if (this == Blocks.melon_stem) return Crop;
|
||||
+ if (this == Blocks.pumpkin_stem) return Crop;
|
||||
+ if (this == Blocks.deadbush) return Desert;
|
||||
+ if (this == Blocks.waterlily) return Water;
|
||||
+ if (this == Blocks.red_mushroom) return Cave;
|
||||
+ if (this == Blocks.brown_mushroom) return Cave;
|
||||
+ if (this == Blocks.nether_wart) return Nether;
|
||||
+ if (this == Blocks.sapling) return Plains;
|
||||
+ if (this == Blocks.tallgrass) return Plains;
|
||||
+ if (this == Blocks.double_plant) return Plains;
|
||||
+ if (this == Blocks.red_flower) return Plains;
|
||||
+ if (this == Blocks.yellow_flower) return Plains;
|
||||
+ if (this == Blocks.field_150464_aj) return Crop;
|
||||
+ if (this == Blocks.field_150459_bM) return Crop;
|
||||
+ if (this == Blocks.field_150469_bN) return Crop;
|
||||
+ if (this == Blocks.field_150394_bc) return Crop;
|
||||
+ if (this == Blocks.field_150393_bb) return Crop;
|
||||
+ if (this == Blocks.field_150330_I) return Desert;
|
||||
+ if (this == Blocks.field_150392_bi) return Water;
|
||||
+ if (this == Blocks.field_150337_Q) return Cave;
|
||||
+ if (this == Blocks.field_150338_P) return Cave;
|
||||
+ if (this == Blocks.field_150388_bm) return Nether;
|
||||
+ if (this == Blocks.field_150345_g) return Plains;
|
||||
+ if (this == Blocks.field_150329_H) return Plains;
|
||||
+ if (this == Blocks.field_150398_cm) return Plains;
|
||||
+ if (this == Blocks.field_150328_O) return Plains;
|
||||
+ if (this == Blocks.field_150327_N) return Plains;
|
||||
+ return Plains;
|
||||
+ }
|
||||
+
|
||||
|
@ -68,6 +68,6 @@
|
|||
+ @Override
|
||||
+ public int getPlantMetadata(IBlockAccess world, int x, int y, int z)
|
||||
+ {
|
||||
+ return world.getBlockMetadata(x, y, z);
|
||||
+ return world.func_72805_g(x, y, z);
|
||||
+ }
|
||||
}
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
public abstract class BlockButton extends Block
|
||||
{
|
||||
private final boolean field_150047_a;
|
||||
@@ -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_)
|
||||
@@ -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_)
|
||||
{
|
||||
- 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()));
|
||||
- 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()));
|
||||
+ 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,48 +22,47 @@
|
|||
+ (dir == EAST && p_149707_1_.isSideSolid(p_149707_2_ - 1, p_149707_3_, p_149707_4_, EAST));
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149742_c
|
||||
public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
|
||||
public boolean func_149742_c(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
|
||||
{
|
||||
- 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_.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_.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));
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149660_a
|
||||
@@ -70,19 +80,21 @@
|
||||
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 @@
|
||||
int k1 = j1 & 8;
|
||||
j1 &= 7;
|
||||
|
||||
- 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_.func_147439_a(p_149660_2_, p_149660_3_, p_149660_4_ + 1).func_149721_r())
|
||||
+ 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_.getBlock(p_149660_2_, p_149660_3_, p_149660_4_ - 1).isNormalCube())
|
||||
- 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 (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_.getBlock(p_149660_2_ + 1, p_149660_3_, p_149660_4_).isNormalCube())
|
||||
- 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 (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_.getBlock(p_149660_2_ - 1, p_149660_3_, p_149660_4_).isNormalCube())
|
||||
- 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 (dir == EAST && p_149660_1_.isSideSolid(p_149660_2_ - 1, p_149660_3_, p_149660_4_, EAST))
|
||||
{
|
||||
j1 = 1;
|
||||
}
|
||||
@@ -96,7 +108,11 @@
|
||||
@@ -89,7 +101,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_.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)));
|
||||
- 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)));
|
||||
+ 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;
|
||||
|
@ -71,30 +70,30 @@
|
|||
+ return 1;
|
||||
}
|
||||
|
||||
// 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;
|
||||
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 @@
|
||||
int l = p_149695_1_.func_72805_g(p_149695_2_, p_149695_3_, p_149695_4_) & 7;
|
||||
boolean flag = false;
|
||||
|
||||
- if (!p_149695_1_.getBlock(p_149695_2_ - 1, p_149695_3_, p_149695_4_).isNormalCube() && l == 1)
|
||||
- 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_.isSideSolid(p_149695_2_ - 1, p_149695_3_, p_149695_4_, EAST) && l == 1)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
|
||||
- if (!p_149695_1_.getBlock(p_149695_2_ + 1, p_149695_3_, p_149695_4_).isNormalCube() && l == 2)
|
||||
- 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_.isSideSolid(p_149695_2_ + 1, p_149695_3_, p_149695_4_, WEST) && l == 2)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
|
||||
- if (!p_149695_1_.getBlock(p_149695_2_, p_149695_3_, p_149695_4_ - 1).isNormalCube() && l == 3)
|
||||
- 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_.isSideSolid(p_149695_2_, p_149695_3_, p_149695_4_ - 1, SOUTH) && l == 3)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
|
||||
- if (!p_149695_1_.getBlock(p_149695_2_, p_149695_3_, p_149695_4_ + 1).isNormalCube() && l == 4)
|
||||
- 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_.isSideSolid(p_149695_2_, p_149695_3_, p_149695_4_ + 1, NORTH) && l == 4)
|
||||
{
|
||||
flag = true;
|
||||
|
|
|
@ -15,18 +15,18 @@
|
|||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon field_150041_a;
|
||||
@@ -135,7 +139,7 @@
|
||||
@@ -125,7 +129,7 @@
|
||||
else
|
||||
{
|
||||
Block block = p_149718_1_.getBlock(p_149718_2_, p_149718_3_ - 1, p_149718_4_);
|
||||
- return block == Blocks.cactus || block == Blocks.sand;
|
||||
Block block = p_149718_1_.func_147439_a(p_149718_2_, p_149718_3_ - 1, p_149718_4_);
|
||||
- return block == Blocks.field_150434_aF || block == Blocks.field_150354_m;
|
||||
+ return block.canSustainPlant(p_149718_1_, p_149718_2_, p_149718_3_ - 1, p_149718_4_, ForgeDirection.UP, this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
@@ -141,4 +145,22 @@
|
||||
this.field_150041_a = p_149651_1_.func_94245_a(this.func_149641_N() + "_top");
|
||||
this.field_150040_b = p_149651_1_.func_94245_a(this.func_149641_N() + "_bottom");
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
|
|
|
@ -9,36 +9,36 @@
|
|||
public class BlockChest extends BlockContainer
|
||||
{
|
||||
private final Random field_149955_b = new Random();
|
||||
@@ -416,7 +418,7 @@
|
||||
@@ -407,7 +409,7 @@
|
||||
{
|
||||
return null;
|
||||
}
|
||||
- else if (p_149951_1_.getBlock(p_149951_2_, p_149951_3_ + 1, p_149951_4_).isNormalCube())
|
||||
- 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_.isSideSolid(p_149951_2_, p_149951_3_ + 1, p_149951_4_, DOWN))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -424,19 +426,19 @@
|
||||
@@ -415,19 +417,19 @@
|
||||
{
|
||||
return null;
|
||||
}
|
||||
- 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_)))
|
||||
- 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_)))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
- 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_)))
|
||||
- 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_)))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
- 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)))
|
||||
- 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)))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
- 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)))
|
||||
- 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)))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
import java.util.Random;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -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_)
|
||||
@@ -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_)
|
||||
{
|
||||
+ super.dropBlockAsItemWithChance(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, 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_);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
|
@ -22,24 +22,24 @@
|
|||
int j1 = func_149987_c(p_149690_5_);
|
||||
byte b0 = 1;
|
||||
|
||||
@@ -183,8 +191,9 @@
|
||||
@@ -170,8 +178,9 @@
|
||||
|
||||
for (int k1 = 0; k1 < b0; ++k1)
|
||||
{
|
||||
- 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));
|
||||
- this.func_149642_a(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, new ItemStack(Items.field_151100_aR, 1, 3));
|
||||
+ dropped.add(new ItemStack(Items.field_151100_aR, 1, 3));
|
||||
}
|
||||
+ return dropped;
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149694_d
|
||||
@@ -231,4 +240,10 @@
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -216,4 +225,10 @@
|
||||
++j1;
|
||||
p_149853_1_.setBlockMetadataWithNotify(p_149853_3_, p_149853_4_, p_149853_5_, j1 << 2 | i1, 2);
|
||||
p_149853_1_.func_72921_c(p_149853_3_, p_149853_4_, p_149853_5_, j1 << 2 | i1, 2);
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public Item getItemDropped(int par1, Random par2Random, int par3)
|
||||
+ public Item func_149650_a(int par1, Random par2Random, int par3)
|
||||
+ {
|
||||
+ return null;
|
||||
+ }
|
||||
|
|
|
@ -16,26 +16,26 @@
|
|||
|
||||
public class BlockCrops extends BlockBush implements IGrowable
|
||||
{
|
||||
@@ -91,11 +93,11 @@
|
||||
@@ -89,11 +91,11 @@
|
||||
{
|
||||
float f1 = 0.0F;
|
||||
|
||||
- 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))
|
||||
- if (p_149864_1_.func_147439_a(l, p_149864_3_ - 1, i1) == Blocks.field_150458_ak)
|
||||
+ 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))
|
||||
{
|
||||
f1 = 1.0F;
|
||||
|
||||
- if (p_149864_1_.getBlockMetadata(l, p_149864_3_ - 1, i1) > 0)
|
||||
+ if (p_149864_1_.getBlock(l, p_149864_3_ - 1, i1).isFertile(p_149864_1_, l, p_149864_3_ - 1, i1))
|
||||
- if (p_149864_1_.func_72805_g(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))
|
||||
{
|
||||
f1 = 3.0F;
|
||||
}
|
||||
@@ -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_)
|
||||
@@ -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_)
|
||||
{
|
||||
super.dropBlockAsItemWithChance(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, 0);
|
||||
super.func_149690_a(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, 0);
|
||||
-
|
||||
- if (!p_149690_1_.isRemote)
|
||||
- if (!p_149690_1_.field_72995_K)
|
||||
- {
|
||||
- if (p_149690_5_ >= 7)
|
||||
- {
|
||||
|
@ -43,17 +43,17 @@
|
|||
-
|
||||
- for (int k1 = 0; k1 < j1; ++k1)
|
||||
- {
|
||||
- if (p_149690_1_.rand.nextInt(15) <= p_149690_5_)
|
||||
- if (p_149690_1_.field_73012_v.nextInt(15) <= p_149690_5_)
|
||||
- {
|
||||
- this.dropBlockAsItem(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, new ItemStack(this.func_149866_i(), 1, 0));
|
||||
- this.func_149642_a(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, new ItemStack(this.func_149866_i(), 1, 0));
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
}
|
||||
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
||||
@@ -211,4 +197,23 @@
|
||||
public Item func_149650_a(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
||||
@@ -204,4 +190,23 @@
|
||||
{
|
||||
this.func_149863_m(p_149853_1_, p_149853_3_, p_149853_4_, p_149853_5_);
|
||||
}
|
||||
|
@ -67,7 +67,7 @@
|
|||
+ {
|
||||
+ for (int i = 0; i < 3 + fortune; ++i)
|
||||
+ {
|
||||
+ if (world.rand.nextInt(15) <= metadata)
|
||||
+ if (world.field_73012_v.nextInt(15) <= metadata)
|
||||
+ {
|
||||
+ ret.add(new ItemStack(this.func_149866_i(), 1, 0));
|
||||
+ }
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
--- ../src-base/minecraft/net/minecraft/block/BlockDoor.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockDoor.java
|
||||
@@ -258,7 +258,7 @@
|
||||
@@ -249,7 +249,7 @@
|
||||
{
|
||||
if (this.blockMaterial == Material.iron)
|
||||
if (this.field_149764_J == Material.field_151573_f)
|
||||
{
|
||||
- return true;
|
||||
+ return false; //Allow items to interact with the door
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -379,7 +379,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_)
|
||||
@@ -367,7 +367,7 @@
|
||||
|
||||
public boolean func_149742_c(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
|
||||
{
|
||||
- return p_149742_3_ >= 255 ? false : World.doesBlockHaveSolidTopSurface(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_) && super.canPlaceBlockAt(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_) && super.canPlaceBlockAt(p_149742_1_, p_149742_2_, p_149742_3_ + 1, p_149742_4_);
|
||||
+ return p_149742_3_ >= p_149742_1_.getHeight() - 1 ? false : World.doesBlockHaveSolidTopSurface(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_) && super.canPlaceBlockAt(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_) && super.canPlaceBlockAt(p_149742_1_, p_149742_2_, p_149742_3_ + 1, p_149742_4_);
|
||||
- return p_149742_3_ >= 255 ? false : World.func_147466_a(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_) && super.func_149742_c(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_) && super.func_149742_c(p_149742_1_, p_149742_2_, p_149742_3_ + 1, p_149742_4_);
|
||||
+ return p_149742_3_ >= p_149742_1_.func_72800_K() - 1 ? false : World.func_147466_a(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_) && super.func_149742_c(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_) && super.func_149742_c(p_149742_1_, p_149742_2_, p_149742_3_ + 1, p_149742_4_);
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149656_h
|
||||
public int func_149656_h()
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
--- ../src-base/minecraft/net/minecraft/block/BlockDoublePlant.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockDoublePlant.java
|
||||
@@ -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_)
|
||||
@@ -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_)
|
||||
{
|
||||
+ 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_.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_);
|
||||
+ 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.
|
||||
int l = p_149718_1_.func_72805_g(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_);
|
||||
}
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
--- ../src-base/minecraft/net/minecraft/block/BlockFalling.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockFalling.java
|
||||
@@ -88,7 +88,7 @@
|
||||
@@ -84,7 +84,7 @@
|
||||
{
|
||||
Block block = p_149831_0_.getBlock(p_149831_1_, p_149831_2_, p_149831_3_);
|
||||
Block block = p_149831_0_.func_147439_a(p_149831_1_, p_149831_2_, p_149831_3_);
|
||||
|
||||
- if (block.blockMaterial == Material.air)
|
||||
- if (block.field_149764_J == Material.field_151579_a)
|
||||
+ if (block.isAir(p_149831_0_, p_149831_1_, p_149831_2_, p_149831_3_))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -98,6 +98,7 @@
|
||||
@@ -94,6 +94,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
+ //TODO: King, take a look here when doing liquids!
|
||||
Material material = block.blockMaterial;
|
||||
return material == Material.water ? true : material == Material.lava;
|
||||
Material material = block.field_149764_J;
|
||||
return material == Material.field_151586_h ? true : material == Material.field_151587_i;
|
||||
}
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
|
||||
public class BlockFarmland extends Block
|
||||
{
|
||||
@@ -100,7 +102,7 @@
|
||||
@@ -94,7 +96,7 @@
|
||||
{
|
||||
Block block = p_149822_1_.getBlock(l, p_149822_3_ + 1, i1);
|
||||
Block block = p_149822_1_.func_147439_a(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 == Blocks.field_150464_aj || block == Blocks.field_150394_bc || block == Blocks.field_150393_bb || block == Blocks.field_150469_bN || block == Blocks.field_150459_bM)
|
||||
+ if (block instanceof IPlantable && canSustainPlant(p_149822_1_, p_149822_2_, p_149822_3_, p_149822_4_, ForgeDirection.UP, (IPlantable)block))
|
||||
{
|
||||
return true;
|
||||
|
|
|
@ -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(getIdFromBlock(Blocks.carpet), 60, 20);
|
||||
Blocks.field_150480_ab.func_149842_a(func_149682_b(Blocks.field_150404_cg), 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.blockRegistry.getObjectById(p_149842_1_), p_149842_2_, p_149842_3_);
|
||||
+ this.setFireInfo((Block)Block.field_149771_c.func_148754_a(p_149842_1_), p_149842_2_, p_149842_3_);
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149668_a
|
||||
@@ -101,13 +108,8 @@
|
||||
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 @@
|
||||
{
|
||||
if (p_149674_1_.getGameRules().getGameRuleBooleanValue("doFireTick"))
|
||||
if (p_149674_1_.func_82736_K().func_82766_b("doFireTick"))
|
||||
{
|
||||
- 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);
|
||||
- boolean flag = p_149674_1_.func_147439_a(p_149674_2_, p_149674_3_ - 1, p_149674_4_) == Blocks.field_150424_aL;
|
||||
+ 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);
|
||||
|
||||
- if (p_149674_1_.provider instanceof WorldProviderEnd && p_149674_1_.getBlock(p_149674_2_, p_149674_3_ - 1, p_149674_4_) == Blocks.bedrock)
|
||||
- if (p_149674_1_.field_73011_w instanceof WorldProviderEnd && p_149674_1_.func_147439_a(p_149674_2_, p_149674_3_ - 1, p_149674_4_) == Blocks.field_150357_h)
|
||||
- {
|
||||
- flag = true;
|
||||
- }
|
||||
-
|
||||
if (!this.canPlaceBlockAt(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_))
|
||||
if (!this.func_149742_c(p_149674_1_, 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_);
|
||||
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_);
|
||||
}
|
||||
}
|
||||
- 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.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.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_.setBlockToAir(p_149674_2_, p_149674_3_, p_149674_4_);
|
||||
p_149674_1_.func_147468_f(p_149674_2_, p_149674_3_, p_149674_4_);
|
||||
}
|
||||
@@ -149,12 +151,12 @@
|
||||
@@ -142,12 +144,12 @@
|
||||
b0 = -50;
|
||||
}
|
||||
|
||||
- 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.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, 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)
|
||||
{
|
||||
@@ -209,10 +211,16 @@
|
||||
@@ -201,10 +203,16 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149841_a
|
||||
+ @Deprecated
|
||||
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_)
|
||||
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_)
|
||||
{
|
||||
- int j1 = this.field_149848_b[Block.getIdFromBlock(p_149841_1_.getBlock(p_149841_2_, p_149841_3_, p_149841_4_))];
|
||||
- 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_))];
|
||||
+ 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_.getBlock(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_.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);
|
||||
+
|
||||
if (p_149841_6_.nextInt(p_149841_5_) < j1)
|
||||
{
|
||||
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_)
|
||||
boolean flag = p_149841_1_.func_147439_a(p_149841_2_, p_149841_3_, p_149841_4_) == Blocks.field_150335_W;
|
||||
@@ -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_)
|
||||
{
|
||||
- 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.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.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);
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149845_m
|
||||
@@ -257,12 +270,13 @@
|
||||
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 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -137,77 +137,77 @@
|
|||
return l;
|
||||
}
|
||||
}
|
||||
@@ -274,15 +288,16 @@
|
||||
@@ -262,15 +276,16 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149844_e
|
||||
+ @Deprecated
|
||||
public boolean canBlockCatchFire(IBlockAccess p_149844_1_, int p_149844_2_, int p_149844_3_, int p_149844_4_)
|
||||
public boolean func_149844_e(IBlockAccess p_149844_1_, int p_149844_2_, int p_149844_3_, int p_149844_4_)
|
||||
{
|
||||
- return this.field_149849_a[Block.getIdFromBlock(p_149844_1_.getBlock(p_149844_2_, p_149844_3_, p_149844_4_))] > 0;
|
||||
- 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 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.getIdFromBlock(p_149846_1_.getBlock(p_149846_2_, p_149846_3_, p_149846_4_))];
|
||||
- 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_))];
|
||||
- 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);
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149742_c
|
||||
@@ -330,9 +345,9 @@
|
||||
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 @@
|
||||
float f1;
|
||||
float f2;
|
||||
|
||||
- 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 (!World.func_147466_a(p_149734_1_, p_149734_2_, p_149734_3_ - 1, p_149734_4_) && !Blocks.field_150480_ab.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.field_150480_ab.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_ - 1, p_149734_4_, UP))
|
||||
{
|
||||
- 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))
|
||||
- if (Blocks.field_150480_ab.func_149844_e(p_149734_1_, p_149734_2_ - 1, p_149734_3_, p_149734_4_))
|
||||
+ if (Blocks.field_150480_ab.canCatchFire(p_149734_1_, p_149734_2_ - 1, p_149734_3_, p_149734_4_, EAST))
|
||||
{
|
||||
for (l = 0; l < 2; ++l)
|
||||
{
|
||||
@@ -343,7 +358,7 @@
|
||||
@@ -327,7 +342,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- 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))
|
||||
- if (Blocks.field_150480_ab.func_149844_e(p_149734_1_, p_149734_2_ + 1, p_149734_3_, p_149734_4_))
|
||||
+ if (Blocks.field_150480_ab.canCatchFire(p_149734_1_, p_149734_2_ + 1, p_149734_3_, p_149734_4_, WEST))
|
||||
{
|
||||
for (l = 0; l < 2; ++l)
|
||||
{
|
||||
@@ -354,7 +369,7 @@
|
||||
@@ -338,7 +353,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- 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))
|
||||
- if (Blocks.field_150480_ab.func_149844_e(p_149734_1_, p_149734_2_, p_149734_3_, p_149734_4_ - 1))
|
||||
+ if (Blocks.field_150480_ab.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_, p_149734_4_ - 1, SOUTH))
|
||||
{
|
||||
for (l = 0; l < 2; ++l)
|
||||
{
|
||||
@@ -365,7 +380,7 @@
|
||||
@@ -349,7 +364,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- 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))
|
||||
- if (Blocks.field_150480_ab.func_149844_e(p_149734_1_, p_149734_2_, p_149734_3_, p_149734_4_ + 1))
|
||||
+ if (Blocks.field_150480_ab.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_, p_149734_4_ + 1, NORTH))
|
||||
{
|
||||
for (l = 0; l < 2; ++l)
|
||||
{
|
||||
@@ -376,7 +391,7 @@
|
||||
@@ -360,7 +375,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- 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))
|
||||
- if (Blocks.field_150480_ab.func_149844_e(p_149734_1_, p_149734_2_, p_149734_3_ + 1, p_149734_4_))
|
||||
+ if (Blocks.field_150480_ab.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_ + 1, p_149734_4_, DOWN))
|
||||
{
|
||||
for (l = 0; l < 2; ++l)
|
||||
{
|
||||
@@ -422,4 +437,101 @@
|
||||
@@ -405,4 +420,101 @@
|
||||
{
|
||||
return MapColor.tntColor;
|
||||
return MapColor.field_151656_f;
|
||||
}
|
||||
+
|
||||
+ /*================================= Forge Start ======================================*/
|
||||
|
@ -220,8 +220,8 @@
|
|||
+
|
||||
+ 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.getIdFromBlock(block);
|
||||
+ if (block == Blocks.field_150350_a) throw new IllegalArgumentException("Tried to set air on fire... This is bad.");
|
||||
+ int id = Block.func_149682_b(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.getIdFromBlock(e.getKey());
|
||||
+ int id = Block.func_149682_b(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.getIdFromBlock(block);
|
||||
+ int id = Block.func_149682_b(block);
|
||||
+ return id >= 0 && id < 4096 ? field_149848_b[id] : 0;
|
||||
+ }
|
||||
+
|
||||
+ public int getEncouragement(Block block)
|
||||
+ {
|
||||
+ int id = Block.getIdFromBlock(block);
|
||||
+ int id = Block.func_149682_b(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.getBlock(x, y, z).isFlammable(world, x, y, z, face);
|
||||
+ return world.func_147439_a(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.getBlock(x, y, z).getFireSpreadSpeed(world, x, y, z, face);
|
||||
+ int newChance = world.func_147439_a(x, y, z).getFireSpreadSpeed(world, x, y, z, face);
|
||||
+ return (newChance > oldChance ? newChance : oldChance);
|
||||
+ }
|
||||
+ /*================================= Forge Start ======================================*/
|
||||
|
|
|
@ -1,37 +1,37 @@
|
|||
--- ../src-base/minecraft/net/minecraft/block/BlockGrass.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockGrass.java
|
||||
@@ -45,7 +45,7 @@
|
||||
@@ -43,7 +43,7 @@
|
||||
{
|
||||
if (!p_149674_1_.isRemote)
|
||||
if (!p_149674_1_.field_72995_K)
|
||||
{
|
||||
- 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)
|
||||
- if (p_149674_1_.func_72957_l(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_.func_72957_l(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_.setBlock(p_149674_2_, p_149674_3_, p_149674_4_, Blocks.dirt);
|
||||
p_149674_1_.func_147449_b(p_149674_2_, p_149674_3_, p_149674_4_, Blocks.field_150346_d);
|
||||
}
|
||||
@@ -58,7 +58,7 @@
|
||||
@@ -56,7 +56,7 @@
|
||||
int k1 = p_149674_4_ + p_149674_5_.nextInt(3) - 1;
|
||||
Block block = p_149674_1_.getBlock(i1, j1 + 1, k1);
|
||||
Block block = p_149674_1_.func_147439_a(i1, j1 + 1, k1);
|
||||
|
||||
- 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)
|
||||
- if (p_149674_1_.func_147439_a(i1, j1, k1) == Blocks.field_150346_d && p_149674_1_.func_72805_g(i1, j1, k1) == 0 && p_149674_1_.func_72957_l(i1, j1 + 1, k1) >= 4 && block.func_149717_k() <= 2)
|
||||
+ if (p_149674_1_.func_147439_a(i1, j1, k1) == Blocks.field_150346_d && p_149674_1_.func_72805_g(i1, j1, k1) == 0 && p_149674_1_.func_72957_l(i1, j1 + 1, k1) >= 4 && p_149674_1_.getBlockLightOpacity(i1, j1 + 1, k1) <= 2)
|
||||
{
|
||||
p_149674_1_.setBlock(i1, j1, k1, Blocks.grass);
|
||||
p_149674_1_.func_147449_b(i1, j1, k1, Blocks.field_150349_c);
|
||||
}
|
||||
@@ -188,15 +188,7 @@
|
||||
@@ -184,15 +184,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- String s = p_149853_1_.getBiomeGenForCoords(i1, k1).func_150572_a(p_149853_2_, i1, j1, k1);
|
||||
- logger.debug("Flower in " + p_149853_1_.getBiomeGenForCoords(i1, k1).biomeName + ": " + s);
|
||||
- String s = p_149853_1_.func_72807_a(i1, k1).func_150572_a(p_149853_2_, i1, j1, k1);
|
||||
- field_149992_a.debug("Flower in " + p_149853_1_.func_72807_a(i1, k1).field_76791_y + ": " + s);
|
||||
- BlockFlower blockflower = BlockFlower.func_149857_e(s);
|
||||
-
|
||||
- if (blockflower != null && blockflower.canBlockStay(p_149853_1_, i1, j1, k1))
|
||||
- if (blockflower != null && blockflower.func_149718_j(p_149853_1_, i1, j1, k1))
|
||||
- {
|
||||
- int i2 = BlockFlower.func_149856_f(s);
|
||||
- p_149853_1_.setBlock(i1, j1, k1, blockflower, i2, 3);
|
||||
- p_149853_1_.func_147465_d(i1, j1, k1, blockflower, i2, 3);
|
||||
- }
|
||||
+ p_149853_1_.getBiomeGenForCoords(i1, k1).plantFlower(p_149853_1_, p_149853_2_, i1, j1, k1);
|
||||
+ p_149853_1_.func_72807_a(i1, k1).plantFlower(p_149853_1_, p_149853_2_, i1, j1, k1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
--- ../src-base/minecraft/net/minecraft/block/BlockIce.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockIce.java
|
||||
@@ -46,7 +46,7 @@
|
||||
p_149636_2_.addStat(StatList.mineBlockStatArray[Block.getIdFromBlock(this)], 1);
|
||||
p_149636_2_.addExhaustion(0.025F);
|
||||
@@ -43,7 +43,7 @@
|
||||
p_149636_2_.func_71064_a(StatList.field_75934_C[Block.func_149682_b(this)], 1);
|
||||
p_149636_2_.func_71020_j(0.025F);
|
||||
|
||||
- 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_))
|
||||
- if (this.func_149700_E() && EnchantmentHelper.func_77502_d(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.func_77502_d(p_149636_2_))
|
||||
{
|
||||
ItemStack itemstack = this.createStackedBlock(p_149636_6_);
|
||||
ItemStack itemstack = this.func_149644_j(p_149636_6_);
|
||||
|
||||
|
|
|
@ -15,73 +15,72 @@
|
|||
public class BlockLadder extends Block
|
||||
{
|
||||
private static final String __OBFID = "CL_00000262";
|
||||
@@ -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_)
|
||||
@@ -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_)
|
||||
{
|
||||
- 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_.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_.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);
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149660_a
|
||||
@@ -94,22 +101,22 @@
|
||||
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_)
|
||||
{
|
||||
int j1 = p_149660_9_;
|
||||
|
||||
- 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_.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_.isSideSolid(p_149660_2_, p_149660_3_, p_149660_4_ + 1, NORTH))
|
||||
{
|
||||
j1 = 2;
|
||||
}
|
||||
|
||||
- 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_.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_.isSideSolid(p_149660_2_, p_149660_3_, p_149660_4_ - 1, SOUTH))
|
||||
{
|
||||
j1 = 3;
|
||||
}
|
||||
|
||||
- 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_.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_.isSideSolid(p_149660_2_ + 1, p_149660_3_, p_149660_4_, WEST))
|
||||
{
|
||||
j1 = 4;
|
||||
}
|
||||
|
||||
- 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_.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_.isSideSolid(p_149660_2_ - 1, p_149660_3_, p_149660_4_, EAST))
|
||||
{
|
||||
j1 = 5;
|
||||
}
|
||||
@@ -123,22 +130,22 @@
|
||||
int l = p_149695_1_.getBlockMetadata(p_149695_2_, p_149695_3_, p_149695_4_);
|
||||
@@ -114,22 +121,22 @@
|
||||
int l = p_149695_1_.func_72805_g(p_149695_2_, p_149695_3_, p_149695_4_);
|
||||
boolean flag = false;
|
||||
|
||||
- if (l == 2 && p_149695_1_.getBlock(p_149695_2_, p_149695_3_, p_149695_4_ + 1).isNormalCube())
|
||||
- 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_.isSideSolid(p_149695_2_, p_149695_3_, p_149695_4_ + 1, NORTH))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
|
||||
- if (l == 3 && p_149695_1_.getBlock(p_149695_2_, p_149695_3_, p_149695_4_ - 1).isNormalCube())
|
||||
- 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_.isSideSolid(p_149695_2_, p_149695_3_, p_149695_4_ - 1, SOUTH))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
|
||||
- if (l == 4 && p_149695_1_.getBlock(p_149695_2_ + 1, p_149695_3_, p_149695_4_).isNormalCube())
|
||||
- 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_.isSideSolid(p_149695_2_ + 1, p_149695_3_, p_149695_4_, WEST))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
|
||||
- if (l == 5 && p_149695_1_.getBlock(p_149695_2_ - 1, p_149695_3_, p_149695_4_).isNormalCube())
|
||||
- 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_.isSideSolid(p_149695_2_ - 1, p_149695_3_, p_149695_4_, EAST))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
@@ -157,4 +164,10 @@
|
||||
@@ -147,4 +154,10 @@
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -19,47 +19,47 @@
|
|||
{
|
||||
int[] field_150128_a;
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -84,10 +86,10 @@
|
||||
@@ -82,10 +84,10 @@
|
||||
{
|
||||
for (int l1 = -b0; l1 <= b0; ++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 (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 (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);
|
||||
- p_149749_1_.setBlockMetadataWithNotify(p_149749_2_ + j1, p_149749_3_ + k1, p_149749_4_ + l1, i2 | 8, 4);
|
||||
- int i2 = p_149749_1_.func_72805_g(p_149749_2_ + j1, p_149749_3_ + k1, p_149749_4_ + l1);
|
||||
- p_149749_1_.func_72921_c(p_149749_2_ + j1, p_149749_3_ + k1, p_149749_4_ + l1, i2 | 8, 4);
|
||||
+ block.beginLeavesDecay(p_149749_1_, p_149749_2_ + j1, p_149749_3_ + k1, p_149749_4_ + l1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -130,9 +132,9 @@
|
||||
@@ -127,9 +129,9 @@
|
||||
{
|
||||
Block block = p_149674_1_.getBlock(p_149674_2_ + l1, p_149674_3_ + i2, p_149674_4_ + j2);
|
||||
Block block = p_149674_1_.func_147439_a(p_149674_2_ + l1, p_149674_3_ + i2, p_149674_4_ + j2);
|
||||
|
||||
- if (block != Blocks.log && block != Blocks.log2)
|
||||
- if (block != Blocks.field_150364_r && block != Blocks.field_150363_s)
|
||||
+ if (!block.canSustainLeaves(p_149674_1_, p_149674_2_ + l1, p_149674_3_ + i2, p_149674_4_ + j2))
|
||||
{
|
||||
- if (block.getMaterial() == Material.leaves)
|
||||
- if (block.func_149688_o() == Material.field_151584_j)
|
||||
+ 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;
|
||||
}
|
||||
@@ -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_)
|
||||
@@ -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_)
|
||||
{
|
||||
- if (!p_149636_1_.isRemote && p_149636_2_.getCurrentEquippedItem() != null && p_149636_2_.getCurrentEquippedItem().getItem() == Items.shears)
|
||||
- if (!p_149636_1_.field_72995_K && p_149636_2_.func_71045_bC() != null && p_149636_2_.func_71045_bC().func_77973_b() == Items.field_151097_aZ)
|
||||
{
|
||||
- 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));
|
||||
- p_149636_2_.func_71064_a(StatList.field_75934_C[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));
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
super.harvestBlock(p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_);
|
||||
super.func_149636_a(p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_);
|
||||
}
|
||||
}
|
||||
@@ -330,4 +326,38 @@
|
||||
@@ -318,4 +314,38 @@
|
||||
}
|
||||
|
||||
public abstract String[] func_150125_e();
|
||||
|
@ -75,7 +75,7 @@
|
|||
+ public ArrayList<ItemStack> onSheared(ItemStack item, IBlockAccess world, int x, int y, int z, int fortune)
|
||||
+ {
|
||||
+ ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
+ ret.add(new ItemStack(this, 1, world.getBlockMetadata(x, y, z) & 3));
|
||||
+ ret.add(new ItemStack(this, 1, world.func_72805_g(x, y, z) & 3));
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
|
@ -83,13 +83,13 @@
|
|||
+ public void beginLeavesDecay(World world, int x, int y, int z)
|
||||
+ {
|
||||
+
|
||||
+ int i2 = world.getBlockMetadata(x, y, z);
|
||||
+ int i2 = world.func_72805_g(x, y, z);
|
||||
+
|
||||
+ if ((i2 & 8) == 0)
|
||||
+ {
|
||||
+ world.setBlockMetadataWithNotify(x, y, z, i2 | 8, 4);
|
||||
+ world.func_72921_c(x, y, z, i2 | 8, 4);
|
||||
+ }
|
||||
+ world.setBlockMetadataWithNotify(x, y, z, world.getBlockMetadata(x, y, z) | 8, 4);
|
||||
+ world.func_72921_c(x, y, z, world.func_72805_g(x, y, z) | 8, 4);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
public class BlockLever extends Block
|
||||
{
|
||||
private static final String __OBFID = "CL_00000264";
|
||||
@@ -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_)
|
||||
@@ -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_)
|
||||
{
|
||||
- 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()))));
|
||||
- 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()))));
|
||||
+ 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,10 +24,9 @@
|
|||
+ (dir == EAST && p_149707_1_.isSideSolid(p_149707_2_ - 1, p_149707_3_, p_149707_4_, EAST ));
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149742_c
|
||||
public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
|
||||
public boolean func_149742_c(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
|
||||
{
|
||||
- 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_.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_.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) ||
|
||||
|
@ -36,93 +35,93 @@
|
|||
+ p_149742_1_.isSideSolid(p_149742_2_, p_149742_3_ + 1, p_149742_4_, DOWN );
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149660_a
|
||||
@@ -63,32 +77,32 @@
|
||||
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 @@
|
||||
int j1 = p_149660_9_ & 7;
|
||||
byte b0 = -1;
|
||||
|
||||
- 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_.func_147439_a(p_149660_2_, p_149660_3_ + 1, p_149660_4_).func_149721_r())
|
||||
+ 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.doesBlockHaveSolidTopSurface(p_149660_1_, p_149660_2_, p_149660_3_ - 1, p_149660_4_))
|
||||
- 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 && 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_.getBlock(p_149660_2_, p_149660_3_, p_149660_4_ + 1).isNormalCube())
|
||||
- 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_.isSideSolid(p_149660_2_, p_149660_3_, p_149660_4_ + 1, NORTH))
|
||||
{
|
||||
b0 = 4;
|
||||
}
|
||||
|
||||
- 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_.func_147439_a(p_149660_2_, p_149660_3_, p_149660_4_ - 1).func_149721_r())
|
||||
+ 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_.getBlock(p_149660_2_ + 1, p_149660_3_, p_149660_4_).isNormalCube())
|
||||
- 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_.isSideSolid(p_149660_2_ + 1, p_149660_3_, p_149660_4_, WEST))
|
||||
{
|
||||
b0 = 2;
|
||||
}
|
||||
|
||||
- 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_.func_147439_a(p_149660_2_ - 1, p_149660_3_, p_149660_4_).func_149721_r())
|
||||
+ if (p_149660_5_ == 5 && p_149660_1_.isSideSolid(p_149660_2_ - 1, p_149660_3_, p_149660_4_, EAST))
|
||||
{
|
||||
b0 = 1;
|
||||
}
|
||||
@@ -156,42 +170,42 @@
|
||||
int l = p_149695_1_.getBlockMetadata(p_149695_2_, p_149695_3_, p_149695_4_) & 7;
|
||||
@@ -147,42 +161,42 @@
|
||||
int l = p_149695_1_.func_72805_g(p_149695_2_, p_149695_3_, p_149695_4_) & 7;
|
||||
boolean flag = false;
|
||||
|
||||
- if (!p_149695_1_.getBlock(p_149695_2_ - 1, p_149695_3_, p_149695_4_).isNormalCube() && l == 1)
|
||||
- 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_.isSideSolid(p_149695_2_ - 1, p_149695_3_, p_149695_4_, EAST) && l == 1)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
|
||||
- if (!p_149695_1_.getBlock(p_149695_2_ + 1, p_149695_3_, p_149695_4_).isNormalCube() && l == 2)
|
||||
- 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_.isSideSolid(p_149695_2_ + 1, p_149695_3_, p_149695_4_, WEST) && l == 2)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
|
||||
- if (!p_149695_1_.getBlock(p_149695_2_, p_149695_3_, p_149695_4_ - 1).isNormalCube() && l == 3)
|
||||
- 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_.isSideSolid(p_149695_2_, p_149695_3_, p_149695_4_ - 1, SOUTH) && l == 3)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
|
||||
- if (!p_149695_1_.getBlock(p_149695_2_, p_149695_3_, p_149695_4_ + 1).isNormalCube() && l == 4)
|
||||
- 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_.isSideSolid(p_149695_2_, p_149695_3_, p_149695_4_ + 1, NORTH) && l == 4)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
|
||||
- if (!World.doesBlockHaveSolidTopSurface(p_149695_1_, p_149695_2_, p_149695_3_ - 1, p_149695_4_) && l == 5)
|
||||
- if (!World.func_147466_a(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.doesBlockHaveSolidTopSurface(p_149695_1_, p_149695_2_, p_149695_3_ - 1, p_149695_4_) && l == 6)
|
||||
- if (!World.func_147466_a(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_.getBlock(p_149695_2_, p_149695_3_ + 1, p_149695_4_).isNormalCube() && l == 0)
|
||||
- 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_.isSideSolid(p_149695_2_, p_149695_3_ + 1, p_149695_4_, DOWN) && l == 0)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
|
||||
- if (!p_149695_1_.getBlock(p_149695_2_, p_149695_3_ + 1, p_149695_4_).isNormalCube() && l == 7)
|
||||
- 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_.isSideSolid(p_149695_2_, p_149695_3_ + 1, p_149695_4_, DOWN) && l == 7)
|
||||
{
|
||||
flag = true;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
--- ../src-base/minecraft/net/minecraft/block/BlockLiquid.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockLiquid.java
|
||||
@@ -69,7 +69,7 @@
|
||||
@@ -67,7 +67,7 @@
|
||||
{
|
||||
for (int l1 = -1; l1 <= 1; ++l1)
|
||||
{
|
||||
- int i2 = p_149720_1_.getBiomeGenForCoords(p_149720_2_ + l1, p_149720_4_ + k1).waterColorMultiplier;
|
||||
+ int i2 = p_149720_1_.getBiomeGenForCoords(p_149720_2_ + l1, p_149720_4_ + k1).getWaterColorMultiplier();
|
||||
- int i2 = p_149720_1_.func_72807_a(p_149720_2_ + l1, p_149720_4_ + k1).field_76759_H;
|
||||
+ int i2 = p_149720_1_.func_72807_a(p_149720_2_ + l1, p_149720_4_ + k1).getWaterColorMultiplier();
|
||||
l += (i2 & 16711680) >> 16;
|
||||
i1 += (i2 & 65280) >> 8;
|
||||
j1 += i2 & 255;
|
||||
|
|
|
@ -8,25 +8,25 @@
|
|||
import net.minecraft.world.World;
|
||||
|
||||
public abstract class BlockLog extends BlockRotatedPillar
|
||||
@@ -54,14 +55,10 @@
|
||||
@@ -53,14 +54,10 @@
|
||||
{
|
||||
for (int l1 = -b0; l1 <= b0; ++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 (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 (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);
|
||||
- int i2 = p_149749_1_.func_72805_g(p_149749_2_ + j1, p_149749_3_ + k1, p_149749_4_ + l1);
|
||||
-
|
||||
- if ((i2 & 8) == 0)
|
||||
- {
|
||||
- p_149749_1_.setBlockMetadataWithNotify(p_149749_2_ + j1, p_149749_3_ + k1, p_149749_4_ + l1, i2 | 8, 4);
|
||||
- p_149749_1_.func_72921_c(p_149749_2_ + j1, p_149749_3_ + k1, p_149749_4_ + l1, i2 | 8, 4);
|
||||
- }
|
||||
+ block.beginLeavesDecay(p_149749_1_, p_149749_2_ + j1, p_149749_3_ + k1, p_149749_4_ + l1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -80,4 +77,16 @@
|
||||
@@ -79,4 +76,16 @@
|
||||
{
|
||||
return this.field_150166_b[p_150161_1_ % this.field_150166_b.length];
|
||||
}
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockMobSpawner extends BlockContainer
|
||||
@@ -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_)
|
||||
@@ -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_)
|
||||
{
|
||||
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.dropXpOnBlockBreak(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, j1);
|
||||
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_);
|
||||
- int j1 = 15 + p_149690_1_.field_73012_v.nextInt(15) + p_149690_1_.field_73012_v.nextInt(15);
|
||||
- this.func_149657_c(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);
|
||||
+ }
|
||||
+
|
||||
// JAVADOC METHOD $$ func_149662_c
|
||||
public boolean isOpaqueCube()
|
||||
public boolean func_149662_c()
|
||||
{
|
||||
return false;
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
|
||||
public class BlockMushroom extends BlockBush implements IGrowable
|
||||
{
|
||||
@@ -89,7 +90,7 @@
|
||||
@@ -85,7 +86,7 @@
|
||||
if (p_149718_3_ >= 0 && p_149718_3_ < 256)
|
||||
{
|
||||
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);
|
||||
Block block = p_149718_1_.func_147439_a(p_149718_2_, p_149718_3_ - 1, p_149718_4_);
|
||||
- return block == Blocks.field_150391_bh || block == Blocks.field_150346_d && p_149718_1_.func_72805_g(p_149718_2_, p_149718_3_ - 1, p_149718_4_) == 2 || p_149718_1_.func_72883_k(p_149718_2_, p_149718_3_, p_149718_4_) < 13 && this.func_149854_a(block);
|
||||
+ return block == Blocks.field_150391_bh || block == Blocks.field_150346_d && p_149718_1_.func_72805_g(p_149718_2_, p_149718_3_ - 1, p_149718_4_) == 2 || p_149718_1_.func_72883_k(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
|
||||
{
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
--- ../src-base/minecraft/net/minecraft/block/BlockMycelium.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockMycelium.java
|
||||
@@ -39,7 +39,7 @@
|
||||
@@ -37,7 +37,7 @@
|
||||
{
|
||||
if (!p_149674_1_.isRemote)
|
||||
if (!p_149674_1_.field_72995_K)
|
||||
{
|
||||
- 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)
|
||||
- if (p_149674_1_.func_72957_l(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_.func_72957_l(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_.setBlock(p_149674_2_, p_149674_3_, p_149674_4_, Blocks.dirt);
|
||||
p_149674_1_.func_147449_b(p_149674_2_, p_149674_3_, p_149674_4_, Blocks.field_150346_d);
|
||||
}
|
||||
@@ -52,7 +52,7 @@
|
||||
@@ -50,7 +50,7 @@
|
||||
int k1 = p_149674_4_ + p_149674_5_.nextInt(3) - 1;
|
||||
Block block = p_149674_1_.getBlock(i1, j1 + 1, k1);
|
||||
Block block = p_149674_1_.func_147439_a(i1, j1 + 1, k1);
|
||||
|
||||
- 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)
|
||||
- if (p_149674_1_.func_147439_a(i1, j1, k1) == Blocks.field_150346_d && p_149674_1_.func_72805_g(i1, j1, k1) == 0 && p_149674_1_.func_72957_l(i1, j1 + 1, k1) >= 4 && block.func_149717_k() <= 2)
|
||||
+ if (p_149674_1_.func_147439_a(i1, j1, k1) == Blocks.field_150346_d && p_149674_1_.func_72805_g(i1, j1, k1) == 0 && p_149674_1_.func_72957_l(i1, j1 + 1, k1) >= 4 && p_149674_1_.getBlockLightOpacity(i1, j1 + 1, k1) <= 2)
|
||||
{
|
||||
p_149674_1_.setBlock(i1, j1, k1, this);
|
||||
p_149674_1_.func_147449_b(i1, j1, k1, this);
|
||||
}
|
||||
|
|
|
@ -16,34 +16,28 @@
|
|||
|
||||
public class BlockNetherWart extends BlockBush
|
||||
{
|
||||
@@ -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_)
|
||||
@@ -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_)
|
||||
{
|
||||
- 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_);
|
||||
- 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_);
|
||||
}
|
||||
|
||||
// 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_)
|
||||
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,7 +64,9 @@
|
||||
|
||||
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_)
|
||||
{
|
||||
+ 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)
|
||||
- if (!p_149690_1_.field_72995_K)
|
||||
+ 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_);
|
||||
+
|
||||
+ if (false && !p_149690_1_.field_72995_K)
|
||||
{
|
||||
int j1 = 1;
|
||||
@@ -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 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);
|
||||
@@ -109,4 +113,23 @@
|
||||
this.field_149883_a[i] = p_149651_1_.func_94245_a(this.func_149641_N() + "_stage_" + i);
|
||||
}
|
||||
}
|
||||
+
|
||||
|
@ -55,12 +49,12 @@
|
|||
+
|
||||
+ if (metadata >= 3)
|
||||
+ {
|
||||
+ count = 2 + world.rand.nextInt(3) + (fortune > 0 ? world.rand.nextInt(fortune + 1) : 0);
|
||||
+ count = 2 + world.field_73012_v.nextInt(3) + (fortune > 0 ? world.field_73012_v.nextInt(fortune + 1) : 0);
|
||||
+ }
|
||||
+
|
||||
+ for (int i = 0; i < count; i++)
|
||||
+ {
|
||||
+ ret.add(new ItemStack(Items.nether_wart));
|
||||
+ ret.add(new ItemStack(Items.field_151075_bm));
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
|
|
|
@ -8,51 +8,51 @@
|
|||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockOre extends Block
|
||||
@@ -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_)
|
||||
@@ -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_)
|
||||
{
|
||||
super.dropBlockAsItemWithChance(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, 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_);
|
||||
+ }
|
||||
|
||||
- if (this.getItemDropped(p_149690_5_, p_149690_1_.rand, p_149690_7_) != Item.getItemFromBlock(this))
|
||||
- if (this.func_149650_a(p_149690_5_, p_149690_1_.field_73012_v, p_149690_7_) != Item.func_150898_a(this))
|
||||
+ private Random rand = new Random();
|
||||
+ @Override
|
||||
+ public int getExpDrop(IBlockAccess p_149690_1_, int p_149690_5_, int p_149690_7_)
|
||||
+ {
|
||||
+ if (this.getItemDropped(p_149690_5_, rand, p_149690_7_) != Item.getItemFromBlock(this))
|
||||
+ if (this.func_149650_a(p_149690_5_, rand, p_149690_7_) != Item.func_150898_a(this))
|
||||
{
|
||||
int j1 = 0;
|
||||
|
||||
if (this == Blocks.coal_ore)
|
||||
if (this == Blocks.field_150365_q)
|
||||
{
|
||||
- j1 = MathHelper.getRandomIntegerInRange(p_149690_1_.rand, 0, 2);
|
||||
+ j1 = MathHelper.getRandomIntegerInRange(rand, 0, 2);
|
||||
- j1 = MathHelper.func_76136_a(p_149690_1_.field_73012_v, 0, 2);
|
||||
+ j1 = MathHelper.func_76136_a(rand, 0, 2);
|
||||
}
|
||||
else if (this == Blocks.diamond_ore)
|
||||
else if (this == Blocks.field_150482_ag)
|
||||
{
|
||||
- j1 = MathHelper.getRandomIntegerInRange(p_149690_1_.rand, 3, 7);
|
||||
+ j1 = MathHelper.getRandomIntegerInRange(rand, 3, 7);
|
||||
- j1 = MathHelper.func_76136_a(p_149690_1_.field_73012_v, 3, 7);
|
||||
+ j1 = MathHelper.func_76136_a(rand, 3, 7);
|
||||
}
|
||||
else if (this == Blocks.emerald_ore)
|
||||
else if (this == Blocks.field_150412_bA)
|
||||
{
|
||||
- j1 = MathHelper.getRandomIntegerInRange(p_149690_1_.rand, 3, 7);
|
||||
+ j1 = MathHelper.getRandomIntegerInRange(rand, 3, 7);
|
||||
- j1 = MathHelper.func_76136_a(p_149690_1_.field_73012_v, 3, 7);
|
||||
+ j1 = MathHelper.func_76136_a(rand, 3, 7);
|
||||
}
|
||||
else if (this == Blocks.lapis_ore)
|
||||
else if (this == Blocks.field_150369_x)
|
||||
{
|
||||
- j1 = MathHelper.getRandomIntegerInRange(p_149690_1_.rand, 2, 5);
|
||||
+ j1 = MathHelper.getRandomIntegerInRange(rand, 2, 5);
|
||||
- j1 = MathHelper.func_76136_a(p_149690_1_.field_73012_v, 2, 5);
|
||||
+ j1 = MathHelper.func_76136_a(rand, 2, 5);
|
||||
}
|
||||
else if (this == Blocks.quartz_ore)
|
||||
else if (this == Blocks.field_150449_bY)
|
||||
{
|
||||
- j1 = MathHelper.getRandomIntegerInRange(p_149690_1_.rand, 2, 5);
|
||||
+ j1 = MathHelper.getRandomIntegerInRange(rand, 2, 5);
|
||||
- j1 = MathHelper.func_76136_a(p_149690_1_.field_73012_v, 2, 5);
|
||||
+ j1 = MathHelper.func_76136_a(rand, 2, 5);
|
||||
}
|
||||
|
||||
- this.dropXpOnBlockBreak(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, j1);
|
||||
- this.func_149657_c(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, j1);
|
||||
+ return j1;
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149692_a
|
||||
public int func_149692_a(int p_149692_1_)
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
|
||||
public class BlockPane extends Block
|
||||
{
|
||||
@@ -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_)
|
||||
@@ -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_)
|
||||
{
|
||||
- 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.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.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))
|
||||
{
|
||||
@@ -124,10 +126,10 @@
|
||||
@@ -117,10 +119,10 @@
|
||||
float f1 = 0.5625F;
|
||||
float f2 = 0.4375F;
|
||||
float f3 = 0.5625F;
|
||||
- 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.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.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))
|
||||
{
|
||||
@@ -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);
|
||||
@@ -186,4 +188,10 @@
|
||||
this.field_149761_L = p_149651_1_.func_94245_a(this.field_150101_M);
|
||||
this.field_150102_N = p_149651_1_.func_94245_a(this.field_150100_a);
|
||||
}
|
||||
+
|
||||
+ public boolean canPaneConnectTo(IBlockAccess world, int x, int y, int z, ForgeDirection dir)
|
||||
+ {
|
||||
+ return canPaneConnectToBlock(world.getBlock(x, y, z)) ||
|
||||
+ return func_150098_a(world.func_147439_a(x, y, z)) ||
|
||||
+ world.isSideSolid(x, y, z, dir.getOpposite(), false);
|
||||
+ }
|
||||
}
|
||||
|
|
|
@ -8,58 +8,58 @@
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityPiston;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
@@ -380,7 +381,8 @@
|
||||
@@ -360,7 +361,8 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
- return !(p_150080_0_ instanceof ITileEntityProvider);
|
||||
+ 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_)));
|
||||
+ return !(p_150080_1_.func_147439_a(p_150080_2_, p_150080_3_, p_150080_4_).hasTileEntity(p_150080_1_.func_72805_g(p_150080_2_, p_150080_3_, p_150080_4_)));
|
||||
+
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,14 +398,14 @@
|
||||
@@ -375,14 +377,14 @@
|
||||
{
|
||||
if (l1 < 13)
|
||||
{
|
||||
- if (j1 <= 0 || j1 >= 255)
|
||||
+ if (j1 <= 0 || j1 >= p_150077_0_.getHeight())
|
||||
+ if (j1 <= 0 || j1 >= p_150077_0_.func_72800_K())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Block block = p_150077_0_.getBlock(i1, j1, k1);
|
||||
Block block = p_150077_0_.func_147439_a(i1, j1, k1);
|
||||
|
||||
- if (block.getMaterial() != Material.air)
|
||||
- if (block.func_149688_o() != Material.field_151579_a)
|
||||
+ if (!block.isAir(p_150077_0_, i1, j1, k1))
|
||||
{
|
||||
if (!canPushBlock(block, p_150077_0_, i1, j1, k1, true))
|
||||
if (!func_150080_a(block, p_150077_0_, i1, j1, k1, true))
|
||||
{
|
||||
@@ -442,14 +444,14 @@
|
||||
@@ -420,14 +422,14 @@
|
||||
{
|
||||
if (l1 < 13)
|
||||
{
|
||||
- if (j1 <= 0 || j1 >= 255)
|
||||
+ if (j1 <= 0 || j1 >= p_150079_1_.getHeight())
|
||||
+ if (j1 <= 0 || j1 >= p_150079_1_.func_72800_K())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Block block = p_150079_1_.getBlock(i1, j1, k1);
|
||||
Block block = p_150079_1_.func_147439_a(i1, j1, k1);
|
||||
|
||||
- if (block.getMaterial() != Material.air)
|
||||
- if (block.func_149688_o() != Material.field_151579_a)
|
||||
+ if (!block.isAir(p_150079_1_, i1, j1, k1))
|
||||
{
|
||||
if (!canPushBlock(block, p_150079_1_, i1, j1, k1, true))
|
||||
if (!func_150080_a(block, p_150079_1_, i1, j1, k1, true))
|
||||
{
|
||||
@@ -470,7 +472,9 @@
|
||||
@@ -448,7 +450,9 @@
|
||||
continue;
|
||||
}
|
||||
|
||||
- block.dropBlockAsItem(p_150079_1_, i1, j1, k1, p_150079_1_.getBlockMetadata(i1, j1, k1), 0);
|
||||
- block.func_149697_b(p_150079_1_, i1, j1, k1, p_150079_1_.func_72805_g(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.dropBlockAsItemWithChance(p_150079_1_, i1, j1, k1, p_150079_1_.getBlockMetadata(i1, j1, k1), chance, 0);
|
||||
p_150079_1_.setBlockToAir(i1, j1, k1);
|
||||
+ block.func_149690_a(p_150079_1_, i1, j1, k1, p_150079_1_.func_72805_g(i1, j1, k1), chance, 0);
|
||||
p_150079_1_.func_147468_f(i1, j1, k1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
--- ../src-base/minecraft/net/minecraft/block/BlockPumpkin.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockPumpkin.java
|
||||
@@ -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_)
|
||||
@@ -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_)
|
||||
{
|
||||
- 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_);
|
||||
- return p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_, p_149742_4_).field_149764_J.func_76222_j() && 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_);
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149689_a
|
||||
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_)
|
||||
|
|
|
@ -12,21 +12,21 @@
|
|||
|
||||
public static final boolean func_150051_a(Block p_150051_0_)
|
||||
{
|
||||
- return p_150051_0_ == Blocks.rail || p_150051_0_ == Blocks.golden_rail || p_150051_0_ == Blocks.detector_rail || p_150051_0_ == Blocks.activator_rail;
|
||||
- return p_150051_0_ == Blocks.field_150448_aq || p_150051_0_ == Blocks.field_150318_D || p_150051_0_ == Blocks.field_150319_E || p_150051_0_ == Blocks.field_150408_cc;
|
||||
+ return p_150051_0_ instanceof BlockRailBase;
|
||||
}
|
||||
|
||||
protected BlockRailBase(boolean p_i45389_1_)
|
||||
@@ -85,7 +86,7 @@
|
||||
// JAVADOC METHOD $$ func_149645_b
|
||||
public int getRenderType()
|
||||
@@ -78,7 +79,7 @@
|
||||
|
||||
public int func_149645_b()
|
||||
{
|
||||
- return 9;
|
||||
+ return renderType;
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149745_a
|
||||
@@ -205,6 +206,111 @@
|
||||
public int func_149745_a(Random p_149745_1_)
|
||||
@@ -193,6 +194,111 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
|||
+ */
|
||||
+ public boolean isFlexibleRail(IBlockAccess world, int y, int x, int z)
|
||||
+ {
|
||||
+ return isPowered();
|
||||
+ return func_150050_e();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -86,8 +86,8 @@
|
|||
+ */
|
||||
+ public int getBasicRailMetadata(IBlockAccess world, EntityMinecart cart, int x, int y, int z)
|
||||
+ {
|
||||
+ int meta = world.getBlockMetadata(x, y, z);
|
||||
+ if(isPowered())
|
||||
+ int meta = world.func_72805_g(x, y, z);
|
||||
+ if(func_150050_e())
|
||||
+ {
|
||||
+ meta = meta & 7;
|
||||
+ }
|
||||
|
@ -138,7 +138,7 @@
|
|||
public class Rail
|
||||
{
|
||||
private World field_150660_b;
|
||||
@@ -214,6 +320,7 @@
|
||||
@@ -202,6 +308,7 @@
|
||||
private final boolean field_150656_f;
|
||||
private List field_150657_g = new ArrayList();
|
||||
private static final String __OBFID = "CL_00000196";
|
||||
|
@ -146,12 +146,12 @@
|
|||
|
||||
public Rail(World p_i45388_2_, int p_i45388_3_, int p_i45388_4_, int p_i45388_5_)
|
||||
{
|
||||
@@ -221,19 +328,10 @@
|
||||
@@ -209,19 +316,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_.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_);
|
||||
- Block block = p_i45388_2_.func_147439_a(p_i45388_3_, p_i45388_4_, p_i45388_5_);
|
||||
- int l = p_i45388_2_.func_72805_g(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_.getBlock(p_i45388_3_, p_i45388_4_, p_i45388_5_);
|
||||
+ BlockRailBase block = (BlockRailBase)p_i45388_2_.func_147439_a(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);
|
||||
}
|
||||
|
||||
@@ -424,7 +522,7 @@
|
||||
@@ -412,7 +510,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))
|
||||
{
|
||||
@@ -437,7 +535,7 @@
|
||||
@@ -425,7 +523,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))
|
||||
{
|
||||
@@ -582,7 +680,7 @@
|
||||
@@ -570,7 +668,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))
|
||||
{
|
||||
@@ -595,7 +693,7 @@
|
||||
@@ -583,7 +681,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src-base/minecraft/net/minecraft/block/BlockRedstoneComparator.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneComparator.java
|
||||
@@ -237,4 +237,19 @@
|
||||
@@ -228,4 +228,19 @@
|
||||
{
|
||||
return new TileEntityComparator();
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
|||
+ {
|
||||
+ if (y == tileY && world instanceof World)
|
||||
+ {
|
||||
+ onNeighborBlockChange((World)world, x, y, z, world.getBlock(tileX, tileY, tileZ));
|
||||
+ func_149695_a((World)world, x, y, z, world.func_147439_a(tileX, tileY, tileZ));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
|
|
@ -8,24 +8,24 @@
|
|||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockRedstoneOre extends Block
|
||||
@@ -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_)
|
||||
@@ -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_)
|
||||
{
|
||||
super.dropBlockAsItemWithChance(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, 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_);
|
||||
+ }
|
||||
|
||||
- if (this.getItemDropped(p_149690_5_, p_149690_1_.rand, p_149690_7_) != Item.getItemFromBlock(this))
|
||||
- if (this.func_149650_a(p_149690_5_, p_149690_1_.field_73012_v, p_149690_7_) != Item.func_150898_a(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.getItemDropped(p_149690_5_, rand, p_149690_7_) != Item.getItemFromBlock(this))
|
||||
+ if (this.func_149650_a(p_149690_5_, rand, p_149690_7_) != Item.func_150898_a(this))
|
||||
{
|
||||
- int j1 = 1 + p_149690_1_.rand.nextInt(5);
|
||||
- this.dropXpOnBlockBreak(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, j1);
|
||||
- int j1 = 1 + p_149690_1_.field_73012_v.nextInt(5);
|
||||
- this.func_149657_c(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, j1);
|
||||
+ return 1 + rand.nextInt(5);
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149734_b
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
--- ../src-base/minecraft/net/minecraft/block/BlockRedstoneWire.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneWire.java
|
||||
@@ -415,7 +415,7 @@
|
||||
@@ -405,7 +405,7 @@
|
||||
}
|
||||
else if (!Blocks.unpowered_repeater.func_149907_e(block))
|
||||
else if (!Blocks.field_150413_aR.func_149907_e(block))
|
||||
{
|
||||
- return block.canProvidePower() && p_150174_4_ != -1;
|
||||
- return block.func_149744_f() && p_150174_4_ != -1;
|
||||
+ return block.canConnectRedstone(p_150174_0_, p_150174_1_, p_150174_2_, p_150174_3_, p_150174_4_);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -13,18 +13,18 @@
|
|||
{
|
||||
private static final String __OBFID = "CL_00000300";
|
||||
|
||||
@@ -59,7 +63,7 @@
|
||||
public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
|
||||
@@ -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_)
|
||||
{
|
||||
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))));
|
||||
Block block = p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_ - 1, p_149742_4_);
|
||||
- return block == this ? true : (block != Blocks.field_150349_c && block != Blocks.field_150346_d && block != Blocks.field_150354_m ? 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))));
|
||||
+ return block.canSustainPlant(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_, ForgeDirection.UP, this);
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149695_a
|
||||
@@ -130,4 +134,22 @@
|
||||
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 @@
|
||||
{
|
||||
return p_149720_1_.getBiomeGenForCoords(p_149720_2_, p_149720_4_).getBiomeGrassColor(p_149720_2_, p_149720_3_, p_149720_4_);
|
||||
return p_149720_1_.func_72807_a(p_149720_2_, p_149720_4_).func_150558_b(p_149720_2_, p_149720_3_, p_149720_4_);
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
|
@ -42,6 +42,6 @@
|
|||
+ @Override
|
||||
+ public int getPlantMetadata(IBlockAccess world, int x, int y, int z)
|
||||
+ {
|
||||
+ return world.getBlockMetadata(x, y, z);
|
||||
+ return world.func_72805_g(x, y, z);
|
||||
+ }
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
--- ../src-base/minecraft/net/minecraft/block/BlockSapling.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockSapling.java
|
||||
@@ -73,6 +73,7 @@
|
||||
@@ -71,6 +71,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_)
|
||||
{
|
||||
+ if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(p_149878_1_, p_149878_5_, p_149878_2_, p_149878_3_, p_149878_4_)) return;
|
||||
int l = p_149878_1_.getBlockMetadata(p_149878_2_, p_149878_3_, p_149878_4_) & 7;
|
||||
int l = p_149878_1_.func_72805_g(p_149878_2_, p_149878_3_, p_149878_4_) & 7;
|
||||
Object object = p_149878_5_.nextInt(10) == 0 ? new WorldGenBigTree(true) : new WorldGenTrees(true);
|
||||
int i1 = 0;
|
||||
|
|
|
@ -8,29 +8,28 @@
|
|||
import java.util.Iterator;
|
||||
import java.util.Random;
|
||||
import net.minecraft.block.material.Material;
|
||||
@@ -118,9 +119,6 @@
|
||||
@@ -108,8 +109,6 @@
|
||||
return p_149692_1_;
|
||||
}
|
||||
|
||||
- // 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_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_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_)
|
||||
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_)
|
||||
{
|
||||
@@ -130,29 +128,38 @@
|
||||
p_149681_1_.setBlockMetadataWithNotify(p_149681_2_, p_149681_3_, p_149681_4_, p_149681_5_, 4);
|
||||
if (p_149681_6_.field_71075_bZ.field_75098_d)
|
||||
@@ -118,29 +117,38 @@
|
||||
p_149681_1_.func_72921_c(p_149681_2_, p_149681_3_, p_149681_4_, p_149681_5_, 4);
|
||||
}
|
||||
|
||||
+ this.dropBlockAsItem(p_149681_1_, p_149681_2_, p_149681_3_, p_149681_4_, p_149681_5_, 0);
|
||||
+ this.func_149697_b(p_149681_1_, p_149681_2_, p_149681_3_, p_149681_4_, p_149681_5_, 0);
|
||||
+
|
||||
super.onBlockHarvested(p_149681_1_, p_149681_2_, p_149681_3_, p_149681_4_, p_149681_5_, p_149681_6_);
|
||||
super.func_149681_a(p_149681_1_, p_149681_2_, p_149681_3_, p_149681_4_, p_149681_5_, p_149681_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 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_)
|
||||
{
|
||||
- if (!p_149749_1_.isRemote)
|
||||
+ super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
|
||||
- if (!p_149749_1_.field_72995_K)
|
||||
+ super.func_149749_a(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
|
@ -40,24 +39,24 @@
|
|||
{
|
||||
if ((p_149749_6_ & 8) == 0)
|
||||
{
|
||||
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_);
|
||||
ItemStack itemstack = new ItemStack(Items.field_151144_bL, 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_);
|
||||
|
||||
+ if (tileentityskull == null) return ret;
|
||||
+
|
||||
if (tileentityskull.func_145904_a() == 3 && tileentityskull.func_145907_c() != null && tileentityskull.func_145907_c().length() > 0)
|
||||
{
|
||||
itemstack.setTagCompound(new NBTTagCompound());
|
||||
itemstack.getTagCompound().setString("SkullOwner", tileentityskull.func_145907_c());
|
||||
itemstack.func_77982_d(new NBTTagCompound());
|
||||
itemstack.func_77978_p().func_74778_a("SkullOwner", tileentityskull.func_145907_c());
|
||||
}
|
||||
|
||||
- this.dropBlockAsItem(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, itemstack);
|
||||
- this.func_149642_a(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, itemstack);
|
||||
+ ret.add(itemstack);
|
||||
}
|
||||
-
|
||||
- super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
|
||||
- super.func_149749_a(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
|
||||
}
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
||||
public Item func_149650_a(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
||||
|
|
|
@ -1,54 +1,53 @@
|
|||
--- ../src-base/minecraft/net/minecraft/block/BlockSnow.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockSnow.java
|
||||
@@ -79,7 +79,7 @@
|
||||
public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
|
||||
@@ -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_)
|
||||
{
|
||||
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;
|
||||
Block block = p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_ - 1, p_149742_4_);
|
||||
- return block != Blocks.field_150432_aD && block != Blocks.field_150403_cj ? (block.func_149688_o() == Material.field_151584_j ? true : (block == this && (p_149742_1_.func_72805_g(p_149742_2_, p_149742_3_ - 1, p_149742_4_) & 7) == 7 ? true : block.func_149662_c() && block.field_149764_J.func_76230_c())) : false;
|
||||
+ return block != Blocks.field_150432_aD && block != Blocks.field_150403_cj ? (block.isLeaves(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_) ? true : (block == this && (p_149742_1_.func_72805_g(p_149742_2_, p_149742_3_ - 1, p_149742_4_) & 7) == 7 ? true : block.func_149662_c() && block.field_149764_J.func_76230_c())) : false;
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149695_a
|
||||
@@ -92,7 +92,6 @@
|
||||
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 @@
|
||||
{
|
||||
if (!this.canPlaceBlockAt(p_150155_1_, p_150155_2_, p_150155_3_, p_150155_4_))
|
||||
if (!this.func_149742_c(p_150155_1_, 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_);
|
||||
- this.func_149697_b(p_150155_1_, p_150155_2_, p_150155_3_, p_150155_4_, p_150155_1_.func_72805_g(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_);
|
||||
return false;
|
||||
}
|
||||
@@ -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_)
|
||||
@@ -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_)
|
||||
{
|
||||
- int i1 = p_149636_6_ & 7;
|
||||
- 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);
|
||||
- this.func_149642_a(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, new ItemStack(Items.field_151126_ay, 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_.func_71064_a(StatList.field_75934_C[Block.func_149682_b(this)], 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_)
|
||||
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_)
|
||||
{
|
||||
- return 0;
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149674_a
|
||||
@@ -127,7 +124,6 @@
|
||||
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_)
|
||||
{
|
||||
if (p_149674_1_.getSavedLightValue(EnumSkyBlock.Block, p_149674_2_, p_149674_3_, p_149674_4_) > 11)
|
||||
if (p_149674_1_.func_72972_b(EnumSkyBlock.Block, p_149674_2_, p_149674_3_, p_149674_4_) > 11)
|
||||
{
|
||||
- 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_);
|
||||
- this.func_149697_b(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_, p_149674_1_.func_72805_g(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_);
|
||||
}
|
||||
}
|
||||
@@ -138,4 +134,34 @@
|
||||
@@ -127,4 +123,34 @@
|
||||
{
|
||||
return p_149646_5_ == 1 ? true : super.shouldSideBeRendered(p_149646_1_, p_149646_2_, p_149646_3_, p_149646_4_, p_149646_5_);
|
||||
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_);
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
|
@ -77,7 +76,7 @@
|
|||
+ */
|
||||
+ public boolean isReplaceable(IBlockAccess world, int x, int y, int z)
|
||||
+ {
|
||||
+ int meta = world.getBlockMetadata(x, y, z);
|
||||
+ return meta >= 7 ? false : blockMaterial.isReplaceable();
|
||||
+ int meta = world.func_72805_g(x, y, z);
|
||||
+ return meta >= 7 ? false : field_149764_J.func_76222_j();
|
||||
+ }
|
||||
}
|
||||
|
|
|
@ -16,46 +16,39 @@
|
|||
|
||||
public class BlockStem extends BlockBush implements IGrowable
|
||||
{
|
||||
@@ -103,7 +105,7 @@
|
||||
@@ -101,7 +103,7 @@
|
||||
|
||||
Block block = p_149674_1_.getBlock(j1, p_149674_3_ - 1, k1);
|
||||
Block block = p_149674_1_.func_147439_a(j1, p_149674_3_ - 1, k1);
|
||||
|
||||
- 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))
|
||||
- if (p_149674_1_.func_147439_a(j1, p_149674_3_, k1).field_149764_J == Material.field_151579_a && (block == Blocks.field_150458_ak || block == Blocks.field_150346_d || block == Blocks.field_150349_c))
|
||||
+ 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.field_150346_d || block == Blocks.field_150349_c))
|
||||
{
|
||||
p_149674_1_.setBlock(j1, p_149674_3_, k1, this.field_149877_a);
|
||||
p_149674_1_.func_147449_b(j1, p_149674_3_, k1, this.field_149877_a);
|
||||
}
|
||||
@@ -146,11 +148,11 @@
|
||||
Block block8 = p_149875_1_.getBlock(l, p_149875_3_ - 1, i1);
|
||||
@@ -144,11 +146,11 @@
|
||||
Block block8 = p_149875_1_.func_147439_a(l, p_149875_3_ - 1, i1);
|
||||
float f1 = 0.0F;
|
||||
|
||||
- if (block8 == Blocks.farmland)
|
||||
- if (block8 == Blocks.field_150458_ak)
|
||||
+ if (block8.canSustainPlant(p_149875_1_, l, p_149875_3_ - 1, i1, UP, this))
|
||||
{
|
||||
f1 = 1.0F;
|
||||
|
||||
- if (p_149875_1_.getBlockMetadata(l, p_149875_3_ - 1, i1) > 0)
|
||||
- if (p_149875_1_.func_72805_g(l, p_149875_3_ - 1, i1) > 0)
|
||||
+ if (block8.isFertile(p_149875_1_, l, p_149875_3_ - 1, i1))
|
||||
{
|
||||
f1 = 3.0F;
|
||||
}
|
||||
@@ -224,6 +226,7 @@
|
||||
@@ -215,7 +217,7 @@
|
||||
{
|
||||
super.dropBlockAsItemWithChance(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, 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_);
|
||||
|
||||
+ /*
|
||||
if (!p_149690_1_.isRemote)
|
||||
- if (!p_149690_1_.field_72995_K)
|
||||
+ if (false && !p_149690_1_.field_72995_K)
|
||||
{
|
||||
Item item = null;
|
||||
@@ -246,6 +249,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
+ */
|
||||
}
|
||||
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
||||
@@ -293,4 +297,22 @@
|
||||
@@ -282,4 +284,22 @@
|
||||
{
|
||||
this.func_149874_m(p_149853_1_, p_149853_3_, p_149853_4_, p_149853_5_);
|
||||
}
|
||||
|
@ -67,8 +60,8 @@
|
|||
+ ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
+
|
||||
+ Item item = null;
|
||||
+ item = field_149877_a == Blocks.pumpkin ? Items.pumpkin_seeds : item;
|
||||
+ item = field_149877_a == Blocks.melon_block ? Items.melon_seeds : item;
|
||||
+ item = field_149877_a == Blocks.field_150423_aK ? Items.field_151080_bb : item;
|
||||
+ item = field_149877_a == Blocks.field_150440_ba ? Items.field_151081_bc : item;
|
||||
+
|
||||
+ for (int i = 0; item != null && i < 3; i++)
|
||||
+ {
|
||||
|
|
|
@ -20,31 +20,31 @@
|
|||
{
|
||||
private static final String[] field_149871_a = new String[] {"deadbush", "tallgrass", "fern"};
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -75,7 +78,7 @@
|
||||
@@ -71,7 +74,7 @@
|
||||
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
||||
public Item func_149650_a(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
||||
{
|
||||
- return p_149650_2_.nextInt(8) == 0 ? Items.wheat_seeds : null;
|
||||
- return p_149650_2_.nextInt(8) == 0 ? Items.field_151014_N : null;
|
||||
+ return null;
|
||||
}
|
||||
|
||||
// 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_)
|
||||
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_)
|
||||
{
|
||||
- if (!p_149636_1_.isRemote && p_149636_2_.getCurrentEquippedItem() != null && p_149636_2_.getCurrentEquippedItem().getItem() == Items.shears)
|
||||
- if (!p_149636_1_.field_72995_K && p_149636_2_.func_71045_bC() != null && p_149636_2_.func_71045_bC().func_77973_b() == Items.field_151097_aZ)
|
||||
{
|
||||
- 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_));
|
||||
- p_149636_2_.func_71064_a(StatList.field_75934_C[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.field_150329_H, 1, p_149636_6_));
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
super.harvestBlock(p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_);
|
||||
super.func_149636_a(p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_);
|
||||
}
|
||||
}
|
||||
@@ -151,4 +148,28 @@
|
||||
Blocks.double_plant.func_149889_c(p_149853_1_, p_149853_3_, p_149853_4_, p_149853_5_, b0, 2);
|
||||
@@ -143,4 +140,28 @@
|
||||
Blocks.field_150398_cm.func_149889_c(p_149853_1_, p_149853_3_, p_149853_4_, p_149853_5_, b0, 2);
|
||||
}
|
||||
}
|
||||
+
|
||||
|
@ -52,7 +52,7 @@
|
|||
+ public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int meta, int fortune)
|
||||
+ {
|
||||
+ ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
+ if (world.rand.nextInt(8) != 0) return ret;
|
||||
+ if (world.field_73012_v.nextInt(8) != 0) return ret;
|
||||
+ ItemStack seed = ForgeHooks.getGrassSeed(world);
|
||||
+ if (seed != null) ret.add(seed);
|
||||
+ return ret;
|
||||
|
@ -68,7 +68,7 @@
|
|||
+ public ArrayList<ItemStack> onSheared(ItemStack item, IBlockAccess world, int x, int y, int z, int fortune)
|
||||
+ {
|
||||
+ ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
+ ret.add(new ItemStack(this, 1, world.getBlockMetadata(x, y, z)));
|
||||
+ ret.add(new ItemStack(this, 1, world.func_72805_g(x, y, z)));
|
||||
+ return ret;
|
||||
+ }
|
||||
}
|
||||
|
|
|
@ -8,19 +8,18 @@
|
|||
|
||||
public class BlockTorch extends Block
|
||||
{
|
||||
@@ -55,14 +56,18 @@
|
||||
@@ -51,13 +52,17 @@
|
||||
else
|
||||
{
|
||||
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;
|
||||
Block block = p_150107_1_.func_147439_a(p_150107_2_, p_150107_3_, p_150107_4_);
|
||||
- return block == Blocks.field_150422_aJ || block == Blocks.field_150386_bk || block == Blocks.field_150359_w || block == Blocks.field_150463_bK;
|
||||
+ return block.canPlaceTorchOnTop(p_150107_1_, p_150107_2_, p_150107_3_, p_150107_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_)
|
||||
public boolean func_149742_c(World p_149742_1_, int p_149742_2_, int p_149742_3_, int 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_.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_.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) ||
|
||||
|
@ -28,81 +27,81 @@
|
|||
+ func_150107_m(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_);
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149660_a
|
||||
@@ -75,22 +80,22 @@
|
||||
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 @@
|
||||
j1 = 5;
|
||||
}
|
||||
|
||||
- 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_.func_147445_c(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_.isBlockNormalCubeDefault(p_149660_2_, p_149660_3_, p_149660_4_ - 1, true))
|
||||
- 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_.isSideSolid(p_149660_2_, p_149660_3_, p_149660_4_ - 1, SOUTH, true))
|
||||
{
|
||||
j1 = 3;
|
||||
}
|
||||
|
||||
- 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_.func_147445_c(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_.isBlockNormalCubeDefault(p_149660_2_ - 1, p_149660_3_, p_149660_4_, true))
|
||||
- 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_.isSideSolid(p_149660_2_ - 1, p_149660_3_, p_149660_4_, EAST, true))
|
||||
{
|
||||
j1 = 1;
|
||||
}
|
||||
@@ -114,19 +119,19 @@
|
||||
@@ -106,19 +111,19 @@
|
||||
{
|
||||
if (p_149726_1_.getBlockMetadata(p_149726_2_, p_149726_3_, p_149726_4_) == 0)
|
||||
if (p_149726_1_.func_72805_g(p_149726_2_, p_149726_3_, p_149726_4_) == 0)
|
||||
{
|
||||
- if (p_149726_1_.isBlockNormalCubeDefault(p_149726_2_ - 1, p_149726_3_, p_149726_4_, true))
|
||||
- if (p_149726_1_.func_147445_c(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);
|
||||
p_149726_1_.func_72921_c(p_149726_2_, p_149726_3_, p_149726_4_, 1, 2);
|
||||
}
|
||||
- else if (p_149726_1_.isBlockNormalCubeDefault(p_149726_2_ + 1, p_149726_3_, p_149726_4_, true))
|
||||
- else if (p_149726_1_.func_147445_c(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);
|
||||
p_149726_1_.func_72921_c(p_149726_2_, p_149726_3_, p_149726_4_, 2, 2);
|
||||
}
|
||||
- else if (p_149726_1_.isBlockNormalCubeDefault(p_149726_2_, p_149726_3_, p_149726_4_ - 1, true))
|
||||
- else if (p_149726_1_.func_147445_c(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);
|
||||
p_149726_1_.func_72921_c(p_149726_2_, p_149726_3_, p_149726_4_, 3, 2);
|
||||
}
|
||||
- else if (p_149726_1_.isBlockNormalCubeDefault(p_149726_2_, p_149726_3_, p_149726_4_ + 1, true))
|
||||
- else if (p_149726_1_.func_147445_c(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);
|
||||
p_149726_1_.func_72921_c(p_149726_2_, p_149726_3_, p_149726_4_, 4, 2);
|
||||
}
|
||||
@@ -152,22 +157,22 @@
|
||||
int l = p_150108_1_.getBlockMetadata(p_150108_2_, p_150108_3_, p_150108_4_);
|
||||
@@ -143,22 +148,22 @@
|
||||
int l = p_150108_1_.func_72805_g(p_150108_2_, p_150108_3_, p_150108_4_);
|
||||
boolean flag = false;
|
||||
|
||||
- if (!p_150108_1_.isBlockNormalCubeDefault(p_150108_2_ - 1, p_150108_3_, p_150108_4_, true) && l == 1)
|
||||
- if (!p_150108_1_.func_147445_c(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_.isBlockNormalCubeDefault(p_150108_2_ + 1, p_150108_3_, p_150108_4_, true) && l == 2)
|
||||
- if (!p_150108_1_.func_147445_c(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_.isBlockNormalCubeDefault(p_150108_2_, p_150108_3_, p_150108_4_ - 1, true) && l == 3)
|
||||
- if (!p_150108_1_.func_147445_c(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_.isBlockNormalCubeDefault(p_150108_2_, p_150108_3_, p_150108_4_ + 1, true) && l == 4)
|
||||
- if (!p_150108_1_.func_147445_c(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;
|
||||
|
|
|
@ -13,37 +13,37 @@
|
|||
private static final String __OBFID = "CL_00000327";
|
||||
|
||||
protected BlockTrapDoor(Material p_i45434_1_)
|
||||
@@ -173,7 +176,7 @@
|
||||
@@ -163,7 +166,7 @@
|
||||
--i1;
|
||||
}
|
||||
|
||||
- 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))))
|
||||
- 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))))
|
||||
{
|
||||
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_)
|
||||
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_)
|
||||
{
|
||||
+ if (disableValidation) return true;
|
||||
if (p_149707_5_ == 0)
|
||||
{
|
||||
return false;
|
||||
@@ -261,7 +265,7 @@
|
||||
@@ -248,7 +252,7 @@
|
||||
--p_149707_2_;
|
||||
}
|
||||
|
||||
- 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);
|
||||
- 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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -272,6 +276,7 @@
|
||||
@@ -259,6 +263,7 @@
|
||||
|
||||
private static boolean func_150119_a(Block p_150119_0_)
|
||||
{
|
||||
+ if (disableValidation) return true;
|
||||
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;
|
||||
return p_150119_0_.field_149764_J.func_76218_k() && p_150119_0_.func_149686_d() || p_150119_0_ == Blocks.field_150426_aN || p_150119_0_ instanceof BlockSlab || p_150119_0_ instanceof BlockStairs;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
public class BlockTripWireHook extends Block
|
||||
{
|
||||
private static final String __OBFID = "CL_00000329";
|
||||
@@ -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_)
|
||||
@@ -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_)
|
||||
{
|
||||
- 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()));
|
||||
- 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()));
|
||||
+ 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,77 +22,75 @@
|
|||
+ (dir == EAST && p_149707_1_.isSideSolid(p_149707_2_ - 1, p_149707_3_, p_149707_4_, EAST ));
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149742_c
|
||||
public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
|
||||
public boolean func_149742_c(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
|
||||
{
|
||||
- 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_.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_.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);
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_149660_a
|
||||
@@ -67,22 +77,22 @@
|
||||
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_)
|
||||
{
|
||||
byte b0 = 0;
|
||||
|
||||
- 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_.func_147445_c(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_.isBlockNormalCubeDefault(p_149660_2_, p_149660_3_, p_149660_4_ - 1, true))
|
||||
- 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_.isSideSolid(p_149660_2_, p_149660_3_, p_149660_4_ - 1, SOUTH, true))
|
||||
{
|
||||
b0 = 0;
|
||||
}
|
||||
|
||||
- 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_.func_147445_c(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_.isBlockNormalCubeDefault(p_149660_2_ - 1, p_149660_3_, p_149660_4_, true))
|
||||
- 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_.isSideSolid(p_149660_2_ - 1, p_149660_3_, p_149660_4_, EAST, true))
|
||||
{
|
||||
b0 = 3;
|
||||
}
|
||||
@@ -107,22 +117,22 @@
|
||||
@@ -97,22 +107,22 @@
|
||||
int i1 = l & 3;
|
||||
boolean flag = false;
|
||||
|
||||
- if (!p_149695_1_.getBlock(p_149695_2_ - 1, p_149695_3_, p_149695_4_).isNormalCube() && i1 == 3)
|
||||
- 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_.isSideSolid(p_149695_2_ - 1, p_149695_3_, p_149695_4_, EAST) && i1 == 3)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
|
||||
- if (!p_149695_1_.getBlock(p_149695_2_ + 1, p_149695_3_, p_149695_4_).isNormalCube() && i1 == 1)
|
||||
- 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_.isSideSolid(p_149695_2_ + 1, p_149695_3_, p_149695_4_, WEST) && i1 == 1)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
|
||||
- if (!p_149695_1_.getBlock(p_149695_2_, p_149695_3_, p_149695_4_ - 1).isNormalCube() && i1 == 0)
|
||||
- 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_.isSideSolid(p_149695_2_, p_149695_3_, p_149695_4_ - 1, SOUTH) && i1 == 0)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
|
||||
- if (!p_149695_1_.getBlock(p_149695_2_, p_149695_3_, p_149695_4_ + 1).isNormalCube() && i1 == 2)
|
||||
- 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_.isSideSolid(p_149695_2_, p_149695_3_, p_149695_4_ + 1, NORTH) && i1 == 2)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
@@ -143,7 +153,7 @@
|
||||
@@ -133,7 +143,7 @@
|
||||
boolean flag3 = (p_150136_6_ & 8) == 8;
|
||||
boolean flag4 = !p_150136_5_;
|
||||
boolean flag5 = false;
|
||||
- boolean flag6 = !World.doesBlockHaveSolidTopSurface(p_150136_1_, p_150136_2_, p_150136_3_ - 1, p_150136_4_);
|
||||
- boolean flag6 = !World.func_147466_a(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];
|
||||
int l1 = Direction.field_71583_a[k1];
|
||||
int i2 = Direction.field_71581_b[k1];
|
||||
int j2 = 0;
|
||||
|
|
|
@ -24,18 +24,18 @@
|
|||
{
|
||||
private static final String __OBFID = "CL_00000330";
|
||||
|
||||
@@ -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_)
|
||||
@@ -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_)
|
||||
{
|
||||
- if (!p_149636_1_.isRemote && p_149636_2_.getCurrentEquippedItem() != null && p_149636_2_.getCurrentEquippedItem().getItem() == Items.shears)
|
||||
- if (!p_149636_1_.field_72995_K && p_149636_2_.func_71045_bC() != null && p_149636_2_.func_71045_bC().func_77973_b() == Items.field_151097_aZ)
|
||||
{
|
||||
- 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));
|
||||
- p_149636_2_.func_71064_a(StatList.field_75934_C[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.field_150395_bd, 1, 0));
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
super.harvestBlock(p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_);
|
||||
super.func_149636_a(p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_);
|
||||
}
|
||||
}
|
||||
+
|
||||
|
|
|
@ -15,16 +15,16 @@
|
|||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.lwjgl.LWJGLException;
|
||||
@@ -274,7 +282,7 @@
|
||||
this.startTimerHackThread();
|
||||
this.session = par1Session;
|
||||
logger.info("Setting user: " + par1Session.getUsername());
|
||||
- logger.info("(Session ID is " + par1Session.getSessionID() + ")");
|
||||
@@ -245,7 +253,7 @@
|
||||
this.func_71389_H();
|
||||
this.field_71449_j = p_i1014_1_;
|
||||
field_147123_G.info("Setting user: " + p_i1014_1_.func_111285_a());
|
||||
- field_147123_G.info("(Session ID is " + p_i1014_1_.func_111286_b() + ")");
|
||||
+ //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;
|
||||
@@ -450,7 +458,7 @@
|
||||
this.field_71459_aj = p_i1014_5_;
|
||||
this.field_71443_c = p_i1014_2_;
|
||||
this.field_71440_d = p_i1014_3_;
|
||||
@@ -419,7 +427,7 @@
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -33,32 +33,32 @@
|
|||
}
|
||||
catch (LWJGLException lwjglexception)
|
||||
{
|
||||
@@ -550,7 +558,7 @@
|
||||
this.effectRenderer = new EffectRenderer(this.theWorld, this.renderEngine);
|
||||
@@ -518,7 +526,7 @@
|
||||
this.field_71452_i = new EffectRenderer(this.field_71441_e, this.field_71446_o);
|
||||
FMLClientHandler.instance().finishMinecraftLoading();
|
||||
this.checkGLError("Post startup");
|
||||
- this.ingameGUI = new GuiIngame(this);
|
||||
+ this.ingameGUI = new GuiIngameForge(this);
|
||||
this.func_71361_d("Post startup");
|
||||
- this.field_71456_v = new GuiIngame(this);
|
||||
+ this.field_71456_v = new GuiIngameForge(this);
|
||||
|
||||
if (this.serverName != null)
|
||||
if (this.field_71475_ae != null)
|
||||
{
|
||||
@@ -737,11 +745,6 @@
|
||||
// JAVADOC METHOD $$ func_147108_a
|
||||
public void displayGuiScreen(GuiScreen p_147108_1_)
|
||||
@@ -701,11 +709,6 @@
|
||||
|
||||
public void func_147108_a(GuiScreen p_147108_1_)
|
||||
{
|
||||
- if (this.currentScreen != null)
|
||||
- if (this.field_71462_r != null)
|
||||
- {
|
||||
- this.currentScreen.onGuiClosed();
|
||||
- this.field_71462_r.func_146281_b();
|
||||
- }
|
||||
-
|
||||
if (p_147108_1_ == null && this.theWorld == null)
|
||||
if (p_147108_1_ == null && this.field_71441_e == null)
|
||||
{
|
||||
p_147108_1_ = new GuiMainMenu();
|
||||
@@ -751,6 +754,17 @@
|
||||
@@ -715,6 +718,17 @@
|
||||
p_147108_1_ = new GuiGameOver();
|
||||
}
|
||||
|
||||
+ GuiScreen old = this.currentScreen;
|
||||
+ GuiScreen old = this.field_71462_r;
|
||||
+ GuiOpenEvent event = new GuiOpenEvent(p_147108_1_);
|
||||
+
|
||||
+ if (MinecraftForge.EVENT_BUS.post(event)) return;
|
||||
|
@ -66,47 +66,47 @@
|
|||
+ p_147108_1_ = event.gui;
|
||||
+ if (old != null && p_147108_1_ != old)
|
||||
+ {
|
||||
+ old.onGuiClosed();
|
||||
+ old.func_146281_b();
|
||||
+ }
|
||||
+
|
||||
if (p_147108_1_ instanceof GuiMainMenu)
|
||||
{
|
||||
this.gameSettings.showDebugInfo = false;
|
||||
@@ -1341,7 +1355,7 @@
|
||||
this.field_71474_y.field_74330_P = false;
|
||||
@@ -1296,7 +1310,7 @@
|
||||
|
||||
if (this.thePlayer.isCurrentToolAdventureModeExempt(i, j, k))
|
||||
if (this.field_71439_g.func_82246_f(i, j, k))
|
||||
{
|
||||
- this.effectRenderer.addBlockHitEffects(i, j, k, this.objectMouseOver.sideHit);
|
||||
+ this.effectRenderer.addBlockHitEffects(i, j, k, this.objectMouseOver);
|
||||
this.thePlayer.swingItem();
|
||||
- this.field_71452_i.func_78867_a(i, j, k, this.field_71476_x.field_72310_e);
|
||||
+ this.field_71452_i.addBlockHitEffects(i, j, k, this.field_71476_x);
|
||||
this.field_71439_g.func_71038_i();
|
||||
}
|
||||
}
|
||||
@@ -1422,11 +1436,12 @@
|
||||
int j = this.objectMouseOver.blockY;
|
||||
int k = this.objectMouseOver.blockZ;
|
||||
@@ -1377,11 +1391,12 @@
|
||||
int j = this.field_71476_x.field_72312_c;
|
||||
int k = this.field_71476_x.field_72309_d;
|
||||
|
||||
- if (this.theWorld.getBlock(i, j, k).getMaterial() != Material.air)
|
||||
+ if (!this.theWorld.getBlock(i, j, k).isAir(theWorld, i, j, k))
|
||||
- if (this.field_71441_e.func_147439_a(i, j, k).func_149688_o() != Material.field_151579_a)
|
||||
+ if (!this.field_71441_e.func_147439_a(i, j, k).isAir(field_71441_e, i, j, k))
|
||||
{
|
||||
int l = itemstack != null ? itemstack.stackSize : 0;
|
||||
int l = itemstack != null ? itemstack.field_77994_a : 0;
|
||||
|
||||
- if (this.playerController.onPlayerRightClick(this.thePlayer, this.theWorld, itemstack, i, j, k, this.objectMouseOver.sideHit, this.objectMouseOver.hitVec))
|
||||
+ boolean result = !ForgeEventFactory.onPlayerInteract(thePlayer, Action.RIGHT_CLICK_BLOCK, i, j, k, this.objectMouseOver.sideHit).isCanceled();
|
||||
+ if (result && this.playerController.onPlayerRightClick(this.thePlayer, this.theWorld, itemstack, i, j, k, this.objectMouseOver.sideHit, this.objectMouseOver.hitVec))
|
||||
- if (this.field_71442_b.func_78760_a(this.field_71439_g, this.field_71441_e, itemstack, i, j, k, this.field_71476_x.field_72310_e, this.field_71476_x.field_72307_f))
|
||||
+ boolean result = !ForgeEventFactory.onPlayerInteract(field_71439_g, Action.RIGHT_CLICK_BLOCK, i, j, k, this.field_71476_x.field_72310_e).isCanceled();
|
||||
+ if (result && this.field_71442_b.func_78760_a(this.field_71439_g, this.field_71441_e, itemstack, i, j, k, this.field_71476_x.field_72310_e, this.field_71476_x.field_72307_f))
|
||||
{
|
||||
flag = false;
|
||||
this.thePlayer.swingItem();
|
||||
@@ -1453,7 +1468,8 @@
|
||||
this.field_71439_g.func_71038_i();
|
||||
@@ -1408,7 +1423,8 @@
|
||||
{
|
||||
ItemStack itemstack1 = this.thePlayer.inventory.getCurrentItem();
|
||||
ItemStack itemstack1 = this.field_71439_g.field_71071_by.func_70448_g();
|
||||
|
||||
- if (itemstack1 != null && this.playerController.sendUseItem(this.thePlayer, this.theWorld, itemstack1))
|
||||
+ boolean result = !ForgeEventFactory.onPlayerInteract(thePlayer, Action.RIGHT_CLICK_AIR, 0, 0, 0, -1).isCanceled();
|
||||
+ if (result && itemstack1 != null && this.playerController.sendUseItem(this.thePlayer, this.theWorld, itemstack1))
|
||||
- if (itemstack1 != null && this.field_71442_b.func_78769_a(this.field_71439_g, this.field_71441_e, itemstack1))
|
||||
+ boolean result = !ForgeEventFactory.onPlayerInteract(field_71439_g, Action.RIGHT_CLICK_AIR, 0, 0, 0, -1).isCanceled();
|
||||
+ if (result && itemstack1 != null && this.field_71442_b.func_78769_a(this.field_71439_g, this.field_71441_e, itemstack1))
|
||||
{
|
||||
this.entityRenderer.itemRenderer.resetEquippedProgress2();
|
||||
this.field_71460_t.field_78516_c.func_78445_c();
|
||||
}
|
||||
@@ -1655,6 +1671,8 @@
|
||||
@@ -1607,6 +1623,8 @@
|
||||
|
||||
while (Mouse.next())
|
||||
{
|
||||
|
@ -114,28 +114,28 @@
|
|||
+
|
||||
i = Mouse.getEventButton();
|
||||
|
||||
if (isRunningOnMac && i == 0 && (Keyboard.isKeyDown(29) || Keyboard.isKeyDown(157)))
|
||||
@@ -2125,6 +2143,11 @@
|
||||
// JAVADOC METHOD $$ func_71353_a
|
||||
public void loadWorld(WorldClient par1WorldClient, String par2Str)
|
||||
if (field_142025_a && i == 0 && (Keyboard.isKeyDown(29) || Keyboard.isKeyDown(157)))
|
||||
@@ -2074,6 +2092,11 @@
|
||||
|
||||
public void func_71353_a(WorldClient p_71353_1_, String p_71353_2_)
|
||||
{
|
||||
+ if (theWorld != null)
|
||||
+ if (field_71441_e != null)
|
||||
+ {
|
||||
+ MinecraftForge.EVENT_BUS.post(new WorldEvent.Unload(theWorld));
|
||||
+ MinecraftForge.EVENT_BUS.post(new WorldEvent.Unload(field_71441_e));
|
||||
+ }
|
||||
+
|
||||
if (par1WorldClient == null)
|
||||
if (p_71353_1_ == null)
|
||||
{
|
||||
NetHandlerPlayClient nethandlerplayclient = this.getNetHandler();
|
||||
@@ -2137,6 +2160,18 @@
|
||||
if (this.theIntegratedServer != null)
|
||||
NetHandlerPlayClient nethandlerplayclient = this.func_147114_u();
|
||||
@@ -2086,6 +2109,18 @@
|
||||
if (this.field_71437_Z != null)
|
||||
{
|
||||
this.theIntegratedServer.initiateShutdown();
|
||||
+ if (loadingScreen != null)
|
||||
this.field_71437_Z.func_71263_m();
|
||||
+ if (field_71461_s != null)
|
||||
+ {
|
||||
+ this.loadingScreen.resetProgresAndWorkingMessage("Shutting down internal server...");
|
||||
+ this.field_71461_s.func_73719_c("Shutting down internal server...");
|
||||
+ }
|
||||
+ while (!theIntegratedServer.isServerStopped())
|
||||
+ while (!field_71437_Z.func_71241_aa())
|
||||
+ {
|
||||
+ try
|
||||
+ {
|
||||
|
@ -145,131 +145,130 @@
|
|||
+ }
|
||||
}
|
||||
|
||||
this.theIntegratedServer = null;
|
||||
@@ -2292,113 +2327,10 @@
|
||||
if (this.objectMouseOver != null)
|
||||
this.field_71437_Z = null;
|
||||
@@ -2234,113 +2269,10 @@
|
||||
if (this.field_71476_x != null)
|
||||
{
|
||||
boolean flag = this.thePlayer.capabilities.isCreativeMode;
|
||||
boolean flag = this.field_71439_g.field_71075_bZ.field_75098_d;
|
||||
- int i = 0;
|
||||
- boolean flag1 = false;
|
||||
- Item item;
|
||||
int j;
|
||||
|
||||
- if (this.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
- if (this.field_71476_x.field_72313_a == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
- {
|
||||
- j = this.objectMouseOver.blockX;
|
||||
- int k = this.objectMouseOver.blockY;
|
||||
- int l = this.objectMouseOver.blockZ;
|
||||
- Block block = this.theWorld.getBlock(j, k, l);
|
||||
- j = this.field_71476_x.field_72311_b;
|
||||
- int k = this.field_71476_x.field_72312_c;
|
||||
- int l = this.field_71476_x.field_72309_d;
|
||||
- Block block = this.field_71441_e.func_147439_a(j, k, l);
|
||||
-
|
||||
- if (block.getMaterial() == Material.air)
|
||||
- if (block.func_149688_o() == Material.field_151579_a)
|
||||
- {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- item = block.getItem(this.theWorld, j, k, l);
|
||||
- item = block.func_149694_d(this.field_71441_e, j, k, l);
|
||||
-
|
||||
- if (item == null)
|
||||
- {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- flag1 = item.getHasSubtypes();
|
||||
- Block block1 = item instanceof ItemBlock && !block.isFlowerPot() ? Block.getBlockFromItem(item) : block;
|
||||
- i = block1.getDamageValue(this.theWorld, j, k, l);
|
||||
- flag1 = item.func_77614_k();
|
||||
- Block block1 = item instanceof ItemBlock && !block.func_149648_K() ? Block.func_149634_a(item) : block;
|
||||
- i = block1.func_149643_k(this.field_71441_e, j, k, l);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- if (this.objectMouseOver.typeOfHit != MovingObjectPosition.MovingObjectType.ENTITY || this.objectMouseOver.entityHit == null || !flag)
|
||||
- if (this.field_71476_x.field_72313_a != MovingObjectPosition.MovingObjectType.ENTITY || this.field_71476_x.field_72308_g == null || !flag)
|
||||
- {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- if (this.objectMouseOver.entityHit instanceof EntityPainting)
|
||||
- if (this.field_71476_x.field_72308_g instanceof EntityPainting)
|
||||
- {
|
||||
- item = Items.painting;
|
||||
- item = Items.field_151159_an;
|
||||
- }
|
||||
- else if (this.objectMouseOver.entityHit instanceof EntityLeashKnot)
|
||||
- else if (this.field_71476_x.field_72308_g instanceof EntityLeashKnot)
|
||||
- {
|
||||
- item = Items.lead;
|
||||
- item = Items.field_151058_ca;
|
||||
- }
|
||||
- else if (this.objectMouseOver.entityHit instanceof EntityItemFrame)
|
||||
- else if (this.field_71476_x.field_72308_g instanceof EntityItemFrame)
|
||||
- {
|
||||
- EntityItemFrame entityitemframe = (EntityItemFrame)this.objectMouseOver.entityHit;
|
||||
- ItemStack itemstack = entityitemframe.getDisplayedItem();
|
||||
- EntityItemFrame entityitemframe = (EntityItemFrame)this.field_71476_x.field_72308_g;
|
||||
- ItemStack itemstack = entityitemframe.func_82335_i();
|
||||
-
|
||||
- if (itemstack == null)
|
||||
- {
|
||||
- item = Items.item_frame;
|
||||
- item = Items.field_151160_bD;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- item = itemstack.getItem();
|
||||
- i = itemstack.getItemDamage();
|
||||
- item = itemstack.func_77973_b();
|
||||
- i = itemstack.func_77960_j();
|
||||
- flag1 = true;
|
||||
- }
|
||||
- }
|
||||
- else if (this.objectMouseOver.entityHit instanceof EntityMinecart)
|
||||
- else if (this.field_71476_x.field_72308_g instanceof EntityMinecart)
|
||||
- {
|
||||
- EntityMinecart entityminecart = (EntityMinecart)this.objectMouseOver.entityHit;
|
||||
- EntityMinecart entityminecart = (EntityMinecart)this.field_71476_x.field_72308_g;
|
||||
-
|
||||
- if (entityminecart.getMinecartType() == 2)
|
||||
- if (entityminecart.func_94087_l() == 2)
|
||||
- {
|
||||
- item = Items.furnace_minecart;
|
||||
- item = Items.field_151109_aJ;
|
||||
- }
|
||||
- else if (entityminecart.getMinecartType() == 1)
|
||||
- else if (entityminecart.func_94087_l() == 1)
|
||||
- {
|
||||
- item = Items.chest_minecart;
|
||||
- item = Items.field_151108_aI;
|
||||
- }
|
||||
- else if (entityminecart.getMinecartType() == 3)
|
||||
- else if (entityminecart.func_94087_l() == 3)
|
||||
- {
|
||||
- item = Items.tnt_minecart;
|
||||
- item = Items.field_151142_bV;
|
||||
- }
|
||||
- else if (entityminecart.getMinecartType() == 5)
|
||||
- else if (entityminecart.func_94087_l() == 5)
|
||||
- {
|
||||
- item = Items.hopper_minecart;
|
||||
- item = Items.field_151140_bW;
|
||||
- }
|
||||
- else if (entityminecart.getMinecartType() == 6)
|
||||
- else if (entityminecart.func_94087_l() == 6)
|
||||
- {
|
||||
- item = Items.command_block_minecart;
|
||||
- item = Items.field_151095_cc;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- item = Items.minecart;
|
||||
- item = Items.field_151143_au;
|
||||
- }
|
||||
- }
|
||||
- else if (this.objectMouseOver.entityHit instanceof EntityBoat)
|
||||
- else if (this.field_71476_x.field_72308_g instanceof EntityBoat)
|
||||
- {
|
||||
- item = Items.boat;
|
||||
- item = Items.field_151124_az;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- item = Items.spawn_egg;
|
||||
- i = EntityList.getEntityID(this.objectMouseOver.entityHit);
|
||||
- item = Items.field_151063_bx;
|
||||
- i = EntityList.func_75619_a(this.field_71476_x.field_72308_g);
|
||||
- flag1 = true;
|
||||
-
|
||||
- if (i <= 0 || !EntityList.entityEggs.containsKey(Integer.valueOf(i)))
|
||||
- if (i <= 0 || !EntityList.field_75627_a.containsKey(Integer.valueOf(i)))
|
||||
- {
|
||||
- return;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- this.thePlayer.inventory.func_146030_a(item, i, flag1, flag);
|
||||
- this.field_71439_g.field_71071_by.func_146030_a(item, i, flag1, flag);
|
||||
-
|
||||
+ if (!ForgeHooks.onPickBlock(this.objectMouseOver, this.thePlayer, this.theWorld)) return;
|
||||
+ if (!ForgeHooks.onPickBlock(this.field_71476_x, this.field_71439_g, this.field_71441_e)) return;
|
||||
+ // We delete this code wholly instead of commenting it out, to make sure we detect changes in it between MC versions
|
||||
if (flag)
|
||||
{
|
||||
j = this.thePlayer.inventoryContainer.inventorySlots.size() - 9 + this.thePlayer.inventory.currentItem;
|
||||
@@ -2568,9 +2500,16 @@
|
||||
par1PlayerUsageSnooper.addData("gl_max_texture_size", Integer.valueOf(getGLMaximumTextureSize()));
|
||||
j = this.field_71439_g.field_71069_bz.field_75151_b.size() - 9 + this.field_71439_g.field_71071_by.field_70461_c;
|
||||
@@ -2507,8 +2439,15 @@
|
||||
p_70001_1_.func_76472_a("gl_max_texture_size", Integer.valueOf(func_71369_N()));
|
||||
}
|
||||
|
||||
+ //Forge: Adds a optimization to the getGLMaximumTextureSize, only calculate it once.
|
||||
+ private static int max_texture_size = -1;
|
||||
// JAVADOC METHOD $$ func_71369_N
|
||||
public static int getGLMaximumTextureSize()
|
||||
public static int func_71369_N()
|
||||
{
|
||||
+ if (max_texture_size != -1)
|
||||
+ {
|
||||
|
@ -279,7 +278,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);
|
||||
@@ -2578,6 +2517,7 @@
|
||||
@@ -2516,6 +2455,7 @@
|
||||
|
||||
if (j != 0)
|
||||
{
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
@SideOnly(Side.CLIENT)
|
||||
public class SoundManager
|
||||
{
|
||||
@@ -81,6 +86,7 @@
|
||||
@@ -69,6 +74,7 @@
|
||||
{
|
||||
SoundSystemConfig.addLibrary(LibraryLWJGLOpenAL.class);
|
||||
SoundSystemConfig.setCodec("ogg", CodecJOrbis.class);
|
||||
|
@ -20,11 +20,11 @@
|
|||
}
|
||||
catch (SoundSystemException soundsystemexception)
|
||||
{
|
||||
@@ -92,6 +98,7 @@
|
||||
@@ -80,6 +86,7 @@
|
||||
{
|
||||
this.unloadSoundSystem();
|
||||
this.loadSoundSystem();
|
||||
this.func_148613_b();
|
||||
this.func_148608_i();
|
||||
+ MinecraftForge.EVENT_BUS.post(new SoundLoadEvent(this));
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_148608_i
|
||||
private synchronized void func_148608_i()
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/entity/EntityOtherPlayerMP.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/entity/EntityOtherPlayerMP.java
|
||||
@@ -157,7 +157,8 @@
|
||||
@@ -151,7 +151,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
- public float getEyeHeight()
|
||||
- public float func_70047_e()
|
||||
+ @Override
|
||||
+ public float getDefaultEyeHeight()
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class EntityPlayerSP extends AbstractClientPlayer
|
||||
@@ -331,7 +334,7 @@
|
||||
@@ -325,7 +328,7 @@
|
||||
f *= 1.0F - f1 * 0.15F;
|
||||
}
|
||||
|
||||
|
@ -18,44 +18,44 @@
|
|||
+ return ForgeHooksClient.getOffsetFOV(this, f);
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_71053_j
|
||||
@@ -494,20 +497,45 @@
|
||||
return this.worldObj.getBlock(par1, par2, par3).isNormalCube();
|
||||
public void func_71053_j()
|
||||
@@ -479,20 +482,45 @@
|
||||
return this.field_70170_p.func_147439_a(p_71153_1_, p_71153_2_, p_71153_3_).func_149721_r();
|
||||
}
|
||||
|
||||
+ private boolean isHeadspaceFree(int x, int y, int z, int height)
|
||||
+ {
|
||||
+ for (int i1 = 0; i1 < height; i1++)
|
||||
+ {
|
||||
+ if (isBlockTranslucent(x, y + i1, z + 1)) return false;
|
||||
+ if (func_71153_f(x, y + i1, z + 1)) return false;
|
||||
+ }
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
protected boolean func_145771_j(double p_145771_1_, double p_145771_3_, double p_145771_5_)
|
||||
{
|
||||
+ if (this.noClip)
|
||||
+ if (this.field_70145_X)
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
int i = MathHelper.floor_double(p_145771_1_);
|
||||
int j = MathHelper.floor_double(p_145771_3_);
|
||||
int k = MathHelper.floor_double(p_145771_5_);
|
||||
int i = MathHelper.func_76128_c(p_145771_1_);
|
||||
int j = MathHelper.func_76128_c(p_145771_3_);
|
||||
int k = MathHelper.func_76128_c(p_145771_5_);
|
||||
double d3 = p_145771_1_ - (double)i;
|
||||
double d4 = p_145771_5_ - (double)k;
|
||||
|
||||
- if (this.isBlockTranslucent(i, j, k) || this.isBlockTranslucent(i, j + 1, k))
|
||||
+ int entHeight = Math.max(Math.round(this.height), 1);
|
||||
- if (this.func_71153_f(i, j, k) || this.func_71153_f(i, j + 1, k))
|
||||
+ int entHeight = Math.max(Math.round(this.field_70131_O), 1);
|
||||
+
|
||||
+ boolean inTranslucentBlock = true;
|
||||
+
|
||||
+ for (int i1 = 0; i1 < entHeight; i1++)
|
||||
{
|
||||
- boolean flag = !this.isBlockTranslucent(i - 1, j, k) && !this.isBlockTranslucent(i - 1, j + 1, k);
|
||||
- boolean flag1 = !this.isBlockTranslucent(i + 1, j, k) && !this.isBlockTranslucent(i + 1, j + 1, k);
|
||||
- boolean flag2 = !this.isBlockTranslucent(i, j, k - 1) && !this.isBlockTranslucent(i, j + 1, k - 1);
|
||||
- boolean flag3 = !this.isBlockTranslucent(i, j, k + 1) && !this.isBlockTranslucent(i, j + 1, k + 1);
|
||||
+ if (!this.isBlockTranslucent(i, j + i1, k))
|
||||
- boolean flag = !this.func_71153_f(i - 1, j, k) && !this.func_71153_f(i - 1, j + 1, k);
|
||||
- boolean flag1 = !this.func_71153_f(i + 1, j, k) && !this.func_71153_f(i + 1, j + 1, k);
|
||||
- boolean flag2 = !this.func_71153_f(i, j, k - 1) && !this.func_71153_f(i, j + 1, k - 1);
|
||||
- boolean flag3 = !this.func_71153_f(i, j, k + 1) && !this.func_71153_f(i, j + 1, k + 1);
|
||||
+ if (!this.func_71153_f(i, j + i1, k))
|
||||
+ {
|
||||
+ inTranslucentBlock = false;
|
||||
+ }
|
||||
|
@ -70,16 +70,16 @@
|
|||
byte b0 = -1;
|
||||
double d5 = 9999.0D;
|
||||
|
||||
@@ -596,6 +624,12 @@
|
||||
@@ -576,6 +604,12 @@
|
||||
|
||||
public void playSound(String par1Str, float par2, float par3)
|
||||
public void func_85030_a(String p_85030_1_, float p_85030_2_, float p_85030_3_)
|
||||
{
|
||||
+ PlaySoundAtEntityEvent event = new PlaySoundAtEntityEvent(this, par1Str, par2, par3);
|
||||
+ PlaySoundAtEntityEvent event = new PlaySoundAtEntityEvent(this, p_85030_1_, p_85030_2_, p_85030_3_);
|
||||
+ if (MinecraftForge.EVENT_BUS.post(event))
|
||||
+ {
|
||||
+ return;
|
||||
+ }
|
||||
+ par1Str = event.name;
|
||||
this.worldObj.playSound(this.posX, this.posY - (double)this.yOffset, this.posZ, par1Str, par2, par3, false);
|
||||
+ p_85030_1_ = event.name;
|
||||
this.field_70170_p.func_72980_b(this.field_70165_t, this.field_70163_u - (double)this.field_70129_M, this.field_70161_v, p_85030_1_, p_85030_2_, p_85030_3_, false);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,20 +16,20 @@
|
|||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
@@ -139,6 +141,7 @@
|
||||
@@ -131,6 +133,7 @@
|
||||
public void func_146403_a(String 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_);
|
||||
this.field_146297_k.field_71456_v.func_146158_b().func_146239_a(p_146403_1_);
|
||||
+ if (ClientCommandHandler.instance.func_71556_a(field_146297_k.field_71439_g, p_146403_1_) == 1) return;
|
||||
this.field_146297_k.field_71439_g.func_71165_d(p_146403_1_);
|
||||
}
|
||||
|
||||
@@ -315,13 +318,14 @@
|
||||
this.mc.ingameGUI.getChatGUI().printChatMessageWithOptionalDeletion(new ChatComponentText(stringbuilder.toString()), 1);
|
||||
@@ -305,13 +308,14 @@
|
||||
this.field_146297_k.field_71456_v.func_146158_b().func_146234_a(new ChatComponentText(stringbuilder.toString()), 1);
|
||||
}
|
||||
|
||||
- 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++)));
|
||||
- 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++)));
|
||||
}
|
||||
|
||||
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.mc.thePlayer.sendQueue.addToSendQueue(new C14PacketTabComplete(p_146405_1_));
|
||||
this.field_146297_k.field_71439_g.field_71174_a.func_147297_a(new C14PacketTabComplete(p_146405_1_));
|
||||
this.field_146414_r = true;
|
||||
}
|
||||
@@ -445,6 +449,13 @@
|
||||
@@ -433,6 +437,13 @@
|
||||
String[] astring1 = p_146406_1_;
|
||||
int i = p_146406_1_.length;
|
||||
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/gui/GuiCreateWorld.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiCreateWorld.java
|
||||
@@ -323,7 +323,7 @@
|
||||
@@ -320,7 +320,7 @@
|
||||
}
|
||||
else if (p_146284_1_.id == 8)
|
||||
else if (p_146284_1_.field_146127_k == 8)
|
||||
{
|
||||
- this.mc.displayGuiScreen(new GuiCreateFlatWorld(this, this.field_146334_a));
|
||||
+ WorldType.worldTypes[field_146331_K].onCustomizeButton(mc, this);
|
||||
- this.field_146297_k.func_147108_a(new GuiCreateFlatWorld(this, this.field_146334_a));
|
||||
+ WorldType.field_77139_a[field_146331_K].onCustomizeButton(field_146297_k, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
@@ -338,7 +338,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.field_77139_a[this.field_146331_K] == WorldType.field_77138_c;
|
||||
+ this.field_146322_F.field_146125_m = this.field_146344_y && WorldType.field_77139_a[this.field_146331_K].isCustomizable();
|
||||
|
||||
if (this.field_146344_y)
|
||||
{
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
import org.apache.commons.io.Charsets;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -630,6 +631,7 @@
|
||||
this.drawString(this.fontRendererObj, brd, 2, this.height - ( 10 + i * (this.fontRendererObj.FONT_HEIGHT + 1)), 16777215);
|
||||
@@ -614,6 +615,7 @@
|
||||
this.func_73731_b(this.field_146289_q, brd, 2, this.field_146295_m - ( 10 + i * (this.field_146289_q.field_78288_b + 1)), 16777215);
|
||||
}
|
||||
}
|
||||
+ ForgeHooksClient.renderMainMenu(this, fontRendererObj, width, height);
|
||||
+ ForgeHooksClient.renderMainMenu(this, field_146289_q, field_146294_l, field_146295_m);
|
||||
String s1 = "Copyright Mojang AB. Do not distribute!";
|
||||
this.drawString(this.fontRendererObj, s1, this.width - this.fontRendererObj.getStringWidth(s1) - 2, this.height - 10, -1);
|
||||
this.func_73731_b(this.field_146289_q, s1, this.field_146294_l - this.field_146289_q.func_78256_a(s1) - 2, this.field_146295_m - 10, -1);
|
||||
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/gui/GuiScreen.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiScreen.java
|
||||
@@ -123,7 +123,9 @@
|
||||
@@ -111,7 +111,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ FontRenderer font = p_146285_1_.getItem().getFontRenderer(p_146285_1_);
|
||||
+ FontRenderer font = p_146285_1_.func_77973_b().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 ? fontRendererObj : font));
|
||||
+ drawHoveringText(list, p_146285_2_, p_146285_3_, (font == null ? field_146289_q : font));
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_146279_a
|
||||
@@ -134,6 +136,11 @@
|
||||
protected void func_146279_a(String p_146279_1_, int p_146279_2_, int p_146279_3_)
|
||||
@@ -121,6 +123,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_, fontRendererObj);
|
||||
+ drawHoveringText(p_146283_1_, p_146283_2_, p_146283_3_, field_146289_q);
|
||||
+ }
|
||||
+
|
||||
+ protected void drawHoveringText(List p_146283_1_, int p_146283_2_, int p_146283_3_, FontRenderer font)
|
||||
|
@ -22,21 +22,21 @@
|
|||
if (!p_146283_1_.isEmpty())
|
||||
{
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
@@ -146,7 +153,7 @@
|
||||
@@ -133,7 +140,7 @@
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
String s = (String)iterator.next();
|
||||
- int l = this.fontRendererObj.getStringWidth(s);
|
||||
+ int l = font.getStringWidth(s);
|
||||
- int l = this.field_146289_q.func_78256_a(s);
|
||||
+ int l = font.func_78256_a(s);
|
||||
|
||||
if (l > k)
|
||||
{
|
||||
@@ -191,7 +198,7 @@
|
||||
@@ -178,7 +185,7 @@
|
||||
for (int i2 = 0; i2 < p_146283_1_.size(); ++i2)
|
||||
{
|
||||
String s1 = (String)p_146283_1_.get(i2);
|
||||
- this.fontRendererObj.drawStringWithShadow(s1, j2, k2, -1);
|
||||
+ font.drawStringWithShadow(s1, j2, k2, -1);
|
||||
- this.field_146289_q.func_78261_a(s1, j2, k2, -1);
|
||||
+ font.func_78261_a(s1, j2, k2, -1);
|
||||
|
||||
if (i2 == 0)
|
||||
{
|
||||
|
|
|
@ -1,39 +1,39 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/gui/GuiSlot.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiSlot.java
|
||||
@@ -314,16 +314,7 @@
|
||||
@@ -294,16 +294,7 @@
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_FOG);
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
- this.mc.getTextureManager().bindTexture(Gui.optionsBackground);
|
||||
Tessellator tessellator = Tessellator.field_78398_a;
|
||||
- this.field_148161_k.func_110434_K().func_110577_a(Gui.field_110325_k);
|
||||
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
- float f1 = 32.0F;
|
||||
- tessellator.startDrawingQuads();
|
||||
- tessellator.setColorOpaque_I(2105376);
|
||||
- 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();
|
||||
- tessellator.func_78382_b();
|
||||
- tessellator.func_78378_d(2105376);
|
||||
- tessellator.func_78374_a((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.func_78374_a((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.func_78374_a((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.func_78374_a((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.func_78381_a();
|
||||
+ drawContainerBackground(tessellator);
|
||||
l1 = this.left + this.width / 2 - this.getListWidth() / 2 + 2;
|
||||
i2 = this.top + 4 - (int)this.amountScrolled;
|
||||
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;
|
||||
|
||||
@@ -499,4 +490,18 @@
|
||||
@@ -475,4 +466,18 @@
|
||||
{
|
||||
return this.slotHeight;
|
||||
return this.field_148149_f;
|
||||
}
|
||||
+
|
||||
+ protected void drawContainerBackground(Tessellator tessellator)
|
||||
+ {
|
||||
+ this.mc.getTextureManager().bindTexture(Gui.optionsBackground);
|
||||
+ this.field_148161_k.func_110434_K().func_110577_a(Gui.field_110325_k);
|
||||
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
+ float f1 = 32.0F;
|
||||
+ tessellator.startDrawingQuads();
|
||||
+ tessellator.setColorOpaque_I(2105376);
|
||||
+ 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();
|
||||
+ tessellator.func_78382_b();
|
||||
+ tessellator.func_78378_d(2105376);
|
||||
+ tessellator.func_78374_a((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.func_78374_a((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.func_78374_a((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.func_78374_a((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.func_78381_a();
|
||||
+ }
|
||||
}
|
||||
|
|
|
@ -23,10 +23,10 @@
|
|||
this.field_146562_a = p_i45026_1_;
|
||||
@@ -58,6 +65,14 @@
|
||||
short short2 = 141;
|
||||
this.field_146569_s = this.field_146567_u = this.field_146565_w = (double)(AchievementList.openInventory.displayColumn * 24 - short1 / 2 - 12);
|
||||
this.field_146568_t = this.field_146566_v = this.field_146573_x = (double)(AchievementList.openInventory.displayRow * 24 - short2 / 2);
|
||||
this.field_146569_s = this.field_146567_u = this.field_146565_w = (double)(AchievementList.field_76004_f.field_75993_a * 24 - short1 / 2 - 12);
|
||||
this.field_146568_t = this.field_146566_v = this.field_146573_x = (double)(AchievementList.field_76004_f.field_75991_b * 24 - short2 / 2);
|
||||
+ minecraftAchievements.clear();
|
||||
+ for (Object achievement : AchievementList.achievementList)
|
||||
+ for (Object achievement : AchievementList.field_76007_e)
|
||||
+ {
|
||||
+ if (!AchievementPage.isAchievementInPages((Achievement)achievement))
|
||||
+ {
|
||||
|
@ -35,57 +35,57 @@
|
|||
+ }
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_73866_w_
|
||||
@@ -66,6 +81,7 @@
|
||||
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)));
|
||||
public void func_73866_w_()
|
||||
@@ -65,6 +80,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.func_135052_a("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)));
|
||||
}
|
||||
|
||||
protected void actionPerformed(GuiButton p_146284_1_)
|
||||
@@ -76,6 +92,16 @@
|
||||
protected void func_146284_a(GuiButton p_146284_1_)
|
||||
@@ -75,6 +91,16 @@
|
||||
{
|
||||
this.mc.displayGuiScreen(this.field_146562_a);
|
||||
this.field_146297_k.func_147108_a(this.field_146562_a);
|
||||
}
|
||||
+
|
||||
+ if (p_146284_1_.id == 2)
|
||||
+ if (p_146284_1_.field_146127_k == 2)
|
||||
+ {
|
||||
+ currentPage++;
|
||||
+ if (currentPage >= AchievementPage.getAchievementPages().size())
|
||||
+ {
|
||||
+ currentPage = -1;
|
||||
+ }
|
||||
+ button.displayString = AchievementPage.getTitle(currentPage);
|
||||
+ button.field_146126_j = AchievementPage.getTitle(currentPage);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -343,11 +369,12 @@
|
||||
@@ -339,11 +365,12 @@
|
||||
int i4;
|
||||
int j5;
|
||||
|
||||
- for (i3 = 0; i3 < AchievementList.achievementList.size(); ++i3)
|
||||
- for (i3 = 0; i3 < AchievementList.field_76007_e.size(); ++i3)
|
||||
+ List<Achievement> achievementList = (currentPage == -1 ? minecraftAchievements : AchievementPage.getAchievementPage(currentPage).getAchievements());
|
||||
+ for (i3 = 0; i3 < achievementList.size(); ++i3)
|
||||
{
|
||||
- Achievement achievement1 = (Achievement)AchievementList.achievementList.get(i3);
|
||||
- Achievement achievement1 = (Achievement)AchievementList.field_76007_e.get(i3);
|
||||
+ Achievement achievement1 = achievementList.get(i3);
|
||||
|
||||
- if (achievement1.parentAchievement != null)
|
||||
+ if (achievement1.parentAchievement != null && achievementList.contains(achievement1.parentAchievement))
|
||||
- if (achievement1.field_75992_c != null)
|
||||
+ if (achievement1.field_75992_c != null && achievementList.contains(achievement1.field_75992_c))
|
||||
{
|
||||
j3 = achievement1.displayColumn * 24 - k + 11;
|
||||
k3 = achievement1.displayRow * 24 - l + 11;
|
||||
@@ -404,9 +431,9 @@
|
||||
j3 = achievement1.field_75993_a * 24 - k + 11;
|
||||
k3 = achievement1.field_75991_b * 24 - l + 11;
|
||||
@@ -400,9 +427,9 @@
|
||||
int i5;
|
||||
int l4;
|
||||
|
||||
- for (j5 = 0; j5 < AchievementList.achievementList.size(); ++j5)
|
||||
- for (j5 = 0; j5 < AchievementList.field_76007_e.size(); ++j5)
|
||||
+ for (j5 = 0; j5 < achievementList.size(); ++j5)
|
||||
{
|
||||
- Achievement achievement2 = (Achievement)AchievementList.achievementList.get(j5);
|
||||
- Achievement achievement2 = (Achievement)AchievementList.field_76007_e.get(j5);
|
||||
+ Achievement achievement2 = (Achievement)achievementList.get(j5);
|
||||
l4 = achievement2.displayColumn * 24 - k;
|
||||
i5 = achievement2.displayRow * 24 - l;
|
||||
l4 = achievement2.field_75993_a * 24 - k;
|
||||
i5 = achievement2.field_75991_b * 24 - l;
|
||||
|
||||
|
|
|
@ -8,29 +8,29 @@
|
|||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
@@ -123,7 +124,11 @@
|
||||
@@ -112,7 +113,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.drawGuiContainerForegroundLayer(par1, par2);
|
||||
this.func_146979_b(p_73863_1_, p_73863_2_);
|
||||
+ GL11.glEnable(GL11.GL_LIGHTING);
|
||||
InventoryPlayer inventoryplayer = this.mc.thePlayer.inventory;
|
||||
ItemStack itemstack = this.draggedStack == null ? inventoryplayer.getItemStack() : this.draggedStack;
|
||||
InventoryPlayer inventoryplayer = this.field_146297_k.field_71439_g.field_71071_by;
|
||||
ItemStack itemstack = this.field_147012_x == null ? inventoryplayer.func_70445_o() : this.field_147012_x;
|
||||
|
||||
@@ -187,8 +192,11 @@
|
||||
@@ -176,8 +181,11 @@
|
||||
GL11.glTranslatef(0.0F, 0.0F, 32.0F);
|
||||
this.zLevel = 200.0F;
|
||||
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_);
|
||||
this.field_73735_i = 200.0F;
|
||||
field_146296_j.field_77023_b = 200.0F;
|
||||
- field_146296_j.func_82406_b(this.field_146289_q, this.field_146297_k.func_110434_K(), p_146982_1_, p_146982_2_, p_146982_3_);
|
||||
- field_146296_j.func_94148_a(this.field_146289_q, this.field_146297_k.func_110434_K(), p_146982_1_, p_146982_2_, p_146982_3_ - (this.field_147012_x == 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 = 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;
|
||||
itemRender.zLevel = 0.0F;
|
||||
+ if (p_146982_1_ != null) font = p_146982_1_.func_77973_b().getFontRenderer(p_146982_1_);
|
||||
+ if (font == null) font = field_146289_q;
|
||||
+ field_146296_j.func_82406_b(font, this.field_146297_k.func_110434_K(), p_146982_1_, p_146982_2_, p_146982_3_);
|
||||
+ field_146296_j.func_94148_a(font, this.field_146297_k.func_110434_K(), p_146982_1_, p_146982_2_, p_146982_3_ - (this.field_147012_x == null ? 0 : 8), p_146982_4_);
|
||||
this.field_73735_i = 0.0F;
|
||||
field_146296_j.field_77023_b = 0.0F;
|
||||
}
|
||||
|
|
|
@ -1,64 +1,64 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java
|
||||
@@ -53,6 +53,8 @@
|
||||
@@ -49,6 +49,8 @@
|
||||
private boolean field_147057_D;
|
||||
private CreativeCrafting field_147059_E;
|
||||
private static final String __OBFID = "CL_00000752";
|
||||
+ private static int tabPage = 0;
|
||||
+ private int maxPages = 0;
|
||||
|
||||
public GuiContainerCreative(EntityPlayer par1EntityPlayer)
|
||||
public GuiContainerCreative(EntityPlayer p_i1088_1_)
|
||||
{
|
||||
@@ -190,7 +192,7 @@
|
||||
@@ -185,7 +187,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
- if (itemstack1 != null && itemstack2 != null && itemstack1.isItemEqual(itemstack2))
|
||||
+ if (itemstack1 != null && itemstack2 != null && itemstack1.isItemEqual(itemstack2) && ItemStack.areItemStackTagsEqual(itemstack1, itemstack2)) //Forge: Bugfix, Compare NBT data, allow for deletion of enchanted books, MC-12770
|
||||
- if (itemstack1 != null && itemstack2 != null && itemstack1.func_77969_a(itemstack2))
|
||||
+ if (itemstack1 != null && itemstack2 != null && itemstack1.func_77969_a(itemstack2) && ItemStack.func_77970_a(itemstack1, itemstack2)) //Forge: Bugfix, Compare NBT data, allow for deletion of enchanted books, MC-12770
|
||||
{
|
||||
if (p_146984_3_ == 0)
|
||||
{
|
||||
@@ -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;
|
||||
@@ -260,6 +262,13 @@
|
||||
this.func_147050_b(CreativeTabs.field_78032_a[i]);
|
||||
this.field_147059_E = new CreativeCrafting(this.field_146297_k);
|
||||
this.field_146297_k.field_71439_g.field_71069_bz.func_75132_a(this.field_147059_E);
|
||||
+ int tabCount = CreativeTabs.field_78032_a.length;
|
||||
+ if (tabCount > 12)
|
||||
+ {
|
||||
+ buttonList.add(new GuiButton(101, guiLeft, guiTop - 50, 20, 20, "<"));
|
||||
+ buttonList.add(new GuiButton(102, guiLeft + xSize - 20, guiTop - 50, 20, 20, ">"));
|
||||
+ 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, ">"));
|
||||
+ maxPages = ((tabCount - 12) / 10) + 1;
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -289,7 +298,7 @@
|
||||
// JAVADOC METHOD $$ func_73869_a
|
||||
protected void keyTyped(char par1, int par2)
|
||||
@@ -281,7 +290,7 @@
|
||||
|
||||
protected void func_73869_a(char p_73869_1_, int p_73869_2_)
|
||||
{
|
||||
- if (selectedTabIndex != CreativeTabs.tabAllSearch.getTabIndex())
|
||||
+ if (!CreativeTabs.creativeTabArray[selectedTabIndex].hasSearchBar())
|
||||
- if (field_147058_w != CreativeTabs.field_78027_g.func_78021_a())
|
||||
+ if (!CreativeTabs.field_78032_a[field_147058_w].hasSearchBar())
|
||||
{
|
||||
if (GameSettings.isKeyDown(this.mc.gameSettings.keyBindChat))
|
||||
if (GameSettings.func_100015_a(this.field_146297_k.field_71474_y.field_74310_D))
|
||||
{
|
||||
@@ -326,6 +335,15 @@
|
||||
@@ -318,6 +327,15 @@
|
||||
{
|
||||
GuiContainerCreative.ContainerCreative containercreative = (GuiContainerCreative.ContainerCreative)this.inventorySlots;
|
||||
containercreative.itemList.clear();
|
||||
GuiContainerCreative.ContainerCreative containercreative = (GuiContainerCreative.ContainerCreative)this.field_147002_h;
|
||||
containercreative.field_148330_a.clear();
|
||||
+
|
||||
+ CreativeTabs tab = CreativeTabs.creativeTabArray[selectedTabIndex];
|
||||
+ if (tab.hasSearchBar() && tab != CreativeTabs.tabAllSearch)
|
||||
+ CreativeTabs tab = CreativeTabs.field_78032_a[field_147058_w];
|
||||
+ if (tab.hasSearchBar() && tab != CreativeTabs.field_78027_g)
|
||||
+ {
|
||||
+ tab.displayAllReleventItems(containercreative.itemList);
|
||||
+ tab.func_78018_a(containercreative.field_148330_a);
|
||||
+ updateFilteredItems(containercreative);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
Iterator iterator = Item.itemRegistry.iterator();
|
||||
Iterator iterator = Item.field_150901_e.iterator();
|
||||
|
||||
while (iterator.hasNext())
|
||||
@@ -337,7 +355,13 @@
|
||||
item.getSubItems(item, (CreativeTabs)null, containercreative.itemList);
|
||||
@@ -329,7 +347,13 @@
|
||||
item.func_150895_a(item, (CreativeTabs)null, containercreative.field_148330_a);
|
||||
}
|
||||
}
|
||||
+ updateFilteredItems(containercreative);
|
||||
|
@ -68,19 +68,19 @@
|
|||
+ private void updateFilteredItems(GuiContainerCreative.ContainerCreative containercreative)
|
||||
+ {
|
||||
+ Iterator iterator;
|
||||
Enchantment[] aenchantment = Enchantment.enchantmentsList;
|
||||
Enchantment[] aenchantment = Enchantment.field_77331_b;
|
||||
int j = aenchantment.length;
|
||||
|
||||
@@ -392,7 +416,7 @@
|
||||
@@ -383,7 +407,7 @@
|
||||
{
|
||||
CreativeTabs creativetabs = CreativeTabs.creativeTabArray[selectedTabIndex];
|
||||
CreativeTabs creativetabs = CreativeTabs.field_78032_a[field_147058_w];
|
||||
|
||||
- if (creativetabs.drawInForegroundOfTab())
|
||||
+ if (creativetabs != null && creativetabs.drawInForegroundOfTab())
|
||||
- if (creativetabs.func_78019_g())
|
||||
+ if (creativetabs != null && creativetabs.func_78019_g())
|
||||
{
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
this.fontRendererObj.drawString(I18n.format(creativetabs.getTranslatedTabLabel(), new Object[0]), 8, 6, 4210752);
|
||||
@@ -413,7 +437,7 @@
|
||||
this.field_146289_q.func_78276_b(I18n.func_135052_a(creativetabs.func_78024_c(), new Object[0]), 8, 6, 4210752);
|
||||
@@ -403,7 +427,7 @@
|
||||
{
|
||||
CreativeTabs creativetabs = acreativetabs[k1];
|
||||
|
||||
|
@ -89,42 +89,42 @@
|
|||
{
|
||||
return;
|
||||
}
|
||||
@@ -437,7 +461,7 @@
|
||||
@@ -426,7 +450,7 @@
|
||||
{
|
||||
CreativeTabs creativetabs = acreativetabs[k1];
|
||||
|
||||
- if (this.func_147049_a(creativetabs, l, i1))
|
||||
+ if (creativetabs != null && this.func_147049_a(creativetabs, l, i1))
|
||||
{
|
||||
this.setCurrentCreativeTab(creativetabs);
|
||||
this.func_147050_b(creativetabs);
|
||||
return;
|
||||
@@ -451,11 +475,13 @@
|
||||
// JAVADOC METHOD $$ func_147055_p
|
||||
private boolean needsScrollBars()
|
||||
@@ -439,11 +463,13 @@
|
||||
|
||||
private boolean func_147055_p()
|
||||
{
|
||||
+ if (CreativeTabs.creativeTabArray[selectedTabIndex] == null) return false;
|
||||
return selectedTabIndex != CreativeTabs.tabInventory.getTabIndex() && CreativeTabs.creativeTabArray[selectedTabIndex].shouldHidePlayerInventory() && ((GuiContainerCreative.ContainerCreative)this.inventorySlots).func_148328_e();
|
||||
+ if (CreativeTabs.field_78032_a[field_147058_w] == null) return false;
|
||||
return field_147058_w != CreativeTabs.field_78036_m.func_78021_a() && CreativeTabs.field_78032_a[field_147058_w].func_78017_i() && ((GuiContainerCreative.ContainerCreative)this.field_147002_h).func_148328_e();
|
||||
}
|
||||
|
||||
private void setCurrentCreativeTab(CreativeTabs p_147050_1_)
|
||||
private void func_147050_b(CreativeTabs p_147050_1_)
|
||||
{
|
||||
+ if (p_147050_1_ == null) return;
|
||||
int i = selectedTabIndex;
|
||||
selectedTabIndex = p_147050_1_.getTabIndex();
|
||||
GuiContainerCreative.ContainerCreative containercreative = (GuiContainerCreative.ContainerCreative)this.inventorySlots;
|
||||
@@ -524,7 +550,7 @@
|
||||
int i = field_147058_w;
|
||||
field_147058_w = p_147050_1_.func_78021_a();
|
||||
GuiContainerCreative.ContainerCreative containercreative = (GuiContainerCreative.ContainerCreative)this.field_147002_h;
|
||||
@@ -512,7 +538,7 @@
|
||||
|
||||
if (this.searchField != null)
|
||||
if (this.field_147062_A != null)
|
||||
{
|
||||
- if (p_147050_1_ == CreativeTabs.tabAllSearch)
|
||||
- if (p_147050_1_ == CreativeTabs.field_78027_g)
|
||||
+ if (p_147050_1_.hasSearchBar())
|
||||
{
|
||||
this.searchField.setVisible(true);
|
||||
this.searchField.setCanLoseFocus(false);
|
||||
@@ -622,23 +648,45 @@
|
||||
this.field_147062_A.func_146189_e(true);
|
||||
this.field_147062_A.func_146205_d(false);
|
||||
@@ -608,23 +634,45 @@
|
||||
|
||||
super.drawScreen(par1, par2, par3);
|
||||
CreativeTabs[] acreativetabs = CreativeTabs.creativeTabArray;
|
||||
super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_);
|
||||
CreativeTabs[] acreativetabs = CreativeTabs.field_78032_a;
|
||||
- int i2 = acreativetabs.length;
|
||||
+ int start = tabPage * 10;
|
||||
+ int i2 = Math.min(acreativetabs.length, ((tabPage + 1) * 10) + 2);
|
||||
|
@ -137,39 +137,39 @@
|
|||
CreativeTabs creativetabs = acreativetabs[j2];
|
||||
|
||||
+ if (creativetabs == null) continue;
|
||||
if (this.renderCreativeInventoryHoveringText(creativetabs, par1, par2))
|
||||
if (this.func_147052_b(creativetabs, p_73863_1_, p_73863_2_))
|
||||
{
|
||||
+ rendered = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+ if (!rendered && renderCreativeInventoryHoveringText(CreativeTabs.tabAllSearch, par1, par2))
|
||||
+ if (!rendered && func_147052_b(CreativeTabs.field_78027_g, p_73863_1_, p_73863_2_))
|
||||
+ {
|
||||
+ renderCreativeInventoryHoveringText(CreativeTabs.tabInventory, par1, par2);
|
||||
+ func_147052_b(CreativeTabs.field_78036_m, p_73863_1_, p_73863_2_);
|
||||
+ }
|
||||
+
|
||||
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))
|
||||
if (this.field_147064_C != null && field_147058_w == CreativeTabs.field_78036_m.func_78021_a() && this.func_146978_c(this.field_147064_C.field_75223_e, this.field_147064_C.field_75221_f, 16, 16, p_73863_1_, p_73863_2_))
|
||||
{
|
||||
this.drawCreativeTabHoveringText(I18n.format("inventory.binSlot", new Object[0]), par1, par2);
|
||||
this.func_146279_a(I18n.func_135052_a("inventory.binSlot", new Object[0]), p_73863_1_, p_73863_2_);
|
||||
}
|
||||
|
||||
+ if (maxPages != 0)
|
||||
+ {
|
||||
+ String page = String.format("%d / %d", tabPage + 1, maxPages + 1);
|
||||
+ int width = fontRendererObj.getStringWidth(page);
|
||||
+ int width = field_146289_q.func_78256_a(page);
|
||||
+ GL11.glDisable(GL11.GL_LIGHTING);
|
||||
+ this.zLevel = 300.0F;
|
||||
+ itemRender.zLevel = 300.0F;
|
||||
+ fontRendererObj.drawString(page, guiLeft + (xSize / 2) - (width / 2), guiTop - 44, -1);
|
||||
+ this.zLevel = 0.0F;
|
||||
+ itemRender.zLevel = 0.0F;
|
||||
+ this.field_73735_i = 300.0F;
|
||||
+ field_146296_j.field_77023_b = 300.0F;
|
||||
+ field_146289_q.func_78276_b(page, field_147003_i + (field_146999_f / 2) - (width / 2), field_147009_r - 44, -1);
|
||||
+ this.field_73735_i = 0.0F;
|
||||
+ field_146296_j.field_77023_b = 0.0F;
|
||||
+ }
|
||||
+
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
}
|
||||
@@ -707,17 +755,37 @@
|
||||
@@ -693,17 +741,37 @@
|
||||
int k = acreativetabs.length;
|
||||
int l;
|
||||
|
||||
|
@ -181,11 +181,11 @@
|
|||
+ for (l = start; l < k; ++l)
|
||||
{
|
||||
CreativeTabs creativetabs1 = acreativetabs[l];
|
||||
this.mc.getTextureManager().bindTexture(field_147061_u);
|
||||
this.field_146297_k.func_110434_K().func_110577_a(field_147061_u);
|
||||
|
||||
+ if (creativetabs1 == null) continue;
|
||||
+
|
||||
if (creativetabs1.getTabIndex() != selectedTabIndex)
|
||||
if (creativetabs1.func_78021_a() != field_147058_w)
|
||||
{
|
||||
this.func_147051_a(creativetabs1);
|
||||
}
|
||||
|
@ -193,28 +193,28 @@
|
|||
|
||||
+ if (tabPage != 0)
|
||||
+ {
|
||||
+ if (creativetabs != CreativeTabs.tabAllSearch)
|
||||
+ if (creativetabs != CreativeTabs.field_78027_g)
|
||||
+ {
|
||||
+ this.mc.getTextureManager().bindTexture(field_147061_u);
|
||||
+ func_147051_a(CreativeTabs.tabAllSearch);
|
||||
+ this.field_146297_k.func_110434_K().func_110577_a(field_147061_u);
|
||||
+ func_147051_a(CreativeTabs.field_78027_g);
|
||||
+ }
|
||||
+ if (creativetabs != CreativeTabs.tabInventory)
|
||||
+ if (creativetabs != CreativeTabs.field_78036_m)
|
||||
+ {
|
||||
+ this.mc.getTextureManager().bindTexture(field_147061_u);
|
||||
+ func_147051_a(CreativeTabs.tabInventory);
|
||||
+ this.field_146297_k.func_110434_K().func_110577_a(field_147061_u);
|
||||
+ func_147051_a(CreativeTabs.field_78036_m);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
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);
|
||||
this.field_146297_k.func_110434_K().func_110577_a(new ResourceLocation("textures/gui/container/creative_inventory/tab_" + creativetabs.func_78015_f()));
|
||||
this.func_73729_b(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();
|
||||
@@ -718,6 +786,14 @@
|
||||
this.func_73729_b(i1, k + (int)((float)(l - k - 17) * this.field_147067_x), 232 + (this.func_147055_p() ? 0 : 12), 0, 12, 15);
|
||||
}
|
||||
|
||||
+ if (creativetabs == null || creativetabs.getTabPage() != tabPage)
|
||||
+ {
|
||||
+ if (creativetabs != CreativeTabs.tabAllSearch && creativetabs != CreativeTabs.tabInventory)
|
||||
+ if (creativetabs != CreativeTabs.field_78027_g && creativetabs != CreativeTabs.field_78036_m)
|
||||
+ {
|
||||
+ return;
|
||||
+ }
|
||||
|
@ -222,41 +222,41 @@
|
|||
+
|
||||
this.func_147051_a(creativetabs);
|
||||
|
||||
if (creativetabs == CreativeTabs.tabInventory)
|
||||
@@ -742,6 +818,15 @@
|
||||
if (creativetabs == CreativeTabs.field_78036_m)
|
||||
@@ -728,6 +804,15 @@
|
||||
|
||||
protected boolean func_147049_a(CreativeTabs p_147049_1_, int p_147049_2_, int p_147049_3_)
|
||||
{
|
||||
+ if (p_147049_1_.getTabPage() != tabPage)
|
||||
+ {
|
||||
+ if (p_147049_1_ != CreativeTabs.tabAllSearch &&
|
||||
+ p_147049_1_ != CreativeTabs.tabInventory)
|
||||
+ if (p_147049_1_ != CreativeTabs.field_78027_g &&
|
||||
+ p_147049_1_ != CreativeTabs.field_78036_m)
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
int k = p_147049_1_.getTabColumn();
|
||||
int k = p_147049_1_.func_78020_k();
|
||||
int l = 28 * k;
|
||||
byte b0 = 0;
|
||||
@@ -843,6 +928,7 @@
|
||||
@@ -828,6 +913,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;
|
||||
itemRender.zLevel = 100.0F;
|
||||
@@ -869,6 +955,15 @@
|
||||
this.func_73729_b(l, i1, j, k, 28, b0);
|
||||
this.field_73735_i = 100.0F;
|
||||
field_146296_j.field_77023_b = 100.0F;
|
||||
@@ -854,6 +940,15 @@
|
||||
{
|
||||
this.mc.displayGuiScreen(new GuiStats(this, this.mc.thePlayer.getStatFileWriter()));
|
||||
this.field_146297_k.func_147108_a(new GuiStats(this, this.field_146297_k.field_71439_g.func_146107_m()));
|
||||
}
|
||||
+
|
||||
+ if (p_146284_1_.id == 101)
|
||||
+ if (p_146284_1_.field_146127_k == 101)
|
||||
+ {
|
||||
+ tabPage = Math.max(tabPage - 1, 0);
|
||||
+ }
|
||||
+ else if (p_146284_1_.id == 102)
|
||||
+ else if (p_146284_1_.field_146127_k == 102)
|
||||
+ {
|
||||
+ tabPage = Math.min(tabPage + 1, maxPages);
|
||||
+ }
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/gui/mco/GuiScreenCreateOnlineWorld.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/gui/mco/GuiScreenCreateOnlineWorld.java
|
||||
@@ -208,7 +208,7 @@
|
||||
GuiScreenCreateOnlineWorld.logger.error("Couldn\'t create world");
|
||||
@@ -202,7 +202,7 @@
|
||||
GuiScreenCreateOnlineWorld.field_146765_a.error("Couldn\'t create world");
|
||||
this.func_148416_a(unsupportedencodingexception.getLocalizedMessage());
|
||||
}
|
||||
- catch (IOException ioexception)
|
||||
+ catch (@SuppressWarnings("hiding") IOException ioexception)
|
||||
{
|
||||
GuiScreenCreateOnlineWorld.logger.error("Could not parse response creating world");
|
||||
GuiScreenCreateOnlineWorld.field_146765_a.error("Could not parse response creating world");
|
||||
this.func_148416_a(ioexception.getLocalizedMessage());
|
||||
|
|
|
@ -7,4 +7,4 @@
|
|||
-@SideOnly(Side.CLIENT)
|
||||
public abstract class ModelBase
|
||||
{
|
||||
public float onGround;
|
||||
public float field_78095_p;
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
-@SideOnly(Side.CLIENT)
|
||||
public class ModelBox
|
||||
{
|
||||
// JAVADOC FIELD $$ field_78253_h
|
||||
@@ -86,6 +85,7 @@
|
||||
private PositionTextureVertex[] field_78253_h;
|
||||
@@ -77,6 +76,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_78245_a
|
||||
+ @SideOnly(Side.CLIENT)
|
||||
public void render(Tessellator par1Tessellator, float par2)
|
||||
public void func_78245_a(Tessellator p_78245_1_, float p_78245_2_)
|
||||
{
|
||||
for (int i = 0; i < this.quadList.length; ++i)
|
||||
for (int i = 0; i < this.field_78254_i.length; ++i)
|
||||
|
|
|
@ -7,36 +7,36 @@
|
|||
-@SideOnly(Side.CLIENT)
|
||||
public class ModelRenderer
|
||||
{
|
||||
// JAVADOC FIELD $$ field_78801_a
|
||||
@@ -110,6 +109,7 @@
|
||||
this.rotationPointZ = par3;
|
||||
public float field_78801_a;
|
||||
@@ -102,6 +101,7 @@
|
||||
this.field_78798_e = p_78793_3_;
|
||||
}
|
||||
|
||||
+ @SideOnly(Side.CLIENT)
|
||||
public void render(float par1)
|
||||
public void func_78785_a(float p_78785_1_)
|
||||
{
|
||||
if (!this.isHidden)
|
||||
@@ -192,6 +192,7 @@
|
||||
if (!this.field_78807_k)
|
||||
@@ -184,6 +184,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ @SideOnly(Side.CLIENT)
|
||||
public void renderWithRotation(float par1)
|
||||
public void func_78791_b(float p_78791_1_)
|
||||
{
|
||||
if (!this.isHidden)
|
||||
@@ -228,6 +229,7 @@
|
||||
if (!this.field_78807_k)
|
||||
@@ -219,6 +220,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_78794_c
|
||||
+ @SideOnly(Side.CLIENT)
|
||||
public void postRender(float par1)
|
||||
public void func_78794_c(float p_78794_1_)
|
||||
{
|
||||
if (!this.isHidden)
|
||||
@@ -270,6 +272,7 @@
|
||||
if (!this.field_78807_k)
|
||||
@@ -260,6 +262,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_78788_d
|
||||
+ @SideOnly(Side.CLIENT)
|
||||
private void compileDisplayList(float par1)
|
||||
private void func_78788_d(float p_78788_1_)
|
||||
{
|
||||
this.displayList = GLAllocation.generateDisplayLists(1);
|
||||
this.field_78811_r = GLAllocation.func_74526_a(1);
|
||||
|
|
|
@ -10,4 +10,4 @@
|
|||
-@SideOnly(Side.CLIENT)
|
||||
public class PositionTextureVertex
|
||||
{
|
||||
public Vec3 vector3D;
|
||||
public Vec3 field_78243_a;
|
||||
|
|
|
@ -11,4 +11,4 @@
|
|||
-@SideOnly(Side.CLIENT)
|
||||
public class TexturedQuad
|
||||
{
|
||||
public PositionTextureVertex[] vertexPositions;
|
||||
public PositionTextureVertex[] field_78239_a;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java
|
||||
@@ -63,6 +63,7 @@
|
||||
Chunk chunk = new Chunk(this.worldObj, par1, par2);
|
||||
this.chunkMapping.add(ChunkCoordIntPair.chunkXZ2Int(par1, par2), chunk);
|
||||
this.chunkListing.add(chunk);
|
||||
@@ -56,6 +56,7 @@
|
||||
Chunk chunk = new Chunk(this.field_73235_d, p_73158_1_, p_73158_2_);
|
||||
this.field_73236_b.func_76163_a(ChunkCoordIntPair.func_77272_a(p_73158_1_, p_73158_2_), chunk);
|
||||
this.field_73237_c.add(chunk);
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.ChunkEvent.Load(chunk));
|
||||
chunk.isChunkLoaded = true;
|
||||
chunk.field_76636_d = true;
|
||||
return chunk;
|
||||
}
|
||||
|
|
|
@ -11,75 +11,75 @@
|
|||
@SideOnly(Side.CLIENT)
|
||||
public class PlayerControllerMP
|
||||
{
|
||||
@@ -105,6 +109,12 @@
|
||||
// JAVADOC METHOD $$ func_78751_a
|
||||
public boolean onPlayerDestroyBlock(int par1, int par2, int par3, int par4)
|
||||
@@ -88,6 +92,12 @@
|
||||
|
||||
public boolean func_78751_a(int p_78751_1_, int p_78751_2_, int p_78751_3_, int p_78751_4_)
|
||||
{
|
||||
+ ItemStack stack = mc.thePlayer.getCurrentEquippedItem();
|
||||
+ if (stack != null && stack.getItem() != null && stack.getItem().onBlockStartBreak(stack, par1, par2, par3, mc.thePlayer))
|
||||
+ ItemStack stack = field_78776_a.field_71439_g.func_71045_bC();
|
||||
+ if (stack != null && stack.func_77973_b() != null && stack.func_77973_b().onBlockStartBreak(stack, p_78751_1_, p_78751_2_, p_78751_3_, field_78776_a.field_71439_g))
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
if (this.currentGameType.isAdventure() && !this.mc.thePlayer.isCurrentToolAdventureModeExempt(par1, par2, par3))
|
||||
if (this.field_78779_k.func_82752_c() && !this.field_78776_a.field_71439_g.func_82246_f(p_78751_1_, p_78751_2_, p_78751_3_))
|
||||
{
|
||||
return false;
|
||||
@@ -126,7 +136,7 @@
|
||||
@@ -109,7 +119,7 @@
|
||||
{
|
||||
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.setBlockToAir(par1, par2, par3);
|
||||
+ boolean flag = block.removedByPlayer(worldclient, mc.thePlayer, par1, par2, par3);
|
||||
worldclient.func_72926_e(2001, p_78751_1_, p_78751_2_, p_78751_3_, Block.func_149682_b(block) + (worldclient.func_72805_g(p_78751_1_, p_78751_2_, p_78751_3_) << 12));
|
||||
int i1 = worldclient.func_72805_g(p_78751_1_, p_78751_2_, p_78751_3_);
|
||||
- boolean flag = worldclient.func_147468_f(p_78751_1_, p_78751_2_, p_78751_3_);
|
||||
+ boolean flag = block.removedByPlayer(worldclient, field_78776_a.field_71439_g, p_78751_1_, p_78751_2_, p_78751_3_);
|
||||
|
||||
if (flag)
|
||||
{
|
||||
@@ -327,11 +337,18 @@
|
||||
float f2 = (float)par8Vec3.zCoord - (float)par6;
|
||||
@@ -304,11 +314,18 @@
|
||||
float f2 = (float)p_78760_8_.field_72449_c - (float)p_78760_6_;
|
||||
boolean flag = false;
|
||||
|
||||
- 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))
|
||||
- if ((!p_78760_1_.func_70093_af() || p_78760_1_.func_70694_bm() == null) && p_78760_2_.func_147439_a(p_78760_4_, p_78760_5_, p_78760_6_).func_149727_a(p_78760_2_, p_78760_4_, p_78760_5_, p_78760_6_, p_78760_1_, p_78760_7_, f, f1, f2))
|
||||
+ if (p_78760_3_ != null &&
|
||||
+ p_78760_3_.func_77973_b() != null &&
|
||||
+ p_78760_3_.func_77973_b().onItemUseFirst(p_78760_3_, p_78760_1_, p_78760_2_, p_78760_4_, p_78760_5_, p_78760_6_, p_78760_7_, f, f1, f2))
|
||||
{
|
||||
- flag = true;
|
||||
+ return true;
|
||||
}
|
||||
|
||||
+ if (!par1EntityPlayer.isSneaking() || par1EntityPlayer.getHeldItem() == null || par1EntityPlayer.getHeldItem().getItem().doesSneakBypassUse(par2World, par4, par5, par6, par1EntityPlayer))
|
||||
+ if (!p_78760_1_.func_70093_af() || p_78760_1_.func_70694_bm() == null || p_78760_1_.func_70694_bm().func_77973_b().doesSneakBypassUse(p_78760_2_, p_78760_4_, p_78760_5_, p_78760_6_, p_78760_1_))
|
||||
+ {
|
||||
+ flag = par2World.getBlock(par4, par5, par6).onBlockActivated(par2World, par4, par5, par6, par1EntityPlayer, par7, f, f1, f2);
|
||||
+ flag = p_78760_2_.func_147439_a(p_78760_4_, p_78760_5_, p_78760_6_).func_149727_a(p_78760_2_, p_78760_4_, p_78760_5_, p_78760_6_, p_78760_1_, p_78760_7_, f, f1, f2);
|
||||
+ }
|
||||
+
|
||||
if (!flag && par3ItemStack != null && par3ItemStack.getItem() instanceof ItemBlock)
|
||||
if (!flag && p_78760_3_ != null && p_78760_3_.func_77973_b() instanceof ItemBlock)
|
||||
{
|
||||
ItemBlock itemblock = (ItemBlock)par3ItemStack.getItem();
|
||||
@@ -363,7 +380,15 @@
|
||||
ItemBlock itemblock = (ItemBlock)p_78760_3_.func_77973_b();
|
||||
@@ -340,7 +357,15 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- return par3ItemStack.tryPlaceItemIntoWorld(par1EntityPlayer, par2World, par4, par5, par6, par7, f, f1, f2);
|
||||
+ if (!par3ItemStack.tryPlaceItemIntoWorld(par1EntityPlayer, par2World, par4, par5, par6, par7, f, f1, f2))
|
||||
- return p_78760_3_.func_77943_a(p_78760_1_, p_78760_2_, p_78760_4_, p_78760_5_, p_78760_6_, p_78760_7_, f, f1, f2);
|
||||
+ if (!p_78760_3_.func_77943_a(p_78760_1_, p_78760_2_, p_78760_4_, p_78760_5_, p_78760_6_, p_78760_7_, f, f1, f2))
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
+ if (par3ItemStack.stackSize <= 0)
|
||||
+ if (p_78760_3_.field_77994_a <= 0)
|
||||
+ {
|
||||
+ MinecraftForge.EVENT_BUS.post(new PlayerDestroyItemEvent(par1EntityPlayer, par3ItemStack));
|
||||
+ MinecraftForge.EVENT_BUS.post(new PlayerDestroyItemEvent(p_78760_1_, p_78760_3_));
|
||||
+ }
|
||||
+ return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -383,9 +408,10 @@
|
||||
@@ -359,9 +384,10 @@
|
||||
{
|
||||
par1EntityPlayer.inventory.mainInventory[par1EntityPlayer.inventory.currentItem] = itemstack1;
|
||||
p_78769_1_.field_71071_by.field_70462_a[p_78769_1_.field_71071_by.field_70461_c] = itemstack1;
|
||||
|
||||
- if (itemstack1.stackSize == 0)
|
||||
+ if (itemstack1.stackSize <= 0)
|
||||
- if (itemstack1.field_77994_a == 0)
|
||||
+ if (itemstack1.field_77994_a <= 0)
|
||||
{
|
||||
par1EntityPlayer.inventory.mainInventory[par1EntityPlayer.inventory.currentItem] = null;
|
||||
+ MinecraftForge.EVENT_BUS.post(new PlayerDestroyItemEvent(par1EntityPlayer, itemstack1));
|
||||
p_78769_1_.field_71071_by.field_70462_a[p_78769_1_.field_71071_by.field_70461_c] = null;
|
||||
+ MinecraftForge.EVENT_BUS.post(new PlayerDestroyItemEvent(p_78769_1_, itemstack1));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -10,29 +10,29 @@
|
|||
@SideOnly(Side.CLIENT)
|
||||
public class WorldClient extends World
|
||||
{
|
||||
@@ -56,8 +59,11 @@
|
||||
super(new SaveHandlerMP(), "MpServer", WorldProvider.getProviderForDimension(p_i45063_3_), p_i45063_2_, p_i45063_5_);
|
||||
this.sendQueue = p_i45063_1_;
|
||||
this.difficultySetting = p_i45063_4_;
|
||||
- this.setSpawnLocation(8, 64, 8);
|
||||
this.mapStorage = p_i45063_1_.mapStorageOrigin;
|
||||
+ this.isRemote = true;
|
||||
@@ -51,8 +54,11 @@
|
||||
super(new SaveHandlerMP(), "MpServer", WorldProvider.func_76570_a(p_i45063_3_), p_i45063_2_, p_i45063_5_);
|
||||
this.field_73035_a = p_i45063_1_;
|
||||
this.field_73013_u = p_i45063_4_;
|
||||
- this.func_72950_A(8, 64, 8);
|
||||
this.field_72988_C = p_i45063_1_.field_147305_a;
|
||||
+ this.field_72995_K = true;
|
||||
+ this.finishSetup();
|
||||
+ this.setSpawnLocation(8, 64, 8);
|
||||
+ this.func_72950_A(8, 64, 8);
|
||||
+ MinecraftForge.EVENT_BUS.post(new WorldEvent.Load(this));
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_72835_b
|
||||
@@ -275,6 +281,12 @@
|
||||
// JAVADOC METHOD $$ func_72979_l
|
||||
protected void updateWeather()
|
||||
public void func_72835_b()
|
||||
@@ -261,6 +267,12 @@
|
||||
|
||||
protected void func_72979_l()
|
||||
{
|
||||
+ super.updateWeather();
|
||||
+ super.func_72979_l();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void updateWeatherBody()
|
||||
+ {
|
||||
if (!this.provider.hasNoSky)
|
||||
if (!this.field_73011_w.field_76576_e)
|
||||
{
|
||||
;
|
||||
|
|
|
@ -9,26 +9,26 @@
|
|||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -706,7 +708,11 @@
|
||||
// JAVADOC METHOD $$ func_147251_a
|
||||
public void handleChat(S02PacketChat p_147251_1_)
|
||||
@@ -675,7 +677,11 @@
|
||||
|
||||
public void func_147251_a(S02PacketChat p_147251_1_)
|
||||
{
|
||||
- this.gameController.ingameGUI.getChatGUI().printChatMessage(p_147251_1_.func_148915_c());
|
||||
- this.field_147299_f.field_71456_v.func_146158_b().func_146227_a(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.gameController.ingameGUI.getChatGUI().printChatMessage(event.message);
|
||||
+ this.field_147299_f.field_71456_v.func_146158_b().func_146227_a(event.message);
|
||||
+ }
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_147279_a
|
||||
@@ -1160,6 +1166,10 @@
|
||||
public void func_147279_a(S0BPacketAnimation p_147279_1_)
|
||||
@@ -1115,6 +1121,10 @@
|
||||
{
|
||||
tileentity.readFromNBT(p_147273_1_.func_148857_g());
|
||||
tileentity.func_145839_a(p_147273_1_.func_148857_g());
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
+ tileentity.onDataPacket(netManager, p_147273_1_);
|
||||
+ tileentity.onDataPacket(field_147302_e, p_147273_1_);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,63 +12,63 @@
|
|||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -72,7 +74,10 @@
|
||||
@@ -70,7 +72,10 @@
|
||||
|
||||
try
|
||||
{
|
||||
- entityfx.onUpdate();
|
||||
- entityfx.func_70071_h_();
|
||||
+ if (entityfx != null)
|
||||
+ {
|
||||
+ entityfx.onUpdate();
|
||||
+ entityfx.func_70071_h_();
|
||||
+ }
|
||||
}
|
||||
catch (Throwable throwable)
|
||||
{
|
||||
@@ -97,7 +102,7 @@
|
||||
@@ -95,7 +100,7 @@
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
|
||||
- if (entityfx.isDead)
|
||||
+ if (entityfx == null || entityfx.isDead)
|
||||
- if (entityfx.field_70128_L)
|
||||
+ if (entityfx == null || entityfx.field_70128_L)
|
||||
{
|
||||
this.fxLayers[i].remove(j--);
|
||||
this.field_78876_b[i].remove(j--);
|
||||
}
|
||||
@@ -147,6 +152,7 @@
|
||||
for (int j = 0; j < this.fxLayers[i].size(); ++j)
|
||||
@@ -144,6 +149,7 @@
|
||||
for (int j = 0; j < this.field_78876_b[i].size(); ++j)
|
||||
{
|
||||
final EntityFX entityfx = (EntityFX)this.fxLayers[i].get(j);
|
||||
final EntityFX entityfx = (EntityFX)this.field_78876_b[i].get(j);
|
||||
+ if (entityfx == null) continue;
|
||||
tessellator.setBrightness(entityfx.getBrightnessForRender(par2));
|
||||
tessellator.func_78380_c(entityfx.func_70070_b(p_78874_2_));
|
||||
|
||||
try
|
||||
@@ -203,6 +209,7 @@
|
||||
@@ -200,6 +206,7 @@
|
||||
for (int i = 0; i < list.size(); ++i)
|
||||
{
|
||||
EntityFX entityfx = (EntityFX)list.get(i);
|
||||
+ if (entityfx == null) continue;
|
||||
tessellator.setBrightness(entityfx.getBrightnessForRender(par2));
|
||||
entityfx.renderParticle(tessellator, par2, f2, f6, f3, f4, f5);
|
||||
tessellator.func_78380_c(entityfx.func_70070_b(p_78872_2_));
|
||||
entityfx.func_70539_a(tessellator, p_78872_2_, f2, f6, f3, f4, f5);
|
||||
}
|
||||
@@ -221,7 +228,7 @@
|
||||
@@ -218,7 +225,7 @@
|
||||
|
||||
public void addBlockDestroyEffects(int p_147215_1_, int p_147215_2_, int p_147215_3_, Block p_147215_4_, int p_147215_5_)
|
||||
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_)
|
||||
{
|
||||
- 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))
|
||||
- if (p_147215_4_.func_149688_o() != Material.field_151579_a)
|
||||
+ if (!p_147215_4_.isAir(field_78878_a, p_147215_1_, p_147215_2_, p_147215_3_) && !p_147215_4_.addDestroyEffects(field_78878_a, p_147215_1_, p_147215_2_, p_147215_3_, p_147215_5_, this))
|
||||
{
|
||||
byte b0 = 4;
|
||||
|
||||
@@ -291,4 +298,13 @@
|
||||
@@ -287,4 +294,13 @@
|
||||
{
|
||||
return "" + (this.fxLayers[0].size() + this.fxLayers[1].size() + this.fxLayers[2].size());
|
||||
return "" + (this.field_78876_b[0].size() + this.field_78876_b[1].size() + this.field_78876_b[2].size());
|
||||
}
|
||||
+
|
||||
+ public void addBlockHitEffects(int x, int y, int z, MovingObjectPosition target)
|
||||
+ {
|
||||
+ Block block = worldObj.getBlock(x, y, z);
|
||||
+ if (block != null && !block.addHitEffects(worldObj, target, this))
|
||||
+ Block block = field_78878_a.func_147439_a(x, y, z);
|
||||
+ if (block != null && !block.addHitEffects(field_78878_a, target, this))
|
||||
+ {
|
||||
+ addBlockHitEffects(x, y, z, target.sideHit);
|
||||
+ func_78867_a(x, y, z, target.field_72310_e);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
|
|
@ -1,33 +1,32 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/particle/EntityDiggingFX.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/particle/EntityDiggingFX.java
|
||||
@@ -12,21 +12,28 @@
|
||||
@@ -12,20 +12,27 @@
|
||||
{
|
||||
private Block field_145784_a;
|
||||
private static final String __OBFID = "CL_00000932";
|
||||
+ private int side;
|
||||
|
||||
public EntityDiggingFX(World par1World, double par2, double par4, double par6, double par8, double par10, double par12, Block par14Block, int par15)
|
||||
public EntityDiggingFX(World p_i1234_1_, double p_i1234_2_, double p_i1234_4_, double p_i1234_6_, double p_i1234_8_, double p_i1234_10_, double p_i1234_12_, Block p_i1234_14_, int p_i1234_15_)
|
||||
{
|
||||
+ this(par1World, par2, par4, par6, par8, par10, par12, par14Block, par15, par1World.rand.nextInt(6));
|
||||
+ this(p_i1234_1_, p_i1234_2_, p_i1234_4_, p_i1234_6_, p_i1234_8_, p_i1234_10_, p_i1234_12_, p_i1234_14_, p_i1234_15_, p_i1234_1_.field_73012_v.nextInt(6));
|
||||
+ }
|
||||
+
|
||||
+ public EntityDiggingFX(World par1World, double par2, double par4, double par6, double par8, double par10, double par12, Block par14Block, int par15, int side)
|
||||
+ public EntityDiggingFX(World p_i1234_1_, double p_i1234_2_, double p_i1234_4_, double p_i1234_6_, double p_i1234_8_, double p_i1234_10_, double p_i1234_12_, Block p_i1234_14_, int p_i1234_15_, int side)
|
||||
+ {
|
||||
super(par1World, par2, par4, par6, par8, par10, par12);
|
||||
this.field_145784_a = par14Block;
|
||||
- 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;
|
||||
super(p_i1234_1_, p_i1234_2_, p_i1234_4_, p_i1234_6_, p_i1234_8_, p_i1234_10_, p_i1234_12_);
|
||||
this.field_145784_a = p_i1234_14_;
|
||||
- this.func_110125_a(p_i1234_14_.func_149691_a(0, p_i1234_15_));
|
||||
+ this.func_110125_a(p_i1234_14_.func_149691_a(side, p_i1234_15_));
|
||||
this.field_70545_g = p_i1234_14_.field_149763_I;
|
||||
this.field_70552_h = this.field_70553_i = this.field_70551_j = 0.6F;
|
||||
this.field_70544_f /= 2.0F;
|
||||
+ this.side = side;
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_70596_a
|
||||
public EntityDiggingFX applyColourMultiplier(int par1, int par2, int par3)
|
||||
public EntityDiggingFX func_70596_a(int p_70596_1_, int p_70596_2_, int p_70596_3_)
|
||||
{
|
||||
- if (this.field_145784_a == Blocks.grass)
|
||||
+ if (this.field_145784_a == Blocks.grass && this.side != 1)
|
||||
- if (this.field_145784_a == Blocks.field_150349_c)
|
||||
+ if (this.field_145784_a == Blocks.field_150349_c && this.side != 1)
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -12,144 +12,144 @@
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class EntityRenderer implements IResourceManagerReloadListener
|
||||
@@ -397,7 +402,7 @@
|
||||
@@ -358,7 +363,7 @@
|
||||
|
||||
if (d3 < d2 || d2 == 0.0D)
|
||||
{
|
||||
- if (entity == this.mc.renderViewEntity.ridingEntity)
|
||||
+ if (entity == this.mc.renderViewEntity.ridingEntity && !entity.canRiderInteract())
|
||||
- if (entity == this.field_78531_r.field_71451_h.field_70154_o)
|
||||
+ if (entity == this.field_78531_r.field_71451_h.field_70154_o && !entity.canRiderInteract())
|
||||
{
|
||||
if (d2 == 0.0D)
|
||||
{
|
||||
@@ -432,8 +437,15 @@
|
||||
// JAVADOC METHOD $$ func_78477_e
|
||||
private void updateFovModifierHand()
|
||||
@@ -392,8 +397,15 @@
|
||||
|
||||
private void func_78477_e()
|
||||
{
|
||||
- EntityPlayerSP entityplayersp = (EntityPlayerSP)this.mc.renderViewEntity;
|
||||
- this.fovMultiplierTemp = entityplayersp.getFOVMultiplier();
|
||||
+ if (mc.renderViewEntity instanceof EntityPlayerSP)
|
||||
- EntityPlayerSP entityplayersp = (EntityPlayerSP)this.field_78531_r.field_71451_h;
|
||||
- this.field_78501_T = entityplayersp.func_71151_f();
|
||||
+ if (field_78531_r.field_71451_h instanceof EntityPlayerSP)
|
||||
+ {
|
||||
+ EntityPlayerSP entityplayersp = (EntityPlayerSP)this.mc.renderViewEntity;
|
||||
+ this.fovMultiplierTemp = entityplayersp.getFOVMultiplier();
|
||||
+ EntityPlayerSP entityplayersp = (EntityPlayerSP)this.field_78531_r.field_71451_h;
|
||||
+ this.field_78501_T = entityplayersp.func_71151_f();
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ this.fovMultiplierTemp = mc.thePlayer.getFOVMultiplier();
|
||||
+ this.field_78501_T = field_78531_r.field_71439_g.func_71151_f();
|
||||
+ }
|
||||
this.fovModifierHandPrev = this.fovModifierHand;
|
||||
this.fovModifierHand += (this.fovMultiplierTemp - this.fovModifierHand) * 0.5F;
|
||||
this.field_78506_S = this.field_78507_R;
|
||||
this.field_78507_R += (this.field_78501_T - this.field_78507_R) * 0.5F;
|
||||
|
||||
@@ -457,7 +469,7 @@
|
||||
@@ -416,7 +428,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- EntityPlayer entityplayer = (EntityPlayer)this.mc.renderViewEntity;
|
||||
+ EntityLivingBase entityplayer = (EntityLivingBase)this.mc.renderViewEntity;
|
||||
- EntityPlayer entityplayer = (EntityPlayer)this.field_78531_r.field_71451_h;
|
||||
+ EntityLivingBase entityplayer = (EntityLivingBase)this.field_78531_r.field_71451_h;
|
||||
float f1 = 70.0F;
|
||||
|
||||
if (par2)
|
||||
@@ -540,15 +552,7 @@
|
||||
if (p_78481_2_)
|
||||
@@ -497,15 +509,7 @@
|
||||
|
||||
if (!this.mc.gameSettings.debugCamEnable)
|
||||
if (!this.field_78531_r.field_71474_y.field_74325_U)
|
||||
{
|
||||
- Block block = this.mc.theWorld.getBlock(MathHelper.floor_double(entitylivingbase.posX), MathHelper.floor_double(entitylivingbase.posY), MathHelper.floor_double(entitylivingbase.posZ));
|
||||
- Block block = this.field_78531_r.field_71441_e.func_147439_a(MathHelper.func_76128_c(entitylivingbase.field_70165_t), MathHelper.func_76128_c(entitylivingbase.field_70163_u), MathHelper.func_76128_c(entitylivingbase.field_70161_v));
|
||||
-
|
||||
- if (block == Blocks.bed)
|
||||
- if (block == Blocks.field_150324_C)
|
||||
- {
|
||||
- int i = this.mc.theWorld.getBlockMetadata(MathHelper.floor_double(entitylivingbase.posX), MathHelper.floor_double(entitylivingbase.posY), MathHelper.floor_double(entitylivingbase.posZ));
|
||||
- int i = this.field_78531_r.field_71441_e.func_72805_g(MathHelper.func_76128_c(entitylivingbase.field_70165_t), MathHelper.func_76128_c(entitylivingbase.field_70163_u), MathHelper.func_76128_c(entitylivingbase.field_70161_v));
|
||||
- int j = i & 3;
|
||||
- GL11.glRotatef((float)(j * 90), 0.0F, 1.0F, 0.0F);
|
||||
- }
|
||||
-
|
||||
+ ForgeHooksClient.orientBedCamera(mc, entitylivingbase);
|
||||
GL11.glRotatef(entitylivingbase.prevRotationYaw + (entitylivingbase.rotationYaw - entitylivingbase.prevRotationYaw) * par1 + 180.0F, 0.0F, -1.0F, 0.0F);
|
||||
GL11.glRotatef(entitylivingbase.prevRotationPitch + (entitylivingbase.rotationPitch - entitylivingbase.prevRotationPitch) * par1, -1.0F, 0.0F, 0.0F);
|
||||
+ ForgeHooksClient.orientBedCamera(field_78531_r, entitylivingbase);
|
||||
GL11.glRotatef(entitylivingbase.field_70126_B + (entitylivingbase.field_70177_z - entitylivingbase.field_70126_B) * p_78467_1_ + 180.0F, 0.0F, -1.0F, 0.0F);
|
||||
GL11.glRotatef(entitylivingbase.field_70127_C + (entitylivingbase.field_70125_A - entitylivingbase.field_70127_C) * p_78467_1_, -1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
@@ -1253,7 +1257,10 @@
|
||||
@@ -1203,7 +1207,10 @@
|
||||
GL11.glPushMatrix();
|
||||
RenderHelper.enableStandardItemLighting();
|
||||
this.mc.mcProfiler.endStartSection("entities");
|
||||
RenderHelper.func_74519_b();
|
||||
this.field_78531_r.field_71424_I.func_76318_c("entities");
|
||||
+ ForgeHooksClient.setRenderPass(0);
|
||||
renderglobal.renderEntities(entitylivingbase, frustrum, par1);
|
||||
renderglobal.func_147589_a(entitylivingbase, frustrum, p_78471_1_);
|
||||
+ ForgeHooksClient.setRenderPass(0);
|
||||
+ // ToDo: Try and figure out how to make particles render sorted correctly.. {They render behind water}
|
||||
this.enableLightmap((double)par1);
|
||||
this.mc.mcProfiler.endStartSection("litParticles");
|
||||
effectrenderer.renderLitParticles(entitylivingbase, par1);
|
||||
@@ -1271,7 +1278,10 @@
|
||||
this.func_78463_b((double)p_78471_1_);
|
||||
this.field_78531_r.field_71424_I.func_76318_c("litParticles");
|
||||
effectrenderer.func_78872_b(entitylivingbase, p_78471_1_);
|
||||
@@ -1221,7 +1228,10 @@
|
||||
entityplayer = (EntityPlayer)entitylivingbase;
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
this.mc.mcProfiler.endStartSection("outline");
|
||||
- renderglobal.drawSelectionBox(entityplayer, this.mc.objectMouseOver, 0, par1);
|
||||
+ if (!ForgeHooksClient.onDrawBlockHighlight(renderglobal, entityplayer, mc.objectMouseOver, 0, entityplayer.inventory.getCurrentItem(), par1))
|
||||
this.field_78531_r.field_71424_I.func_76318_c("outline");
|
||||
- renderglobal.func_72731_b(entityplayer, this.field_78531_r.field_71476_x, 0, p_78471_1_);
|
||||
+ if (!ForgeHooksClient.onDrawBlockHighlight(renderglobal, entityplayer, field_78531_r.field_71476_x, 0, entityplayer.field_71071_by.func_70448_g(), p_78471_1_))
|
||||
+ {
|
||||
+ renderglobal.drawSelectionBox(entityplayer, this.mc.objectMouseOver, 0, par1);
|
||||
+ renderglobal.func_72731_b(entityplayer, this.field_78531_r.field_71476_x, 0, p_78471_1_);
|
||||
+ }
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
}
|
||||
}
|
||||
@@ -1284,14 +1294,17 @@
|
||||
@@ -1234,14 +1244,17 @@
|
||||
entityplayer = (EntityPlayer)entitylivingbase;
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
this.mc.mcProfiler.endStartSection("outline");
|
||||
- renderglobal.drawSelectionBox(entityplayer, this.mc.objectMouseOver, 0, par1);
|
||||
+ if (!ForgeHooksClient.onDrawBlockHighlight(renderglobal, entityplayer, mc.objectMouseOver, 0, entityplayer.inventory.getCurrentItem(), par1))
|
||||
this.field_78531_r.field_71424_I.func_76318_c("outline");
|
||||
- renderglobal.func_72731_b(entityplayer, this.field_78531_r.field_71476_x, 0, p_78471_1_);
|
||||
+ if (!ForgeHooksClient.onDrawBlockHighlight(renderglobal, entityplayer, field_78531_r.field_71476_x, 0, entityplayer.field_71071_by.func_70448_g(), p_78471_1_))
|
||||
+ {
|
||||
+ renderglobal.drawSelectionBox(entityplayer, this.mc.objectMouseOver, 0, par1);
|
||||
+ renderglobal.func_72731_b(entityplayer, this.field_78531_r.field_71476_x, 0, p_78471_1_);
|
||||
+ }
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
}
|
||||
|
||||
this.mc.mcProfiler.endStartSection("destroyProgress");
|
||||
this.field_78531_r.field_71424_I.func_76318_c("destroyProgress");
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.glBlendFunc(770, 1, 1, 0);
|
||||
- renderglobal.drawBlockDamageTexture(Tessellator.instance, (EntityPlayer)entitylivingbase, par1);
|
||||
+ renderglobal.drawBlockDamageTexture(Tessellator.instance, entitylivingbase, par1);
|
||||
OpenGlHelper.func_148821_a(770, 1, 1, 0);
|
||||
- renderglobal.func_72717_a(Tessellator.field_78398_a, (EntityPlayer)entitylivingbase, p_78471_1_);
|
||||
+ renderglobal.drawBlockDamageTexture(Tessellator.field_78398_a, entitylivingbase, p_78471_1_);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
@@ -1346,6 +1359,16 @@
|
||||
renderglobal.sortAndRender(entitylivingbase, 1, (double)par1);
|
||||
@@ -1296,6 +1309,16 @@
|
||||
renderglobal.func_72719_a(entitylivingbase, 1, (double)p_78471_1_);
|
||||
}
|
||||
|
||||
+ if (this.debugViewDirection == 0) //Only render if render pass 0 happens as well.
|
||||
+ if (this.field_78532_q == 0) //Only render if render pass 0 happens as well.
|
||||
+ {
|
||||
+ RenderHelper.enableStandardItemLighting();
|
||||
+ this.mc.mcProfiler.endStartSection("entities");
|
||||
+ RenderHelper.func_74519_b();
|
||||
+ this.field_78531_r.field_71424_I.func_76318_c("entities");
|
||||
+ ForgeHooksClient.setRenderPass(1);
|
||||
+ renderglobal.renderEntities(entitylivingbase, frustrum, par1);
|
||||
+ renderglobal.func_147589_a(entitylivingbase, frustrum, p_78471_1_);
|
||||
+ ForgeHooksClient.setRenderPass(-1);
|
||||
+ RenderHelper.disableStandardItemLighting();
|
||||
+ RenderHelper.func_74518_a();
|
||||
+ }
|
||||
+
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
@@ -1357,9 +1380,12 @@
|
||||
this.renderCloudsCheck(renderglobal, par1);
|
||||
@@ -1307,9 +1330,12 @@
|
||||
this.func_82829_a(renderglobal, p_78471_1_);
|
||||
}
|
||||
|
||||
+ this.mc.mcProfiler.endStartSection("FRenderLast");
|
||||
+ ForgeHooksClient.dispatchRenderLast(renderglobal, par1);
|
||||
+ this.field_78531_r.field_71424_I.func_76318_c("FRenderLast");
|
||||
+ ForgeHooksClient.dispatchRenderLast(renderglobal, p_78471_1_);
|
||||
+
|
||||
this.mc.mcProfiler.endStartSection("hand");
|
||||
this.field_78531_r.field_71424_I.func_76318_c("hand");
|
||||
|
||||
- if (this.cameraZoom == 1.0D)
|
||||
+ if (!ForgeHooksClient.renderFirstPersonHand(renderglobal, par1, j) && this.cameraZoom == 1.0D)
|
||||
- if (this.field_78503_V == 1.0D)
|
||||
+ if (!ForgeHooksClient.renderFirstPersonHand(renderglobal, p_78471_1_, j) && this.field_78503_V == 1.0D)
|
||||
{
|
||||
GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT);
|
||||
this.renderHand(par1, j);
|
||||
@@ -1477,6 +1503,13 @@
|
||||
// JAVADOC METHOD $$ func_78474_d
|
||||
protected void renderRainSnow(float par1)
|
||||
this.func_78476_b(p_78471_1_, j);
|
||||
@@ -1425,6 +1451,13 @@
|
||||
|
||||
protected void func_78474_d(float p_78474_1_)
|
||||
{
|
||||
+ IRenderHandler renderer = null;
|
||||
+ if ((renderer = this.mc.theWorld.provider.getWeatherRenderer()) != null)
|
||||
+ if ((renderer = this.field_78531_r.field_71441_e.field_73011_w.getWeatherRenderer()) != null)
|
||||
+ {
|
||||
+ renderer.render(par1, this.mc.theWorld, mc);
|
||||
+ renderer.render(p_78474_1_, this.field_78531_r.field_71441_e, field_78531_r);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
float f1 = this.mc.theWorld.getRainStrength(par1);
|
||||
float f1 = this.field_78531_r.field_71441_e.func_72867_j(p_78474_1_);
|
||||
|
||||
if (f1 > 0.0F)
|
||||
|
|
|
@ -22,91 +22,90 @@
|
|||
@SideOnly(Side.CLIENT)
|
||||
public class ItemRenderer
|
||||
{
|
||||
@@ -53,13 +61,25 @@
|
||||
// JAVADOC METHOD $$ func_78443_a
|
||||
public void renderItem(EntityLivingBase par1EntityLivingBase, ItemStack par2ItemStack, int par3)
|
||||
@@ -49,13 +57,24 @@
|
||||
|
||||
public void func_78443_a(EntityLivingBase p_78443_1_, ItemStack p_78443_2_, int p_78443_3_)
|
||||
{
|
||||
+ this.renderItem(par1EntityLivingBase, par2ItemStack, par3, EQUIPPED);
|
||||
+ this.renderItem(p_78443_1_, p_78443_2_, p_78443_3_, EQUIPPED);
|
||||
+ }
|
||||
+
|
||||
+ // JAVADOC METHOD $$ renderItem
|
||||
+ public void renderItem(EntityLivingBase par1EntityLivingBase, ItemStack par2ItemStack, int par3, ItemRenderType type)
|
||||
+ public void renderItem(EntityLivingBase p_78443_1_, ItemStack p_78443_2_, int p_78443_3_, ItemRenderType type)
|
||||
+ {
|
||||
GL11.glPushMatrix();
|
||||
TextureManager texturemanager = this.mc.getTextureManager();
|
||||
Item item = par2ItemStack.getItem();
|
||||
Block block = Block.getBlockFromItem(item);
|
||||
TextureManager texturemanager = this.field_78455_a.func_110434_K();
|
||||
Item item = p_78443_2_.func_77973_b();
|
||||
Block block = Block.func_149634_a(item);
|
||||
|
||||
- if (par2ItemStack.getItemSpriteNumber() == 0 && item instanceof ItemBlock && RenderBlocks.renderItemIn3d(block.getRenderType()))
|
||||
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(par2ItemStack, type);
|
||||
- if (p_78443_2_.func_94608_d() == 0 && item instanceof ItemBlock && RenderBlocks.func_147739_a(block.func_149645_b()))
|
||||
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(p_78443_2_, type);
|
||||
+ if (customRenderer != null)
|
||||
{
|
||||
+ texturemanager.bindTexture(texturemanager.getResourceLocation(par2ItemStack.getItemSpriteNumber()));
|
||||
+ ForgeHooksClient.renderEquippedItem(type, customRenderer, renderBlocksIr, par1EntityLivingBase, par2ItemStack);
|
||||
+ texturemanager.func_110577_a(texturemanager.func_130087_a(p_78443_2_.func_94608_d()));
|
||||
+ ForgeHooksClient.renderEquippedItem(type, customRenderer, field_147720_h, p_78443_1_, p_78443_2_);
|
||||
+ }
|
||||
+ else if (par2ItemStack.getItemSpriteNumber() == 0 && item instanceof ItemBlock && RenderBlocks.renderItemIn3d(block.getRenderType()))
|
||||
+ else if (p_78443_2_.func_94608_d() == 0 && item instanceof ItemBlock && RenderBlocks.func_147739_a(block.func_149645_b()))
|
||||
+ {
|
||||
texturemanager.bindTexture(texturemanager.getResourceLocation(0));
|
||||
texturemanager.func_110577_a(texturemanager.func_130087_a(0));
|
||||
|
||||
if (par2ItemStack != null && par2ItemStack.getItem() instanceof ItemCloth)
|
||||
@@ -104,7 +124,7 @@
|
||||
if (p_78443_2_ != null && p_78443_2_.func_77973_b() instanceof ItemCloth)
|
||||
@@ -100,7 +119,7 @@
|
||||
GL11.glTranslatef(-0.9375F, -0.0625F, 0.0F);
|
||||
renderItemIn2D(tessellator, f1, f2, f, f3, iicon.getIconWidth(), iicon.getIconHeight(), 0.0625F);
|
||||
func_78439_a(tessellator, f1, f2, f, f3, iicon.func_94211_a(), iicon.func_94216_b(), 0.0625F);
|
||||
|
||||
- if (par2ItemStack.hasEffect() && par3 == 0)
|
||||
+ if (par2ItemStack.hasEffect(par3))
|
||||
- if (p_78443_2_.func_77962_s() && p_78443_3_ == 0)
|
||||
+ if (p_78443_2_.hasEffect(p_78443_3_))
|
||||
{
|
||||
GL11.glDepthFunc(GL11.GL_EQUAL);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
@@ -279,7 +299,7 @@
|
||||
@@ -273,7 +292,7 @@
|
||||
RenderPlayer renderplayer;
|
||||
Render render;
|
||||
|
||||
- if (itemstack != null && itemstack.getItem() == Items.filled_map)
|
||||
+ if (itemstack != null && itemstack.getItem() instanceof ItemMap)
|
||||
- if (itemstack != null && itemstack.func_77973_b() == Items.field_151098_aY)
|
||||
+ if (itemstack != null && itemstack.func_77973_b() instanceof ItemMap)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
f13 = 0.8F;
|
||||
@@ -346,12 +366,21 @@
|
||||
tessellator.addVertexWithUV((double)(128 + b0), (double)(0 - b0), 0.0D, 1.0D, 0.0D);
|
||||
tessellator.addVertexWithUV((double)(0 - b0), (double)(0 - b0), 0.0D, 0.0D, 0.0D);
|
||||
tessellator.draw();
|
||||
- MapData mapdata = Items.filled_map.getMapData(itemstack, this.mc.theWorld);
|
||||
@@ -340,12 +359,21 @@
|
||||
tessellator.func_78374_a((double)(128 + b0), (double)(0 - b0), 0.0D, 1.0D, 0.0D);
|
||||
tessellator.func_78374_a((double)(0 - b0), (double)(0 - b0), 0.0D, 0.0D, 0.0D);
|
||||
tessellator.func_78381_a();
|
||||
- MapData mapdata = Items.field_151098_aY.func_77873_a(itemstack, this.field_78455_a.field_71441_e);
|
||||
|
||||
- if (mapdata != null)
|
||||
+ IItemRenderer custom = MinecraftForgeClient.getItemRenderer(itemstack, FIRST_PERSON_MAP);
|
||||
+ MapData mapdata = ((ItemMap)itemstack.getItem()).getMapData(itemstack, this.mc.theWorld);
|
||||
+ MapData mapdata = ((ItemMap)itemstack.func_77973_b()).func_77873_a(itemstack, this.field_78455_a.field_71441_e);
|
||||
+
|
||||
+ if (custom == null)
|
||||
{
|
||||
- this.mc.entityRenderer.getMapItemRenderer().func_148250_a(mapdata, false);
|
||||
- this.field_78455_a.field_71460_t.func_147701_i().func_148250_a(mapdata, false);
|
||||
+ if (mapdata != null)
|
||||
+ {
|
||||
+ this.mc.entityRenderer.getMapItemRenderer().func_148250_a(mapdata, false);
|
||||
+ this.field_78455_a.field_71460_t.func_147701_i().func_148250_a(mapdata, false);
|
||||
+ }
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
+ custom.renderItem(FIRST_PERSON_MAP, itemstack, mc.thePlayer, mc.getTextureManager(), mapdata);
|
||||
+ custom.renderItem(FIRST_PERSON_MAP, itemstack, field_78455_a.field_71439_g, field_78455_a.func_110434_K(), mapdata);
|
||||
+ }
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
@@ -452,17 +481,20 @@
|
||||
@@ -446,17 +474,20 @@
|
||||
|
||||
if (itemstack.getItem().requiresMultipleRenderPasses())
|
||||
if (itemstack.func_77973_b().func_77623_v())
|
||||
{
|
||||
- this.renderItem(entityclientplayermp, itemstack, 0);
|
||||
- int j1 = itemstack.getItem().getColorFromItemStack(itemstack, 1);
|
||||
- this.func_78443_a(entityclientplayermp, itemstack, 0);
|
||||
- int j1 = itemstack.func_77973_b().func_82790_a(itemstack, 1);
|
||||
- f10 = (float)(j1 >> 16 & 255) / 255.0F;
|
||||
- f11 = (float)(j1 >> 8 & 255) / 255.0F;
|
||||
- f12 = (float)(j1 & 255) / 255.0F;
|
||||
- GL11.glColor4f(1.0F * f10, 1.0F * f11, 1.0F * f12, 1.0F);
|
||||
- this.renderItem(entityclientplayermp, itemstack, 1);
|
||||
- this.func_78443_a(entityclientplayermp, itemstack, 1);
|
||||
+ this.renderItem(entityclientplayermp, itemstack, 0, EQUIPPED_FIRST_PERSON);
|
||||
+ for (int x = 1; x < itemstack.getItem().getRenderPasses(itemstack.getItemDamage()); x++)
|
||||
+ for (int x = 1; x < itemstack.func_77973_b().getRenderPasses(itemstack.func_77960_j()); x++)
|
||||
+ {
|
||||
+ int j1 = itemstack.getItem().getColorFromItemStack(itemstack, x);
|
||||
+ int j1 = itemstack.func_77973_b().func_82790_a(itemstack, x);
|
||||
+ f10 = (float)(j1 >> 16 & 255) / 255.0F;
|
||||
+ f11 = (float)(j1 >> 8 & 255) / 255.0F;
|
||||
+ f12 = (float)(j1 & 255) / 255.0F;
|
||||
|
@ -116,7 +115,7 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
- this.renderItem(entityclientplayermp, itemstack, 0);
|
||||
- this.func_78443_a(entityclientplayermp, itemstack, 0);
|
||||
+ this.renderItem(entityclientplayermp, itemstack, 0, EQUIPPED_FIRST_PERSON);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
--- ../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 shadersSupported;
|
||||
@@ -24,6 +24,10 @@
|
||||
public static boolean field_148824_g;
|
||||
private static final String __OBFID = "CL_00001179";
|
||||
|
||||
+ /* Stores the last values sent into setLightmapTextureCoords */
|
||||
+ public static float lastBrightnessX = 0.0f;
|
||||
+ public static float lastBrightnessY = 0.0f;
|
||||
+
|
||||
// JAVADOC METHOD $$ func_77474_a
|
||||
public static void initializeTextures()
|
||||
public static void func_77474_a()
|
||||
{
|
||||
@@ -89,6 +93,12 @@
|
||||
field_77477_c = GLContext.getCapabilities().GL_ARB_multitexture && !GLContext.getCapabilities().OpenGL13;
|
||||
@@ -82,6 +86,12 @@
|
||||
{
|
||||
GL13.glMultiTexCoord2f(par0, par1, par2);
|
||||
GL13.glMultiTexCoord2f(p_77475_0_, p_77475_1_, p_77475_2_);
|
||||
}
|
||||
+
|
||||
+ if (par0 == lightmapTexUnit)
|
||||
+ if (p_77475_0_ == field_77476_b)
|
||||
+ {
|
||||
+ lastBrightnessX = par1;
|
||||
+ lastBrightnessY = par2;
|
||||
+ lastBrightnessX = p_77475_1_;
|
||||
+ lastBrightnessY = p_77475_2_;
|
||||
+ }
|
||||
}
|
||||
|
||||
public static void glBlendFunc(int p_148821_0_, int p_148821_1_, int p_148821_2_, int p_148821_3_)
|
||||
public static void func_148821_a(int p_148821_0_, int p_148821_1_, int p_148821_2_, int p_148821_3_)
|
||||
|
|
|
@ -9,101 +9,101 @@
|
|||
@SideOnly(Side.CLIENT)
|
||||
public class RenderBlocks
|
||||
{
|
||||
@@ -414,9 +416,9 @@
|
||||
public boolean renderBlockBed(Block p_147773_1_, int p_147773_2_, int p_147773_3_, int p_147773_4_)
|
||||
@@ -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_)
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
- 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_);
|
||||
Tessellator tessellator = Tessellator.field_78398_a;
|
||||
- int l = this.field_147845_a.func_72805_g(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_);
|
||||
float f = 0.5F;
|
||||
float f1 = 1.0F;
|
||||
float f2 = 0.8F;
|
||||
@@ -425,6 +427,7 @@
|
||||
tessellator.setBrightness(j1);
|
||||
tessellator.setColorOpaque_F(f, f, f);
|
||||
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();
|
||||
@@ -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.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();
|
||||
@@ -2135,7 +2139,7 @@
|
||||
@@ -347,6 +349,7 @@
|
||||
tessellator.func_78380_c(j1);
|
||||
tessellator.func_78386_a(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
|
||||
double d0 = (double)iicon.func_94209_e();
|
||||
double d1 = (double)iicon.func_94212_f();
|
||||
double d2 = (double)iicon.func_94206_g();
|
||||
@@ -363,6 +366,7 @@
|
||||
tessellator.func_78380_c(p_147773_1_.func_149677_c(this.field_147845_a, p_147773_2_, p_147773_3_ + 1, p_147773_4_));
|
||||
tessellator.func_78386_a(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
|
||||
d0 = (double)iicon.func_94209_e();
|
||||
d1 = (double)iicon.func_94212_f();
|
||||
d2 = (double)iicon.func_94206_g();
|
||||
@@ -2037,7 +2041,7 @@
|
||||
double d9;
|
||||
double d10;
|
||||
|
||||
- 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))
|
||||
- if (!World.func_147466_a(this.field_147845_a, p_147801_2_, p_147801_3_ - 1, p_147801_4_) && !Blocks.field_150480_ab.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.field_150480_ab.canCatchFire(this.field_147845_a, p_147801_2_, p_147801_3_ - 1, p_147801_4_, UP))
|
||||
{
|
||||
float f2 = 0.2F;
|
||||
float f1 = 0.0625F;
|
||||
@@ -2155,7 +2159,7 @@
|
||||
@@ -2057,7 +2061,7 @@
|
||||
d0 = d5;
|
||||
}
|
||||
|
||||
- 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))
|
||||
- if (Blocks.field_150480_ab.func_149844_e(this.field_147845_a, p_147801_2_ - 1, p_147801_3_, p_147801_4_))
|
||||
+ if (Blocks.field_150480_ab.canCatchFire(this.field_147845_a, 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);
|
||||
@@ -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);
|
||||
tessellator.func_78374_a((double)((float)p_147801_2_ + f2), (double)((float)p_147801_3_ + f + f1), (double)(p_147801_4_ + 1), d2, d1);
|
||||
tessellator.func_78374_a((double)(p_147801_2_ + 0), (double)((float)(p_147801_3_ + 0) + f1), (double)(p_147801_4_ + 1), d2, d3);
|
||||
@@ -2069,7 +2073,7 @@
|
||||
tessellator.func_78374_a((double)((float)p_147801_2_ + f2), (double)((float)p_147801_3_ + f + f1), (double)(p_147801_4_ + 1), d2, d1);
|
||||
}
|
||||
|
||||
- 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))
|
||||
- if (Blocks.field_150480_ab.func_149844_e(this.field_147845_a, p_147801_2_ + 1, p_147801_3_, p_147801_4_))
|
||||
+ if (Blocks.field_150480_ab.canCatchFire(this.field_147845_a, 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);
|
||||
@@ -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);
|
||||
tessellator.func_78374_a((double)((float)(p_147801_2_ + 1) - f2), (double)((float)p_147801_3_ + f + f1), (double)(p_147801_4_ + 0), d0, d1);
|
||||
tessellator.func_78374_a((double)(p_147801_2_ + 1 - 0), (double)((float)(p_147801_3_ + 0) + f1), (double)(p_147801_4_ + 0), d0, d3);
|
||||
@@ -2081,7 +2085,7 @@
|
||||
tessellator.func_78374_a((double)((float)(p_147801_2_ + 1) - f2), (double)((float)p_147801_3_ + f + f1), (double)(p_147801_4_ + 0), d0, d1);
|
||||
}
|
||||
|
||||
- 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))
|
||||
- if (Blocks.field_150480_ab.func_149844_e(this.field_147845_a, p_147801_2_, p_147801_3_, p_147801_4_ - 1))
|
||||
+ if (Blocks.field_150480_ab.canCatchFire(this.field_147845_a, 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);
|
||||
@@ -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);
|
||||
tessellator.func_78374_a((double)(p_147801_2_ + 0), (double)((float)p_147801_3_ + f + f1), (double)((float)p_147801_4_ + f2), d2, d1);
|
||||
tessellator.func_78374_a((double)(p_147801_2_ + 0), (double)((float)(p_147801_3_ + 0) + f1), (double)(p_147801_4_ + 0), d2, d3);
|
||||
@@ -2093,7 +2097,7 @@
|
||||
tessellator.func_78374_a((double)(p_147801_2_ + 0), (double)((float)p_147801_3_ + f + f1), (double)((float)p_147801_4_ + f2), d2, d1);
|
||||
}
|
||||
|
||||
- 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))
|
||||
- if (Blocks.field_150480_ab.func_149844_e(this.field_147845_a, p_147801_2_, p_147801_3_, p_147801_4_ + 1))
|
||||
+ if (Blocks.field_150480_ab.canCatchFire(this.field_147845_a, 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);
|
||||
@@ -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);
|
||||
tessellator.func_78374_a((double)(p_147801_2_ + 1), (double)((float)p_147801_3_ + f + f1), (double)((float)(p_147801_4_ + 1) - f2), d0, d1);
|
||||
tessellator.func_78374_a((double)(p_147801_2_ + 1), (double)((float)(p_147801_3_ + 0) + f1), (double)(p_147801_4_ + 1 - 0), d0, d3);
|
||||
@@ -2105,7 +2109,7 @@
|
||||
tessellator.func_78374_a((double)(p_147801_2_ + 1), (double)((float)p_147801_3_ + f + f1), (double)((float)(p_147801_4_ + 1) - f2), d0, d1);
|
||||
}
|
||||
|
||||
- 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))
|
||||
- if (Blocks.field_150480_ab.func_149844_e(this.field_147845_a, p_147801_2_, p_147801_3_ + 1, p_147801_4_))
|
||||
+ if (Blocks.field_150480_ab.canCatchFire(this.field_147845_a, 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;
|
||||
@@ -3217,10 +3221,10 @@
|
||||
@@ -3118,10 +3122,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_.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);
|
||||
- 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);
|
||||
double d19 = 0.01D;
|
||||
|
|
|
@ -10,121 +10,121 @@
|
|||
@SideOnly(Side.CLIENT)
|
||||
public class RenderGlobal implements IWorldAccess
|
||||
{
|
||||
@@ -413,8 +416,10 @@
|
||||
// JAVADOC METHOD $$ func_147589_a
|
||||
public void renderEntities(EntityLivingBase p_147589_1_, ICamera p_147589_2_, float p_147589_3_)
|
||||
@@ -375,8 +378,10 @@
|
||||
|
||||
public void func_147589_a(EntityLivingBase p_147589_1_, ICamera p_147589_2_, float p_147589_3_)
|
||||
{
|
||||
+ int pass = MinecraftForgeClient.getRenderPass();
|
||||
if (this.renderEntitiesStartupCounter > 0)
|
||||
if (this.field_72740_G > 0)
|
||||
{
|
||||
+ if (pass > 0) return;
|
||||
--this.renderEntitiesStartupCounter;
|
||||
--this.field_72740_G;
|
||||
}
|
||||
else
|
||||
@@ -425,9 +430,12 @@
|
||||
this.theWorld.theProfiler.startSection("prepare");
|
||||
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_);
|
||||
@@ -387,9 +392,12 @@
|
||||
this.field_72769_h.field_72984_F.func_76320_a("prepare");
|
||||
TileEntityRendererDispatcher.field_147556_a.func_147542_a(this.field_72769_h, this.field_72777_q.func_110434_K(), this.field_72777_q.field_71466_p, this.field_72777_q.field_71451_h, p_147589_3_);
|
||||
RenderManager.field_78727_a.func_147938_a(this.field_72769_h, this.field_72777_q.func_110434_K(), this.field_72777_q.field_71466_p, this.field_72777_q.field_71451_h, this.field_72777_q.field_147125_j, this.field_72777_q.field_71474_y, p_147589_3_);
|
||||
+ if (pass == 0) // no indentation to shrink patch
|
||||
+ {
|
||||
this.countEntitiesTotal = 0;
|
||||
this.countEntitiesRendered = 0;
|
||||
this.countEntitiesHidden = 0;
|
||||
this.field_72748_H = 0;
|
||||
this.field_72749_I = 0;
|
||||
this.field_72750_J = 0;
|
||||
+ }
|
||||
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_;
|
||||
@@ -456,13 +464,17 @@
|
||||
this.mc.entityRenderer.enableLightmap((double)p_147589_3_);
|
||||
this.theWorld.theProfiler.endStartSection("global");
|
||||
List list = this.theWorld.getLoadedEntityList();
|
||||
EntityLivingBase entitylivingbase1 = this.field_72777_q.field_71451_h;
|
||||
double d3 = entitylivingbase1.field_70142_S + (entitylivingbase1.field_70165_t - entitylivingbase1.field_70142_S) * (double)p_147589_3_;
|
||||
double d4 = entitylivingbase1.field_70137_T + (entitylivingbase1.field_70163_u - entitylivingbase1.field_70137_T) * (double)p_147589_3_;
|
||||
@@ -418,13 +426,17 @@
|
||||
this.field_72777_q.field_71460_t.func_78463_b((double)p_147589_3_);
|
||||
this.field_72769_h.field_72984_F.func_76318_c("global");
|
||||
List list = this.field_72769_h.func_72910_y();
|
||||
+ if (pass == 0) // no indentation for smaller patch size
|
||||
+ {
|
||||
this.countEntitiesTotal = list.size();
|
||||
this.field_72748_H = list.size();
|
||||
+ }
|
||||
Entity entity;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < this.theWorld.weatherEffects.size(); ++i)
|
||||
for (i = 0; i < this.field_72769_h.field_73007_j.size(); ++i)
|
||||
{
|
||||
entity = (Entity)this.theWorld.weatherEffects.get(i);
|
||||
entity = (Entity)this.field_72769_h.field_73007_j.get(i);
|
||||
+ if (!entity.shouldRenderInPass(pass)) continue;
|
||||
++this.countEntitiesRendered;
|
||||
++this.field_72749_I;
|
||||
|
||||
if (entity.isInRangeToRender3d(d0, d1, d2))
|
||||
@@ -476,6 +488,7 @@
|
||||
if (entity.func_145770_h(d0, d1, d2))
|
||||
@@ -438,6 +450,7 @@
|
||||
for (i = 0; i < list.size(); ++i)
|
||||
{
|
||||
entity = (Entity)list.get(i);
|
||||
+ if (!entity.shouldRenderInPass(pass)) continue;
|
||||
boolean flag = entity.isInRangeToRender3d(d0, d1, d2) && (entity.ignoreFrustumCheck || p_147589_2_.isBoundingBoxInFrustum(entity.boundingBox) || entity.riddenByEntity == this.mc.thePlayer);
|
||||
boolean flag = entity.func_145770_h(d0, d1, d2) && (entity.field_70158_ak || p_147589_2_.func_78546_a(entity.field_70121_D) || entity.field_70153_n == this.field_72777_q.field_71439_g);
|
||||
|
||||
if (!flag && entity instanceof EntityLiving)
|
||||
@@ -501,7 +514,11 @@
|
||||
@@ -463,7 +476,11 @@
|
||||
|
||||
for (i = 0; i < this.tileEntities.size(); ++i)
|
||||
for (i = 0; i < this.field_147598_a.size(); ++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((TileEntity)this.field_147598_a.get(i), p_147589_3_);
|
||||
+ TileEntity tile = (TileEntity)this.field_147598_a.get(i);
|
||||
+ if (tile.shouldRenderInPass(pass) && p_147589_2_.func_78546_a(tile.getRenderBoundingBox()))
|
||||
+ {
|
||||
+ TileEntityRendererDispatcher.instance.renderTileEntity(tile, p_147589_3_);
|
||||
+ TileEntityRendererDispatcher.field_147556_a.func_147544_a(tile, p_147589_3_);
|
||||
+ }
|
||||
}
|
||||
|
||||
this.mc.entityRenderer.disableLightmap((double)p_147589_3_);
|
||||
@@ -978,6 +995,12 @@
|
||||
// JAVADOC METHOD $$ func_72714_a
|
||||
public void renderSky(float par1)
|
||||
this.field_72777_q.field_71460_t.func_78483_a((double)p_147589_3_);
|
||||
@@ -933,6 +950,12 @@
|
||||
|
||||
public void func_72714_a(float p_72714_1_)
|
||||
{
|
||||
+ IRenderHandler skyProvider = null;
|
||||
+ if ((skyProvider = this.mc.theWorld.provider.getSkyRenderer()) != null)
|
||||
+ if ((skyProvider = this.field_72777_q.field_71441_e.field_73011_w.getSkyRenderer()) != null)
|
||||
+ {
|
||||
+ skyProvider.render(par1, this.theWorld, mc);
|
||||
+ skyProvider.render(p_72714_1_, this.field_72769_h, field_72777_q);
|
||||
+ return;
|
||||
+ }
|
||||
if (this.mc.theWorld.provider.dimensionId == 1)
|
||||
if (this.field_72777_q.field_71441_e.field_73011_w.field_76574_g == 1)
|
||||
{
|
||||
GL11.glDisable(GL11.GL_FOG);
|
||||
@@ -1216,6 +1239,12 @@
|
||||
@@ -1171,6 +1194,12 @@
|
||||
|
||||
public void renderClouds(float par1)
|
||||
public void func_72718_b(float p_72718_1_)
|
||||
{
|
||||
+ IRenderHandler renderer = null;
|
||||
+ if ((renderer = theWorld.provider.getCloudRenderer()) != null)
|
||||
+ if ((renderer = field_72769_h.field_73011_w.getCloudRenderer()) != null)
|
||||
+ {
|
||||
+ renderer.render(par1, theWorld, mc);
|
||||
+ renderer.render(p_72718_1_, field_72769_h, field_72777_q);
|
||||
+ return;
|
||||
+ }
|
||||
if (this.mc.theWorld.provider.isSurfaceWorld())
|
||||
if (this.field_72777_q.field_71441_e.field_73011_w.func_76569_d())
|
||||
{
|
||||
if (this.mc.gameSettings.fancyGraphics)
|
||||
@@ -1619,6 +1648,11 @@
|
||||
if (this.field_72777_q.field_71474_y.field_74347_j)
|
||||
@@ -1571,6 +1600,11 @@
|
||||
|
||||
public void drawBlockDamageTexture(Tessellator par1Tessellator, EntityPlayer par2EntityPlayer, float par3)
|
||||
public void func_72717_a(Tessellator p_72717_1_, EntityPlayer p_72717_2_, float p_72717_3_)
|
||||
{
|
||||
+ drawBlockDamageTexture(par1Tessellator, (EntityLivingBase)par2EntityPlayer, par3);
|
||||
+ drawBlockDamageTexture(p_72717_1_, (EntityLivingBase)p_72717_2_, p_72717_3_);
|
||||
+ }
|
||||
+
|
||||
+ public void drawBlockDamageTexture(Tessellator par1Tessellator, EntityLivingBase par2EntityPlayer, float par3)
|
||||
+ public void drawBlockDamageTexture(Tessellator p_72717_1_, EntityLivingBase p_72717_2_, float p_72717_3_)
|
||||
+ {
|
||||
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;
|
||||
@@ -1845,12 +1879,15 @@
|
||||
double d0 = p_72717_2_.field_70142_S + (p_72717_2_.field_70165_t - p_72717_2_.field_70142_S) * (double)p_72717_3_;
|
||||
double d1 = p_72717_2_.field_70137_T + (p_72717_2_.field_70163_u - p_72717_2_.field_70137_T) * (double)p_72717_3_;
|
||||
double d2 = p_72717_2_.field_70136_U + (p_72717_2_.field_70161_v - p_72717_2_.field_70136_U) * (double)p_72717_3_;
|
||||
@@ -1789,12 +1823,15 @@
|
||||
{
|
||||
ItemRecord itemrecord = ItemRecord.getRecord(par1Str);
|
||||
ItemRecord itemrecord = ItemRecord.func_150926_b(p_72702_1_);
|
||||
|
||||
+ ResourceLocation resource = null;
|
||||
if (itemrecord != null)
|
||||
{
|
||||
this.mc.ingameGUI.setRecordPlayingMessage(itemrecord.getRecordNameLocal());
|
||||
+ resource = itemrecord.getRecordResource(par1Str);
|
||||
this.field_72777_q.field_71456_v.func_73833_a(itemrecord.func_150927_i());
|
||||
+ resource = itemrecord.getRecordResource(p_72702_1_);
|
||||
}
|
||||
|
||||
- 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.mapSoundPositions.put(chunkcoordinates, positionedsoundrecord);
|
||||
this.mc.getSoundHandler().playSound(positionedsoundrecord);
|
||||
- PositionedSoundRecord positionedsoundrecord = PositionedSoundRecord.func_147675_a(new ResourceLocation(p_72702_1_), (float)p_72702_2_, (float)p_72702_3_, (float)p_72702_4_);
|
||||
+ if (resource == null) resource = new ResourceLocation(p_72702_1_);
|
||||
+ PositionedSoundRecord positionedsoundrecord = PositionedSoundRecord.func_147675_a(resource, (float)p_72702_2_, (float)p_72702_3_, (float)p_72702_4_);
|
||||
this.field_147593_P.put(chunkcoordinates, positionedsoundrecord);
|
||||
this.field_72777_q.func_147118_V().func_147682_a(positionedsoundrecord);
|
||||
}
|
||||
|
|
|
@ -8,10 +8,14 @@
|
|||
import java.util.PriorityQueue;
|
||||
import net.minecraft.client.shader.TesselatorVertexState;
|
||||
import net.minecraft.client.util.QuadComparator;
|
||||
@@ -15,14 +16,21 @@
|
||||
@@ -15,10 +16,17 @@
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class Tessellator
|
||||
{
|
||||
- private ByteBuffer field_78394_d;
|
||||
- private IntBuffer field_147568_c;
|
||||
- private FloatBuffer field_147566_d;
|
||||
- private ShortBuffer field_147567_e;
|
||||
+ private static int nativeBufferSize = 0x200000;
|
||||
+ private static int trivertsInBuffer = (nativeBufferSize / 48) * 6;
|
||||
+ public static boolean renderingWorldRenderer = false;
|
||||
|
@ -19,31 +23,23 @@
|
|||
+ private int rawBufferSize = 0;
|
||||
+ public int textureID = 0;
|
||||
+
|
||||
// JAVADOC FIELD $$ field_78394_d
|
||||
- private ByteBuffer byteBuffer;
|
||||
+ private static ByteBuffer byteBuffer = GLAllocation.createDirectByteBuffer(nativeBufferSize * 4);
|
||||
// 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
|
||||
@@ -67,14 +75,17 @@
|
||||
+ private static ByteBuffer field_78394_d = GLAllocation.func_74524_c(nativeBufferSize * 4);
|
||||
+ private static IntBuffer field_147568_c = field_78394_d.asIntBuffer();
|
||||
+ private static FloatBuffer field_147566_d = field_78394_d.asFloatBuffer();
|
||||
+ private static ShortBuffer field_147567_e = field_78394_d.asShortBuffer();
|
||||
private int[] field_78405_h;
|
||||
private int field_78406_i;
|
||||
private double field_78403_j;
|
||||
@@ -44,14 +52,17 @@
|
||||
|
||||
private Tessellator(int par1)
|
||||
private Tessellator(int p_i1250_1_)
|
||||
{
|
||||
- this.bufferSize = par1;
|
||||
- this.byteBuffer = GLAllocation.createDirectByteBuffer(par1 * 4);
|
||||
- this.intBuffer = this.byteBuffer.asIntBuffer();
|
||||
- this.floatBuffer = this.byteBuffer.asFloatBuffer();
|
||||
- this.shortBuffer = this.byteBuffer.asShortBuffer();
|
||||
- this.rawBuffer = new int[par1];
|
||||
- this.field_78388_E = p_i1250_1_;
|
||||
- this.field_78394_d = GLAllocation.func_74524_c(p_i1250_1_ * 4);
|
||||
- this.field_147568_c = this.field_78394_d.asIntBuffer();
|
||||
- this.field_147566_d = this.field_78394_d.asFloatBuffer();
|
||||
- this.field_147567_e = this.field_78394_d.asShortBuffer();
|
||||
- this.field_78405_h = new int[p_i1250_1_];
|
||||
}
|
||||
|
||||
+ public Tessellator()
|
||||
|
@ -52,98 +48,98 @@
|
|||
+
|
||||
+ static
|
||||
+ {
|
||||
+ instance.defaultTexture = true;
|
||||
+ field_78398_a.defaultTexture = true;
|
||||
+ }
|
||||
+
|
||||
// JAVADOC METHOD $$ func_78381_a
|
||||
public int draw()
|
||||
public int func_78381_a()
|
||||
{
|
||||
@@ -86,12 +97,15 @@
|
||||
if (!this.field_78415_z)
|
||||
@@ -62,12 +73,15 @@
|
||||
{
|
||||
this.isDrawing = false;
|
||||
this.field_78415_z = false;
|
||||
|
||||
- if (this.vertexCount > 0)
|
||||
- if (this.field_78406_i > 0)
|
||||
+ int offs = 0;
|
||||
+ while (offs < vertexCount)
|
||||
+ while (offs < field_78406_i)
|
||||
{
|
||||
+ int vtc = Math.min(vertexCount - offs, nativeBufferSize >> 5);
|
||||
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.rawBufferIndex * 4);
|
||||
+ this.byteBuffer.limit(vtc * 32);
|
||||
+ int vtc = Math.min(field_78406_i - offs, nativeBufferSize >> 5);
|
||||
this.field_147568_c.clear();
|
||||
- this.field_147568_c.put(this.field_78405_h, 0, this.field_147569_p);
|
||||
+ this.field_147568_c.put(this.field_78405_h, offs * 8, vtc * 8);
|
||||
this.field_78394_d.position(0);
|
||||
- this.field_78394_d.limit(this.field_147569_p * 4);
|
||||
+ this.field_78394_d.limit(vtc * 32);
|
||||
+ offs += vtc;
|
||||
|
||||
if (this.hasTexture)
|
||||
if (this.field_78400_o)
|
||||
{
|
||||
@@ -126,7 +140,7 @@
|
||||
this.floatBuffer.position(0);
|
||||
GL11.glVertexPointer(3, 32, this.floatBuffer);
|
||||
@@ -102,7 +116,7 @@
|
||||
this.field_147566_d.position(0);
|
||||
GL11.glVertexPointer(3, 32, this.field_147566_d);
|
||||
GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
- GL11.glDrawArrays(this.drawMode, 0, this.vertexCount);
|
||||
+ GL11.glDrawArrays(this.drawMode, 0, vtc);
|
||||
- GL11.glDrawArrays(this.field_78409_u, 0, this.field_78406_i);
|
||||
+ GL11.glDrawArrays(this.field_78409_u, 0, vtc);
|
||||
GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
|
||||
if (this.hasTexture)
|
||||
@@ -152,6 +166,12 @@
|
||||
if (this.field_78400_o)
|
||||
@@ -128,6 +142,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ if (rawBufferSize > 0x20000 && rawBufferIndex < (rawBufferSize << 3))
|
||||
+ if (rawBufferSize > 0x20000 && field_147569_p < (rawBufferSize << 3))
|
||||
+ {
|
||||
+ rawBufferSize = 0x10000;
|
||||
+ rawBuffer = new int[rawBufferSize];
|
||||
+ field_78405_h = new int[rawBufferSize];
|
||||
+ }
|
||||
+
|
||||
int i = this.rawBufferIndex * 4;
|
||||
this.reset();
|
||||
int i = this.field_147569_p * 4;
|
||||
this.func_78379_d();
|
||||
return i;
|
||||
@@ -186,6 +206,14 @@
|
||||
@@ -162,6 +182,14 @@
|
||||
|
||||
public void setVertexState(TesselatorVertexState p_147565_1_)
|
||||
public void func_147565_a(TesselatorVertexState p_147565_1_)
|
||||
{
|
||||
+ while (p_147565_1_.getRawBuffer().length > rawBufferSize && rawBufferSize > 0)
|
||||
+ while (p_147565_1_.func_147572_a().length > rawBufferSize && rawBufferSize > 0)
|
||||
+ {
|
||||
+ rawBufferSize <<= 1;
|
||||
+ }
|
||||
+ if (rawBufferSize > rawBuffer.length)
|
||||
+ if (rawBufferSize > field_78405_h.length)
|
||||
+ {
|
||||
+ rawBuffer = new int[rawBufferSize];
|
||||
+ field_78405_h = new int[rawBufferSize];
|
||||
+ }
|
||||
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)
|
||||
System.arraycopy(p_147565_1_.func_147572_a(), 0, this.field_78405_h, 0, p_147565_1_.func_147572_a().length);
|
||||
this.field_147569_p = p_147565_1_.func_147576_b();
|
||||
this.field_78406_i = p_147565_1_.func_147575_c();
|
||||
@@ -296,6 +324,19 @@
|
||||
|
||||
public void func_78377_a(double p_78377_1_, double p_78377_3_, double p_78377_5_)
|
||||
{
|
||||
+ if (rawBufferIndex >= rawBufferSize - 32)
|
||||
+ if (field_147569_p >= rawBufferSize - 32)
|
||||
+ {
|
||||
+ if (rawBufferSize == 0)
|
||||
+ {
|
||||
+ rawBufferSize = 0x10000;
|
||||
+ rawBuffer = new int[rawBufferSize];
|
||||
+ field_78405_h = new int[rawBufferSize];
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ rawBufferSize *= 2;
|
||||
+ rawBuffer = Arrays.copyOf(rawBuffer, rawBufferSize);
|
||||
+ field_78405_h = Arrays.copyOf(field_78405_h, rawBufferSize);
|
||||
+ }
|
||||
+ }
|
||||
++this.addedVertices;
|
||||
++this.field_78411_s;
|
||||
|
||||
if (this.hasTexture)
|
||||
@@ -358,12 +399,6 @@
|
||||
this.rawBuffer[this.rawBufferIndex + 2] = Float.floatToRawIntBits((float)(par5 + this.zOffset));
|
||||
this.rawBufferIndex += 8;
|
||||
++this.vertexCount;
|
||||
if (this.field_78400_o)
|
||||
@@ -324,12 +365,6 @@
|
||||
this.field_78405_h[this.field_147569_p + 2] = Float.floatToRawIntBits((float)(p_78377_5_ + this.field_78417_x));
|
||||
this.field_147569_p += 8;
|
||||
++this.field_78406_i;
|
||||
-
|
||||
- if (this.vertexCount % 4 == 0 && this.rawBufferIndex >= this.bufferSize - 32)
|
||||
- if (this.field_78406_i % 4 == 0 && this.field_147569_p >= this.field_78388_E - 32)
|
||||
- {
|
||||
- this.draw();
|
||||
- this.isDrawing = true;
|
||||
- this.func_78381_a();
|
||||
- this.field_78415_z = true;
|
||||
- }
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_78378_d
|
||||
public void func_78378_d(int p_78378_1_)
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/renderer/WorldRenderer.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/WorldRenderer.java
|
||||
@@ -29,7 +29,7 @@
|
||||
// JAVADOC FIELD $$ field_78924_a
|
||||
public World worldObj;
|
||||
private int glRenderList = -1;
|
||||
- private static Tessellator tessellator = Tessellator.instance;
|
||||
@@ -28,7 +28,7 @@
|
||||
private TesselatorVertexState field_147894_y;
|
||||
public World field_78924_a;
|
||||
private int field_78942_y = -1;
|
||||
- private static Tessellator field_78941_z = Tessellator.field_78398_a;
|
||||
+ //private static Tessellator tessellator = Tessellator.instance;
|
||||
public static int chunksUpdated;
|
||||
public int posX;
|
||||
public int posY;
|
||||
@@ -179,7 +179,7 @@
|
||||
this.preRenderBlocks(k2);
|
||||
public static int field_78922_b;
|
||||
public int field_78923_c;
|
||||
public int field_78920_d;
|
||||
@@ -157,7 +157,7 @@
|
||||
this.func_147890_b(k2);
|
||||
}
|
||||
|
||||
- if (k2 == 0 && block.hasTileEntity())
|
||||
+ if (k2 == 0 && block.hasTileEntity(chunkcache.getBlockMetadata(j3, l2, i3)))
|
||||
- if (k2 == 0 && block.func_149716_u())
|
||||
+ if (k2 == 0 && block.hasTileEntity(chunkcache.func_72805_g(j3, l2, i3)))
|
||||
{
|
||||
TileEntity tileentity = chunkcache.getTileEntity(j3, l2, i3);
|
||||
TileEntity tileentity = chunkcache.func_147438_o(j3, l2, i3);
|
||||
|
||||
@@ -195,7 +195,9 @@
|
||||
@@ -173,7 +173,9 @@
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
|
@ -27,42 +27,42 @@
|
|||
+ if (!block.canRenderInPass(k2)) continue;
|
||||
+
|
||||
{
|
||||
flag1 |= renderblocks.renderBlockByRenderType(block, j3, l2, i3);
|
||||
flag1 |= renderblocks.func_147805_b(block, j3, l2, i3);
|
||||
|
||||
@@ -254,21 +256,22 @@
|
||||
@@ -232,21 +234,22 @@
|
||||
GL11.glTranslatef(-8.0F, -8.0F, -8.0F);
|
||||
GL11.glScalef(f, f, f);
|
||||
GL11.glTranslatef(8.0F, 8.0F, 8.0F);
|
||||
- tessellator.startDrawingQuads();
|
||||
- tessellator.setTranslation((double)(-this.posX), (double)(-this.posY), (double)(-this.posZ));
|
||||
+ Tessellator.instance.startDrawingQuads();
|
||||
+ Tessellator.instance.setTranslation((double)(-this.posX), (double)(-this.posY), (double)(-this.posZ));
|
||||
- field_78941_z.func_78382_b();
|
||||
- field_78941_z.func_78373_b((double)(-this.field_78923_c), (double)(-this.field_78920_d), (double)(-this.field_78921_e));
|
||||
+ Tessellator.field_78398_a.func_78382_b();
|
||||
+ Tessellator.field_78398_a.func_78373_b((double)(-this.field_78923_c), (double)(-this.field_78920_d), (double)(-this.field_78921_e));
|
||||
}
|
||||
|
||||
private void postRenderBlocks(int p_147891_1_, EntityLivingBase p_147891_2_)
|
||||
private void func_147891_a(int p_147891_1_, EntityLivingBase p_147891_2_)
|
||||
{
|
||||
if (p_147891_1_ == 1 && !this.skipRenderPass[p_147891_1_])
|
||||
if (p_147891_1_ == 1 && !this.field_78928_m[p_147891_1_])
|
||||
{
|
||||
- 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.field_147894_y = field_78941_z.func_147564_a((float)p_147891_2_.field_70165_t, (float)p_147891_2_.field_70163_u, (float)p_147891_2_.field_70161_v);
|
||||
+ this.field_147894_y = Tessellator.field_78398_a.func_147564_a((float)p_147891_2_.field_70165_t, (float)p_147891_2_.field_70163_u, (float)p_147891_2_.field_70161_v);
|
||||
}
|
||||
|
||||
- this.bytesDrawn += tessellator.draw();
|
||||
- this.field_78917_C += field_78941_z.func_78381_a();
|
||||
+ //ForgeHooksClient.afterRenderPass(l1); Noop fo now, TODO: Event if anyone needs
|
||||
+ this.bytesDrawn += Tessellator.instance.draw();
|
||||
+ this.field_78917_C += Tessellator.field_78398_a.func_78381_a();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glEndList();
|
||||
- tessellator.setTranslation(0.0D, 0.0D, 0.0D);
|
||||
+ Tessellator.instance.setTranslation(0.0D, 0.0D, 0.0D);
|
||||
- field_78941_z.func_78373_b(0.0D, 0.0D, 0.0D);
|
||||
+ Tessellator.field_78398_a.func_78373_b(0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
|
||||
public void updateRendererSort(EntityLivingBase p_147889_1_)
|
||||
@@ -276,7 +279,7 @@
|
||||
if (this.vertexState != null && !this.skipRenderPass[1])
|
||||
public void func_147889_b(EntityLivingBase p_147889_1_)
|
||||
@@ -254,7 +257,7 @@
|
||||
if (this.field_147894_y != null && !this.field_78928_m[1])
|
||||
{
|
||||
this.preRenderBlocks(1);
|
||||
- tessellator.setVertexState(this.vertexState);
|
||||
+ Tessellator.instance.setVertexState(this.vertexState);
|
||||
this.postRenderBlocks(1, p_147889_1_);
|
||||
this.func_147890_b(1);
|
||||
- field_78941_z.func_147565_a(this.field_147894_y);
|
||||
+ Tessellator.field_78398_a.func_147565_a(this.field_147894_y);
|
||||
this.func_147891_a(1, p_147889_1_);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,98 +16,98 @@
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderBiped extends RenderLiving
|
||||
@@ -50,11 +56,13 @@
|
||||
@@ -49,11 +55,13 @@
|
||||
this.field_82425_h = new ModelBiped(0.5F);
|
||||
}
|
||||
|
||||
+ @Deprecated //Use the more sensitive version getArmorResource below
|
||||
public static ResourceLocation func_110857_a(ItemArmor par0ItemArmor, int par1)
|
||||
public static ResourceLocation func_110857_a(ItemArmor p_110857_0_, int p_110857_1_)
|
||||
{
|
||||
return func_110858_a(par0ItemArmor, par1, (String)null);
|
||||
return func_110858_a(p_110857_0_, p_110857_1_, (String)null);
|
||||
}
|
||||
|
||||
+ @Deprecated //Use the more sensitive version getArmorResource below
|
||||
public static ResourceLocation func_110858_a(ItemArmor par0ItemArmor, int par1, String par2Str)
|
||||
public static ResourceLocation func_110858_a(ItemArmor p_110858_0_, int p_110858_1_, String p_110858_2_)
|
||||
{
|
||||
String s1 = String.format("textures/models/armor/%s_layer_%d%s.png", new Object[] {bipedArmorFilenamePrefix[par0ItemArmor.renderIndex], Integer.valueOf(par1 == 2 ? 2 : 1), par2Str == null ? "" : String.format("_%s", new Object[]{par2Str})});
|
||||
@@ -81,7 +89,7 @@
|
||||
String s1 = String.format("textures/models/armor/%s_layer_%d%s.png", new Object[] {field_82424_k[p_110858_0_.field_77880_c], Integer.valueOf(p_110858_1_ == 2 ? 2 : 1), p_110858_2_ == null ? "" : String.format("_%s", new Object[]{p_110858_2_})});
|
||||
@@ -79,7 +87,7 @@
|
||||
if (item instanceof ItemArmor)
|
||||
{
|
||||
ItemArmor itemarmor = (ItemArmor)item;
|
||||
- this.bindTexture(func_110857_a(itemarmor, par2));
|
||||
+ this.bindTexture(getArmorResource(par1EntityLiving, itemstack, par2, null));
|
||||
ModelBiped modelbiped = par2 == 2 ? this.field_82425_h : this.field_82423_g;
|
||||
modelbiped.bipedHead.showModel = par2 == 0;
|
||||
modelbiped.bipedHeadwear.showModel = par2 == 0;
|
||||
@@ -90,14 +98,16 @@
|
||||
modelbiped.bipedLeftArm.showModel = par2 == 1;
|
||||
modelbiped.bipedRightLeg.showModel = par2 == 2 || par2 == 3;
|
||||
modelbiped.bipedLeftLeg.showModel = par2 == 2 || par2 == 3;
|
||||
+ modelbiped = ForgeHooksClient.getArmorModel(par1EntityLiving, itemstack, par2, modelbiped);
|
||||
this.setRenderPassModel(modelbiped);
|
||||
modelbiped.onGround = this.mainModel.onGround;
|
||||
modelbiped.isRiding = this.mainModel.isRiding;
|
||||
modelbiped.isChild = this.mainModel.isChild;
|
||||
- this.func_110776_a(func_110857_a(itemarmor, p_130006_2_));
|
||||
+ this.func_110776_a(getArmorResource(p_130006_1_, itemstack, p_130006_2_, null));
|
||||
ModelBiped modelbiped = p_130006_2_ == 2 ? this.field_82425_h : this.field_82423_g;
|
||||
modelbiped.field_78116_c.field_78806_j = p_130006_2_ == 0;
|
||||
modelbiped.field_78114_d.field_78806_j = p_130006_2_ == 0;
|
||||
@@ -88,14 +96,16 @@
|
||||
modelbiped.field_78113_g.field_78806_j = p_130006_2_ == 1;
|
||||
modelbiped.field_78123_h.field_78806_j = p_130006_2_ == 2 || p_130006_2_ == 3;
|
||||
modelbiped.field_78124_i.field_78806_j = p_130006_2_ == 2 || p_130006_2_ == 3;
|
||||
+ modelbiped = ForgeHooksClient.getArmorModel(p_130006_1_, itemstack, p_130006_2_, modelbiped);
|
||||
this.func_77042_a(modelbiped);
|
||||
modelbiped.field_78095_p = this.field_77045_g.field_78095_p;
|
||||
modelbiped.field_78093_q = this.field_77045_g.field_78093_q;
|
||||
modelbiped.field_78091_s = this.field_77045_g.field_78091_s;
|
||||
|
||||
- if (itemarmor.getArmorMaterial() == ItemArmor.ArmorMaterial.CLOTH)
|
||||
- if (itemarmor.func_82812_d() == ItemArmor.ArmorMaterial.CLOTH)
|
||||
+ //Move out of if to allow for more then just CLOTH to have color
|
||||
+ int j = itemarmor.getColor(itemstack);
|
||||
+ int j = itemarmor.func_82814_b(itemstack);
|
||||
+ if (j != -1)
|
||||
{
|
||||
- int j = itemarmor.getColor(itemstack);
|
||||
- int j = itemarmor.func_82814_b(itemstack);
|
||||
float f1 = (float)(j >> 16 & 255) / 255.0F;
|
||||
float f2 = (float)(j >> 8 & 255) / 255.0F;
|
||||
float f3 = (float)(j & 255) / 255.0F;
|
||||
@@ -135,7 +145,7 @@
|
||||
@@ -133,7 +143,7 @@
|
||||
|
||||
if (item instanceof ItemArmor)
|
||||
{
|
||||
- this.bindTexture(func_110858_a((ItemArmor)item, par2, "overlay"));
|
||||
+ this.bindTexture(getArmorResource(par1EntityLivingBase, itemstack, par2, "overlay"));
|
||||
- this.func_110776_a(func_110858_a((ItemArmor)item, p_82408_2_, "overlay"));
|
||||
+ this.func_110776_a(getArmorResource(p_82408_1_, itemstack, p_82408_2_, "overlay"));
|
||||
float f1 = 1.0F;
|
||||
GL11.glColor3f(1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
@@ -188,9 +198,12 @@
|
||||
this.modelBipedMain.bipedHead.postRender(0.0625F);
|
||||
item = itemstack1.getItem();
|
||||
@@ -184,9 +194,12 @@
|
||||
this.field_77071_a.field_78116_c.func_78794_c(0.0625F);
|
||||
item = itemstack1.func_77973_b();
|
||||
|
||||
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack1, EQUIPPED);
|
||||
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack1, BLOCK_3D));
|
||||
+
|
||||
if (item instanceof ItemBlock)
|
||||
{
|
||||
- if (RenderBlocks.renderItemIn3d(Block.getBlockFromItem(item).getRenderType()))
|
||||
+ if (is3D || RenderBlocks.renderItemIn3d(Block.getBlockFromItem(item).getRenderType()))
|
||||
- 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()))
|
||||
{
|
||||
f1 = 0.625F;
|
||||
GL11.glTranslatef(0.0F, -0.25F, 0.0F);
|
||||
@@ -233,7 +246,10 @@
|
||||
this.modelBipedMain.bipedRightArm.postRender(0.0625F);
|
||||
@@ -229,7 +242,10 @@
|
||||
this.field_77071_a.field_78112_f.func_78794_c(0.0625F);
|
||||
GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F);
|
||||
|
||||
- if (item instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(item).getRenderType()))
|
||||
- if (item instanceof ItemBlock && RenderBlocks.func_147739_a(Block.func_149634_a(item).func_149645_b()))
|
||||
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack, EQUIPPED);
|
||||
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack, BLOCK_3D));
|
||||
+
|
||||
+ if (item instanceof ItemBlock && (is3D || RenderBlocks.renderItemIn3d(Block.getBlockFromItem(item).getRenderType())))
|
||||
+ if (item instanceof ItemBlock && (is3D || RenderBlocks.func_147739_a(Block.func_149634_a(item).func_149645_b())))
|
||||
{
|
||||
f1 = 0.5F;
|
||||
GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
|
||||
@@ -289,7 +305,10 @@
|
||||
@@ -285,7 +301,10 @@
|
||||
f3 = (float)(i >> 8 & 255) / 255.0F;
|
||||
float f4 = (float)(i & 255) / 255.0F;
|
||||
GL11.glColor4f(f2, f3, f4, 1.0F);
|
||||
- this.renderManager.itemRenderer.renderItem(par1EntityLiving, itemstack, j);
|
||||
+ for (int x = 1; x < itemstack.getItem().getRenderPasses(itemstack.getItemDamage()); x++)
|
||||
- this.field_76990_c.field_78721_f.func_78443_a(p_130005_1_, itemstack, j);
|
||||
+ for (int x = 1; x < itemstack.func_77973_b().getRenderPasses(itemstack.func_77960_j()); x++)
|
||||
+ {
|
||||
+ this.renderManager.itemRenderer.renderItem(par1EntityLiving, itemstack, x);
|
||||
+ this.field_76990_c.field_78721_f.func_78443_a(p_130005_1_, itemstack, x);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -344,4 +363,33 @@
|
||||
@@ -336,4 +355,33 @@
|
||||
{
|
||||
this.doRender((EntityLiving)par1Entity, par2, par4, par6, par8, par9);
|
||||
this.func_76986_a((EntityLiving)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
|
||||
}
|
||||
+
|
||||
+ /*=================================== FORGE START =========================================*/
|
||||
|
@ -122,9 +122,9 @@
|
|||
+ */
|
||||
+ public static ResourceLocation getArmorResource(Entity entity, ItemStack stack, int slot, String type)
|
||||
+ {
|
||||
+ ItemArmor item = (ItemArmor)stack.getItem();
|
||||
+ ItemArmor item = (ItemArmor)stack.func_77973_b();
|
||||
+ String s1 = String.format("textures/models/armor/%s_layer_%d%s.png",
|
||||
+ bipedArmorFilenamePrefix[item.renderIndex], (slot == 2 ? 2 : 1), type == null ? "" : String.format("_%s", type));
|
||||
+ field_82424_k[item.field_77880_c], (slot == 2 ? 2 : 1), type == null ? "" : String.format("_%s", type));
|
||||
+
|
||||
+ s1 = ForgeHooksClient.getArmorTexture(entity, stack, s1, slot, type);
|
||||
+ ResourceLocation resourcelocation = (ResourceLocation)field_110859_k.get(s1);
|
||||
|
|
|
@ -17,85 +17,84 @@
|
|||
@SideOnly(Side.CLIENT)
|
||||
public class RenderItem extends Render
|
||||
{
|
||||
@@ -56,7 +59,7 @@
|
||||
this.bindEntityTexture(par1EntityItem);
|
||||
this.random.setSeed(187L);
|
||||
@@ -53,7 +56,7 @@
|
||||
this.func_110777_b(p_77014_1_);
|
||||
this.field_77025_h.setSeed(187L);
|
||||
GL11.glPushMatrix();
|
||||
- float f2 = MathHelper.sin(((float)par1EntityItem.age + par9) / 10.0F + par1EntityItem.hoverStart) * 0.1F + 0.1F;
|
||||
+ float f2 = shouldBob() ? MathHelper.sin(((float)par1EntityItem.age + par9) / 10.0F + par1EntityItem.hoverStart) * 0.1F + 0.1F : 0F;
|
||||
float f3 = (((float)par1EntityItem.age + par9) / 20.0F + par1EntityItem.hoverStart) * (180F / (float)Math.PI);
|
||||
- float f2 = MathHelper.func_76126_a(((float)p_77014_1_.field_70292_b + p_77014_9_) / 10.0F + p_77014_1_.field_70290_d) * 0.1F + 0.1F;
|
||||
+ float f2 = shouldBob() ? MathHelper.func_76126_a(((float)p_77014_1_.field_70292_b + p_77014_9_) / 10.0F + p_77014_1_.field_70290_d) * 0.1F + 0.1F : 0F;
|
||||
float f3 = (((float)p_77014_1_.field_70292_b + p_77014_9_) / 20.0F + p_77014_1_.field_70290_d) * (180F / (float)Math.PI);
|
||||
byte b0 = 1;
|
||||
|
||||
@@ -80,12 +83,19 @@
|
||||
@@ -77,12 +80,19 @@
|
||||
b0 = 5;
|
||||
}
|
||||
|
||||
+ b0 = getMiniBlockCount(itemstack, b0);
|
||||
+
|
||||
GL11.glTranslatef((float)par2, (float)par4 + f2, (float)par6);
|
||||
GL11.glTranslatef((float)p_77014_2_, (float)p_77014_4_ + f2, (float)p_77014_6_);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
float f7;
|
||||
float f6;
|
||||
int k;
|
||||
|
||||
+ if (ForgeHooksClient.renderEntityItem(par1EntityItem, itemstack, f2, f3, random, renderManager.renderEngine, field_147909_c, b0))
|
||||
+ if (ForgeHooksClient.renderEntityItem(p_77014_1_, itemstack, f2, f3, field_77025_h, field_76990_c.field_78724_e, field_147909_c, b0))
|
||||
+ {
|
||||
+ ;
|
||||
+ }
|
||||
+ else // Code Style break here to prevent the patch from editing this line
|
||||
if (itemstack.getItemSpriteNumber() == 0 && itemstack.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemstack.getItem()).getRenderType()))
|
||||
if (itemstack.func_94608_d() == 0 && itemstack.func_77973_b() instanceof ItemBlock && RenderBlocks.func_147739_a(Block.func_149634_a(itemstack.func_77973_b()).func_149645_b()))
|
||||
{
|
||||
Block block = Block.getBlockFromItem(itemstack.getItem());
|
||||
@@ -140,7 +150,7 @@
|
||||
Block block = Block.func_149634_a(itemstack.func_77973_b());
|
||||
@@ -137,7 +147,7 @@
|
||||
{
|
||||
float f5;
|
||||
|
||||
- if (itemstack.getItemSpriteNumber() == 1 && itemstack.getItem().requiresMultipleRenderPasses())
|
||||
+ if (/*itemstack.getItemSpriteNumber() == 1 &&*/ itemstack.getItem().requiresMultipleRenderPasses())
|
||||
- if (itemstack.func_94608_d() == 1 && itemstack.func_77973_b().func_77623_v())
|
||||
+ if (/*itemstack.getItemSpriteNumber() == 1 &&*/ itemstack.func_77973_b().func_77623_v())
|
||||
{
|
||||
if (renderInFrame)
|
||||
if (field_82407_g)
|
||||
{
|
||||
@@ -152,10 +162,10 @@
|
||||
@@ -149,10 +159,10 @@
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
}
|
||||
|
||||
- for (int j = 0; j <= 1; ++j)
|
||||
+ for (int j = 0; j < itemstack.getItem().getRenderPasses(itemstack.getItemDamage()); ++j)
|
||||
+ for (int j = 0; j < itemstack.func_77973_b().getRenderPasses(itemstack.func_77960_j()); ++j)
|
||||
{
|
||||
this.random.setSeed(187L);
|
||||
- IIcon iicon1 = itemstack.getItem().getIconFromDamageForRenderPass(itemstack.getItemDamage(), j);
|
||||
+ IIcon iicon1 = itemstack.getItem().getIcon(itemstack, j);
|
||||
this.field_77025_h.setSeed(187L);
|
||||
- IIcon iicon1 = itemstack.func_77973_b().func_77618_c(itemstack.func_77960_j(), j);
|
||||
+ IIcon iicon1 = itemstack.func_77973_b().getIcon(itemstack, j);
|
||||
|
||||
if (this.renderWithColor)
|
||||
if (this.field_77024_a)
|
||||
{
|
||||
@@ -164,11 +174,11 @@
|
||||
@@ -161,11 +171,11 @@
|
||||
f6 = (float)(k >> 8 & 255) / 255.0F;
|
||||
f7 = (float)(k & 255) / 255.0F;
|
||||
GL11.glColor4f(f5, f6, f7, 1.0F);
|
||||
- this.renderDroppedItem(par1EntityItem, iicon1, b0, par9, f5, f6, f7);
|
||||
+ this.renderDroppedItem(par1EntityItem, iicon1, b0, par9, f5, f6, f7, j);
|
||||
- this.func_77020_a(p_77014_1_, iicon1, b0, p_77014_9_, f5, f6, f7);
|
||||
+ this.renderDroppedItem(p_77014_1_, iicon1, b0, p_77014_9_, f5, f6, f7, j);
|
||||
}
|
||||
else
|
||||
{
|
||||
- this.renderDroppedItem(par1EntityItem, iicon1, b0, par9, 1.0F, 1.0F, 1.0F);
|
||||
+ this.renderDroppedItem(par1EntityItem, iicon1, b0, par9, 1.0F, 1.0F, 1.0F, j);
|
||||
- this.func_77020_a(p_77014_1_, iicon1, b0, p_77014_9_, 1.0F, 1.0F, 1.0F);
|
||||
+ this.renderDroppedItem(p_77014_1_, iicon1, b0, p_77014_9_, 1.0F, 1.0F, 1.0F, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -227,6 +237,12 @@
|
||||
// JAVADOC METHOD $$ func_77020_a
|
||||
private void renderDroppedItem(EntityItem par1EntityItem, IIcon par2Icon, int par3, float par4, float par5, float par6, float par7)
|
||||
@@ -222,6 +232,11 @@
|
||||
|
||||
private void func_77020_a(EntityItem p_77020_1_, IIcon p_77020_2_, int p_77020_3_, float p_77020_4_, float p_77020_5_, float p_77020_6_, float p_77020_7_)
|
||||
{
|
||||
+ this.renderDroppedItem(par1EntityItem, par2Icon, par3, par4, par5, par6, par7, 0);
|
||||
+ this.renderDroppedItem(p_77020_1_, p_77020_2_, p_77020_3_, p_77020_4_, p_77020_5_, p_77020_6_, p_77020_7_, 0);
|
||||
+ }
|
||||
+
|
||||
+ // JAVADOC METHOD $$ renderDroppedItem
|
||||
+ private void renderDroppedItem(EntityItem par1EntityItem, IIcon par2Icon, int par3, float par4, float par5, float par6, float par7, int pass)
|
||||
+ private void renderDroppedItem(EntityItem p_77020_1_, IIcon p_77020_2_, int p_77020_3_, float p_77020_4_, float p_77020_5_, float p_77020_6_, float p_77020_7_, int pass)
|
||||
+ {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
Tessellator tessellator = Tessellator.field_78398_a;
|
||||
|
||||
if (par2Icon == null)
|
||||
@@ -281,11 +297,24 @@
|
||||
if (p_77020_2_ == null)
|
||||
@@ -276,11 +291,24 @@
|
||||
b0 = 4;
|
||||
}
|
||||
|
||||
|
@ -109,9 +108,9 @@
|
|||
+ // Makes items offset when in 3D, like when in 2D, looks much better. Considered a vanilla bug...
|
||||
+ if (k > 0 && shouldSpreadItems())
|
||||
+ {
|
||||
+ float x = (random.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;
|
||||
+ float y = (random.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;
|
||||
+ float z = (random.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;
|
||||
+ float x = (field_77025_h.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;
|
||||
+ float y = (field_77025_h.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;
|
||||
+ float z = (field_77025_h.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;
|
||||
+ GL11.glTranslatef(x, y, f9 + f10);
|
||||
+ }
|
||||
+ else
|
||||
|
@ -119,113 +118,108 @@
|
|||
+ GL11.glTranslatef(0f, 0f, f9 + f10);
|
||||
+ }
|
||||
|
||||
if (itemstack.getItemSpriteNumber() == 0)
|
||||
if (itemstack.func_94608_d() == 0)
|
||||
{
|
||||
@@ -299,7 +328,7 @@
|
||||
GL11.glColor4f(par5, par6, par7, 1.0F);
|
||||
ItemRenderer.renderItemIn2D(tessellator, f15, f4, f14, f5, ((IIcon)par2Icon).getIconWidth(), ((IIcon)par2Icon).getIconHeight(), f9);
|
||||
@@ -294,7 +322,7 @@
|
||||
GL11.glColor4f(p_77020_5_, p_77020_6_, p_77020_7_, 1.0F);
|
||||
ItemRenderer.func_78439_a(tessellator, f15, f4, f14, f5, ((IIcon)p_77020_2_).func_94211_a(), ((IIcon)p_77020_2_).func_94216_b(), f9);
|
||||
|
||||
- if (itemstack.hasEffect())
|
||||
- if (itemstack.func_77962_s())
|
||||
+ if (itemstack.hasEffect(pass))
|
||||
{
|
||||
GL11.glDepthFunc(GL11.GL_EQUAL);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
@@ -368,6 +397,12 @@
|
||||
// JAVADOC METHOD $$ func_77015_a
|
||||
public void renderItemIntoGUI(FontRenderer par1FontRenderer, TextureManager par2TextureManager, ItemStack par3ItemStack, int par4, int par5)
|
||||
@@ -362,6 +390,11 @@
|
||||
|
||||
public void func_77015_a(FontRenderer p_77015_1_, TextureManager p_77015_2_, ItemStack p_77015_3_, int p_77015_4_, int p_77015_5_)
|
||||
{
|
||||
+ this.renderItemIntoGUI(par1FontRenderer, par2TextureManager, par3ItemStack, par4, par5, false);
|
||||
+ this.renderItemIntoGUI(p_77015_1_, p_77015_2_, p_77015_3_, p_77015_4_, p_77015_5_, false);
|
||||
+ }
|
||||
+
|
||||
+ // JAVADOC METHOD $$ renderItemIntoGUI
|
||||
+ public void renderItemIntoGUI(FontRenderer par1FontRenderer, TextureManager par2TextureManager, ItemStack par3ItemStack, int par4, int par5, boolean renderEffect)
|
||||
+ public void renderItemIntoGUI(FontRenderer p_77015_1_, TextureManager p_77015_2_, ItemStack p_77015_3_, int p_77015_4_, int p_77015_5_, boolean renderEffect)
|
||||
+ {
|
||||
int k = par3ItemStack.getItemDamage();
|
||||
Object object = par3ItemStack.getIconIndex();
|
||||
int k = p_77015_3_.func_77960_j();
|
||||
Object object = p_77015_3_.func_77954_c();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
@@ -426,11 +461,13 @@
|
||||
@@ -420,11 +453,13 @@
|
||||
GL11.glColorMask(true, true, true, true);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
- OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
- OpenGlHelper.func_148821_a(770, 771, 1, 0);
|
||||
|
||||
- for (l = 0; l <= 1; ++l)
|
||||
+ Item item = par3ItemStack.getItem();
|
||||
+ Item item = p_77015_3_.func_77973_b();
|
||||
+ for (l = 0; l < item.getRenderPasses(k); ++l)
|
||||
{
|
||||
- IIcon iicon = par3ItemStack.getItem().getIconFromDamageForRenderPass(k, l);
|
||||
+ 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);
|
||||
- IIcon iicon = p_77015_3_.func_77973_b().func_77618_c(k, l);
|
||||
+ OpenGlHelper.func_148821_a(770, 771, 1, 0);
|
||||
+ p_77015_2_.func_110577_a(item.func_94901_k() == 0 ? TextureMap.field_110575_b : TextureMap.field_110576_c);
|
||||
+ IIcon iicon = item.getIcon(p_77015_3_, l);
|
||||
int i1 = p_77015_3_.func_77973_b().func_82790_a(p_77015_3_, l);
|
||||
f = (float)(i1 >> 16 & 255) / 255.0F;
|
||||
float f1 = (float)(i1 >> 8 & 255) / 255.0F;
|
||||
@@ -441,7 +478,18 @@
|
||||
@@ -435,7 +470,18 @@
|
||||
GL11.glColor4f(f, f1, f2, 1.0F);
|
||||
}
|
||||
|
||||
+ GL11.glDisable(GL11.GL_LIGHTING); //Forge: Make sure that render states are reset, ad renderEffect can derp them up.
|
||||
+ GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
+
|
||||
this.renderIcon(par4, par5, iicon, 16, 16);
|
||||
this.func_94149_a(p_77015_4_, p_77015_5_, iicon, 16, 16);
|
||||
+
|
||||
+ GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
+ GL11.glEnable(GL11.GL_LIGHTING);
|
||||
+
|
||||
+ if (renderEffect && par3ItemStack.hasEffect(l))
|
||||
+ if (renderEffect && p_77015_3_.hasEffect(l))
|
||||
+ {
|
||||
+ renderEffect(par2TextureManager, par4, par5);
|
||||
+ renderEffect(p_77015_2_, p_77015_4_, p_77015_5_);
|
||||
+ }
|
||||
}
|
||||
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
@@ -468,8 +516,19 @@
|
||||
@@ -462,8 +508,19 @@
|
||||
GL11.glColor4f(f4, f3, f, 1.0F);
|
||||
}
|
||||
|
||||
+ GL11.glDisable(GL11.GL_LIGHTING); //Forge: Make sure that render states are reset, ad renderEffect can derp them up.
|
||||
+ GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
+
|
||||
this.renderIcon(par4, par5, (IIcon)object, 16, 16);
|
||||
this.func_94149_a(p_77015_4_, p_77015_5_, (IIcon)object, 16, 16);
|
||||
+
|
||||
+ GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
+
|
||||
+ if (renderEffect && par3ItemStack.hasEffect(0))
|
||||
+ if (renderEffect && p_77015_3_.hasEffect(0))
|
||||
+ {
|
||||
+ renderEffect(par2TextureManager, par4, par5);
|
||||
+ renderEffect(p_77015_2_, p_77015_4_, p_77015_5_);
|
||||
+ }
|
||||
+ GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
@@ -484,7 +543,10 @@
|
||||
@@ -477,7 +534,10 @@
|
||||
|
||||
try
|
||||
{
|
||||
- this.renderItemIntoGUI(par1FontRenderer, par2TextureManager, par3ItemStack, par4, par5);
|
||||
+ if (!ForgeHooksClient.renderInventoryItem(this.field_147909_c, par2TextureManager, par3ItemStack, renderWithColor, zLevel, (float)par4, (float)par5))
|
||||
- this.func_77015_a(p_82406_1_, p_82406_2_, p_82406_3_, p_82406_4_, p_82406_5_);
|
||||
+ if (!ForgeHooksClient.renderInventoryItem(this.field_147909_c, p_82406_2_, p_82406_3_, field_77024_a, field_77023_b, (float)p_82406_4_, (float)p_82406_5_))
|
||||
+ {
|
||||
+ this.renderItemIntoGUI(par1FontRenderer, par2TextureManager, par3ItemStack, par4, par5, true);
|
||||
+ this.renderItemIntoGUI(p_82406_1_, p_82406_2_, p_82406_3_, p_82406_4_, p_82406_5_, true);
|
||||
+ }
|
||||
}
|
||||
catch (Throwable throwable)
|
||||
{
|
||||
@@ -525,6 +587,7 @@
|
||||
@@ -518,7 +578,8 @@
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
|
||||
+ /* Forge: Bugfix, Move this to a per-render pass, modders must handle themselves
|
||||
if (par3ItemStack.hasEffect())
|
||||
- if (p_82406_3_.func_77962_s())
|
||||
+ // Forge: Bugfix, Move this to a per-render pass, modders must handle themselves
|
||||
+ if (false && p_82406_3_.func_77962_s())
|
||||
{
|
||||
GL11.glDepthFunc(GL11.GL_EQUAL);
|
||||
@@ -540,11 +603,29 @@
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDepthFunc(GL11.GL_LEQUAL);
|
||||
}
|
||||
+ */
|
||||
|
||||
this.zLevel -= 50.0F;
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
@@ -538,6 +599,23 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -234,11 +228,11 @@
|
|||
+ GL11.glDepthFunc(GL11.GL_EQUAL);
|
||||
+ GL11.glDisable(GL11.GL_LIGHTING);
|
||||
+ GL11.glDepthMask(false);
|
||||
+ manager.bindTexture(RES_ITEM_GLINT);
|
||||
+ manager.func_110577_a(field_110798_h);
|
||||
+ GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
+ GL11.glEnable(GL11.GL_BLEND);
|
||||
+ GL11.glColor4f(0.5F, 0.25F, 0.8F, 1.0F);
|
||||
+ this.renderGlint(x * 431278612 + y * 32178161, x - 2, y - 2, 20, 20);
|
||||
+ this.func_77018_a(x * 431278612 + y * 32178161, x - 2, y - 2, 20, 20);
|
||||
+ GL11.glDepthMask(true);
|
||||
+ GL11.glDisable(GL11.GL_BLEND);
|
||||
+ GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
|
@ -246,12 +240,12 @@
|
|||
+ GL11.glDepthFunc(GL11.GL_LEQUAL);
|
||||
+ }
|
||||
+
|
||||
private void renderGlint(int par1, int par2, int par3, int par4, int par5)
|
||||
private void func_77018_a(int p_77018_1_, int p_77018_2_, int p_77018_3_, int p_77018_4_, int p_77018_5_)
|
||||
{
|
||||
for (int j1 = 0; j1 < 2; ++j1)
|
||||
@@ -649,4 +730,42 @@
|
||||
@@ -638,4 +716,42 @@
|
||||
{
|
||||
this.doRender((EntityItem)par1Entity, par2, par4, par6, par8, par9);
|
||||
this.func_76986_a((EntityItem)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
|
||||
}
|
||||
+
|
||||
+ /*==================================== FORGE START ===========================================*/
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
|
||||
@@ -219,11 +219,13 @@
|
||||
if (p_147938_4_.isPlayerSleeping())
|
||||
@@ -212,11 +212,13 @@
|
||||
if (p_147938_4_.func_70608_bn())
|
||||
{
|
||||
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);
|
||||
Block block = p_147938_1_.func_147439_a(MathHelper.func_76128_c(p_147938_4_.field_70165_t), MathHelper.func_76128_c(p_147938_4_.field_70163_u), MathHelper.func_76128_c(p_147938_4_.field_70161_v));
|
||||
+ int x = MathHelper.func_76128_c(p_147938_4_.field_70165_t);
|
||||
+ int y = MathHelper.func_76128_c(p_147938_4_.field_70163_u);
|
||||
+ int z = MathHelper.func_76128_c(p_147938_4_.field_70161_v);
|
||||
|
||||
- if (block == Blocks.bed)
|
||||
- if (block == Blocks.field_150324_C)
|
||||
+ if (block.isBed(p_147938_1_, x, y, z, p_147938_4_))
|
||||
{
|
||||
- int i = p_147938_1_.getBlockMetadata(MathHelper.floor_double(p_147938_4_.posX), MathHelper.floor_double(p_147938_4_.posY), MathHelper.floor_double(p_147938_4_.posZ));
|
||||
- int i = p_147938_1_.func_72805_g(MathHelper.func_76128_c(p_147938_4_.field_70165_t), MathHelper.func_76128_c(p_147938_4_.field_70163_u), MathHelper.func_76128_c(p_147938_4_.field_70161_v));
|
||||
- int j = i & 3;
|
||||
+ int j = block.getBedDirection(p_147938_1_, x, y, z);
|
||||
this.playerViewY = (float)(j * 90 + 180);
|
||||
this.playerViewX = 0.0F;
|
||||
this.field_78735_i = (float)(j * 90 + 180);
|
||||
this.field_78732_j = 0.0F;
|
||||
}
|
||||
|
|
|
@ -23,11 +23,11 @@
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderPlayer extends RendererLivingEntity
|
||||
@@ -46,6 +55,13 @@
|
||||
@@ -45,6 +54,13 @@
|
||||
{
|
||||
ItemStack itemstack = par1AbstractClientPlayer.inventory.armorItemInSlot(3 - par2);
|
||||
ItemStack itemstack = p_77107_1_.field_71071_by.func_70440_f(3 - p_77107_2_);
|
||||
|
||||
+ RenderPlayerEvent.SetArmorModel event = new RenderPlayerEvent.SetArmorModel(par1AbstractClientPlayer, this, 3 - par2, par3, itemstack);
|
||||
+ RenderPlayerEvent.SetArmorModel event = new RenderPlayerEvent.SetArmorModel(p_77107_1_, this, 3 - p_77107_2_, p_77107_3_, itemstack);
|
||||
+ MinecraftForge.EVENT_BUS.post(event);
|
||||
+ if (event.result != -1)
|
||||
+ {
|
||||
|
@ -36,135 +36,135 @@
|
|||
+
|
||||
if (itemstack != null)
|
||||
{
|
||||
Item item = itemstack.getItem();
|
||||
@@ -53,7 +69,7 @@
|
||||
Item item = itemstack.func_77973_b();
|
||||
@@ -52,7 +68,7 @@
|
||||
if (item instanceof ItemArmor)
|
||||
{
|
||||
ItemArmor itemarmor = (ItemArmor)item;
|
||||
- this.bindTexture(RenderBiped.func_110857_a(itemarmor, par2));
|
||||
+ this.bindTexture(RenderBiped.getArmorResource(par1AbstractClientPlayer, itemstack, par2, null));
|
||||
ModelBiped modelbiped = par2 == 2 ? this.modelArmor : this.modelArmorChestplate;
|
||||
modelbiped.bipedHead.showModel = par2 == 0;
|
||||
modelbiped.bipedHeadwear.showModel = par2 == 0;
|
||||
@@ -62,14 +78,16 @@
|
||||
modelbiped.bipedLeftArm.showModel = par2 == 1;
|
||||
modelbiped.bipedRightLeg.showModel = par2 == 2 || par2 == 3;
|
||||
modelbiped.bipedLeftLeg.showModel = par2 == 2 || par2 == 3;
|
||||
+ modelbiped = ForgeHooksClient.getArmorModel(par1AbstractClientPlayer, itemstack, par2, modelbiped);
|
||||
this.setRenderPassModel(modelbiped);
|
||||
modelbiped.onGround = this.mainModel.onGround;
|
||||
modelbiped.isRiding = this.mainModel.isRiding;
|
||||
modelbiped.isChild = this.mainModel.isChild;
|
||||
- this.func_110776_a(RenderBiped.func_110857_a(itemarmor, p_77107_2_));
|
||||
+ this.func_110776_a(RenderBiped.getArmorResource(p_77107_1_, itemstack, p_77107_2_, null));
|
||||
ModelBiped modelbiped = p_77107_2_ == 2 ? this.field_77111_i : this.field_77108_b;
|
||||
modelbiped.field_78116_c.field_78806_j = p_77107_2_ == 0;
|
||||
modelbiped.field_78114_d.field_78806_j = p_77107_2_ == 0;
|
||||
@@ -61,14 +77,16 @@
|
||||
modelbiped.field_78113_g.field_78806_j = p_77107_2_ == 1;
|
||||
modelbiped.field_78123_h.field_78806_j = p_77107_2_ == 2 || p_77107_2_ == 3;
|
||||
modelbiped.field_78124_i.field_78806_j = p_77107_2_ == 2 || p_77107_2_ == 3;
|
||||
+ modelbiped = ForgeHooksClient.getArmorModel(p_77107_1_, itemstack, p_77107_2_, modelbiped);
|
||||
this.func_77042_a(modelbiped);
|
||||
modelbiped.field_78095_p = this.field_77045_g.field_78095_p;
|
||||
modelbiped.field_78093_q = this.field_77045_g.field_78093_q;
|
||||
modelbiped.field_78091_s = this.field_77045_g.field_78091_s;
|
||||
|
||||
- if (itemarmor.getArmorMaterial() == ItemArmor.ArmorMaterial.CLOTH)
|
||||
- if (itemarmor.func_82812_d() == ItemArmor.ArmorMaterial.CLOTH)
|
||||
+ //Move outside if to allow for more then just CLOTH
|
||||
+ int j = itemarmor.getColor(itemstack);
|
||||
+ int j = itemarmor.func_82814_b(itemstack);
|
||||
+ if (j != -1)
|
||||
{
|
||||
- int j = itemarmor.getColor(itemstack);
|
||||
- int j = itemarmor.func_82814_b(itemstack);
|
||||
float f1 = (float)(j >> 16 & 255) / 255.0F;
|
||||
float f2 = (float)(j >> 8 & 255) / 255.0F;
|
||||
float f3 = (float)(j & 255) / 255.0F;
|
||||
@@ -107,7 +125,7 @@
|
||||
@@ -106,7 +124,7 @@
|
||||
|
||||
if (item instanceof ItemArmor)
|
||||
{
|
||||
- this.bindTexture(RenderBiped.func_110858_a((ItemArmor)item, par2, "overlay"));
|
||||
+ this.bindTexture(RenderBiped.getArmorResource(par1AbstractClientPlayer, itemstack, par2, "overlay"));
|
||||
- this.func_110776_a(RenderBiped.func_110858_a((ItemArmor)item, p_130220_2_, "overlay"));
|
||||
+ this.func_110776_a(RenderBiped.getArmorResource(p_130220_1_, itemstack, p_130220_2_, "overlay"));
|
||||
GL11.glColor3f(1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
@@ -116,6 +134,7 @@
|
||||
// JAVADOC METHOD $$ func_76986_a
|
||||
public void doRender(AbstractClientPlayer par1AbstractClientPlayer, double par2, double par4, double par6, float par8, float par9)
|
||||
@@ -114,6 +132,7 @@
|
||||
|
||||
public void func_76986_a(AbstractClientPlayer p_130009_1_, double p_130009_2_, double p_130009_4_, double p_130009_6_, float p_130009_8_, float p_130009_9_)
|
||||
{
|
||||
+ if (MinecraftForge.EVENT_BUS.post(new RenderPlayerEvent.Pre(par1AbstractClientPlayer, this, par9))) return;
|
||||
+ if (MinecraftForge.EVENT_BUS.post(new RenderPlayerEvent.Pre(p_130009_1_, this, p_130009_9_))) return;
|
||||
GL11.glColor3f(1.0F, 1.0F, 1.0F);
|
||||
ItemStack itemstack = par1AbstractClientPlayer.inventory.getCurrentItem();
|
||||
this.modelArmorChestplate.heldItemRight = this.modelArmor.heldItemRight = this.modelBipedMain.heldItemRight = itemstack != null ? 1 : 0;
|
||||
@@ -146,6 +165,7 @@
|
||||
this.modelArmorChestplate.aimedBow = this.modelArmor.aimedBow = this.modelBipedMain.aimedBow = false;
|
||||
this.modelArmorChestplate.isSneak = this.modelArmor.isSneak = this.modelBipedMain.isSneak = false;
|
||||
this.modelArmorChestplate.heldItemRight = this.modelArmor.heldItemRight = this.modelBipedMain.heldItemRight = 0;
|
||||
+ MinecraftForge.EVENT_BUS.post(new RenderPlayerEvent.Post(par1AbstractClientPlayer, this, par9));
|
||||
ItemStack itemstack = p_130009_1_.field_71071_by.func_70448_g();
|
||||
this.field_77108_b.field_78120_m = this.field_77111_i.field_78120_m = this.field_77109_a.field_78120_m = itemstack != null ? 1 : 0;
|
||||
@@ -144,6 +163,7 @@
|
||||
this.field_77108_b.field_78118_o = this.field_77111_i.field_78118_o = this.field_77109_a.field_78118_o = false;
|
||||
this.field_77108_b.field_78117_n = this.field_77111_i.field_78117_n = this.field_77109_a.field_78117_n = false;
|
||||
this.field_77108_b.field_78120_m = this.field_77111_i.field_78120_m = this.field_77109_a.field_78120_m = 0;
|
||||
+ MinecraftForge.EVENT_BUS.post(new RenderPlayerEvent.Post(p_130009_1_, this, p_130009_9_));
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_110775_a
|
||||
@@ -156,12 +176,18 @@
|
||||
protected ResourceLocation func_110775_a(AbstractClientPlayer p_110817_1_)
|
||||
@@ -153,12 +173,18 @@
|
||||
|
||||
protected void renderEquippedItems(AbstractClientPlayer par1AbstractClientPlayer, float par2)
|
||||
protected void func_77029_c(AbstractClientPlayer p_77100_1_, float p_77100_2_)
|
||||
{
|
||||
+ RenderPlayerEvent.Specials.Pre event = new RenderPlayerEvent.Specials.Pre(par1AbstractClientPlayer, this, par2);
|
||||
+ RenderPlayerEvent.Specials.Pre event = new RenderPlayerEvent.Specials.Pre(p_77100_1_, this, p_77100_2_);
|
||||
+ if (MinecraftForge.EVENT_BUS.post(event))
|
||||
+ {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
GL11.glColor3f(1.0F, 1.0F, 1.0F);
|
||||
super.renderEquippedItems(par1AbstractClientPlayer, par2);
|
||||
super.renderArrowsStuckInEntity(par1AbstractClientPlayer, par2);
|
||||
ItemStack itemstack = par1AbstractClientPlayer.inventory.armorItemInSlot(3);
|
||||
super.func_77029_c(p_77100_1_, p_77100_2_);
|
||||
super.func_85093_e(p_77100_1_, p_77100_2_);
|
||||
ItemStack itemstack = p_77100_1_.field_71071_by.func_70440_f(3);
|
||||
|
||||
- if (itemstack != null)
|
||||
+ if (itemstack != null && event.renderHelmet)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
this.modelBipedMain.bipedHead.postRender(0.0625F);
|
||||
@@ -169,7 +195,10 @@
|
||||
this.field_77109_a.field_78116_c.func_78794_c(0.0625F);
|
||||
@@ -166,7 +192,10 @@
|
||||
|
||||
if (itemstack.getItem() instanceof ItemBlock)
|
||||
if (itemstack.func_77973_b() instanceof ItemBlock)
|
||||
{
|
||||
- if (RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemstack.getItem()).getRenderType()))
|
||||
- if (RenderBlocks.func_147739_a(Block.func_149634_a(itemstack.func_77973_b()).func_149645_b()))
|
||||
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack, EQUIPPED);
|
||||
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack, BLOCK_3D));
|
||||
+
|
||||
+ if (is3D || RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemstack.getItem()).getRenderType()))
|
||||
+ if (is3D || RenderBlocks.func_147739_a(Block.func_149634_a(itemstack.func_77973_b()).func_149645_b()))
|
||||
{
|
||||
f1 = 0.625F;
|
||||
GL11.glTranslatef(0.0F, -0.25F, 0.0F);
|
||||
@@ -221,6 +250,7 @@
|
||||
@@ -218,6 +247,7 @@
|
||||
}
|
||||
|
||||
boolean flag = par1AbstractClientPlayer.getTextureCape().isTextureUploaded();
|
||||
boolean flag = p_77100_1_.func_110310_o().func_110557_a();
|
||||
+ flag = event.renderCape && flag;
|
||||
float f5;
|
||||
|
||||
if (flag && !par1AbstractClientPlayer.isInvisible() && !par1AbstractClientPlayer.getHideCape())
|
||||
@@ -272,7 +302,7 @@
|
||||
if (flag && !p_77100_1_.func_82150_aj() && !p_77100_1_.func_82238_cc())
|
||||
@@ -269,7 +299,7 @@
|
||||
|
||||
ItemStack itemstack1 = par1AbstractClientPlayer.inventory.getCurrentItem();
|
||||
ItemStack itemstack1 = p_77100_1_.field_71071_by.func_70448_g();
|
||||
|
||||
- if (itemstack1 != null)
|
||||
+ if (itemstack1 != null && event.renderItem)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
this.modelBipedMain.bipedRightArm.postRender(0.0625F);
|
||||
@@ -290,7 +320,10 @@
|
||||
enumaction = itemstack1.getItemUseAction();
|
||||
this.field_77109_a.field_78112_f.func_78794_c(0.0625F);
|
||||
@@ -287,7 +317,10 @@
|
||||
enumaction = itemstack1.func_77975_n();
|
||||
}
|
||||
|
||||
- if (itemstack1.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemstack1.getItem()).getRenderType()))
|
||||
- if (itemstack1.func_77973_b() instanceof ItemBlock && RenderBlocks.func_147739_a(Block.func_149634_a(itemstack1.func_77973_b()).func_149645_b()))
|
||||
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack1, EQUIPPED);
|
||||
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack1, BLOCK_3D));
|
||||
+
|
||||
+ if (is3D || itemstack1.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemstack1.getItem()).getRenderType()))
|
||||
+ if (is3D || itemstack1.func_77973_b() instanceof ItemBlock && RenderBlocks.func_147739_a(Block.func_149634_a(itemstack1.func_77973_b()).func_149645_b()))
|
||||
{
|
||||
f3 = 0.5F;
|
||||
GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
|
||||
@@ -347,7 +380,7 @@
|
||||
@@ -344,7 +377,7 @@
|
||||
|
||||
if (itemstack1.getItem().requiresMultipleRenderPasses())
|
||||
if (itemstack1.func_77973_b().func_77623_v())
|
||||
{
|
||||
- for (k = 0; k <= 1; ++k)
|
||||
+ for (k = 0; k <= itemstack1.getItem().getRenderPasses(itemstack1.getItemDamage()); ++k)
|
||||
+ for (k = 0; k <= itemstack1.func_77973_b().getRenderPasses(itemstack1.func_77960_j()); ++k)
|
||||
{
|
||||
int i = itemstack1.getItem().getColorFromItemStack(itemstack1, k);
|
||||
int i = itemstack1.func_77973_b().func_82790_a(itemstack1, k);
|
||||
f12 = (float)(i >> 16 & 255) / 255.0F;
|
||||
@@ -369,6 +402,7 @@
|
||||
@@ -366,6 +399,7 @@
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
+ MinecraftForge.EVENT_BUS.post(new RenderPlayerEvent.Specials.Post(par1AbstractClientPlayer, this, par2));
|
||||
+ MinecraftForge.EVENT_BUS.post(new RenderPlayerEvent.Specials.Post(p_77100_1_, this, p_77100_2_));
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_77041_b
|
||||
protected void func_77041_b(AbstractClientPlayer p_77104_1_, float p_77104_2_)
|
||||
|
|
|
@ -11,15 +11,15 @@
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderSnowMan extends RenderLiving
|
||||
@@ -39,7 +43,10 @@
|
||||
@@ -38,7 +42,10 @@
|
||||
GL11.glPushMatrix();
|
||||
this.snowmanModel.head.postRender(0.0625F);
|
||||
this.field_77094_a.field_78195_c.func_78794_c(0.0625F);
|
||||
|
||||
- if (RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemstack.getItem()).getRenderType()))
|
||||
- if (RenderBlocks.func_147739_a(Block.func_149634_a(itemstack.func_77973_b()).func_149645_b()))
|
||||
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack, EQUIPPED);
|
||||
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack, BLOCK_3D));
|
||||
+
|
||||
+ if (is3D || RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemstack.getItem()).getRenderType()))
|
||||
+ if (is3D || RenderBlocks.func_147739_a(Block.func_149634_a(itemstack.func_77973_b()).func_149645_b()))
|
||||
{
|
||||
float f1 = 0.625F;
|
||||
GL11.glTranslatef(0.0F, -0.34375F, 0.0F);
|
||||
|
|
|
@ -10,54 +10,54 @@
|
|||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
@@ -33,6 +36,9 @@
|
||||
protected ModelBase renderPassModel;
|
||||
@@ -32,6 +35,9 @@
|
||||
protected ModelBase field_77046_h;
|
||||
private static final String __OBFID = "CL_00001012";
|
||||
|
||||
+ public static float NAME_TAG_RANGE = 64.0f;
|
||||
+ public static float NAME_TAG_RANGE_SNEAK = 32.0f;
|
||||
+
|
||||
public RendererLivingEntity(ModelBase par1ModelBase, float par2)
|
||||
public RendererLivingEntity(ModelBase p_i1261_1_, float p_i1261_2_)
|
||||
{
|
||||
this.mainModel = par1ModelBase;
|
||||
@@ -66,6 +72,7 @@
|
||||
// JAVADOC METHOD $$ func_76986_a
|
||||
public void doRender(EntityLivingBase par1EntityLivingBase, double par2, double par4, double par6, float par8, float par9)
|
||||
this.field_77045_g = p_i1261_1_;
|
||||
@@ -62,6 +68,7 @@
|
||||
|
||||
public void func_76986_a(EntityLivingBase p_130000_1_, double p_130000_2_, double p_130000_4_, double p_130000_6_, float p_130000_8_, float p_130000_9_)
|
||||
{
|
||||
+ if (MinecraftForge.EVENT_BUS.post(new RenderLivingEvent.Pre(par1EntityLivingBase, this, par2, par4, par6))) return;
|
||||
+ if (MinecraftForge.EVENT_BUS.post(new RenderLivingEvent.Pre(p_130000_1_, this, p_130000_2_, p_130000_4_, p_130000_6_))) return;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
this.mainModel.onGround = this.renderSwingProgress(par1EntityLivingBase, par9);
|
||||
@@ -275,6 +282,7 @@
|
||||
this.field_77045_g.field_78095_p = this.func_77040_d(p_130000_1_, p_130000_9_);
|
||||
@@ -271,6 +278,7 @@
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glPopMatrix();
|
||||
this.passSpecialRender(par1EntityLivingBase, par2, par4, par6);
|
||||
+ MinecraftForge.EVENT_BUS.post(new RenderLivingEvent.Post(par1EntityLivingBase, this, par2, par4, par6));
|
||||
this.func_77033_b(p_130000_1_, p_130000_2_, p_130000_4_, p_130000_6_);
|
||||
+ MinecraftForge.EVENT_BUS.post(new RenderLivingEvent.Post(p_130000_1_, this, p_130000_2_, p_130000_4_, p_130000_6_));
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_77036_a
|
||||
@@ -428,6 +436,7 @@
|
||||
// JAVADOC METHOD $$ func_77033_b
|
||||
protected void passSpecialRender(EntityLivingBase par1EntityLivingBase, double par2, double par4, double par6)
|
||||
protected void func_77036_a(EntityLivingBase p_77036_1_, float p_77036_2_, float p_77036_3_, float p_77036_4_, float p_77036_5_, float p_77036_6_, float p_77036_7_)
|
||||
@@ -416,6 +424,7 @@
|
||||
|
||||
protected void func_77033_b(EntityLivingBase p_77033_1_, double p_77033_2_, double p_77033_4_, double p_77033_6_)
|
||||
{
|
||||
+ if (MinecraftForge.EVENT_BUS.post(new RenderLivingEvent.Specials.Pre(par1EntityLivingBase, this, par2, par4, par6))) return;
|
||||
+ if (MinecraftForge.EVENT_BUS.post(new RenderLivingEvent.Specials.Pre(p_77033_1_, this, p_77033_2_, p_77033_4_, p_77033_6_))) return;
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
|
||||
|
||||
if (this.func_110813_b(par1EntityLivingBase))
|
||||
@@ -435,7 +444,7 @@
|
||||
if (this.func_110813_b(p_77033_1_))
|
||||
@@ -423,7 +432,7 @@
|
||||
float f = 1.6F;
|
||||
float f1 = 0.016666668F * f;
|
||||
double d3 = par1EntityLivingBase.getDistanceSqToEntity(this.renderManager.livingPlayer);
|
||||
- float f2 = par1EntityLivingBase.isSneaking() ? 32.0F : 64.0F;
|
||||
+ float f2 = par1EntityLivingBase.isSneaking() ? NAME_TAG_RANGE_SNEAK : NAME_TAG_RANGE;
|
||||
double d3 = p_77033_1_.func_70068_e(this.field_76990_c.field_78734_h);
|
||||
- float f2 = p_77033_1_.func_70093_af() ? 32.0F : 64.0F;
|
||||
+ float f2 = p_77033_1_.func_70093_af() ? NAME_TAG_RANGE_SNEAK : NAME_TAG_RANGE;
|
||||
|
||||
if (d3 < (double)(f2 * f2))
|
||||
{
|
||||
@@ -479,6 +488,7 @@
|
||||
@@ -467,6 +476,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
+ MinecraftForge.EVENT_BUS.post(new RenderLivingEvent.Specials.Post(par1EntityLivingBase, this, par2, par4, par6));
|
||||
+ MinecraftForge.EVENT_BUS.post(new RenderLivingEvent.Specials.Post(p_77033_1_, this, p_77033_2_, p_77033_4_, p_77033_6_));
|
||||
}
|
||||
|
||||
protected boolean func_110813_b(EntityLivingBase par1EntityLivingBase)
|
||||
protected boolean func_110813_b(EntityLivingBase p_110813_1_)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/renderer/texture/Stitcher.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/texture/Stitcher.java
|
||||
@@ -164,7 +164,7 @@
|
||||
@@ -161,7 +161,7 @@
|
||||
|
||||
if (flag4 ^ flag5)
|
||||
{
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class TextureAtlasSprite implements IIcon
|
||||
@@ -437,4 +439,28 @@
|
||||
@@ -427,4 +429,28 @@
|
||||
{
|
||||
return "TextureAtlasSprite{name=\'" + this.iconName + '\'' + ", frameCount=" + this.framesTextureData.size() + ", rotated=" + this.rotated + ", x=" + this.originX + ", y=" + this.originY + ", height=" + this.height + ", width=" + this.width + ", u0=" + this.minU + ", u1=" + this.maxU + ", v0=" + this.minV + ", v1=" + this.maxV + '}';
|
||||
return "TextureAtlasSprite{name=\'" + this.field_110984_i + '\'' + ", frameCount=" + this.field_110976_a.size() + ", rotated=" + this.field_130222_e + ", x=" + this.field_110975_c + ", y=" + this.field_110974_d + ", height=" + this.field_130224_d + ", width=" + this.field_130223_c + ", u0=" + this.field_110979_l + ", u1=" + this.field_110980_m + ", v0=" + this.field_110977_n + ", v1=" + this.field_110978_o + '}';
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
|
|
|
@ -8,58 +8,58 @@
|
|||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -92,11 +93,14 @@
|
||||
@@ -91,11 +92,14 @@
|
||||
|
||||
public void loadTextureAtlas(IResourceManager par1ResourceManager)
|
||||
public void func_110571_b(IResourceManager p_110571_1_)
|
||||
{
|
||||
+ registerIcons(); //Re-gather list of Icons, allows for addition/removal of blocks/items after this map was initially constructed.
|
||||
+ func_110573_f(); //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.mipmapLevels);
|
||||
this.mapUploadedSprites.clear();
|
||||
this.listAnimatedSprites.clear();
|
||||
int i = Minecraft.func_71369_N();
|
||||
Stitcher stitcher = new Stitcher(i, i, true, 0, this.field_147636_j);
|
||||
this.field_94252_e.clear();
|
||||
this.field_94258_i.clear();
|
||||
int j = Integer.MAX_VALUE;
|
||||
+ ForgeHooksClient.onTextureStitchedPre(this);
|
||||
Iterator iterator = this.mapRegisteredSprites.entrySet().iterator();
|
||||
Iterator iterator = this.field_110574_e.entrySet().iterator();
|
||||
TextureAtlasSprite textureatlassprite;
|
||||
|
||||
@@ -107,6 +111,16 @@
|
||||
@@ -106,6 +110,16 @@
|
||||
textureatlassprite = (TextureAtlasSprite)entry.getValue();
|
||||
ResourceLocation resourcelocation1 = this.completeResourceLocation(resourcelocation, 0);
|
||||
ResourceLocation resourcelocation1 = this.func_147634_a(resourcelocation, 0);
|
||||
|
||||
+ if (textureatlassprite.hasCustomLoader(par1ResourceManager, resourcelocation))
|
||||
+ if (textureatlassprite.hasCustomLoader(p_110571_1_, resourcelocation))
|
||||
+ {
|
||||
+ if (!textureatlassprite.load(par1ResourceManager, resourcelocation))
|
||||
+ if (!textureatlassprite.load(p_110571_1_, resourcelocation))
|
||||
+ {
|
||||
+ j = Math.min(j, Math.min(textureatlassprite.getIconWidth(), textureatlassprite.getIconHeight()));
|
||||
+ stitcher.addSprite(textureatlassprite);
|
||||
+ j = Math.min(j, Math.min(textureatlassprite.func_94211_a(), textureatlassprite.func_94216_b()));
|
||||
+ stitcher.func_110934_a(textureatlassprite);
|
||||
+ }
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
try
|
||||
{
|
||||
IResource iresource = par1ResourceManager.getResource(resourcelocation1);
|
||||
@@ -275,6 +289,7 @@
|
||||
IResource iresource = p_110571_1_.func_110536_a(resourcelocation1);
|
||||
@@ -274,6 +288,7 @@
|
||||
textureatlassprite = (TextureAtlasSprite)iterator2.next();
|
||||
textureatlassprite.copyFrom(this.missingImage);
|
||||
textureatlassprite.func_94217_a(this.field_94249_f);
|
||||
}
|
||||
+ ForgeHooksClient.onTextureStitchedPost(this);
|
||||
}
|
||||
|
||||
private ResourceLocation completeResourceLocation(ResourceLocation p_147634_1_, int p_147634_2_)
|
||||
@@ -348,7 +363,7 @@
|
||||
private ResourceLocation func_147634_a(ResourceLocation p_147634_1_, int p_147634_2_)
|
||||
@@ -347,7 +362,7 @@
|
||||
{
|
||||
throw new IllegalArgumentException("Name cannot be null!");
|
||||
}
|
||||
- else if (par1Str.indexOf(47) == -1 && par1Str.indexOf(92) == -1)
|
||||
+ else if (par1Str.indexOf(92) == -1) // Disable backslashes (\) in texture asset paths.
|
||||
- else if (p_94245_1_.indexOf(47) == -1 && p_94245_1_.indexOf(92) == -1)
|
||||
+ else if (p_94245_1_.indexOf(92) == -1) // Disable backslashes (\) in texture asset paths.
|
||||
{
|
||||
Object object = (TextureAtlasSprite)this.mapRegisteredSprites.get(par1Str);
|
||||
Object object = (TextureAtlasSprite)this.field_110574_e.get(p_94245_1_);
|
||||
|
||||
@@ -404,4 +419,37 @@
|
||||
@@ -403,4 +418,37 @@
|
||||
{
|
||||
this.anisotropicFiltering = p_147632_1_;
|
||||
this.field_147637_k = p_147632_1_;
|
||||
}
|
||||
+
|
||||
+ //===================================================================================================
|
||||
|
@ -74,7 +74,7 @@
|
|||
+ */
|
||||
+ public TextureAtlasSprite getTextureExtry(String name)
|
||||
+ {
|
||||
+ return (TextureAtlasSprite)mapRegisteredSprites.get(name);
|
||||
+ return (TextureAtlasSprite)field_110574_e.get(name);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -87,9 +87,9 @@
|
|||
+ */
|
||||
+ public boolean setTextureEntry(String name, TextureAtlasSprite entry)
|
||||
+ {
|
||||
+ if (!mapRegisteredSprites.containsKey(name))
|
||||
+ if (!field_110574_e.containsKey(name))
|
||||
+ {
|
||||
+ mapRegisteredSprites.put(name, entry);
|
||||
+ field_110574_e.put(name, entry);
|
||||
+ return true;
|
||||
+ }
|
||||
+ return false;
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
{
|
||||
+ try
|
||||
+ {
|
||||
((BlockChest)block).func_149954_e(p_147502_1_.getWorldObj(), p_147502_1_.xCoord, p_147502_1_.yCoord, p_147502_1_.zCoord);
|
||||
((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);
|
||||
+ }
|
||||
+ catch (ClassCastException 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);
|
||||
+ 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);
|
||||
+ }
|
||||
i = p_147502_1_.getBlockMetadata();
|
||||
i = p_147502_1_.func_145832_p();
|
||||
}
|
||||
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -118,8 +119,8 @@
|
||||
if (this.useDepth)
|
||||
if (this.field_147619_e)
|
||||
{
|
||||
EXTFramebufferObject.glBindRenderbufferEXT(36161, this.depthBuffer);
|
||||
- EXTFramebufferObject.glRenderbufferStorageEXT(36161, 33190, this.framebufferTextureWidth, this.framebufferTextureHeight);
|
||||
- EXTFramebufferObject.glFramebufferRenderbufferEXT(36160, 36096, 36161, this.depthBuffer);
|
||||
+ EXTFramebufferObject.glRenderbufferStorageEXT(36161, MinecraftForgeClient.getStencilBits() > 0 ? 35056 /* ARBFramebufferObject.GL_DEPTH24_STENCIL8 */ : 33190, this.framebufferTextureWidth, this.framebufferTextureHeight);
|
||||
+ EXTFramebufferObject.glFramebufferRenderbufferEXT(36160, MinecraftForgeClient.getStencilBits() > 0 ? 33306 /* ARBFramebufferObject.GL_DEPTH_STENCIL_ATTACHMENT */ : 36096, 36161, this.depthBuffer);
|
||||
EXTFramebufferObject.glBindRenderbufferEXT(36161, this.field_147624_h);
|
||||
- EXTFramebufferObject.glRenderbufferStorageEXT(36161, 33190, this.field_147622_a, this.field_147620_b);
|
||||
- EXTFramebufferObject.glFramebufferRenderbufferEXT(36160, 36096, 36161, this.field_147624_h);
|
||||
+ EXTFramebufferObject.glRenderbufferStorageEXT(36161, MinecraftForgeClient.getStencilBits() > 0 ? 35056 /* ARBFramebufferObject.GL_DEPTH24_STENCIL8 */ : 33190, this.field_147622_a, this.field_147620_b);
|
||||
+ EXTFramebufferObject.glFramebufferRenderbufferEXT(36160, MinecraftForgeClient.getStencilBits() > 0 ? 33306 /* ARBFramebufferObject.GL_DEPTH_STENCIL_ATTACHMENT */ : 36096, 36161, this.field_147624_h);
|
||||
}
|
||||
|
||||
this.framebufferClear();
|
||||
this.func_147614_f();
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
+
|
||||
public class CommandHandler implements ICommandManager
|
||||
{
|
||||
private static final Logger logger = LogManager.getLogger();
|
||||
@@ -49,6 +52,16 @@
|
||||
private static final Logger field_147175_a = LogManager.getLogger();
|
||||
@@ -47,6 +50,16 @@
|
||||
|
||||
if (icommand.canCommandSenderUseCommand(par1ICommandSender))
|
||||
if (icommand.func_71519_b(p_71556_1_))
|
||||
{
|
||||
+ CommandEvent event = new CommandEvent(icommand, par1ICommandSender, astring);
|
||||
+ CommandEvent event = new CommandEvent(icommand, p_71556_1_, astring);
|
||||
+ if (MinecraftForge.EVENT_BUS.post(event))
|
||||
+ {
|
||||
+ if (event.exception != null)
|
||||
|
@ -26,4 +26,4 @@
|
|||
+
|
||||
if (i > -1)
|
||||
{
|
||||
EntityPlayerMP[] aentityplayermp = PlayerSelector.matchPlayers(par1ICommandSender, astring[i]);
|
||||
EntityPlayerMP[] aentityplayermp = PlayerSelector.func_82380_c(p_71556_1_, astring[i]);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src-base/minecraft/net/minecraft/crash/CrashReport.java
|
||||
+++ ../src-work/minecraft/net/minecraft/crash/CrashReport.java
|
||||
@@ -330,7 +330,8 @@
|
||||
@@ -315,7 +315,8 @@
|
||||
StackTraceElement stacktraceelement = null;
|
||||
StackTraceElement stacktraceelement1 = null;
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
--- ../src-base/minecraft/net/minecraft/crash/CrashReportCategory.java
|
||||
+++ ../src-work/minecraft/net/minecraft/crash/CrashReportCategory.java
|
||||
@@ -132,8 +132,11 @@
|
||||
@@ -127,8 +127,11 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- this.stackTrace = new StackTraceElement[astacktraceelement.length - 3 - par1];
|
||||
- System.arraycopy(astacktraceelement, 3 + par1, this.stackTrace, 0, this.stackTrace.length);
|
||||
+ int len = astacktraceelement.length - 3 - par1;
|
||||
- this.field_85075_d = new StackTraceElement[astacktraceelement.length - 3 - p_85073_1_];
|
||||
- System.arraycopy(astacktraceelement, 3 + p_85073_1_, this.field_85075_d, 0, this.field_85075_d.length);
|
||||
+ int len = astacktraceelement.length - 3 - p_85073_1_;
|
||||
+ // Really Mojang, Still, god damn...
|
||||
+ if (len <= 0) len = astacktraceelement.length;
|
||||
+ this.stackTrace = new StackTraceElement[len];
|
||||
+ System.arraycopy(astacktraceelement, astacktraceelement.length - len, this.stackTrace, 0, this.stackTrace.length);
|
||||
return this.stackTrace.length;
|
||||
+ this.field_85075_d = new StackTraceElement[len];
|
||||
+ System.arraycopy(astacktraceelement, astacktraceelement.length - len, this.field_85075_d, 0, this.field_85075_d.length);
|
||||
return this.field_85075_d.length;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src-base/minecraft/net/minecraft/creativetab/CreativeTabs.java
|
||||
+++ ../src-work/minecraft/net/minecraft/creativetab/CreativeTabs.java
|
||||
@@ -140,8 +140,22 @@
|
||||
@@ -138,8 +138,22 @@
|
||||
private ItemStack field_151245_t;
|
||||
private static final String __OBFID = "CL_00000005";
|
||||
|
||||
|
@ -9,50 +9,49 @@
|
|||
+ this(getNextID(), lable);
|
||||
+ }
|
||||
+
|
||||
public CreativeTabs(int par1, String par2Str)
|
||||
public CreativeTabs(int p_i1853_1_, String p_i1853_2_)
|
||||
{
|
||||
+ if (par1 >= creativeTabArray.length)
|
||||
+ if (p_i1853_1_ >= field_78032_a.length)
|
||||
+ {
|
||||
+ CreativeTabs[] tmp = new CreativeTabs[par1 + 1];
|
||||
+ for (int x = 0; x < creativeTabArray.length; x++)
|
||||
+ CreativeTabs[] tmp = new CreativeTabs[p_i1853_1_ + 1];
|
||||
+ for (int x = 0; x < field_78032_a.length; x++)
|
||||
+ {
|
||||
+ tmp[x] = creativeTabArray[x];
|
||||
+ tmp[x] = field_78032_a[x];
|
||||
+ }
|
||||
+ creativeTabArray = tmp;
|
||||
+ field_78032_a = tmp;
|
||||
+ }
|
||||
this.tabIndex = par1;
|
||||
this.tabLabel = par2Str;
|
||||
creativeTabArray[par1] = this;
|
||||
@@ -226,6 +240,10 @@
|
||||
this.field_78033_n = p_i1853_1_;
|
||||
this.field_78034_o = p_i1853_2_;
|
||||
field_78032_a[p_i1853_1_] = this;
|
||||
@@ -222,12 +236,20 @@
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getTabColumn()
|
||||
public int func_78020_k()
|
||||
{
|
||||
+ if (tabIndex > 11)
|
||||
+ if (field_78033_n > 11)
|
||||
+ {
|
||||
+ return ((tabIndex - 12) % 10) % 5;
|
||||
+ return ((field_78033_n - 12) % 10) % 5;
|
||||
+ }
|
||||
return this.tabIndex % 6;
|
||||
return this.field_78033_n % 6;
|
||||
}
|
||||
|
||||
@@ -233,6 +251,10 @@
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isTabInFirstRow()
|
||||
public boolean func_78023_l()
|
||||
{
|
||||
+ if (tabIndex > 11)
|
||||
+ if (field_78033_n > 11)
|
||||
+ {
|
||||
+ return ((tabIndex - 12) % 10) < 5;
|
||||
+ return ((field_78033_n - 12) % 10) < 5;
|
||||
+ }
|
||||
return this.tabIndex < 6;
|
||||
return this.field_78033_n < 6;
|
||||
}
|
||||
|
||||
@@ -284,10 +306,18 @@
|
||||
@@ -278,10 +300,18 @@
|
||||
{
|
||||
Item item = (Item)iterator.next();
|
||||
|
||||
- if (item != null && item.getCreativeTab() == this)
|
||||
- if (item != null && item.func_77640_w() == this)
|
||||
+ if (item == null)
|
||||
{
|
||||
- item.getSubItems(item, this, par1List);
|
||||
- item.func_150895_a(item, this, p_78018_1_);
|
||||
+ continue;
|
||||
}
|
||||
+
|
||||
|
@ -60,29 +59,29 @@
|
|||
+ {
|
||||
+ if (tab == this)
|
||||
+ {
|
||||
+ item.getSubItems(item, this, par1List);
|
||||
+ item.func_150895_a(item, this, p_78018_1_);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
if (this.func_111225_m() != null)
|
||||
@@ -326,4 +356,28 @@
|
||||
@@ -319,4 +349,28 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
+
|
||||
+ public int getTabPage()
|
||||
+ {
|
||||
+ if (tabIndex > 11)
|
||||
+ if (field_78033_n > 11)
|
||||
+ {
|
||||
+ return ((tabIndex - 12) / 10) + 1;
|
||||
+ return ((field_78033_n - 12) / 10) + 1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ public static int getNextID()
|
||||
+ {
|
||||
+ return creativeTabArray.length;
|
||||
+ return field_78032_a.length;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -92,6 +91,6 @@
|
|||
+ */
|
||||
+ public boolean hasSearchBar()
|
||||
+ {
|
||||
+ return tabIndex == CreativeTabs.tabAllSearch.tabIndex;
|
||||
+ return field_78033_n == CreativeTabs.field_78027_g.field_78033_n;
|
||||
+ }
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src-base/minecraft/net/minecraft/enchantment/Enchantment.java
|
||||
+++ ../src-work/minecraft/net/minecraft/enchantment/Enchantment.java
|
||||
@@ -157,6 +157,36 @@
|
||||
@@ -123,6 +123,36 @@
|
||||
|
||||
public void func_151367_b(EntityLivingBase p_151367_1_, Entity p_151367_2_, int p_151367_3_) {}
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
|||
+ */
|
||||
+ public boolean canApplyAtEnchantingTable(ItemStack stack)
|
||||
+ {
|
||||
+ return canApply(stack);
|
||||
+ return func_92089_a(stack);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -22,7 +22,7 @@
|
|||
+ */
|
||||
+ public static void addToBookList(Enchantment enchantment)
|
||||
+ {
|
||||
+ com.google.common.collect.ObjectArrays.concat(enchantmentsBookList, enchantment);
|
||||
+ com.google.common.collect.ObjectArrays.concat(field_92090_c, enchantment);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
--- ../src-base/minecraft/net/minecraft/enchantment/EnchantmentHelper.java
|
||||
+++ ../src-work/minecraft/net/minecraft/enchantment/EnchantmentHelper.java
|
||||
@@ -461,7 +461,8 @@
|
||||
@@ -429,7 +429,8 @@
|
||||
{
|
||||
Enchantment enchantment = aenchantment[k];
|
||||
|
||||
- if (enchantment != null && (enchantment.type.canEnchantItem(item) || flag))
|
||||
- if (enchantment != null && (enchantment.field_77351_y.func_77557_a(item) || flag))
|
||||
+ if (enchantment == null) continue;
|
||||
+ if (enchantment.canApplyAtEnchantingTable(par1ItemStack) || ((item == Items.book) && enchantment.isAllowedOnBooks()))
|
||||
+ if (enchantment.canApplyAtEnchantingTable(p_77505_1_) || ((item == Items.field_151122_aG) && enchantment.isAllowedOnBooks()))
|
||||
{
|
||||
for (int l = enchantment.getMinLevel(); l <= enchantment.getMaxLevel(); ++l)
|
||||
for (int l = enchantment.func_77319_d(); l <= enchantment.func_77325_b(); ++l)
|
||||
{
|
||||
|
|
|
@ -44,9 +44,9 @@
|
|||
|
||||
public abstract class Entity
|
||||
{
|
||||
@@ -152,7 +165,14 @@
|
||||
protected UUID entityUniqueID;
|
||||
public Entity.EnumEntitySize myEntitySize;
|
||||
@@ -116,7 +129,14 @@
|
||||
protected UUID field_96093_i;
|
||||
public Entity.EnumEntitySize field_70168_am;
|
||||
private static final String __OBFID = "CL_00001533";
|
||||
+ /** Forge: Used to store custom data for each entity. */
|
||||
+ private NBTTagCompound customEntityData;
|
||||
|
@ -56,13 +56,13 @@
|
|||
|
||||
+ private HashMap<String, IExtendedEntityProperties> extendedProperties;
|
||||
+
|
||||
public int getEntityId()
|
||||
public int func_145782_y()
|
||||
{
|
||||
return this.entityId;
|
||||
@@ -189,6 +209,15 @@
|
||||
this.dataWatcher.addObject(0, Byte.valueOf((byte)0));
|
||||
this.dataWatcher.addObject(1, Short.valueOf((short)300));
|
||||
this.entityInit();
|
||||
return this.field_145783_c;
|
||||
@@ -153,6 +173,15 @@
|
||||
this.field_70180_af.func_75682_a(0, Byte.valueOf((byte)0));
|
||||
this.field_70180_af.func_75682_a(1, Short.valueOf((short)300));
|
||||
this.func_70088_a();
|
||||
+
|
||||
+ extendedProperties = new HashMap<String, IExtendedEntityProperties>();
|
||||
+
|
||||
|
@ -70,22 +70,22 @@
|
|||
+
|
||||
+ for (IExtendedEntityProperties props : this.extendedProperties.values())
|
||||
+ {
|
||||
+ props.init(this, par1World);
|
||||
+ props.init(this, p_i1582_1_);
|
||||
+ }
|
||||
}
|
||||
|
||||
protected abstract void entityInit();
|
||||
@@ -1051,9 +1080,22 @@
|
||||
protected abstract void func_70088_a();
|
||||
@@ -991,9 +1020,22 @@
|
||||
|
||||
if (block.getMaterial() == par1Material)
|
||||
if (block.func_149688_o() == p_70055_1_)
|
||||
{
|
||||
- float f = BlockLiquid.getLiquidHeightPercent(this.worldObj.getBlockMetadata(i, j, k)) - 0.11111111F;
|
||||
- float f = BlockLiquid.func_149801_b(this.field_70170_p.func_72805_g(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
|
||||
+ if (block instanceof IFluidBlock)
|
||||
+ {
|
||||
+ filled = ((IFluidBlock)block).getFilledPercentage(worldObj, i, j, k);
|
||||
+ filled = ((IFluidBlock)block).getFilledPercentage(field_70170_p, i, j, k);
|
||||
+ }
|
||||
+
|
||||
+ if (filled < 0)
|
||||
|
@ -101,14 +101,14 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
@@ -1360,8 +1402,27 @@
|
||||
par1NBTTagCompound.setInteger("PortalCooldown", this.timeUntilPortal);
|
||||
par1NBTTagCompound.setLong("UUIDMost", this.getUniqueID().getMostSignificantBits());
|
||||
par1NBTTagCompound.setLong("UUIDLeast", this.getUniqueID().getLeastSignificantBits());
|
||||
- this.writeEntityToNBT(par1NBTTagCompound);
|
||||
@@ -1278,8 +1320,27 @@
|
||||
p_70109_1_.func_74768_a("PortalCooldown", this.field_71088_bW);
|
||||
p_70109_1_.func_74772_a("UUIDMost", this.func_110124_au().getMostSignificantBits());
|
||||
p_70109_1_.func_74772_a("UUIDLeast", this.func_110124_au().getLeastSignificantBits());
|
||||
- this.func_70014_b(p_70109_1_);
|
||||
+ if (customEntityData != null)
|
||||
+ {
|
||||
+ par1NBTTagCompound.setTag("ForgeData", customEntityData);
|
||||
+ p_70109_1_.func_74782_a("ForgeData", customEntityData);
|
||||
+ }
|
||||
|
||||
+ for (String identifier : this.extendedProperties.keySet())
|
||||
|
@ -116,7 +116,7 @@
|
|||
+ try
|
||||
+ {
|
||||
+ IExtendedEntityProperties props = this.extendedProperties.get(identifier);
|
||||
+ props.saveNBTData(par1NBTTagCompound);
|
||||
+ props.saveNBTData(p_70109_1_);
|
||||
+ }
|
||||
+ catch (Throwable t)
|
||||
+ {
|
||||
|
@ -125,18 +125,18 @@
|
|||
+ }
|
||||
+ }
|
||||
+
|
||||
+ this.writeEntityToNBT(par1NBTTagCompound);
|
||||
+ this.func_70014_b(p_70109_1_);
|
||||
+
|
||||
if (this.ridingEntity != null)
|
||||
if (this.field_70154_o != null)
|
||||
{
|
||||
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
|
||||
@@ -1428,6 +1489,30 @@
|
||||
@@ -1345,6 +1406,30 @@
|
||||
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
this.setRotation(this.rotationYaw, this.rotationPitch);
|
||||
+ if (par1NBTTagCompound.hasKey("ForgeData"))
|
||||
this.func_70107_b(this.field_70165_t, this.field_70163_u, this.field_70161_v);
|
||||
this.func_70101_b(this.field_70177_z, this.field_70125_A);
|
||||
+ if (p_70020_1_.func_74764_b("ForgeData"))
|
||||
+ {
|
||||
+ customEntityData = par1NBTTagCompound.getCompoundTag("ForgeData");
|
||||
+ customEntityData = p_70020_1_.func_74775_l("ForgeData");
|
||||
+ }
|
||||
+
|
||||
+ for (String identifier : this.extendedProperties.keySet())
|
||||
|
@ -144,7 +144,7 @@
|
|||
+ try
|
||||
+ {
|
||||
+ IExtendedEntityProperties props = this.extendedProperties.get(identifier);
|
||||
+ props.loadNBTData(par1NBTTagCompound);
|
||||
+ props.loadNBTData(p_70020_1_);
|
||||
+ }
|
||||
+ catch (Throwable t)
|
||||
+ {
|
||||
|
@ -154,48 +154,48 @@
|
|||
+ }
|
||||
+
|
||||
+ //Rawr, legacy code, Vanilla added a UUID, keep this so older maps will convert properly
|
||||
+ if (par1NBTTagCompound.hasKey("PersistentIDMSB") && par1NBTTagCompound.hasKey("PersistentIDLSB"))
|
||||
+ if (p_70020_1_.func_74764_b("PersistentIDMSB") && p_70020_1_.func_74764_b("PersistentIDLSB"))
|
||||
+ {
|
||||
+ this.entityUniqueID = new UUID(par1NBTTagCompound.getLong("PersistentIDMSB"), par1NBTTagCompound.getLong("PersistentIDLSB"));
|
||||
+ this.field_96093_i = new UUID(p_70020_1_.func_74763_f("PersistentIDMSB"), p_70020_1_.func_74763_f("PersistentIDLSB"));
|
||||
+ }
|
||||
this.readEntityFromNBT(par1NBTTagCompound);
|
||||
this.func_70037_a(p_70020_1_);
|
||||
|
||||
if (this.shouldSetPosAfterLoading())
|
||||
@@ -1512,7 +1597,14 @@
|
||||
if (this.func_142008_O())
|
||||
@@ -1423,7 +1508,14 @@
|
||||
{
|
||||
EntityItem entityitem = new EntityItem(this.worldObj, this.posX, this.posY + (double)par2, this.posZ, par1ItemStack);
|
||||
entityitem.delayBeforeCanPickup = 10;
|
||||
- this.worldObj.spawnEntityInWorld(entityitem);
|
||||
EntityItem entityitem = new EntityItem(this.field_70170_p, this.field_70165_t, this.field_70163_u + (double)p_70099_2_, this.field_70161_v, p_70099_1_);
|
||||
entityitem.field_145804_b = 10;
|
||||
- this.field_70170_p.func_72838_d(entityitem);
|
||||
+ if (captureDrops)
|
||||
+ {
|
||||
+ capturedDrops.add(entityitem);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ this.worldObj.spawnEntityInWorld(entityitem);
|
||||
+ this.field_70170_p.func_72838_d(entityitem);
|
||||
+ }
|
||||
return entityitem;
|
||||
}
|
||||
else
|
||||
@@ -1782,7 +1874,7 @@
|
||||
// JAVADOC METHOD $$ func_70115_ae
|
||||
public boolean isRiding()
|
||||
@@ -1676,7 +1768,7 @@
|
||||
|
||||
public boolean func_70115_ae()
|
||||
{
|
||||
- return this.ridingEntity != null;
|
||||
+ return this.ridingEntity != null && ridingEntity.shouldRiderSit();
|
||||
- return this.field_70154_o != null;
|
||||
+ return this.field_70154_o != null && field_70154_o.shouldRiderSit();
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_70093_af
|
||||
@@ -2103,7 +2195,7 @@
|
||||
public boolean func_70093_af()
|
||||
@@ -1977,7 +2069,7 @@
|
||||
|
||||
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_.getExplosionResistance(this);
|
||||
+ return p_145772_6_.getExplosionResistance(this, p_145772_2_, p_145772_3_, p_145772_3_, p_145772_4_, posX, posY + getEyeHeight(), posZ);
|
||||
- return p_145772_6_.func_149638_a(this);
|
||||
+ return p_145772_6_.getExplosionResistance(this, p_145772_2_, p_145772_3_, p_145772_3_, p_145772_4_, field_70165_t, field_70163_u + func_70047_e(), field_70161_v);
|
||||
}
|
||||
|
||||
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_)
|
||||
@@ -2176,6 +2268,174 @@
|
||||
@@ -2047,6 +2139,174 @@
|
||||
|
||||
public void func_145781_i(int p_145781_1_) {}
|
||||
|
||||
|
@ -233,22 +233,22 @@
|
|||
+ {
|
||||
+ if (this instanceof EntityPainting)
|
||||
+ {
|
||||
+ return new ItemStack(Items.painting);
|
||||
+ return new ItemStack(Items.field_151159_an);
|
||||
+ }
|
||||
+ else if (this instanceof EntityLeashKnot)
|
||||
+ {
|
||||
+ return new ItemStack(Items.lead);
|
||||
+ return new ItemStack(Items.field_151058_ca);
|
||||
+ }
|
||||
+ else if (this instanceof EntityItemFrame)
|
||||
+ {
|
||||
+ ItemStack held = ((EntityItemFrame)this).getDisplayedItem();
|
||||
+ ItemStack held = ((EntityItemFrame)this).func_82335_i();
|
||||
+ if (held == null)
|
||||
+ {
|
||||
+ return new ItemStack(Items.item_frame);
|
||||
+ return new ItemStack(Items.field_151160_bD);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ return held.copy();
|
||||
+ return held.func_77946_l();
|
||||
+ }
|
||||
+ }
|
||||
+ else if (this instanceof EntityMinecart)
|
||||
|
@ -257,14 +257,14 @@
|
|||
+ }
|
||||
+ else if (this instanceof EntityBoat)
|
||||
+ {
|
||||
+ return new ItemStack(Items.boat);
|
||||
+ return new ItemStack(Items.field_151124_az);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ int id = EntityList.getEntityID(this);
|
||||
+ if (id > 0 && EntityList.entityEggs.containsKey(id))
|
||||
+ int id = EntityList.func_75619_a(this);
|
||||
+ if (id > 0 && EntityList.field_75627_a.containsKey(id))
|
||||
+ {
|
||||
+ return new ItemStack(Items.spawn_egg, 1, id);
|
||||
+ return new ItemStack(Items.field_151063_bx, 1, id);
|
||||
+ }
|
||||
+ }
|
||||
+ return null;
|
||||
|
@ -272,7 +272,7 @@
|
|||
+
|
||||
+ public UUID getPersistentID()
|
||||
+ {
|
||||
+ return entityUniqueID;
|
||||
+ return field_96093_i;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -280,7 +280,7 @@
|
|||
+ */
|
||||
+ public final void resetEntityId()
|
||||
+ {
|
||||
+ this.entityId = nextEntityID++;
|
||||
+ this.field_145783_c = field_70152_a++;
|
||||
+ }
|
||||
+
|
||||
+ public boolean shouldRenderInPass(int pass)
|
||||
|
@ -296,7 +296,7 @@
|
|||
+ */
|
||||
+ public boolean isCreatureType(EnumCreatureType type, boolean forSpawnCount)
|
||||
+ {
|
||||
+ return type.getCreatureClass().isAssignableFrom(this.getClass());
|
||||
+ return type.func_75598_a().isAssignableFrom(this.getClass());
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
|
|
@ -10,42 +10,42 @@
|
|||
|
||||
public abstract class EntityLiving extends EntityLivingBase
|
||||
{
|
||||
@@ -130,6 +133,7 @@
|
||||
public void setAttackTarget(EntityLivingBase par1EntityLivingBase)
|
||||
@@ -117,6 +120,7 @@
|
||||
public void func_70624_b(EntityLivingBase p_70624_1_)
|
||||
{
|
||||
this.attackTarget = par1EntityLivingBase;
|
||||
+ ForgeHooks.onLivingSetAttackTarget(this, par1EntityLivingBase);
|
||||
this.field_70696_bz = p_70624_1_;
|
||||
+ ForgeHooks.onLivingSetAttackTarget(this, p_70624_1_);
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_70686_a
|
||||
@@ -506,10 +510,22 @@
|
||||
// JAVADOC METHOD $$ func_70623_bb
|
||||
protected void despawnEntity()
|
||||
public boolean func_70686_a(Class p_70686_1_)
|
||||
@@ -476,10 +480,22 @@
|
||||
|
||||
protected void func_70623_bb()
|
||||
{
|
||||
+ Result result = null;
|
||||
if (this.persistenceRequired)
|
||||
if (this.field_82179_bU)
|
||||
{
|
||||
this.entityAge = 0;
|
||||
this.field_70708_bq = 0;
|
||||
}
|
||||
+ else if ((this.entityAge & 0x1F) == 0x1F && (result = ForgeEventFactory.canEntityDespawn(this)) != Result.DEFAULT)
|
||||
+ else if ((this.field_70708_bq & 0x1F) == 0x1F && (result = ForgeEventFactory.canEntityDespawn(this)) != Result.DEFAULT)
|
||||
+ {
|
||||
+ if (result == Result.DENY)
|
||||
+ {
|
||||
+ this.entityAge = 0;
|
||||
+ this.field_70708_bq = 0;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ this.setDead();
|
||||
+ this.func_70106_y();
|
||||
+ }
|
||||
+ }
|
||||
else
|
||||
{
|
||||
EntityPlayer entityplayer = this.worldObj.getClosestPlayerToEntity(this, -1.0D);
|
||||
@@ -677,7 +693,6 @@
|
||||
EntityPlayer entityplayer = this.field_70170_p.func_72890_a(this, -1.0D);
|
||||
@@ -642,7 +658,6 @@
|
||||
return this.field_70170_p.func_72855_b(this.field_70121_D) && this.field_70170_p.func_72945_a(this, this.field_70121_D).isEmpty() && !this.field_70170_p.func_72953_d(this.field_70121_D);
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_70603_bj
|
||||
- @SideOnly(Side.CLIENT)
|
||||
public float getRenderSizeModifier()
|
||||
public float func_70603_bj()
|
||||
{
|
||||
return 1.0F;
|
||||
|
|
|
@ -16,157 +16,157 @@
|
|||
|
||||
public abstract class EntityLivingBase extends Entity
|
||||
{
|
||||
@@ -254,7 +256,7 @@
|
||||
@@ -225,7 +227,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (!this.worldObj.isRemote && this.isRiding() && this.ridingEntity instanceof EntityLivingBase)
|
||||
+ if (!this.worldObj.isRemote && this.isRiding() && this.ridingEntity != null && ridingEntity.shouldDismountInWater(this))
|
||||
- if (!this.field_70170_p.field_72995_K && this.func_70115_ae() && this.field_70154_o instanceof EntityLivingBase)
|
||||
+ if (!this.field_70170_p.field_72995_K && this.func_70115_ae() && this.field_70154_o != null && field_70154_o.shouldDismountInWater(this))
|
||||
{
|
||||
this.mountEntity((Entity)null);
|
||||
this.func_70078_a((Entity)null);
|
||||
}
|
||||
@@ -408,6 +410,7 @@
|
||||
@@ -374,6 +376,7 @@
|
||||
{
|
||||
this.entityLivingToAttack = par1EntityLivingBase;
|
||||
this.revengeTimer = this.ticksExisted;
|
||||
+ ForgeHooks.onLivingSetAttackTarget(this, par1EntityLivingBase);
|
||||
this.field_70755_b = p_70604_1_;
|
||||
this.field_70756_c = this.field_70173_aa;
|
||||
+ ForgeHooks.onLivingSetAttackTarget(this, p_70604_1_);
|
||||
}
|
||||
|
||||
public EntityLivingBase getLastAttacker()
|
||||
@@ -701,7 +704,6 @@
|
||||
public EntityLivingBase func_110144_aD()
|
||||
@@ -661,7 +664,6 @@
|
||||
return this.func_70668_bt() == EnumCreatureAttribute.UNDEAD;
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_70618_n
|
||||
- @SideOnly(Side.CLIENT)
|
||||
public void removePotionEffectClient(int par1)
|
||||
public void func_70618_n(int p_70618_1_)
|
||||
{
|
||||
this.activePotionsMap.remove(Integer.valueOf(par1));
|
||||
@@ -773,6 +775,7 @@
|
||||
// JAVADOC METHOD $$ func_70097_a
|
||||
public boolean attackEntityFrom(DamageSource par1DamageSource, float par2)
|
||||
this.field_70713_bf.remove(Integer.valueOf(p_70618_1_));
|
||||
@@ -730,6 +732,7 @@
|
||||
|
||||
public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_)
|
||||
{
|
||||
+ if (ForgeHooks.onLivingAttack(this, par1DamageSource, par2)) return false;
|
||||
if (this.isEntityInvulnerable())
|
||||
+ if (ForgeHooks.onLivingAttack(this, p_70097_1_, p_70097_2_)) return false;
|
||||
if (this.func_85032_ar())
|
||||
{
|
||||
return false;
|
||||
@@ -928,6 +931,7 @@
|
||||
// JAVADOC METHOD $$ func_70645_a
|
||||
public void onDeath(DamageSource par1DamageSource)
|
||||
@@ -883,6 +886,7 @@
|
||||
|
||||
public void func_70645_a(DamageSource p_70645_1_)
|
||||
{
|
||||
+ if (ForgeHooks.onLivingDeath(this, par1DamageSource)) return;
|
||||
Entity entity = par1DamageSource.getEntity();
|
||||
+ if (ForgeHooks.onLivingDeath(this, p_70645_1_)) return;
|
||||
Entity entity = p_70645_1_.func_76346_g();
|
||||
EntityLivingBase entitylivingbase = this.func_94060_bK();
|
||||
|
||||
@@ -952,6 +956,10 @@
|
||||
i = EnchantmentHelper.getLootingModifier((EntityLivingBase)entity);
|
||||
@@ -907,6 +911,10 @@
|
||||
i = EnchantmentHelper.func_77519_f((EntityLivingBase)entity);
|
||||
}
|
||||
|
||||
+ captureDrops = true;
|
||||
+ capturedDrops.clear();
|
||||
+ int j = 0;
|
||||
+
|
||||
if (this.func_146066_aG() && this.worldObj.getGameRules().getGameRuleBooleanValue("doMobLoot"))
|
||||
if (this.func_146066_aG() && this.field_70170_p.func_82736_K().func_82766_b("doMobLoot"))
|
||||
{
|
||||
this.dropFewItems(this.recentlyHit > 0, i);
|
||||
@@ -959,7 +967,7 @@
|
||||
this.func_70628_a(this.field_70718_bc > 0, i);
|
||||
@@ -914,7 +922,7 @@
|
||||
|
||||
if (this.recentlyHit > 0)
|
||||
if (this.field_70718_bc > 0)
|
||||
{
|
||||
- int j = this.rand.nextInt(200) - i;
|
||||
+ j = this.rand.nextInt(200) - i;
|
||||
- int j = this.field_70146_Z.nextInt(200) - i;
|
||||
+ j = this.field_70146_Z.nextInt(200) - i;
|
||||
|
||||
if (j < 5)
|
||||
{
|
||||
@@ -967,6 +975,16 @@
|
||||
@@ -922,6 +930,16 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
+
|
||||
+ captureDrops = false;
|
||||
+
|
||||
+ if (!ForgeHooks.onLivingDrops(this, par1DamageSource, capturedDrops, i, recentlyHit > 0, j))
|
||||
+ if (!ForgeHooks.onLivingDrops(this, p_70645_1_, capturedDrops, i, field_70718_bc > 0, j))
|
||||
+ {
|
||||
+ for (EntityItem item : capturedDrops)
|
||||
+ {
|
||||
+ worldObj.spawnEntityInWorld(item);
|
||||
+ field_70170_p.func_72838_d(item);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
this.worldObj.setEntityState(this, (byte)3);
|
||||
@@ -1021,7 +1039,7 @@
|
||||
int j = MathHelper.floor_double(this.boundingBox.minY);
|
||||
int k = MathHelper.floor_double(this.posZ);
|
||||
Block block = this.worldObj.getBlock(i, j, k);
|
||||
- return block == Blocks.ladder || block == Blocks.vine;
|
||||
+ return ForgeHooks.isLivingOnLadder(block, worldObj, i, j, k, this);
|
||||
this.field_70170_p.func_72960_a(this, (byte)3);
|
||||
@@ -970,7 +988,7 @@
|
||||
int j = MathHelper.func_76128_c(this.field_70121_D.field_72338_b);
|
||||
int k = MathHelper.func_76128_c(this.field_70161_v);
|
||||
Block block = this.field_70170_p.func_147439_a(i, j, k);
|
||||
- return block == Blocks.field_150468_ap || block == Blocks.field_150395_bd;
|
||||
+ return ForgeHooks.isLivingOnLadder(block, field_70170_p, i, j, k, this);
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_70089_S
|
||||
@@ -1033,6 +1051,8 @@
|
||||
// JAVADOC METHOD $$ func_70069_a
|
||||
protected void fall(float par1)
|
||||
public boolean func_70089_S()
|
||||
@@ -980,6 +998,8 @@
|
||||
|
||||
protected void func_70069_a(float p_70069_1_)
|
||||
{
|
||||
+ par1 = ForgeHooks.onLivingFall(this, par1);
|
||||
+ if (par1 <= 0) return;
|
||||
super.fall(par1);
|
||||
PotionEffect potioneffect = this.getActivePotionEffect(Potion.jump);
|
||||
float f1 = potioneffect != null ? (float)(potioneffect.getAmplifier() + 1) : 0.0F;
|
||||
@@ -1116,7 +1136,7 @@
|
||||
+ p_70069_1_ = ForgeHooks.onLivingFall(this, p_70069_1_);
|
||||
+ if (p_70069_1_ <= 0) return;
|
||||
super.func_70069_a(p_70069_1_);
|
||||
PotionEffect potioneffect = this.func_70660_b(Potion.field_76430_j);
|
||||
float f1 = potioneffect != null ? (float)(potioneffect.func_76458_c() + 1) : 0.0F;
|
||||
@@ -1059,7 +1079,7 @@
|
||||
{
|
||||
if (this instanceof EntityZombie)
|
||||
{
|
||||
- par2 = par2;
|
||||
- p_70672_2_ = p_70672_2_;
|
||||
+ //par2 = par2; // Forge: Noop Warning
|
||||
}
|
||||
|
||||
int i;
|
||||
@@ -1161,6 +1181,8 @@
|
||||
@@ -1103,6 +1123,8 @@
|
||||
{
|
||||
if (!this.isEntityInvulnerable())
|
||||
if (!this.func_85032_ar())
|
||||
{
|
||||
+ par2 = ForgeHooks.onLivingHurt(this, par1DamageSource, par2);
|
||||
+ if (par2 <= 0) return;
|
||||
par2 = this.applyArmorCalculations(par1DamageSource, par2);
|
||||
par2 = this.applyPotionDamageCalculations(par1DamageSource, par2);
|
||||
float f1 = par2;
|
||||
@@ -1213,6 +1235,17 @@
|
||||
// JAVADOC METHOD $$ func_71038_i
|
||||
public void swingItem()
|
||||
+ p_70665_2_ = ForgeHooks.onLivingHurt(this, p_70665_1_, p_70665_2_);
|
||||
+ if (p_70665_2_ <= 0) return;
|
||||
p_70665_2_ = this.func_70655_b(p_70665_1_, p_70665_2_);
|
||||
p_70665_2_ = this.func_70672_c(p_70665_1_, p_70665_2_);
|
||||
float f1 = p_70665_2_;
|
||||
@@ -1151,6 +1173,17 @@
|
||||
|
||||
public void func_71038_i()
|
||||
{
|
||||
+ ItemStack stack = this.getHeldItem();
|
||||
+ ItemStack stack = this.func_70694_bm();
|
||||
+
|
||||
+ if (stack != null && stack.getItem() != null)
|
||||
+ if (stack != null && stack.func_77973_b() != null)
|
||||
+ {
|
||||
+ Item item = stack.getItem();
|
||||
+ Item item = stack.func_77973_b();
|
||||
+ if (item.onEntitySwing(this, stack))
|
||||
+ {
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (!this.isSwingInProgress || this.swingProgressInt >= this.getArmSwingAnimationEnd() / 2 || this.swingProgressInt < 0)
|
||||
if (!this.field_82175_bq || this.field_110158_av >= this.func_82166_i() / 2 || this.field_110158_av < 0)
|
||||
{
|
||||
this.swingProgressInt = -1;
|
||||
@@ -1422,6 +1455,7 @@
|
||||
this.field_110158_av = -1;
|
||||
@@ -1346,6 +1379,7 @@
|
||||
}
|
||||
|
||||
this.isAirBorne = true;
|
||||
this.field_70160_al = true;
|
||||
+ ForgeHooks.onLivingJump(this);
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_70612_e
|
||||
@@ -1602,6 +1636,7 @@
|
||||
// JAVADOC METHOD $$ func_70071_h_
|
||||
public void onUpdate()
|
||||
public void func_70612_e(float p_70612_1_, float p_70612_2_)
|
||||
@@ -1520,6 +1554,7 @@
|
||||
|
||||
public void func_70071_h_()
|
||||
{
|
||||
+ if (ForgeHooks.onLivingUpdate(this)) return;
|
||||
super.onUpdate();
|
||||
super.func_70071_h_();
|
||||
|
||||
if (!this.worldObj.isRemote)
|
||||
@@ -2099,4 +2134,42 @@
|
||||
if (!this.field_70170_p.field_72995_K)
|
||||
@@ -2000,4 +2035,42 @@
|
||||
{
|
||||
return this.getTeam() != null ? this.getTeam().isSameTeam(par1Team) : false;
|
||||
return this.func_96124_cp() != null ? this.func_96124_cp().func_142054_a(p_142012_1_) : false;
|
||||
}
|
||||
+
|
||||
+ /***
|
||||
|
@ -175,9 +175,9 @@
|
|||
+ */
|
||||
+ public void curePotionEffects(ItemStack curativeItem)
|
||||
+ {
|
||||
+ Iterator<Integer> potionKey = activePotionsMap.keySet().iterator();
|
||||
+ Iterator<Integer> potionKey = field_70713_bf.keySet().iterator();
|
||||
+
|
||||
+ if (worldObj.isRemote)
|
||||
+ if (field_70170_p.field_72995_K)
|
||||
+ {
|
||||
+ return;
|
||||
+ }
|
||||
|
@ -185,12 +185,12 @@
|
|||
+ while (potionKey.hasNext())
|
||||
+ {
|
||||
+ Integer key = potionKey.next();
|
||||
+ PotionEffect effect = (PotionEffect)activePotionsMap.get(key);
|
||||
+ PotionEffect effect = (PotionEffect)field_70713_bf.get(key);
|
||||
+
|
||||
+ if (effect.isCurativeItem(curativeItem))
|
||||
+ {
|
||||
+ potionKey.remove();
|
||||
+ onFinishedPotionEffect(effect);
|
||||
+ func_70688_c(effect);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
|
|
|
@ -8,26 +8,26 @@
|
|||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -25,6 +26,8 @@
|
||||
@@ -21,6 +22,8 @@
|
||||
private double field_151496_k;
|
||||
private static final String __OBFID = "CL_00001595";
|
||||
|
||||
+ private int failedPathFindingPenalty;
|
||||
+
|
||||
public EntityAIAttackOnCollide(EntityCreature par1EntityCreature, Class par2Class, double par3, boolean par5)
|
||||
public EntityAIAttackOnCollide(EntityCreature p_i1635_1_, Class p_i1635_2_, double p_i1635_3_, boolean p_i1635_5_)
|
||||
{
|
||||
this(par1EntityCreature, par3, par5);
|
||||
@@ -59,8 +62,16 @@
|
||||
this(p_i1635_1_, p_i1635_3_, p_i1635_5_);
|
||||
@@ -54,8 +57,16 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- this.entityPathEntity = this.attacker.getNavigator().getPathToEntityLiving(entitylivingbase);
|
||||
- return this.entityPathEntity != null;
|
||||
- this.field_75438_g = this.field_75441_b.func_70661_as().func_75494_a(entitylivingbase);
|
||||
- return this.field_75438_g != null;
|
||||
+ if (-- this.field_75445_i <= 0)
|
||||
+ {
|
||||
+ this.entityPathEntity = this.attacker.getNavigator().getPathToEntityLiving(entitylivingbase);
|
||||
+ this.field_75445_i = 4 + this.attacker.getRNG().nextInt(7);
|
||||
+ return this.entityPathEntity != null;
|
||||
+ this.field_75438_g = this.field_75441_b.func_70661_as().func_75494_a(entitylivingbase);
|
||||
+ this.field_75445_i = 4 + this.field_75441_b.func_70681_au().nextInt(7);
|
||||
+ return this.field_75438_g != null;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
|
@ -36,17 +36,17 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -98,8 +109,25 @@
|
||||
this.field_151497_i = entitylivingbase.posX;
|
||||
this.field_151495_j = entitylivingbase.boundingBox.minY;
|
||||
this.field_151496_k = entitylivingbase.posZ;
|
||||
- this.field_75445_i = 4 + this.attacker.getRNG().nextInt(7);
|
||||
+ this.field_75445_i = failedPathFindingPenalty + 4 + this.attacker.getRNG().nextInt(7);
|
||||
@@ -89,8 +100,25 @@
|
||||
this.field_151497_i = entitylivingbase.field_70165_t;
|
||||
this.field_151495_j = entitylivingbase.field_70121_D.field_72338_b;
|
||||
this.field_151496_k = entitylivingbase.field_70161_v;
|
||||
- this.field_75445_i = 4 + this.field_75441_b.func_70681_au().nextInt(7);
|
||||
+ this.field_75445_i = failedPathFindingPenalty + 4 + this.field_75441_b.func_70681_au().nextInt(7);
|
||||
|
||||
+ if (this.attacker.getNavigator().getPath() != null)
|
||||
+ if (this.field_75441_b.func_70661_as().func_75505_d() != null)
|
||||
+ {
|
||||
+ PathPoint finalPathPoint = this.attacker.getNavigator().getPath().getFinalPathPoint();
|
||||
+ if (finalPathPoint != null && entitylivingbase.getDistanceSq(finalPathPoint.xCoord, finalPathPoint.yCoord, finalPathPoint.zCoord) < 1)
|
||||
+ PathPoint finalPathPoint = this.field_75441_b.func_70661_as().func_75505_d().func_75870_c();
|
||||
+ if (finalPathPoint != null && entitylivingbase.func_70092_e(finalPathPoint.field_75839_a, finalPathPoint.field_75837_b, finalPathPoint.field_75838_c) < 1)
|
||||
+ {
|
||||
+ failedPathFindingPenalty = 0;
|
||||
+ }
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
--- ../src-base/minecraft/net/minecraft/entity/boss/EntityDragon.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/boss/EntityDragon.java
|
||||
@@ -495,9 +495,9 @@
|
||||
@@ -477,9 +477,9 @@
|
||||
{
|
||||
Block block = this.worldObj.getBlock(k1, l1, i2);
|
||||
Block block = this.field_70170_p.func_147439_a(k1, l1, i2);
|
||||
|
||||
- if (block.getMaterial() != Material.air)
|
||||
+ if (!block.isAir(worldObj, k1, l1, i2))
|
||||
- if (block.func_149688_o() != Material.field_151579_a)
|
||||
+ if (!block.isAir(field_70170_p, 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"))
|
||||
- if (block != Blocks.field_150343_Z && block != Blocks.field_150377_bs && block != Blocks.field_150357_h && this.field_70170_p.func_82736_K().func_82766_b("mobGriefing"))
|
||||
+ if (block.canEntityDestroy(field_70170_p, k1, l1, i2, this) && this.field_70170_p.func_82736_K().func_82766_b("mobGriefing"))
|
||||
{
|
||||
flag1 = this.worldObj.setBlockToAir(k1, l1, i2) || flag1;
|
||||
flag1 = this.field_70170_p.func_147468_f(k1, l1, i2) || flag1;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
--- ../src-base/minecraft/net/minecraft/entity/boss/EntityWither.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/boss/EntityWither.java
|
||||
@@ -355,7 +355,7 @@
|
||||
@@ -347,7 +347,7 @@
|
||||
int l = j1 + i2;
|
||||
Block block = this.worldObj.getBlock(j2, k, l);
|
||||
Block block = this.field_70170_p.func_147439_a(j2, k, l);
|
||||
|
||||
- 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))
|
||||
- if (block.func_149688_o() != Material.field_151579_a && block != Blocks.field_150357_h && block != Blocks.field_150384_bq && block != Blocks.field_150378_br && block != Blocks.field_150483_bI)
|
||||
+ if (!block.isAir(field_70170_p, j2, k, l) && block.canEntityDestroy(field_70170_p, j2, k, l, this))
|
||||
{
|
||||
flag = this.worldObj.func_147480_a(j2, k, l, true) || flag;
|
||||
flag = this.field_70170_p.func_147480_a(j2, k, l, true) || flag;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
--- ../src-base/minecraft/net/minecraft/entity/effect/EntityLightningBolt.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/effect/EntityLightningBolt.java
|
||||
@@ -106,7 +106,8 @@
|
||||
@@ -102,7 +102,8 @@
|
||||
for (int l = 0; l < list.size(); ++l)
|
||||
{
|
||||
Entity entity = (Entity)list.get(l);
|
||||
- entity.onStruckByLightning(this);
|
||||
- entity.func_70077_a(this);
|
||||
+ if (!net.minecraftforge.event.ForgeEventFactory.onEntityStruckByLightning(entity, this))
|
||||
+ entity.onStruckByLightning(this);
|
||||
+ entity.func_70077_a(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,20 +9,20 @@
|
|||
|
||||
public class EntityEnderPearl extends EntityThrowable
|
||||
{
|
||||
@@ -51,6 +53,9 @@
|
||||
@@ -50,6 +52,9 @@
|
||||
|
||||
if (entityplayermp.playerNetServerHandler.func_147362_b().isChannelOpen() && entityplayermp.worldObj == this.worldObj)
|
||||
if (entityplayermp.field_71135_a.func_147362_b().func_150724_d() && entityplayermp.field_70170_p == this.field_70170_p)
|
||||
{
|
||||
+ EnderTeleportEvent event = new EnderTeleportEvent(entityplayermp, this.posX, this.posY, this.posZ, 5.0F);
|
||||
+ EnderTeleportEvent event = new EnderTeleportEvent(entityplayermp, this.field_70165_t, this.field_70163_u, this.field_70161_v, 5.0F);
|
||||
+ if (!MinecraftForge.EVENT_BUS.post(event))
|
||||
+ { // Don't indent to lower patch size
|
||||
if (this.getThrower().isRiding())
|
||||
if (this.func_85052_h().func_70115_ae())
|
||||
{
|
||||
this.getThrower().mountEntity((Entity)null);
|
||||
@@ -59,6 +64,7 @@
|
||||
this.getThrower().setPositionAndUpdate(this.posX, this.posY, this.posZ);
|
||||
this.getThrower().fallDistance = 0.0F;
|
||||
this.getThrower().attackEntityFrom(DamageSource.fall, 5.0F);
|
||||
this.func_85052_h().func_70078_a((Entity)null);
|
||||
@@ -58,6 +63,7 @@
|
||||
this.func_85052_h().func_70634_a(this.field_70165_t, this.field_70163_u, this.field_70161_v);
|
||||
this.func_85052_h().field_70143_R = 0.0F;
|
||||
this.func_85052_h().func_70097_a(DamageSource.field_76379_h, 5.0F);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
public class EntityItem extends Entity
|
||||
{
|
||||
@@ -33,6 +36,11 @@
|
||||
public float hoverStart;
|
||||
@@ -30,6 +33,11 @@
|
||||
public float field_70290_d;
|
||||
private static final String __OBFID = "CL_00001669";
|
||||
|
||||
+ /**
|
||||
|
@ -24,116 +24,115 @@
|
|||
+ */
|
||||
+ public int lifespan = 6000;
|
||||
+
|
||||
public EntityItem(World par1World, double par2, double par4, double par6)
|
||||
public EntityItem(World p_i1709_1_, double p_i1709_2_, double p_i1709_4_, double p_i1709_6_)
|
||||
{
|
||||
super(par1World);
|
||||
@@ -49,8 +57,9 @@
|
||||
super(p_i1709_1_);
|
||||
@@ -46,8 +54,9 @@
|
||||
|
||||
public EntityItem(World par1World, double par2, double par4, double par6, ItemStack par8ItemStack)
|
||||
public EntityItem(World p_i1710_1_, double p_i1710_2_, double p_i1710_4_, double p_i1710_6_, ItemStack p_i1710_8_)
|
||||
{
|
||||
- this(par1World, par2, par4, par6);
|
||||
+ this(par1World, par2, par4, par6);
|
||||
this.setEntityItemStack(par8ItemStack);
|
||||
+ this.lifespan = (par8ItemStack.getItem() == null ? 6000 : par8ItemStack.getItem().getEntityLifespan(par8ItemStack, par1World));
|
||||
- this(p_i1710_1_, p_i1710_2_, p_i1710_4_, p_i1710_6_);
|
||||
+ this(p_i1710_1_, p_i1710_2_, p_i1710_4_, p_i1710_6_);
|
||||
this.func_92058_a(p_i1710_8_);
|
||||
+ this.lifespan = (p_i1710_8_.func_77973_b() == null ? 6000 : p_i1710_8_.func_77973_b().getEntityLifespan(p_i1710_8_, p_i1710_1_));
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_70041_e_
|
||||
@@ -76,6 +85,15 @@
|
||||
// JAVADOC METHOD $$ func_70071_h_
|
||||
public void onUpdate()
|
||||
protected boolean func_70041_e_()
|
||||
@@ -71,6 +80,15 @@
|
||||
|
||||
public void func_70071_h_()
|
||||
{
|
||||
+ ItemStack stack = this.getDataWatcher().getWatchableObjectItemStack(10);
|
||||
+ if (stack != null && stack.getItem() != null)
|
||||
+ ItemStack stack = this.func_70096_w().func_82710_f(10);
|
||||
+ if (stack != null && stack.func_77973_b() != null)
|
||||
+ {
|
||||
+ if (stack.getItem().onEntityItemUpdate(this))
|
||||
+ if (stack.func_77973_b().onEntityItemUpdate(this))
|
||||
+ {
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (this.getEntityItem() == null)
|
||||
if (this.func_92059_d() == null)
|
||||
{
|
||||
this.setDead();
|
||||
@@ -131,8 +149,30 @@
|
||||
this.func_70106_y();
|
||||
@@ -126,8 +144,30 @@
|
||||
|
||||
++this.age;
|
||||
++this.field_70292_b;
|
||||
|
||||
- if (!this.worldObj.isRemote && this.age >= 6000)
|
||||
+ ItemStack item = getDataWatcher().getWatchableObjectItemStack(10);
|
||||
- if (!this.field_70170_p.field_72995_K && this.field_70292_b >= 6000)
|
||||
+ ItemStack item = func_70096_w().func_82710_f(10);
|
||||
+
|
||||
+ if (!this.worldObj.isRemote && this.age >= lifespan)
|
||||
+ if (!this.field_70170_p.field_72995_K && this.field_70292_b >= lifespan)
|
||||
{
|
||||
+ if (item != null)
|
||||
+ {
|
||||
+ ItemExpireEvent event = new ItemExpireEvent(this, (item.getItem() == null ? 6000 : item.getItem().getEntityLifespan(item, worldObj)));
|
||||
+ ItemExpireEvent event = new ItemExpireEvent(this, (item.func_77973_b() == null ? 6000 : item.func_77973_b().getEntityLifespan(item, field_70170_p)));
|
||||
+ if (MinecraftForge.EVENT_BUS.post(event))
|
||||
+ {
|
||||
+ lifespan += event.extraLife;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ this.setDead();
|
||||
+ this.func_70106_y();
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ this.setDead();
|
||||
+ this.func_70106_y();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (item != null && item.stackSize <= 0)
|
||||
+ if (item != null && item.field_77994_a <= 0)
|
||||
+ {
|
||||
this.setDead();
|
||||
this.func_70106_y();
|
||||
}
|
||||
}
|
||||
@@ -254,6 +294,7 @@
|
||||
@@ -242,6 +282,7 @@
|
||||
{
|
||||
par1NBTTagCompound.setShort("Health", (short)((byte)this.health));
|
||||
par1NBTTagCompound.setShort("Age", (short)this.age);
|
||||
+ par1NBTTagCompound.setInteger("Lifespan", lifespan);
|
||||
p_70014_1_.func_74777_a("Health", (short)((byte)this.field_70291_e));
|
||||
p_70014_1_.func_74777_a("Age", (short)this.field_70292_b);
|
||||
+ p_70014_1_.func_74768_a("Lifespan", lifespan);
|
||||
|
||||
if (this.func_145800_j() != null)
|
||||
{
|
||||
@@ -290,10 +331,17 @@
|
||||
NBTTagCompound nbttagcompound1 = par1NBTTagCompound.getCompoundTag("Item");
|
||||
this.setEntityItemStack(ItemStack.loadItemStackFromNBT(nbttagcompound1));
|
||||
@@ -277,20 +318,39 @@
|
||||
NBTTagCompound nbttagcompound1 = p_70037_1_.func_74775_l("Item");
|
||||
this.func_92058_a(ItemStack.func_77949_a(nbttagcompound1));
|
||||
|
||||
- if (this.getEntityItem() == null)
|
||||
+ ItemStack item = getDataWatcher().getWatchableObjectItemStack(10);
|
||||
- if (this.func_92059_d() == null)
|
||||
+ ItemStack item = func_70096_w().func_82710_f(10);
|
||||
+
|
||||
+ if (item == null || item.stackSize <= 0)
|
||||
+ if (item == null || item.field_77994_a <= 0)
|
||||
{
|
||||
this.setDead();
|
||||
this.func_70106_y();
|
||||
}
|
||||
+
|
||||
+ if (par1NBTTagCompound.hasKey("Lifespan"))
|
||||
+ if (p_70037_1_.func_74764_b("Lifespan"))
|
||||
+ {
|
||||
+ lifespan = par1NBTTagCompound.getInteger("Lifespan");
|
||||
+ lifespan = p_70037_1_.func_74762_e("Lifespan");
|
||||
+ }
|
||||
}
|
||||
|
||||
// JAVADOC METHOD $$ func_70100_b_
|
||||
@@ -301,10 +349,22 @@
|
||||
public void func_70100_b_(EntityPlayer p_70100_1_)
|
||||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
if (!this.field_70170_p.field_72995_K)
|
||||
{
|
||||
+ if (this.delayBeforeCanPickup > 0)
|
||||
+ if (this.field_145804_b > 0)
|
||||
+ {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ EntityItemPickupEvent event = new EntityItemPickupEvent(par1EntityPlayer, this);
|
||||
+ EntityItemPickupEvent event = new EntityItemPickupEvent(p_70100_1_, this);
|
||||
+
|
||||
+ if (MinecraftForge.EVENT_BUS.post(event))
|
||||
+ {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
ItemStack itemstack = this.getEntityItem();
|
||||
int i = itemstack.stackSize;
|
||||
ItemStack itemstack = this.func_92059_d();
|
||||
int i = itemstack.field_77994_a;
|
||||
|
||||
- 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 (this.field_145804_b == 0 && (this.field_145802_g == null || 6000 - this.field_70292_b <= 200 || this.field_145802_g.equals(p_70100_1_.func_70005_c_())) && p_70100_1_.field_71071_by.func_70441_a(itemstack))
|
||||
+ if (this.field_145804_b <= 0 && (this.field_145802_g == null || lifespan - this.field_70292_b <= 200 || this.field_145802_g.equals(p_70100_1_.func_70005_c_())) && (event.getResult() == Result.ALLOW || i <= 0 || p_70100_1_.field_71071_by.func_70441_a(itemstack)))
|
||||
{
|
||||
if (itemstack.getItem() == Item.getItemFromBlock(Blocks.log))
|
||||
if (itemstack.func_77973_b() == Item.func_150898_a(Blocks.field_150364_r))
|
||||
{
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue