Back to srgnames for patches. We should be starting to look OK now.
This commit is contained in:
parent
b5815a3b8d
commit
e70fb50b51
321 changed files with 6253 additions and 5933 deletions
|
@ -50,8 +50,8 @@ minecraft {
|
||||||
patchDir "patches/minecraft"
|
patchDir "patches/minecraft"
|
||||||
patchAfter "clean"
|
patchAfter "clean"
|
||||||
genPatchesFrom "clean"
|
genPatchesFrom "clean"
|
||||||
genMcpPatches = true
|
genMcpPatches = false
|
||||||
applyMcpPatches = true
|
applyMcpPatches = false
|
||||||
with common
|
with common
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,184 +3,184 @@
|
||||||
@@ -38,8 +38,9 @@
|
@@ -38,8 +38,9 @@
|
||||||
public class Block
|
public class Block
|
||||||
{
|
{
|
||||||
private static final ResourceLocation AIR_ID = new ResourceLocation("air");
|
private static final ResourceLocation field_176230_a = new ResourceLocation("air");
|
||||||
- public static final RegistryNamespacedDefaultedByKey<ResourceLocation, Block> blockRegistry = new RegistryNamespacedDefaultedByKey(AIR_ID);
|
- public static final RegistryNamespacedDefaultedByKey<ResourceLocation, Block> field_149771_c = new RegistryNamespacedDefaultedByKey(field_176230_a);
|
||||||
- public static final ObjectIntIdentityMap<IBlockState> BLOCK_STATE_IDS = new ObjectIntIdentityMap();
|
- public static final ObjectIntIdentityMap<IBlockState> field_176229_d = new ObjectIntIdentityMap();
|
||||||
+ public static final RegistryNamespacedDefaultedByKey<ResourceLocation,Block> blockRegistry = net.minecraftforge.fml.common.registry.GameData.getBlockRegistry();
|
+ public static final RegistryNamespacedDefaultedByKey<ResourceLocation,Block> field_149771_c = net.minecraftforge.fml.common.registry.GameData.getBlockRegistry();
|
||||||
+ @Deprecated //Modders: DO NOT use this! Use GameRegistry
|
+ @Deprecated //Modders: DO NOT use this! Use GameRegistry
|
||||||
+ public static final ObjectIntIdentityMap<IBlockState> BLOCK_STATE_IDS = net.minecraftforge.fml.common.registry.GameData.getBlockStateIDMap();
|
+ public static final ObjectIntIdentityMap<IBlockState> field_176229_d = net.minecraftforge.fml.common.registry.GameData.getBlockStateIDMap();
|
||||||
private CreativeTabs displayOnCreativeTab;
|
private CreativeTabs field_149772_a;
|
||||||
public static final Block.SoundType soundTypeStone = new Block.SoundType("stone", 1.0F, 1.0F);
|
public static final Block.SoundType field_149769_e = new Block.SoundType("stone", 1.0F, 1.0F);
|
||||||
public static final Block.SoundType soundTypeWood = new Block.SoundType("wood", 1.0F, 1.0F);
|
public static final Block.SoundType field_149766_f = new Block.SoundType("wood", 1.0F, 1.0F);
|
||||||
@@ -119,6 +120,9 @@
|
@@ -119,6 +120,9 @@
|
||||||
private IBlockState defaultBlockState;
|
private IBlockState field_176228_M;
|
||||||
private String unlocalizedName;
|
private String field_149770_b;
|
||||||
|
|
||||||
+ public final net.minecraftforge.fml.common.registry.RegistryDelegate<Block> delegate =
|
+ public final net.minecraftforge.fml.common.registry.RegistryDelegate<Block> delegate =
|
||||||
+ ((net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry)blockRegistry).getDelegate(this, Block.class);
|
+ ((net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry)field_149771_c).getDelegate(this, Block.class);
|
||||||
+
|
+
|
||||||
public static int getIdFromBlock(Block blockIn)
|
public static int func_149682_b(Block p_149682_0_)
|
||||||
{
|
{
|
||||||
return blockRegistry.getIDForObject(blockIn);
|
return field_149771_c.func_148757_b(p_149682_0_);
|
||||||
@@ -132,7 +136,8 @@
|
@@ -132,7 +136,8 @@
|
||||||
|
|
||||||
public static Block getBlockById(int id)
|
public static Block func_149729_e(int p_149729_0_)
|
||||||
{
|
{
|
||||||
- return (Block)blockRegistry.getObjectById(id);
|
- return (Block)field_149771_c.func_148754_a(p_149729_0_);
|
||||||
+ Block ret = (Block)blockRegistry.getObjectById(id);
|
+ Block ret = (Block)field_149771_c.func_148754_a(p_149729_0_);
|
||||||
+ return ret == null ? net.minecraft.init.Blocks.air : ret;
|
+ return ret == null ? net.minecraft.init.Blocks.field_150350_a : ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IBlockState getStateById(int id)
|
public static IBlockState func_176220_d(int p_176220_0_)
|
||||||
@@ -303,7 +308,7 @@
|
@@ -303,7 +308,7 @@
|
||||||
|
|
||||||
public boolean isReplaceable(World worldIn, BlockPos pos)
|
public boolean func_176200_f(World p_176200_1_, BlockPos p_176200_2_)
|
||||||
{
|
{
|
||||||
- return false;
|
- return false;
|
||||||
+ return getMaterial().isReplaceable();
|
+ return func_149688_o().func_76222_j();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Block setHardness(float hardness)
|
public Block func_149711_c(float p_149711_1_)
|
||||||
@@ -340,9 +345,10 @@
|
@@ -340,9 +345,10 @@
|
||||||
return this.needsRandomTick;
|
return this.field_149789_z;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ @Deprecated //Forge: New State sensitive version.
|
+ @Deprecated //Forge: New State sensitive version.
|
||||||
public boolean hasTileEntity()
|
public boolean func_149716_u()
|
||||||
{
|
{
|
||||||
- return this.isBlockContainer;
|
- return this.field_149758_A;
|
||||||
+ return hasTileEntity(getDefaultState());
|
+ return hasTileEntity(func_176223_P());
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void setBlockBounds(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
|
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_)
|
||||||
@@ -359,13 +365,13 @@
|
@@ -359,13 +365,13 @@
|
||||||
public int getMixedBrightnessForBlock(IBlockAccess worldIn, BlockPos pos)
|
public int func_176207_c(IBlockAccess p_176207_1_, BlockPos p_176207_2_)
|
||||||
{
|
{
|
||||||
Block block = worldIn.getBlockState(pos).getBlock();
|
Block block = p_176207_1_.func_180495_p(p_176207_2_).func_177230_c();
|
||||||
- int i = worldIn.getCombinedLight(pos, block.getLightValue());
|
- int i = p_176207_1_.func_175626_b(p_176207_2_, block.func_149750_m());
|
||||||
+ int i = worldIn.getCombinedLight(pos, block.getLightValue(worldIn, pos));
|
+ int i = p_176207_1_.func_175626_b(p_176207_2_, block.getLightValue(p_176207_1_, p_176207_2_));
|
||||||
|
|
||||||
if (i == 0 && block instanceof BlockSlab)
|
if (i == 0 && block instanceof BlockSlab)
|
||||||
{
|
{
|
||||||
pos = pos.down();
|
p_176207_2_ = p_176207_2_.func_177977_b();
|
||||||
block = worldIn.getBlockState(pos).getBlock();
|
block = p_176207_1_.func_180495_p(p_176207_2_).func_177230_c();
|
||||||
- return worldIn.getCombinedLight(pos, block.getLightValue());
|
- return p_176207_1_.func_175626_b(p_176207_2_, block.func_149750_m());
|
||||||
+ return worldIn.getCombinedLight(pos, block.getLightValue(worldIn, pos));
|
+ return p_176207_1_.func_175626_b(p_176207_2_, block.getLightValue(p_176207_1_, p_176207_2_));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -453,6 +459,10 @@
|
@@ -453,6 +459,10 @@
|
||||||
|
|
||||||
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
|
public void func_180663_b(World p_180663_1_, BlockPos p_180663_2_, IBlockState p_180663_3_)
|
||||||
{
|
{
|
||||||
+ if (hasTileEntity(state) && !(this instanceof BlockContainer))
|
+ if (hasTileEntity(p_180663_3_) && !(this instanceof BlockContainer))
|
||||||
+ {
|
+ {
|
||||||
+ worldIn.removeTileEntity(pos);
|
+ p_180663_1_.func_175713_t(p_180663_2_);
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
||||||
public int quantityDropped(Random random)
|
public int func_149745_a(Random p_149745_1_)
|
||||||
@@ -467,8 +477,7 @@
|
@@ -467,8 +477,7 @@
|
||||||
|
|
||||||
public float getPlayerRelativeBlockHardness(EntityPlayer playerIn, World worldIn, BlockPos pos)
|
public float func_180647_a(EntityPlayer p_180647_1_, World p_180647_2_, BlockPos p_180647_3_)
|
||||||
{
|
{
|
||||||
- float f = this.getBlockHardness(worldIn, pos);
|
- float f = this.func_176195_g(p_180647_2_, p_180647_3_);
|
||||||
- return f < 0.0F ? 0.0F : (!playerIn.canHarvestBlock(this) ? playerIn.getToolDigEfficiency(this) / f / 100.0F : playerIn.getToolDigEfficiency(this) / f / 30.0F);
|
- return f < 0.0F ? 0.0F : (!p_180647_1_.func_146099_a(this) ? p_180647_1_.func_180471_a(this) / f / 100.0F : p_180647_1_.func_180471_a(this) / f / 30.0F);
|
||||||
+ return net.minecraftforge.common.ForgeHooks.blockStrength(worldIn.getBlockState(pos), playerIn, worldIn, pos);
|
+ return net.minecraftforge.common.ForgeHooks.blockStrength(p_180647_2_.func_180495_p(p_180647_3_), p_180647_1_, p_180647_2_, p_180647_3_);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void dropBlockAsItem(World worldIn, BlockPos pos, IBlockState state, int forture)
|
public final void func_176226_b(World p_176226_1_, BlockPos p_176226_2_, IBlockState p_176226_3_, int p_176226_4_)
|
||||||
@@ -478,20 +487,16 @@
|
@@ -478,20 +487,16 @@
|
||||||
|
|
||||||
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
|
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||||
{
|
{
|
||||||
- if (!worldIn.isRemote)
|
- if (!p_180653_1_.field_72995_K)
|
||||||
+ if (!worldIn.isRemote && !worldIn.restoringBlockSnapshots) // do not drop items while restoring blockstates, prevents item dupe
|
+ if (!p_180653_1_.field_72995_K && !p_180653_1_.restoringBlockSnapshots) // do not drop items while restoring blockstates, prevents item dupe
|
||||||
{
|
{
|
||||||
- int i = this.quantityDroppedWithBonus(fortune, worldIn.rand);
|
- int i = this.func_149679_a(p_180653_5_, p_180653_1_.field_73012_v);
|
||||||
+ java.util.List<ItemStack> items = getDrops(worldIn, pos, state, fortune);
|
+ java.util.List<ItemStack> items = getDrops(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_5_);
|
||||||
+ chance = net.minecraftforge.event.ForgeEventFactory.fireBlockHarvesting(items, worldIn, pos, state, fortune, chance, false, harvesters.get());
|
+ p_180653_4_ = net.minecraftforge.event.ForgeEventFactory.fireBlockHarvesting(items, p_180653_1_, p_180653_2_, p_180653_3_, p_180653_5_, p_180653_4_, false, harvesters.get());
|
||||||
|
|
||||||
- for (int j = 0; j < i; ++j)
|
- for (int j = 0; j < i; ++j)
|
||||||
+ for (ItemStack item : items)
|
+ for (ItemStack item : items)
|
||||||
{
|
{
|
||||||
if (worldIn.rand.nextFloat() <= chance)
|
if (p_180653_1_.field_73012_v.nextFloat() <= p_180653_4_)
|
||||||
{
|
{
|
||||||
- Item item = this.getItemDropped(state, worldIn.rand, fortune);
|
- Item item = this.func_180660_a(p_180653_3_, p_180653_1_.field_73012_v, p_180653_5_);
|
||||||
-
|
-
|
||||||
- if (item != null)
|
- if (item != null)
|
||||||
- {
|
- {
|
||||||
- spawnAsEntity(worldIn, pos, new ItemStack(item, 1, this.damageDropped(state)));
|
- func_180635_a(p_180653_1_, p_180653_2_, new ItemStack(item, 1, this.func_180651_a(p_180653_3_)));
|
||||||
- }
|
- }
|
||||||
+ spawnAsEntity(worldIn, pos, item);
|
+ func_180635_a(p_180653_1_, p_180653_2_, item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -499,8 +504,13 @@
|
@@ -499,8 +504,13 @@
|
||||||
|
|
||||||
public static void spawnAsEntity(World worldIn, BlockPos pos, ItemStack stack)
|
public static void func_180635_a(World p_180635_0_, BlockPos p_180635_1_, ItemStack p_180635_2_)
|
||||||
{
|
{
|
||||||
- if (!worldIn.isRemote && worldIn.getGameRules().getGameRuleBooleanValue("doTileDrops"))
|
- if (!p_180635_0_.field_72995_K && p_180635_0_.func_82736_K().func_82766_b("doTileDrops"))
|
||||||
+ if (!worldIn.isRemote && worldIn.getGameRules().getGameRuleBooleanValue("doTileDrops") && !worldIn.restoringBlockSnapshots) // do not drop items while restoring blockstates, prevents item dupe
|
+ if (!p_180635_0_.field_72995_K && p_180635_0_.func_82736_K().func_82766_b("doTileDrops") && !p_180635_0_.restoringBlockSnapshots) // do not drop items while restoring blockstates, prevents item dupe
|
||||||
{
|
{
|
||||||
+ if (captureDrops.get())
|
+ if (captureDrops.get())
|
||||||
+ {
|
+ {
|
||||||
+ capturedDrops.get().add(stack);
|
+ capturedDrops.get().add(p_180635_2_);
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
float f = 0.5F;
|
float f = 0.5F;
|
||||||
double d0 = (double)(worldIn.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
|
double d0 = (double)(p_180635_0_.field_73012_v.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
|
||||||
double d1 = (double)(worldIn.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
|
double d1 = (double)(p_180635_0_.field_73012_v.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
|
||||||
@@ -687,7 +697,7 @@
|
@@ -687,7 +697,7 @@
|
||||||
|
|
||||||
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
|
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
|
||||||
{
|
{
|
||||||
- return worldIn.getBlockState(pos).getBlock().blockMaterial.isReplaceable();
|
- return p_176196_1_.func_180495_p(p_176196_2_).func_177230_c().field_149764_J.func_76222_j();
|
||||||
+ return worldIn.getBlockState(pos).getBlock().isReplaceable(worldIn, pos);
|
+ return p_176196_1_.func_180495_p(p_176196_2_).func_177230_c().func_176200_f(p_176196_1_, p_176196_2_);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
|
public boolean func_180639_a(World p_180639_1_, BlockPos p_180639_2_, IBlockState p_180639_3_, EntityPlayer p_180639_4_, EnumFacing p_180639_5_, float p_180639_6_, float p_180639_7_, float p_180639_8_)
|
||||||
@@ -799,25 +809,35 @@
|
@@ -799,25 +809,35 @@
|
||||||
player.triggerAchievement(StatList.mineBlockStatArray[getIdFromBlock(this)]);
|
p_180657_2_.func_71029_a(StatList.field_75934_C[func_149682_b(this)]);
|
||||||
player.addExhaustion(0.025F);
|
p_180657_2_.func_71020_j(0.025F);
|
||||||
|
|
||||||
- if (this.canSilkHarvest() && EnchantmentHelper.getSilkTouchModifier(player))
|
- if (this.func_149700_E() && EnchantmentHelper.func_77502_d(p_180657_2_))
|
||||||
+ if (this.canSilkHarvest(worldIn, pos, worldIn.getBlockState(pos), player) && EnchantmentHelper.getSilkTouchModifier(player))
|
+ if (this.canSilkHarvest(p_180657_1_, p_180657_3_, p_180657_1_.func_180495_p(p_180657_3_), p_180657_2_) && EnchantmentHelper.func_77502_d(p_180657_2_))
|
||||||
{
|
{
|
||||||
+ java.util.ArrayList<ItemStack> items = new java.util.ArrayList<ItemStack>();
|
+ java.util.ArrayList<ItemStack> items = new java.util.ArrayList<ItemStack>();
|
||||||
ItemStack itemstack = this.createStackedBlock(state);
|
ItemStack itemstack = this.func_180643_i(p_180657_4_);
|
||||||
|
|
||||||
if (itemstack != null)
|
if (itemstack != null)
|
||||||
{
|
{
|
||||||
- spawnAsEntity(worldIn, pos, itemstack);
|
- func_180635_a(p_180657_1_, p_180657_3_, itemstack);
|
||||||
+ items.add(itemstack);
|
+ items.add(itemstack);
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ net.minecraftforge.event.ForgeEventFactory.fireBlockHarvesting(items, worldIn, pos, worldIn.getBlockState(pos), 0, 1.0f, true, player);
|
+ net.minecraftforge.event.ForgeEventFactory.fireBlockHarvesting(items, p_180657_1_, p_180657_3_, p_180657_1_.func_180495_p(p_180657_3_), 0, 1.0f, true, p_180657_2_);
|
||||||
+ for (ItemStack stack : items)
|
+ for (ItemStack stack : items)
|
||||||
+ {
|
+ {
|
||||||
+ spawnAsEntity(worldIn, pos, stack);
|
+ func_180635_a(p_180657_1_, p_180657_3_, stack);
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
+ harvesters.set(player);
|
+ harvesters.set(p_180657_2_);
|
||||||
int i = EnchantmentHelper.getFortuneModifier(player);
|
int i = EnchantmentHelper.func_77517_e(p_180657_2_);
|
||||||
this.dropBlockAsItem(worldIn, pos, state, i);
|
this.func_176226_b(p_180657_1_, p_180657_3_, p_180657_4_, i);
|
||||||
+ harvesters.set(null);
|
+ harvesters.set(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ @Deprecated //Forge: State sensitive version
|
+ @Deprecated //Forge: State sensitive version
|
||||||
protected boolean canSilkHarvest()
|
protected boolean func_149700_E()
|
||||||
{
|
{
|
||||||
- return this.isFullCube() && !this.isBlockContainer;
|
- return this.func_149686_d() && !this.field_149758_A;
|
||||||
+ return this.isFullCube() && !this.hasTileEntity(silk_check_state.get());
|
+ return this.func_149686_d() && !this.hasTileEntity(silk_check_state.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ItemStack createStackedBlock(IBlockState state)
|
protected ItemStack func_180643_i(IBlockState p_180643_1_)
|
||||||
@@ -1010,6 +1030,1029 @@
|
@@ -1010,6 +1030,1029 @@
|
||||||
return "Block{" + blockRegistry.getNameForObject(this) + "}";
|
return "Block{" + field_149771_c.func_177774_c(this) + "}";
|
||||||
}
|
}
|
||||||
|
|
||||||
+ /* ======================================== FORGE START =====================================*/
|
+ /* ======================================== FORGE START =====================================*/
|
||||||
|
@ -197,12 +197,12 @@
|
||||||
+ */
|
+ */
|
||||||
+ public int getLightValue(IBlockAccess world, BlockPos pos)
|
+ public int getLightValue(IBlockAccess world, BlockPos pos)
|
||||||
+ {
|
+ {
|
||||||
+ Block block = world.getBlockState(pos).getBlock();
|
+ Block block = world.func_180495_p(pos).func_177230_c();
|
||||||
+ if (block != this)
|
+ if (block != this)
|
||||||
+ {
|
+ {
|
||||||
+ return block.getLightValue(world, pos);
|
+ return block.getLightValue(world, pos);
|
||||||
+ }
|
+ }
|
||||||
+ return getLightValue();
|
+ return func_149750_m();
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -226,7 +226,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public boolean isNormalCube(IBlockAccess world, BlockPos pos)
|
+ public boolean isNormalCube(IBlockAccess world, BlockPos pos)
|
||||||
+ {
|
+ {
|
||||||
+ return getMaterial().isOpaque() && isFullCube() && !canProvidePower();
|
+ return func_149688_o().func_76218_k() && func_149686_d() && !func_149744_f();
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -239,11 +239,11 @@
|
||||||
+ */
|
+ */
|
||||||
+ public boolean isSideSolid(IBlockAccess world, BlockPos pos, EnumFacing side)
|
+ public boolean isSideSolid(IBlockAccess world, BlockPos pos, EnumFacing side)
|
||||||
+ {
|
+ {
|
||||||
+ IBlockState state = this.getActualState(world.getBlockState(pos), world, pos);
|
+ IBlockState state = this.func_176221_a(world.func_180495_p(pos), world, pos);
|
||||||
+
|
+
|
||||||
+ if (this instanceof BlockSlab)
|
+ if (this instanceof BlockSlab)
|
||||||
+ {
|
+ {
|
||||||
+ return isFullBlock() || (state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.TOP && side == EnumFacing.UP);
|
+ return func_149730_j() || (state.func_177229_b(BlockSlab.field_176554_a) == BlockSlab.EnumBlockHalf.TOP && side == EnumFacing.UP);
|
||||||
+ }
|
+ }
|
||||||
+ else if (this instanceof BlockFarmland)
|
+ else if (this instanceof BlockFarmland)
|
||||||
+ {
|
+ {
|
||||||
|
@ -251,26 +251,26 @@
|
||||||
+ }
|
+ }
|
||||||
+ else if (this instanceof BlockStairs)
|
+ else if (this instanceof BlockStairs)
|
||||||
+ {
|
+ {
|
||||||
+ boolean flipped = state.getValue(BlockStairs.HALF) == BlockStairs.EnumHalf.TOP;
|
+ boolean flipped = state.func_177229_b(BlockStairs.field_176308_b) == BlockStairs.EnumHalf.TOP;
|
||||||
+ BlockStairs.EnumShape shape = (BlockStairs.EnumShape)state.getValue(BlockStairs.SHAPE);
|
+ BlockStairs.EnumShape shape = (BlockStairs.EnumShape)state.func_177229_b(BlockStairs.field_176310_M);
|
||||||
+ EnumFacing facing = (EnumFacing)state.getValue(BlockStairs.FACING);
|
+ EnumFacing facing = (EnumFacing)state.func_177229_b(BlockStairs.field_176309_a);
|
||||||
+ if (side == EnumFacing.UP) return flipped;
|
+ if (side == EnumFacing.UP) return flipped;
|
||||||
+ if (facing == side) return true;
|
+ if (facing == side) return true;
|
||||||
+ if (flipped)
|
+ if (flipped)
|
||||||
+ {
|
+ {
|
||||||
+ if (shape == BlockStairs.EnumShape.INNER_LEFT ) return side == facing.rotateYCCW();
|
+ if (shape == BlockStairs.EnumShape.INNER_LEFT ) return side == facing.func_176735_f();
|
||||||
+ if (shape == BlockStairs.EnumShape.INNER_RIGHT) return side == facing.rotateY();
|
+ if (shape == BlockStairs.EnumShape.INNER_RIGHT) return side == facing.func_176746_e();
|
||||||
+ }
|
+ }
|
||||||
+ else
|
+ else
|
||||||
+ {
|
+ {
|
||||||
+ if (shape == BlockStairs.EnumShape.INNER_LEFT ) return side == facing.rotateY();
|
+ if (shape == BlockStairs.EnumShape.INNER_LEFT ) return side == facing.func_176746_e();
|
||||||
+ if (shape == BlockStairs.EnumShape.INNER_RIGHT) return side == facing.rotateYCCW();
|
+ if (shape == BlockStairs.EnumShape.INNER_RIGHT) return side == facing.func_176735_f();
|
||||||
+ }
|
+ }
|
||||||
+ return false;
|
+ return false;
|
||||||
+ }
|
+ }
|
||||||
+ else if (this instanceof BlockSnow)
|
+ else if (this instanceof BlockSnow)
|
||||||
+ {
|
+ {
|
||||||
+ return ((Integer)state.getValue(BlockSnow.LAYERS)) >= 8;
|
+ return ((Integer)state.func_177229_b(BlockSnow.field_176315_a)) >= 8;
|
||||||
+ }
|
+ }
|
||||||
+ else if (this instanceof BlockHopper && side == EnumFacing.UP)
|
+ else if (this instanceof BlockHopper && side == EnumFacing.UP)
|
||||||
+ {
|
+ {
|
||||||
|
@ -308,7 +308,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public boolean isAir(IBlockAccess world, BlockPos pos)
|
+ public boolean isAir(IBlockAccess world, BlockPos pos)
|
||||||
+ {
|
+ {
|
||||||
+ return getMaterial() == Material.air;
|
+ return func_149688_o() == Material.field_151579_a;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -343,7 +343,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public boolean removedByPlayer(World world, BlockPos pos, EntityPlayer player, boolean willHarvest)
|
+ public boolean removedByPlayer(World world, BlockPos pos, EntityPlayer player, boolean willHarvest)
|
||||||
+ {
|
+ {
|
||||||
+ return world.setBlockToAir(pos);
|
+ return world.func_175698_g(pos);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -357,7 +357,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public int getFlammability(IBlockAccess world, BlockPos pos, EnumFacing face)
|
+ public int getFlammability(IBlockAccess world, BlockPos pos, EnumFacing face)
|
||||||
+ {
|
+ {
|
||||||
+ return net.minecraft.init.Blocks.fire.getFlammability(this);
|
+ return net.minecraft.init.Blocks.field_150480_ab.func_176532_c(this);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -385,7 +385,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public int getFireSpreadSpeed(IBlockAccess world, BlockPos pos, EnumFacing face)
|
+ public int getFireSpreadSpeed(IBlockAccess world, BlockPos pos, EnumFacing face)
|
||||||
+ {
|
+ {
|
||||||
+ return net.minecraft.init.Blocks.fire.getEncouragement(this);
|
+ return net.minecraft.init.Blocks.field_150480_ab.func_176534_d(this);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -401,11 +401,11 @@
|
||||||
+ */
|
+ */
|
||||||
+ public boolean isFireSource(World world, BlockPos pos, EnumFacing side)
|
+ public boolean isFireSource(World world, BlockPos pos, EnumFacing side)
|
||||||
+ {
|
+ {
|
||||||
+ if (this == net.minecraft.init.Blocks.netherrack && side == EnumFacing.UP)
|
+ if (this == net.minecraft.init.Blocks.field_150424_aL && side == EnumFacing.UP)
|
||||||
+ {
|
+ {
|
||||||
+ return true;
|
+ return true;
|
||||||
+ }
|
+ }
|
||||||
+ if ((world.provider instanceof net.minecraft.world.WorldProviderEnd) && this == net.minecraft.init.Blocks.bedrock && side == EnumFacing.UP)
|
+ if ((world.field_73011_w instanceof net.minecraft.world.WorldProviderEnd) && this == net.minecraft.init.Blocks.field_150357_h && side == EnumFacing.UP)
|
||||||
+ {
|
+ {
|
||||||
+ return true;
|
+ return true;
|
||||||
+ }
|
+ }
|
||||||
|
@ -440,7 +440,7 @@
|
||||||
+ {
|
+ {
|
||||||
+ if (isTileProvider)
|
+ if (isTileProvider)
|
||||||
+ {
|
+ {
|
||||||
+ return ((ITileEntityProvider)this).createNewTileEntity(world, getMetaFromState(state));
|
+ return ((ITileEntityProvider)this).func_149915_a(world, func_176201_c(state));
|
||||||
+ }
|
+ }
|
||||||
+ return null;
|
+ return null;
|
||||||
+ }
|
+ }
|
||||||
|
@ -456,7 +456,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public int quantityDropped(IBlockState state, int fortune, Random random)
|
+ public int quantityDropped(IBlockState state, int fortune, Random random)
|
||||||
+ {
|
+ {
|
||||||
+ return quantityDroppedWithBonus(fortune, random);
|
+ return func_149679_a(fortune, random);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -472,15 +472,15 @@
|
||||||
+ {
|
+ {
|
||||||
+ List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
|
+ List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
|
||||||
+
|
+
|
||||||
+ Random rand = world instanceof World ? ((World)world).rand : RANDOM;
|
+ Random rand = world instanceof World ? ((World)world).field_73012_v : RANDOM;
|
||||||
+
|
+
|
||||||
+ int count = quantityDropped(state, fortune, rand);
|
+ int count = quantityDropped(state, fortune, rand);
|
||||||
+ for(int i = 0; i < count; i++)
|
+ for(int i = 0; i < count; i++)
|
||||||
+ {
|
+ {
|
||||||
+ Item item = this.getItemDropped(state, rand, fortune);
|
+ Item item = this.func_180660_a(state, rand, fortune);
|
||||||
+ if (item != null)
|
+ if (item != null)
|
||||||
+ {
|
+ {
|
||||||
+ ret.add(new ItemStack(item, 1, this.damageDropped(state)));
|
+ ret.add(new ItemStack(item, 1, this.func_180651_a(state)));
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ return ret;
|
+ return ret;
|
||||||
|
@ -498,7 +498,7 @@
|
||||||
+ public boolean canSilkHarvest(World world, BlockPos pos, IBlockState state, EntityPlayer player)
|
+ public boolean canSilkHarvest(World world, BlockPos pos, IBlockState state, EntityPlayer player)
|
||||||
+ {
|
+ {
|
||||||
+ silk_check_state.set(state);;
|
+ silk_check_state.set(state);;
|
||||||
+ boolean ret = this.canSilkHarvest();
|
+ boolean ret = this.func_149700_E();
|
||||||
+ silk_check_state.set(null);
|
+ silk_check_state.set(null);
|
||||||
+ return ret;
|
+ return ret;
|
||||||
+ }
|
+ }
|
||||||
|
@ -514,14 +514,14 @@
|
||||||
+ */
|
+ */
|
||||||
+ public boolean canCreatureSpawn(IBlockAccess world, BlockPos pos, net.minecraft.entity.EntityLiving.SpawnPlacementType type)
|
+ public boolean canCreatureSpawn(IBlockAccess world, BlockPos pos, net.minecraft.entity.EntityLiving.SpawnPlacementType type)
|
||||||
+ {
|
+ {
|
||||||
+ IBlockState state = world.getBlockState(pos);
|
+ IBlockState state = world.func_180495_p(pos);
|
||||||
+ if (this instanceof BlockSlab)
|
+ if (this instanceof BlockSlab)
|
||||||
+ {
|
+ {
|
||||||
+ return (isFullBlock() || state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.TOP);
|
+ return (func_149730_j() || state.func_177229_b(BlockSlab.field_176554_a) == BlockSlab.EnumBlockHalf.TOP);
|
||||||
+ }
|
+ }
|
||||||
+ else if (this instanceof BlockStairs)
|
+ else if (this instanceof BlockStairs)
|
||||||
+ {
|
+ {
|
||||||
+ return state.getValue(BlockStairs.HALF) == BlockStairs.EnumHalf.TOP;
|
+ return state.func_177229_b(BlockStairs.field_176308_b) == BlockStairs.EnumHalf.TOP;
|
||||||
+ }
|
+ }
|
||||||
+ return isSideSolid(world, pos, EnumFacing.UP);
|
+ return isSideSolid(world, pos, EnumFacing.UP);
|
||||||
+ }
|
+ }
|
||||||
|
@ -538,7 +538,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public boolean isBed(IBlockAccess world, BlockPos pos, Entity player)
|
+ public boolean isBed(IBlockAccess world, BlockPos pos, Entity player)
|
||||||
+ {
|
+ {
|
||||||
+ return this == net.minecraft.init.Blocks.bed;
|
+ return this == net.minecraft.init.Blocks.field_150324_C;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -553,7 +553,7 @@
|
||||||
+ public BlockPos getBedSpawnPosition(IBlockAccess world, BlockPos pos, EntityPlayer player)
|
+ public BlockPos getBedSpawnPosition(IBlockAccess world, BlockPos pos, EntityPlayer player)
|
||||||
+ {
|
+ {
|
||||||
+ if (world instanceof World)
|
+ if (world instanceof World)
|
||||||
+ return BlockBed.getSafeExitLocation((World)world, pos, 0);
|
+ return BlockBed.func_176468_a((World)world, pos, 0);
|
||||||
+ return null;
|
+ return null;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
@ -569,10 +569,10 @@
|
||||||
+ {
|
+ {
|
||||||
+ if (world instanceof World)
|
+ if (world instanceof World)
|
||||||
+ {
|
+ {
|
||||||
+ IBlockState state = world.getBlockState(pos);
|
+ IBlockState state = world.func_180495_p(pos);
|
||||||
+ state = state.getBlock().getActualState(state, world, pos);
|
+ state = state.func_177230_c().func_176221_a(state, world, pos);
|
||||||
+ state = state.withProperty(BlockBed.OCCUPIED, true);
|
+ state = state.func_177226_a(BlockBed.field_176471_b, true);
|
||||||
+ ((World)world).setBlockState(pos, state, 4);
|
+ ((World)world).func_180501_a(pos, state, 4);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
@ -586,7 +586,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public EnumFacing getBedDirection(IBlockAccess world, BlockPos pos)
|
+ public EnumFacing getBedDirection(IBlockAccess world, BlockPos pos)
|
||||||
+ {
|
+ {
|
||||||
+ return (EnumFacing)getActualState(world.getBlockState(pos), world, pos).getValue(BlockDirectional.FACING);
|
+ return (EnumFacing)func_176221_a(world.func_180495_p(pos), world, pos).func_177229_b(BlockDirectional.field_176387_N);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -598,7 +598,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public boolean isBedFoot(IBlockAccess world, BlockPos pos)
|
+ public boolean isBedFoot(IBlockAccess world, BlockPos pos)
|
||||||
+ {
|
+ {
|
||||||
+ return getActualState(world.getBlockState(pos), world, pos).getValue(BlockBed.PART) == BlockBed.EnumPartType.FOOT;
|
+ return func_176221_a(world.func_180495_p(pos), world, pos).func_177229_b(BlockBed.field_176472_a) == BlockBed.EnumPartType.FOOT;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -630,7 +630,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public boolean isLeaves(IBlockAccess world, BlockPos pos)
|
+ public boolean isLeaves(IBlockAccess world, BlockPos pos)
|
||||||
+ {
|
+ {
|
||||||
+ return getMaterial() == Material.leaves;
|
+ return func_149688_o() == Material.field_151584_j;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -642,7 +642,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public boolean canBeReplacedByLeaves(IBlockAccess world, BlockPos pos)
|
+ public boolean canBeReplacedByLeaves(IBlockAccess world, BlockPos pos)
|
||||||
+ {
|
+ {
|
||||||
+ return !isFullBlock();
|
+ return !func_149730_j();
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -667,7 +667,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public boolean isReplaceableOreGen(World world, BlockPos pos, com.google.common.base.Predicate<IBlockState> target)
|
+ public boolean isReplaceableOreGen(World world, BlockPos pos, com.google.common.base.Predicate<IBlockState> target)
|
||||||
+ {
|
+ {
|
||||||
+ return target.apply(world.getBlockState(pos));
|
+ return target.apply(world.func_180495_p(pos));
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -681,7 +681,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public float getExplosionResistance(World world, BlockPos pos, Entity exploder, Explosion explosion)
|
+ public float getExplosionResistance(World world, BlockPos pos, Entity exploder, Explosion explosion)
|
||||||
+ {
|
+ {
|
||||||
+ return getExplosionResistance(exploder);
|
+ return func_149638_a(exploder);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -695,8 +695,8 @@
|
||||||
+ */
|
+ */
|
||||||
+ public void onBlockExploded(World world, BlockPos pos, Explosion explosion)
|
+ public void onBlockExploded(World world, BlockPos pos, Explosion explosion)
|
||||||
+ {
|
+ {
|
||||||
+ world.setBlockToAir(pos);
|
+ world.func_175698_g(pos);
|
||||||
+ onBlockDestroyedByExplosion(world, pos, explosion);
|
+ func_180652_a(world, pos, explosion);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -710,7 +710,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public boolean canConnectRedstone(IBlockAccess world, BlockPos pos, EnumFacing side)
|
+ public boolean canConnectRedstone(IBlockAccess world, BlockPos pos, EnumFacing side)
|
||||||
+ {
|
+ {
|
||||||
+ return canProvidePower() && side != null;
|
+ return func_149744_f() && side != null;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -729,7 +729,7 @@
|
||||||
+ }
|
+ }
|
||||||
+ else
|
+ else
|
||||||
+ {
|
+ {
|
||||||
+ return this instanceof BlockFence || this == net.minecraft.init.Blocks.glass || this == net.minecraft.init.Blocks.cobblestone_wall || this == net.minecraft.init.Blocks.stained_glass;
|
+ return this instanceof BlockFence || this == net.minecraft.init.Blocks.field_150359_w || this == net.minecraft.init.Blocks.field_150463_bK || this == net.minecraft.init.Blocks.field_150399_cn;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
@ -759,15 +759,15 @@
|
||||||
+ @Deprecated
|
+ @Deprecated
|
||||||
+ public ItemStack getPickBlock(MovingObjectPosition target, World world, BlockPos pos)
|
+ public ItemStack getPickBlock(MovingObjectPosition target, World world, BlockPos pos)
|
||||||
+ {
|
+ {
|
||||||
+ Item item = getItem(world, pos);
|
+ Item item = func_180665_b(world, pos);
|
||||||
+
|
+
|
||||||
+ if (item == null)
|
+ if (item == null)
|
||||||
+ {
|
+ {
|
||||||
+ return null;
|
+ return null;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ Block block = item instanceof ItemBlock && !isFlowerPot() ? Block.getBlockFromItem(item) : this;
|
+ Block block = item instanceof ItemBlock && !func_149648_K() ? Block.func_149634_a(item) : this;
|
||||||
+ return new ItemStack(item, 1, block.getDamageValue(world, pos));
|
+ return new ItemStack(item, 1, block.func_176222_j(world, pos));
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -834,39 +834,39 @@
|
||||||
+ */
|
+ */
|
||||||
+ public boolean canSustainPlant(IBlockAccess world, BlockPos pos, EnumFacing direction, net.minecraftforge.common.IPlantable plantable)
|
+ public boolean canSustainPlant(IBlockAccess world, BlockPos pos, EnumFacing direction, net.minecraftforge.common.IPlantable plantable)
|
||||||
+ {
|
+ {
|
||||||
+ IBlockState state = world.getBlockState(pos);
|
+ IBlockState state = world.func_180495_p(pos);
|
||||||
+ IBlockState plant = plantable.getPlant(world, pos.offset(direction));
|
+ IBlockState plant = plantable.getPlant(world, pos.func_177972_a(direction));
|
||||||
+ net.minecraftforge.common.EnumPlantType plantType = plantable.getPlantType(world, pos.offset(direction));
|
+ net.minecraftforge.common.EnumPlantType plantType = plantable.getPlantType(world, pos.func_177972_a(direction));
|
||||||
+
|
+
|
||||||
+ if (plant.getBlock() == net.minecraft.init.Blocks.cactus && this == net.minecraft.init.Blocks.cactus)
|
+ if (plant.func_177230_c() == net.minecraft.init.Blocks.field_150434_aF && this == net.minecraft.init.Blocks.field_150434_aF)
|
||||||
+ {
|
+ {
|
||||||
+ return true;
|
+ return true;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (plant.getBlock() == net.minecraft.init.Blocks.reeds && this == net.minecraft.init.Blocks.reeds)
|
+ if (plant.func_177230_c() == net.minecraft.init.Blocks.field_150436_aH && this == net.minecraft.init.Blocks.field_150436_aH)
|
||||||
+ {
|
+ {
|
||||||
+ return true;
|
+ return true;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (plantable instanceof BlockBush && ((BlockBush)plantable).canPlaceBlockOn(this))
|
+ if (plantable instanceof BlockBush && ((BlockBush)plantable).func_149854_a(this))
|
||||||
+ {
|
+ {
|
||||||
+ return true;
|
+ return true;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ switch (plantType)
|
+ switch (plantType)
|
||||||
+ {
|
+ {
|
||||||
+ case Desert: return this == net.minecraft.init.Blocks.sand || this == net.minecraft.init.Blocks.hardened_clay || this == net.minecraft.init.Blocks.stained_hardened_clay || this == net.minecraft.init.Blocks.dirt;
|
+ case Desert: return this == net.minecraft.init.Blocks.field_150354_m || this == net.minecraft.init.Blocks.field_150405_ch || this == net.minecraft.init.Blocks.field_150406_ce || this == net.minecraft.init.Blocks.field_150346_d;
|
||||||
+ case Nether: return this == net.minecraft.init.Blocks.soul_sand;
|
+ case Nether: return this == net.minecraft.init.Blocks.field_150425_aM;
|
||||||
+ case Crop: return this == net.minecraft.init.Blocks.farmland;
|
+ case Crop: return this == net.minecraft.init.Blocks.field_150458_ak;
|
||||||
+ case Cave: return isSideSolid(world, pos, EnumFacing.UP);
|
+ case Cave: return isSideSolid(world, pos, EnumFacing.UP);
|
||||||
+ case Plains: return this == net.minecraft.init.Blocks.grass || this == net.minecraft.init.Blocks.dirt || this == net.minecraft.init.Blocks.farmland;
|
+ case Plains: return this == net.minecraft.init.Blocks.field_150349_c || this == net.minecraft.init.Blocks.field_150346_d || this == net.minecraft.init.Blocks.field_150458_ak;
|
||||||
+ case Water: return getMaterial() == Material.water && ((Integer)state.getValue(BlockLiquid.LEVEL)) == 0;
|
+ case Water: return func_149688_o() == Material.field_151586_h && ((Integer)state.func_177229_b(BlockLiquid.field_176367_b)) == 0;
|
||||||
+ case Beach:
|
+ case Beach:
|
||||||
+ boolean isBeach = this == net.minecraft.init.Blocks.grass || this == net.minecraft.init.Blocks.dirt || this == net.minecraft.init.Blocks.sand;
|
+ boolean isBeach = this == net.minecraft.init.Blocks.field_150349_c || this == net.minecraft.init.Blocks.field_150346_d || this == net.minecraft.init.Blocks.field_150354_m;
|
||||||
+ boolean hasWater = (world.getBlockState(pos.east()).getBlock().getMaterial() == Material.water ||
|
+ boolean hasWater = (world.func_180495_p(pos.func_177974_f()).func_177230_c().func_149688_o() == Material.field_151586_h ||
|
||||||
+ world.getBlockState(pos.west()).getBlock().getMaterial() == Material.water ||
|
+ world.func_180495_p(pos.func_177976_e()).func_177230_c().func_149688_o() == Material.field_151586_h ||
|
||||||
+ world.getBlockState(pos.north()).getBlock().getMaterial() == Material.water ||
|
+ world.func_180495_p(pos.func_177978_c()).func_177230_c().func_149688_o() == Material.field_151586_h ||
|
||||||
+ world.getBlockState(pos.south()).getBlock().getMaterial() == Material.water);
|
+ world.func_180495_p(pos.func_177968_d()).func_177230_c().func_149688_o() == Material.field_151586_h);
|
||||||
+ return isBeach && hasWater;
|
+ return isBeach && hasWater;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
@ -888,9 +888,9 @@
|
||||||
+ */
|
+ */
|
||||||
+ public void onPlantGrow(World world, BlockPos pos, BlockPos source)
|
+ public void onPlantGrow(World world, BlockPos pos, BlockPos source)
|
||||||
+ {
|
+ {
|
||||||
+ if (this == net.minecraft.init.Blocks.grass || this == net.minecraft.init.Blocks.farmland)
|
+ if (this == net.minecraft.init.Blocks.field_150349_c || this == net.minecraft.init.Blocks.field_150458_ak)
|
||||||
+ {
|
+ {
|
||||||
+ world.setBlockState(pos, net.minecraft.init.Blocks.dirt.getDefaultState(), 2);
|
+ world.func_180501_a(pos, net.minecraft.init.Blocks.field_150346_d.func_176223_P(), 2);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
@ -905,9 +905,9 @@
|
||||||
+ */
|
+ */
|
||||||
+ public boolean isFertile(World world, BlockPos pos)
|
+ public boolean isFertile(World world, BlockPos pos)
|
||||||
+ {
|
+ {
|
||||||
+ if (this == net.minecraft.init.Blocks.farmland)
|
+ if (this == net.minecraft.init.Blocks.field_150458_ak)
|
||||||
+ {
|
+ {
|
||||||
+ return ((Integer)world.getBlockState(pos).getValue(BlockFarmland.MOISTURE)) > 0;
|
+ return ((Integer)world.func_180495_p(pos).func_177229_b(BlockFarmland.field_176531_a)) > 0;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ return false;
|
+ return false;
|
||||||
|
@ -927,7 +927,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public int getLightOpacity(IBlockAccess world, BlockPos pos)
|
+ public int getLightOpacity(IBlockAccess world, BlockPos pos)
|
||||||
+ {
|
+ {
|
||||||
+ return getLightOpacity();
|
+ return func_149717_k();
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -941,7 +941,7 @@
|
||||||
+ {
|
+ {
|
||||||
+ if (entity instanceof net.minecraft.entity.boss.EntityDragon)
|
+ if (entity instanceof net.minecraft.entity.boss.EntityDragon)
|
||||||
+ {
|
+ {
|
||||||
+ return this != net.minecraft.init.Blocks.barrier && this != net.minecraft.init.Blocks.obsidian && this != net.minecraft.init.Blocks.end_stone && this != net.minecraft.init.Blocks.bedrock && this != net.minecraft.init.Blocks.command_block;
|
+ return this != net.minecraft.init.Blocks.field_180401_cv && this != net.minecraft.init.Blocks.field_150343_Z && this != net.minecraft.init.Blocks.field_150377_bs && this != net.minecraft.init.Blocks.field_150357_h && this != net.minecraft.init.Blocks.field_150483_bI;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ return true;
|
+ return true;
|
||||||
|
@ -957,7 +957,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public boolean isBeaconBase(IBlockAccess worldObj, BlockPos pos, BlockPos beacon)
|
+ public boolean isBeaconBase(IBlockAccess worldObj, BlockPos pos, BlockPos beacon)
|
||||||
+ {
|
+ {
|
||||||
+ return this == net.minecraft.init.Blocks.emerald_block || this == net.minecraft.init.Blocks.gold_block || this == net.minecraft.init.Blocks.diamond_block || this == net.minecraft.init.Blocks.iron_block;
|
+ return this == net.minecraft.init.Blocks.field_150475_bE || this == net.minecraft.init.Blocks.field_150340_R || this == net.minecraft.init.Blocks.field_150484_ah || this == net.minecraft.init.Blocks.field_150339_S;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -973,12 +973,12 @@
|
||||||
+ */
|
+ */
|
||||||
+ public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis)
|
+ public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis)
|
||||||
+ {
|
+ {
|
||||||
+ IBlockState state = world.getBlockState(pos);
|
+ IBlockState state = world.func_180495_p(pos);
|
||||||
+ for (IProperty prop : (java.util.Set<IProperty>)state.getProperties().keySet())
|
+ for (IProperty prop : (java.util.Set<IProperty>)state.func_177228_b().keySet())
|
||||||
+ {
|
+ {
|
||||||
+ if (prop.getName().equals("facing") || prop.getName().equals("rotation"))
|
+ if (prop.func_177701_a().equals("facing") || prop.func_177701_a().equals("rotation"))
|
||||||
+ {
|
+ {
|
||||||
+ world.setBlockState(pos, state.cycleProperty(prop));
|
+ world.func_175656_a(pos, state.func_177231_a(prop));
|
||||||
+ return true;
|
+ return true;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
@ -994,12 +994,12 @@
|
||||||
+ */
|
+ */
|
||||||
+ public EnumFacing[] getValidRotations(World world, BlockPos pos)
|
+ public EnumFacing[] getValidRotations(World world, BlockPos pos)
|
||||||
+ {
|
+ {
|
||||||
+ IBlockState state = world.getBlockState(pos);
|
+ IBlockState state = world.func_180495_p(pos);
|
||||||
+ for (IProperty prop : (java.util.Set<IProperty>)state.getProperties().keySet())
|
+ for (IProperty prop : (java.util.Set<IProperty>)state.func_177228_b().keySet())
|
||||||
+ {
|
+ {
|
||||||
+ if (prop.getName().equals("facing") && prop.getValueClass() == EnumFacing.class)
|
+ if (prop.func_177701_a().equals("facing") && prop.func_177699_b() == EnumFacing.class)
|
||||||
+ {
|
+ {
|
||||||
+ java.util.Collection<EnumFacing> values = ((java.util.Collection<EnumFacing>)prop.getAllowedValues());
|
+ java.util.Collection<EnumFacing> values = ((java.util.Collection<EnumFacing>)prop.func_177700_c());
|
||||||
+ return values.toArray(new EnumFacing[values.size()]);
|
+ return values.toArray(new EnumFacing[values.size()]);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
@ -1014,7 +1014,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public float getEnchantPowerBonus(World world, BlockPos pos)
|
+ public float getEnchantPowerBonus(World world, BlockPos pos)
|
||||||
+ {
|
+ {
|
||||||
+ return this == net.minecraft.init.Blocks.bookshelf ? 1 : 0;
|
+ return this == net.minecraft.init.Blocks.field_150342_X ? 1 : 0;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -1027,15 +1027,15 @@
|
||||||
+ */
|
+ */
|
||||||
+ public boolean recolorBlock(World world, BlockPos pos, EnumFacing side, net.minecraft.item.EnumDyeColor color)
|
+ public boolean recolorBlock(World world, BlockPos pos, EnumFacing side, net.minecraft.item.EnumDyeColor color)
|
||||||
+ {
|
+ {
|
||||||
+ IBlockState state = world.getBlockState(pos);
|
+ IBlockState state = world.func_180495_p(pos);
|
||||||
+ for (IProperty prop : (java.util.Set<IProperty>)state.getProperties().keySet())
|
+ for (IProperty prop : (java.util.Set<IProperty>)state.func_177228_b().keySet())
|
||||||
+ {
|
+ {
|
||||||
+ if (prop.getName().equals("color") && prop.getValueClass() == net.minecraft.item.EnumDyeColor.class)
|
+ if (prop.func_177701_a().equals("color") && prop.func_177699_b() == net.minecraft.item.EnumDyeColor.class)
|
||||||
+ {
|
+ {
|
||||||
+ net.minecraft.item.EnumDyeColor current = (net.minecraft.item.EnumDyeColor)state.getValue(prop);
|
+ net.minecraft.item.EnumDyeColor current = (net.minecraft.item.EnumDyeColor)state.func_177229_b(prop);
|
||||||
+ if (current != color)
|
+ if (current != color)
|
||||||
+ {
|
+ {
|
||||||
+ world.setBlockState(pos, state.withProperty(prop, color));
|
+ world.func_175656_a(pos, state.func_177226_a(prop, color));
|
||||||
+ return true;
|
+ return true;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
@ -1073,7 +1073,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public boolean shouldCheckWeakPower(IBlockAccess world, BlockPos pos, EnumFacing side)
|
+ public boolean shouldCheckWeakPower(IBlockAccess world, BlockPos pos, EnumFacing side)
|
||||||
+ {
|
+ {
|
||||||
+ return isNormalCube();
|
+ return func_149721_r();
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -1106,7 +1106,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public void setHarvestLevel(String toolClass, int level)
|
+ public void setHarvestLevel(String toolClass, int level)
|
||||||
+ {
|
+ {
|
||||||
+ java.util.Iterator<IBlockState> itr = getBlockState().getValidStates().iterator();
|
+ java.util.Iterator<IBlockState> itr = func_176194_O().func_177619_a().iterator();
|
||||||
+ while (itr.hasNext())
|
+ while (itr.hasNext())
|
||||||
+ {
|
+ {
|
||||||
+ setHarvestLevel(toolClass, level, itr.next());
|
+ setHarvestLevel(toolClass, level, itr.next());
|
||||||
|
@ -1127,7 +1127,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public void setHarvestLevel(String toolClass, int level, IBlockState state)
|
+ public void setHarvestLevel(String toolClass, int level, IBlockState state)
|
||||||
+ {
|
+ {
|
||||||
+ int idx = this.getMetaFromState(state);
|
+ int idx = this.func_176201_c(state);
|
||||||
+ this.harvestTool[idx] = toolClass;
|
+ this.harvestTool[idx] = toolClass;
|
||||||
+ this.harvestLevel[idx] = level;
|
+ this.harvestLevel[idx] = level;
|
||||||
+ }
|
+ }
|
||||||
|
@ -1138,7 +1138,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public String getHarvestTool(IBlockState state)
|
+ public String getHarvestTool(IBlockState state)
|
||||||
+ {
|
+ {
|
||||||
+ return harvestTool[getMetaFromState(state)];
|
+ return harvestTool[func_176201_c(state)];
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -1150,7 +1150,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public int getHarvestLevel(IBlockState state)
|
+ public int getHarvestLevel(IBlockState state)
|
||||||
+ {
|
+ {
|
||||||
+ return harvestLevel[getMetaFromState(state)];
|
+ return harvestLevel[func_176201_c(state)];
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -1159,7 +1159,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public boolean isToolEffective(String type, IBlockState state)
|
+ public boolean isToolEffective(String type, IBlockState state)
|
||||||
+ {
|
+ {
|
||||||
+ if ("pickaxe".equals(type) && (this == net.minecraft.init.Blocks.redstone_ore || this == net.minecraft.init.Blocks.lit_redstone_ore || this == net.minecraft.init.Blocks.obsidian))
|
+ if ("pickaxe".equals(type) && (this == net.minecraft.init.Blocks.field_150450_ax || this == net.minecraft.init.Blocks.field_150439_ay || this == net.minecraft.init.Blocks.field_150343_Z))
|
||||||
+ return false;
|
+ return false;
|
||||||
+ return type != null && type.equals(getHarvestTool(state));
|
+ return type != null && type.equals(getHarvestTool(state));
|
||||||
+ }
|
+ }
|
||||||
|
@ -1169,7 +1169,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos)
|
+ public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||||
+ {
|
+ {
|
||||||
+ return getActualState(state, world, pos);
|
+ return func_176221_a(state, world, pos);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -1178,7 +1178,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public boolean canRenderInLayer(EnumWorldBlockLayer layer)
|
+ public boolean canRenderInLayer(EnumWorldBlockLayer layer)
|
||||||
+ {
|
+ {
|
||||||
+ return getBlockLayer() == layer;
|
+ return func_180664_k() == layer;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ // For Internal use only to capture droped items inside getDrops
|
+ // For Internal use only to capture droped items inside getDrops
|
||||||
|
@ -1206,6 +1206,6 @@
|
||||||
+ }
|
+ }
|
||||||
+ /* ========================================= FORGE END ======================================*/
|
+ /* ========================================= FORGE END ======================================*/
|
||||||
+
|
+
|
||||||
public static void registerBlocks()
|
public static void func_149671_p()
|
||||||
{
|
{
|
||||||
registerBlock(0, AIR_ID, (new BlockAir()).setUnlocalizedName("air"));
|
func_176215_a(0, field_176230_a, (new BlockAir()).func_149663_c("air"));
|
||||||
|
|
|
@ -11,25 +11,25 @@
|
||||||
{
|
{
|
||||||
@@ -36,7 +36,7 @@
|
@@ -36,7 +36,7 @@
|
||||||
|
|
||||||
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
|
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
|
||||||
{
|
{
|
||||||
- return super.canPlaceBlockAt(worldIn, pos) && this.canPlaceBlockOn(worldIn.getBlockState(pos.down()).getBlock());
|
- return super.func_176196_c(p_176196_1_, p_176196_2_) && this.func_149854_a(p_176196_1_.func_180495_p(p_176196_2_.func_177977_b()).func_177230_c());
|
||||||
+ return super.canPlaceBlockAt(worldIn, pos) && worldIn.getBlockState(pos.down()).getBlock().canSustainPlant(worldIn, pos.down(), net.minecraft.util.EnumFacing.UP, this);
|
+ return super.func_176196_c(p_176196_1_, p_176196_2_) && p_176196_1_.func_180495_p(p_176196_2_.func_177977_b()).func_177230_c().canSustainPlant(p_176196_1_, p_176196_2_.func_177977_b(), net.minecraft.util.EnumFacing.UP, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean canPlaceBlockOn(Block ground)
|
protected boolean func_149854_a(Block p_149854_1_)
|
||||||
@@ -66,7 +66,10 @@
|
@@ -66,7 +66,10 @@
|
||||||
|
|
||||||
public boolean canBlockStay(World worldIn, BlockPos pos, IBlockState state)
|
public boolean func_180671_f(World p_180671_1_, BlockPos p_180671_2_, IBlockState p_180671_3_)
|
||||||
{
|
{
|
||||||
- return this.canPlaceBlockOn(worldIn.getBlockState(pos.down()).getBlock());
|
- return this.func_149854_a(p_180671_1_.func_180495_p(p_180671_2_.func_177977_b()).func_177230_c());
|
||||||
+ BlockPos down = pos.down();
|
+ BlockPos down = p_180671_2_.func_177977_b();
|
||||||
+ Block soil = worldIn.getBlockState(down).getBlock();
|
+ Block soil = p_180671_1_.func_180495_p(down).func_177230_c();
|
||||||
+ if (state.getBlock() != this) return this.canPlaceBlockOn(soil); //Forge: This function is called during world gen and placement, before this block is set, so if we are not 'here' then assume it's the pre-check.
|
+ if (p_180671_3_.func_177230_c() != this) return this.func_149854_a(soil); //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.
|
||||||
+ return soil.canSustainPlant(worldIn, down, net.minecraft.util.EnumFacing.UP, this);
|
+ return soil.canSustainPlant(p_180671_1_, down, net.minecraft.util.EnumFacing.UP, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AxisAlignedBB getCollisionBoundingBox(World worldIn, BlockPos pos, IBlockState state)
|
public AxisAlignedBB func_180640_a(World p_180640_1_, BlockPos p_180640_2_, IBlockState p_180640_3_)
|
||||||
@@ -89,4 +92,33 @@
|
@@ -89,4 +92,33 @@
|
||||||
{
|
{
|
||||||
return EnumWorldBlockLayer.CUTOUT;
|
return EnumWorldBlockLayer.CUTOUT;
|
||||||
|
@ -38,29 +38,29 @@
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public net.minecraftforge.common.EnumPlantType getPlantType(net.minecraft.world.IBlockAccess world, BlockPos pos)
|
+ public net.minecraftforge.common.EnumPlantType getPlantType(net.minecraft.world.IBlockAccess world, BlockPos pos)
|
||||||
+ {
|
+ {
|
||||||
+ if (this == Blocks.wheat) return net.minecraftforge.common.EnumPlantType.Crop;
|
+ if (this == Blocks.field_150464_aj) return net.minecraftforge.common.EnumPlantType.Crop;
|
||||||
+ if (this == Blocks.carrots) return net.minecraftforge.common.EnumPlantType.Crop;
|
+ if (this == Blocks.field_150459_bM) return net.minecraftforge.common.EnumPlantType.Crop;
|
||||||
+ if (this == Blocks.potatoes) return net.minecraftforge.common.EnumPlantType.Crop;
|
+ if (this == Blocks.field_150469_bN) return net.minecraftforge.common.EnumPlantType.Crop;
|
||||||
+ if (this == Blocks.melon_stem) return net.minecraftforge.common.EnumPlantType.Crop;
|
+ if (this == Blocks.field_150394_bc) return net.minecraftforge.common.EnumPlantType.Crop;
|
||||||
+ if (this == Blocks.pumpkin_stem) return net.minecraftforge.common.EnumPlantType.Crop;
|
+ if (this == Blocks.field_150393_bb) return net.minecraftforge.common.EnumPlantType.Crop;
|
||||||
+ if (this == Blocks.deadbush) return net.minecraftforge.common.EnumPlantType.Desert;
|
+ if (this == Blocks.field_150330_I) return net.minecraftforge.common.EnumPlantType.Desert;
|
||||||
+ if (this == Blocks.waterlily) return net.minecraftforge.common.EnumPlantType.Water;
|
+ if (this == Blocks.field_150392_bi) return net.minecraftforge.common.EnumPlantType.Water;
|
||||||
+ if (this == Blocks.red_mushroom) return net.minecraftforge.common.EnumPlantType.Cave;
|
+ if (this == Blocks.field_150337_Q) return net.minecraftforge.common.EnumPlantType.Cave;
|
||||||
+ if (this == Blocks.brown_mushroom) return net.minecraftforge.common.EnumPlantType.Cave;
|
+ if (this == Blocks.field_150338_P) return net.minecraftforge.common.EnumPlantType.Cave;
|
||||||
+ if (this == Blocks.nether_wart) return net.minecraftforge.common.EnumPlantType.Nether;
|
+ if (this == Blocks.field_150388_bm) return net.minecraftforge.common.EnumPlantType.Nether;
|
||||||
+ if (this == Blocks.sapling) return net.minecraftforge.common.EnumPlantType.Plains;
|
+ if (this == Blocks.field_150345_g) return net.minecraftforge.common.EnumPlantType.Plains;
|
||||||
+ if (this == Blocks.tallgrass) return net.minecraftforge.common.EnumPlantType.Plains;
|
+ if (this == Blocks.field_150329_H) return net.minecraftforge.common.EnumPlantType.Plains;
|
||||||
+ if (this == Blocks.double_plant) return net.minecraftforge.common.EnumPlantType.Plains;
|
+ if (this == Blocks.field_150398_cm) return net.minecraftforge.common.EnumPlantType.Plains;
|
||||||
+ if (this == Blocks.red_flower) return net.minecraftforge.common.EnumPlantType.Plains;
|
+ if (this == Blocks.field_150328_O) return net.minecraftforge.common.EnumPlantType.Plains;
|
||||||
+ if (this == Blocks.yellow_flower) return net.minecraftforge.common.EnumPlantType.Plains;
|
+ if (this == Blocks.field_150327_N) return net.minecraftforge.common.EnumPlantType.Plains;
|
||||||
+ return net.minecraftforge.common.EnumPlantType.Plains;
|
+ return net.minecraftforge.common.EnumPlantType.Plains;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public IBlockState getPlant(net.minecraft.world.IBlockAccess world, BlockPos pos)
|
+ public IBlockState getPlant(net.minecraft.world.IBlockAccess world, BlockPos pos)
|
||||||
+ {
|
+ {
|
||||||
+ IBlockState state = world.getBlockState(pos);
|
+ IBlockState state = world.func_180495_p(pos);
|
||||||
+ if (state.getBlock() != this) return getDefaultState();
|
+ if (state.func_177230_c() != this) return func_176223_P();
|
||||||
+ return state;
|
+ return state;
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
|
|
||||||
protected static boolean func_181088_a(World p_181088_0_, BlockPos p_181088_1_, EnumFacing p_181088_2_)
|
protected static boolean func_181088_a(World p_181088_0_, BlockPos p_181088_1_, EnumFacing p_181088_2_)
|
||||||
{
|
{
|
||||||
- BlockPos blockpos = p_181088_1_.offset(p_181088_2_);
|
- BlockPos blockpos = p_181088_1_.func_177972_a(p_181088_2_);
|
||||||
- return p_181088_2_ == EnumFacing.DOWN ? World.doesBlockHaveSolidTopSurface(p_181088_0_, blockpos) : p_181088_0_.getBlockState(blockpos).getBlock().isNormalCube();
|
- return p_181088_2_ == EnumFacing.DOWN ? World.func_175683_a(p_181088_0_, blockpos) : p_181088_0_.func_180495_p(blockpos).func_177230_c().func_149721_r();
|
||||||
+ return p_181088_2_ == EnumFacing.UP && World.doesBlockHaveSolidTopSurface(p_181088_0_, p_181088_1_.down()) ? true : p_181088_0_.isSideSolid(p_181088_1_.offset(p_181088_2_.getOpposite()), p_181088_2_);
|
+ return p_181088_2_ == EnumFacing.UP && World.func_175683_a(p_181088_0_, p_181088_1_.func_177977_b()) ? true : p_181088_0_.isSideSolid(p_181088_1_.func_177972_a(p_181088_2_.func_176734_d()), p_181088_2_);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
|
public IBlockState func_180642_a(World p_180642_1_, BlockPos p_180642_2_, EnumFacing p_180642_3_, float p_180642_4_, float p_180642_5_, float p_180642_6_, int p_180642_7_, EntityLivingBase p_180642_8_)
|
||||||
|
|
|
@ -7,20 +7,20 @@
|
||||||
-public class BlockCactus extends Block
|
-public class BlockCactus extends Block
|
||||||
+public class BlockCactus extends Block implements net.minecraftforge.common.IPlantable
|
+public class BlockCactus extends Block implements net.minecraftforge.common.IPlantable
|
||||||
{
|
{
|
||||||
public static final PropertyInteger AGE = PropertyInteger.create("age", 0, 15);
|
public static final PropertyInteger field_176587_a = PropertyInteger.func_177719_a("age", 0, 15);
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@
|
@@ -109,7 +109,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
Block block = worldIn.getBlockState(pos.down()).getBlock();
|
Block block = p_176586_1_.func_180495_p(p_176586_2_.func_177977_b()).func_177230_c();
|
||||||
- return block == Blocks.cactus || block == Blocks.sand;
|
- return block == Blocks.field_150434_aF || block == Blocks.field_150354_m;
|
||||||
+ return block.canSustainPlant(worldIn, pos.down(), EnumFacing.UP, this);
|
+ return block.canSustainPlant(p_176586_1_, p_176586_2_.func_177977_b(), EnumFacing.UP, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn)
|
public void func_180634_a(World p_180634_1_, BlockPos p_180634_2_, IBlockState p_180634_3_, Entity p_180634_4_)
|
||||||
@@ -137,4 +137,16 @@
|
@@ -137,4 +137,16 @@
|
||||||
{
|
{
|
||||||
return new BlockState(this, new IProperty[] {AGE});
|
return new BlockState(this, new IProperty[] {field_176587_a});
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
|
@ -32,6 +32,6 @@
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public IBlockState getPlant(net.minecraft.world.IBlockAccess world, BlockPos pos)
|
+ public IBlockState getPlant(net.minecraft.world.IBlockAccess world, BlockPos pos)
|
||||||
+ {
|
+ {
|
||||||
+ return getDefaultState();
|
+ return func_176223_P();
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockChest.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockChest.java
|
||||||
@@ -527,7 +527,7 @@
|
@@ -527,7 +527,7 @@
|
||||||
|
|
||||||
private boolean isBelowSolidBlock(World worldIn, BlockPos pos)
|
private boolean func_176456_n(World p_176456_1_, BlockPos p_176456_2_)
|
||||||
{
|
{
|
||||||
- return worldIn.getBlockState(pos.up()).getBlock().isNormalCube();
|
- return p_176456_1_.func_180495_p(p_176456_2_.func_177984_a()).func_177230_c().func_149721_r();
|
||||||
+ return worldIn.isSideSolid(pos.up(), EnumFacing.DOWN, false);
|
+ return p_176456_1_.isSideSolid(p_176456_2_.func_177984_a(), EnumFacing.DOWN, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isOcelotSittingOnChest(World worldIn, BlockPos pos)
|
private boolean func_176453_o(World p_176453_1_, BlockPos p_176453_2_)
|
||||||
|
|
|
@ -1,25 +1,27 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/block/BlockCocoa.java
|
--- ../src-base/minecraft/net/minecraft/block/BlockCocoa.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockCocoa.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockCocoa.java
|
||||||
@@ -137,6 +137,13 @@
|
@@ -137,7 +137,14 @@
|
||||||
|
|
||||||
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
|
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||||
{
|
{
|
||||||
+ super.dropBlockAsItemWithChance(worldIn, pos, state, chance, fortune);
|
- int i = ((Integer)p_180653_3_.func_177229_b(field_176501_a)).intValue();
|
||||||
|
+ super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public java.util.List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
+ public java.util.List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||||
+ {
|
+ {
|
||||||
+ java.util.List<ItemStack> dropped = super.getDrops(world, pos, state, fortune);
|
+ java.util.List<ItemStack> dropped = super.getDrops(world, pos, state, fortune);
|
||||||
int i = ((Integer)state.getValue(AGE)).intValue();
|
+ int i = ((Integer)state.func_177229_b(field_176501_a)).intValue();
|
||||||
int j = 1;
|
int j = 1;
|
||||||
|
|
||||||
|
if (i >= 2)
|
||||||
@@ -147,8 +154,9 @@
|
@@ -147,8 +154,9 @@
|
||||||
|
|
||||||
for (int k = 0; k < j; ++k)
|
for (int k = 0; k < j; ++k)
|
||||||
{
|
{
|
||||||
- spawnAsEntity(worldIn, pos, new ItemStack(Items.dye, 1, EnumDyeColor.BROWN.getDyeDamage()));
|
- func_180635_a(p_180653_1_, p_180653_2_, new ItemStack(Items.field_151100_aR, 1, EnumDyeColor.BROWN.func_176767_b()));
|
||||||
+ dropped.add(new ItemStack(Items.dye, 1, EnumDyeColor.BROWN.getDyeDamage()));
|
+ dropped.add(new ItemStack(Items.field_151100_aR, 1, EnumDyeColor.BROWN.func_176767_b()));
|
||||||
}
|
}
|
||||||
+ return dropped;
|
+ return dropped;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,63 +2,63 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockCrops.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockCrops.java
|
||||||
@@ -81,11 +81,11 @@
|
@@ -81,11 +81,11 @@
|
||||||
float f1 = 0.0F;
|
float f1 = 0.0F;
|
||||||
IBlockState iblockstate = worldIn.getBlockState(blockpos.add(i, 0, j));
|
IBlockState iblockstate = p_180672_1_.func_180495_p(blockpos.func_177982_a(i, 0, j));
|
||||||
|
|
||||||
- if (iblockstate.getBlock() == Blocks.farmland)
|
- if (iblockstate.func_177230_c() == Blocks.field_150458_ak)
|
||||||
+ if (iblockstate.getBlock().canSustainPlant(worldIn, blockpos.add(i, 0, j), net.minecraft.util.EnumFacing.UP, (net.minecraftforge.common.IPlantable)blockIn))
|
+ if (iblockstate.func_177230_c().canSustainPlant(p_180672_1_, blockpos.func_177982_a(i, 0, j), net.minecraft.util.EnumFacing.UP, (net.minecraftforge.common.IPlantable)p_180672_0_))
|
||||||
{
|
{
|
||||||
f1 = 1.0F;
|
f1 = 1.0F;
|
||||||
|
|
||||||
- if (((Integer)iblockstate.getValue(BlockFarmland.MOISTURE)).intValue() > 0)
|
- if (((Integer)iblockstate.func_177229_b(BlockFarmland.field_176531_a)).intValue() > 0)
|
||||||
+ if (iblockstate.getBlock().isFertile(worldIn, blockpos.add(i, 0, j)))
|
+ if (iblockstate.func_177230_c().isFertile(p_180672_1_, blockpos.func_177982_a(i, 0, j)))
|
||||||
{
|
{
|
||||||
f1 = 3.0F;
|
f1 = 3.0F;
|
||||||
}
|
}
|
||||||
@@ -126,7 +126,7 @@
|
@@ -126,7 +126,7 @@
|
||||||
|
|
||||||
public boolean canBlockStay(World worldIn, BlockPos pos, IBlockState state)
|
public boolean func_180671_f(World p_180671_1_, BlockPos p_180671_2_, IBlockState p_180671_3_)
|
||||||
{
|
{
|
||||||
- return (worldIn.getLight(pos) >= 8 || worldIn.canSeeSky(pos)) && this.canPlaceBlockOn(worldIn.getBlockState(pos.down()).getBlock());
|
- return (p_180671_1_.func_175699_k(p_180671_2_) >= 8 || p_180671_1_.func_175678_i(p_180671_2_)) && this.func_149854_a(p_180671_1_.func_180495_p(p_180671_2_.func_177977_b()).func_177230_c());
|
||||||
+ return (worldIn.getLight(pos) >= 8 || worldIn.canSeeSky(pos)) && worldIn.getBlockState(pos.down()).getBlock().canSustainPlant(worldIn, pos.down(), net.minecraft.util.EnumFacing.UP, this);
|
+ return (p_180671_1_.func_175699_k(p_180671_2_) >= 8 || p_180671_1_.func_175678_i(p_180671_2_)) && p_180671_1_.func_180495_p(p_180671_2_.func_177977_b()).func_177230_c().canSustainPlant(p_180671_1_, p_180671_2_.func_177977_b(), net.minecraft.util.EnumFacing.UP, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Item getSeed()
|
protected Item func_149866_i()
|
||||||
@@ -142,24 +142,6 @@
|
@@ -142,24 +142,6 @@
|
||||||
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
|
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||||
{
|
{
|
||||||
super.dropBlockAsItemWithChance(worldIn, pos, state, chance, 0);
|
super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, 0);
|
||||||
-
|
-
|
||||||
- if (!worldIn.isRemote)
|
- if (!p_180653_1_.field_72995_K)
|
||||||
- {
|
- {
|
||||||
- int i = ((Integer)state.getValue(AGE)).intValue();
|
- int i = ((Integer)p_180653_3_.func_177229_b(field_176488_a)).intValue();
|
||||||
-
|
-
|
||||||
- if (i >= 7)
|
- if (i >= 7)
|
||||||
- {
|
- {
|
||||||
- int j = 3 + fortune;
|
- int j = 3 + p_180653_5_;
|
||||||
-
|
-
|
||||||
- for (int k = 0; k < j; ++k)
|
- for (int k = 0; k < j; ++k)
|
||||||
- {
|
- {
|
||||||
- if (worldIn.rand.nextInt(15) <= i)
|
- if (p_180653_1_.field_73012_v.nextInt(15) <= i)
|
||||||
- {
|
- {
|
||||||
- spawnAsEntity(worldIn, pos, new ItemStack(this.getSeed(), 1, 0));
|
- func_180635_a(p_180653_1_, p_180653_2_, new ItemStack(this.func_149866_i(), 1, 0));
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
}
|
}
|
||||||
|
|
||||||
public Item getItemDropped(IBlockState state, Random rand, int fortune)
|
public Item func_180660_a(IBlockState p_180660_1_, Random p_180660_2_, int p_180660_3_)
|
||||||
@@ -202,4 +184,26 @@
|
@@ -202,4 +184,26 @@
|
||||||
{
|
{
|
||||||
return new BlockState(this, new IProperty[] {AGE});
|
return new BlockState(this, new IProperty[] {field_176488_a});
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public java.util.List<ItemStack> getDrops(net.minecraft.world.IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
+ public java.util.List<ItemStack> getDrops(net.minecraft.world.IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||||
+ {
|
+ {
|
||||||
+ java.util.List<ItemStack> ret = super.getDrops(world, pos, state, fortune);
|
+ java.util.List<ItemStack> ret = super.getDrops(world, pos, state, fortune);
|
||||||
+ int age = ((Integer)state.getValue(AGE)).intValue();
|
+ int age = ((Integer)state.func_177229_b(field_176488_a)).intValue();
|
||||||
+ Random rand = world instanceof World ? ((World)world).rand : new Random();
|
+ Random rand = world instanceof World ? ((World)world).field_73012_v : new Random();
|
||||||
+
|
+
|
||||||
+ if (age >= 7)
|
+ if (age >= 7)
|
||||||
+ {
|
+ {
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
+ {
|
+ {
|
||||||
+ if (rand.nextInt(15) <= age)
|
+ if (rand.nextInt(15) <= age)
|
||||||
+ {
|
+ {
|
||||||
+ ret.add(new ItemStack(this.getSeed(), 1, 0));
|
+ ret.add(new ItemStack(this.func_149866_i(), 1, 0));
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
|
|
@ -11,16 +11,16 @@
|
||||||
{
|
{
|
||||||
@@ -45,14 +45,15 @@
|
@@ -45,14 +45,15 @@
|
||||||
|
|
||||||
public void harvestBlock(World worldIn, EntityPlayer player, BlockPos pos, IBlockState state, TileEntity te)
|
public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, TileEntity p_180657_5_)
|
||||||
{
|
{
|
||||||
- if (!worldIn.isRemote && player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() == Items.shears)
|
- if (!p_180657_1_.field_72995_K && p_180657_2_.func_71045_bC() != null && p_180657_2_.func_71045_bC().func_77973_b() == Items.field_151097_aZ)
|
||||||
{
|
{
|
||||||
- player.triggerAchievement(StatList.mineBlockStatArray[Block.getIdFromBlock(this)]);
|
- p_180657_2_.func_71029_a(StatList.field_75934_C[Block.func_149682_b(this)]);
|
||||||
- spawnAsEntity(worldIn, pos, new ItemStack(Blocks.deadbush, 1, 0));
|
- func_180635_a(p_180657_1_, p_180657_3_, new ItemStack(Blocks.field_150330_I, 1, 0));
|
||||||
- }
|
- }
|
||||||
- else
|
- else
|
||||||
- {
|
- {
|
||||||
super.harvestBlock(worldIn, player, pos, state, te);
|
super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
|
@ -28,6 +28,6 @@
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public java.util.List<ItemStack> onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
|
+ public java.util.List<ItemStack> onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
|
||||||
+ {
|
+ {
|
||||||
+ return new java.util.ArrayList<ItemStack>(java.util.Arrays.asList(new ItemStack(Blocks.deadbush)));
|
+ return new java.util.ArrayList<ItemStack>(java.util.Arrays.asList(new ItemStack(Blocks.field_150330_I)));
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockDoor.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockDoor.java
|
||||||
@@ -154,7 +154,7 @@
|
@@ -154,7 +154,7 @@
|
||||||
{
|
{
|
||||||
if (this.blockMaterial == Material.iron)
|
if (this.field_149764_J == Material.field_151573_f)
|
||||||
{
|
{
|
||||||
- return true;
|
- return true;
|
||||||
+ return false; //Allow items to interact with the door
|
+ return false; //Allow items to interact with the door
|
||||||
|
@ -11,10 +11,10 @@
|
||||||
{
|
{
|
||||||
@@ -272,7 +272,7 @@
|
@@ -272,7 +272,7 @@
|
||||||
|
|
||||||
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
|
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
|
||||||
{
|
{
|
||||||
- return pos.getY() >= 255 ? false : World.doesBlockHaveSolidTopSurface(worldIn, pos.down()) && super.canPlaceBlockAt(worldIn, pos) && super.canPlaceBlockAt(worldIn, pos.up());
|
- return p_176196_2_.func_177956_o() >= 255 ? false : World.func_175683_a(p_176196_1_, p_176196_2_.func_177977_b()) && super.func_176196_c(p_176196_1_, p_176196_2_) && super.func_176196_c(p_176196_1_, p_176196_2_.func_177984_a());
|
||||||
+ return pos.getY() >= worldIn.getHeight() - 1 ? false : World.doesBlockHaveSolidTopSurface(worldIn, pos.down()) && super.canPlaceBlockAt(worldIn, pos) && super.canPlaceBlockAt(worldIn, pos.up());
|
+ return p_176196_2_.func_177956_o() >= p_176196_1_.func_72800_K() - 1 ? false : World.func_175683_a(p_176196_1_, p_176196_2_.func_177977_b()) && super.func_176196_c(p_176196_1_, p_176196_2_) && super.func_176196_c(p_176196_1_, p_176196_2_.func_177984_a());
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMobilityFlag()
|
public int func_149656_h()
|
||||||
|
|
|
@ -7,50 +7,50 @@
|
||||||
-public class BlockDoublePlant extends BlockBush implements IGrowable
|
-public class BlockDoublePlant extends BlockBush implements IGrowable
|
||||||
+public class BlockDoublePlant extends BlockBush implements IGrowable, net.minecraftforge.common.IShearable
|
+public class BlockDoublePlant extends BlockBush implements IGrowable, net.minecraftforge.common.IShearable
|
||||||
{
|
{
|
||||||
public static final PropertyEnum<BlockDoublePlant.EnumPlantType> VARIANT = PropertyEnum.<BlockDoublePlant.EnumPlantType>create("variant", BlockDoublePlant.EnumPlantType.class);
|
public static final PropertyEnum<BlockDoublePlant.EnumPlantType> field_176493_a = PropertyEnum.<BlockDoublePlant.EnumPlantType>func_177709_a("variant", BlockDoublePlant.EnumPlantType.class);
|
||||||
public static final PropertyEnum<BlockDoublePlant.EnumBlockHalf> HALF = PropertyEnum.<BlockDoublePlant.EnumBlockHalf>create("half", BlockDoublePlant.EnumBlockHalf.class);
|
public static final PropertyEnum<BlockDoublePlant.EnumBlockHalf> field_176492_b = PropertyEnum.<BlockDoublePlant.EnumBlockHalf>func_177709_a("half", BlockDoublePlant.EnumBlockHalf.class);
|
||||||
@@ -90,6 +90,8 @@
|
@@ -90,6 +90,8 @@
|
||||||
Block block = (Block)(flag ? this : worldIn.getBlockState(blockpos).getBlock());
|
Block block = (Block)(flag ? this : p_176475_1_.func_180495_p(blockpos).func_177230_c());
|
||||||
Block block1 = (Block)(flag ? worldIn.getBlockState(blockpos1).getBlock() : this);
|
Block block1 = (Block)(flag ? p_176475_1_.func_180495_p(blockpos1).func_177230_c() : this);
|
||||||
|
|
||||||
+ if (!flag) this.dropBlockAsItem(worldIn, pos, state, 0); //Forge move above the setting to air.
|
+ if (!flag) this.func_176226_b(p_176475_1_, p_176475_2_, p_176475_3_, 0); //Forge move above the setting to air.
|
||||||
+
|
+
|
||||||
if (block == this)
|
if (block == this)
|
||||||
{
|
{
|
||||||
worldIn.setBlockState(blockpos, Blocks.air.getDefaultState(), 2);
|
p_176475_1_.func_180501_a(blockpos, Blocks.field_150350_a.func_176223_P(), 2);
|
||||||
@@ -98,17 +100,13 @@
|
@@ -98,17 +100,13 @@
|
||||||
if (block1 == this)
|
if (block1 == this)
|
||||||
{
|
{
|
||||||
worldIn.setBlockState(blockpos1, Blocks.air.getDefaultState(), 3);
|
p_176475_1_.func_180501_a(blockpos1, Blocks.field_150350_a.func_176223_P(), 3);
|
||||||
-
|
-
|
||||||
- if (!flag)
|
- if (!flag)
|
||||||
- {
|
- {
|
||||||
- this.dropBlockAsItem(worldIn, blockpos1, state, 0);
|
- this.func_176226_b(p_176475_1_, blockpos1, p_176475_3_, 0);
|
||||||
- }
|
- }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canBlockStay(World worldIn, BlockPos pos, IBlockState state)
|
public boolean func_180671_f(World p_180671_1_, BlockPos p_180671_2_, IBlockState p_180671_3_)
|
||||||
{
|
{
|
||||||
+ if (state.getBlock() != this) return super.canBlockStay(worldIn, pos, state); //Forge: This function is called during world gen and placement, before this block is set, so if we are not 'here' then assume it's the pre-check.
|
+ if (p_180671_3_.func_177230_c() != this) return super.func_180671_f(p_180671_1_, p_180671_2_, p_180671_3_); //Forge: This function is called during world gen and placement, before this block is set, so if we are not 'here' then assume it's the pre-check.
|
||||||
if (state.getValue(HALF) == BlockDoublePlant.EnumBlockHalf.UPPER)
|
if (p_180671_3_.func_177229_b(field_176492_b) == BlockDoublePlant.EnumBlockHalf.UPPER)
|
||||||
{
|
{
|
||||||
return worldIn.getBlockState(pos.down()).getBlock() == this;
|
return p_180671_1_.func_180495_p(p_180671_2_.func_177977_b()).func_177230_c() == this;
|
||||||
@@ -158,7 +156,6 @@
|
@@ -158,7 +156,6 @@
|
||||||
|
|
||||||
public void harvestBlock(World worldIn, EntityPlayer player, BlockPos pos, IBlockState state, TileEntity te)
|
public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, TileEntity p_180657_5_)
|
||||||
{
|
{
|
||||||
- if (worldIn.isRemote || player.getCurrentEquippedItem() == null || player.getCurrentEquippedItem().getItem() != Items.shears || state.getValue(HALF) != BlockDoublePlant.EnumBlockHalf.LOWER || !this.onHarvest(worldIn, pos, state, player))
|
- if (p_180657_1_.field_72995_K || p_180657_2_.func_71045_bC() == null || p_180657_2_.func_71045_bC().func_77973_b() != Items.field_151097_aZ || p_180657_4_.func_177229_b(field_176492_b) != BlockDoublePlant.EnumBlockHalf.LOWER || !this.func_176489_b(p_180657_1_, p_180657_3_, p_180657_4_, p_180657_2_))
|
||||||
{
|
{
|
||||||
super.harvestBlock(worldIn, player, pos, state, te);
|
super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_);
|
||||||
}
|
}
|
||||||
@@ -221,8 +218,6 @@
|
@@ -221,8 +218,6 @@
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player.triggerAchievement(StatList.mineBlockStatArray[Block.getIdFromBlock(this)]);
|
p_176489_4_.func_71029_a(StatList.field_75934_C[Block.func_149682_b(this)]);
|
||||||
- int i = (blockdoubleplant$enumplanttype == BlockDoublePlant.EnumPlantType.GRASS ? BlockTallGrass.EnumType.GRASS : BlockTallGrass.EnumType.FERN).getMeta();
|
- int i = (blockdoubleplant$enumplanttype == BlockDoublePlant.EnumPlantType.GRASS ? BlockTallGrass.EnumType.GRASS : BlockTallGrass.EnumType.FERN).func_177044_a();
|
||||||
- spawnAsEntity(worldIn, pos, new ItemStack(Blocks.tallgrass, 2, i));
|
- func_180635_a(p_176489_1_, p_176489_2_, new ItemStack(Blocks.field_150329_H, 2, i));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -61,27 +61,27 @@
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public boolean isShearable(ItemStack item, IBlockAccess world, BlockPos pos)
|
+ public boolean isShearable(ItemStack item, IBlockAccess world, BlockPos pos)
|
||||||
+ {
|
+ {
|
||||||
+ IBlockState state = world.getBlockState(pos);
|
+ IBlockState state = world.func_180495_p(pos);
|
||||||
+ EnumPlantType type = (EnumPlantType)state.getValue(VARIANT);
|
+ EnumPlantType type = (EnumPlantType)state.func_177229_b(field_176493_a);
|
||||||
+ return state.getValue(HALF) == EnumBlockHalf.LOWER && (type == EnumPlantType.FERN || type == EnumPlantType.GRASS);
|
+ return state.func_177229_b(field_176492_b) == EnumBlockHalf.LOWER && (type == EnumPlantType.FERN || type == EnumPlantType.GRASS);
|
||||||
+ }
|
+ }
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public java.util.List<ItemStack> onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
|
+ public java.util.List<ItemStack> onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
|
||||||
+ {
|
+ {
|
||||||
+ java.util.List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
|
+ java.util.List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
|
||||||
+ EnumPlantType type = (EnumPlantType)world.getBlockState(pos).getValue(VARIANT);
|
+ EnumPlantType type = (EnumPlantType)world.func_180495_p(pos).func_177229_b(field_176493_a);
|
||||||
+ if (type == EnumPlantType.FERN) ret.add(new ItemStack(Blocks.tallgrass, 2, BlockTallGrass.EnumType.FERN.getMeta()));
|
+ if (type == EnumPlantType.FERN) ret.add(new ItemStack(Blocks.field_150329_H, 2, BlockTallGrass.EnumType.FERN.func_177044_a()));
|
||||||
+ if (type == EnumPlantType.GRASS) ret.add(new ItemStack(Blocks.tallgrass, 2, BlockTallGrass.EnumType.GRASS.getMeta()));
|
+ if (type == EnumPlantType.GRASS) ret.add(new ItemStack(Blocks.field_150329_H, 2, BlockTallGrass.EnumType.GRASS.func_177044_a()));
|
||||||
+ return ret;
|
+ return ret;
|
||||||
+ }
|
+ }
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public boolean removedByPlayer(World world, BlockPos pos, EntityPlayer player, boolean willHarvest)
|
+ public boolean removedByPlayer(World world, BlockPos pos, EntityPlayer player, boolean willHarvest)
|
||||||
+ {
|
+ {
|
||||||
+ //Forge: Break both parts on the client to prevent the top part flickering as default type for a few frames.
|
+ //Forge: Break both parts on the client to prevent the top part flickering as default type for a few frames.
|
||||||
+ IBlockState state = world.getBlockState(pos);
|
+ IBlockState state = world.func_180495_p(pos);
|
||||||
+ if (state.getBlock() == this && state.getValue(HALF) == EnumBlockHalf.LOWER && world.getBlockState(pos.up()).getBlock() == this)
|
+ if (state.func_177230_c() == this && state.func_177229_b(field_176492_b) == EnumBlockHalf.LOWER && world.func_180495_p(pos.func_177984_a()).func_177230_c() == this)
|
||||||
+ world.setBlockToAir(pos.up());
|
+ world.func_175698_g(pos.func_177984_a());
|
||||||
+ return world.setBlockToAir(pos);
|
+ return world.func_175698_g(pos);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
public static enum EnumBlockHalf implements IStringSerializable
|
public static enum EnumBlockHalf implements IStringSerializable
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockFalling.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockFalling.java
|
||||||
@@ -86,6 +86,7 @@
|
@@ -86,6 +86,7 @@
|
||||||
|
|
||||||
public static boolean canFallInto(World worldIn, BlockPos pos)
|
public static boolean func_180685_d(World p_180685_0_, BlockPos p_180685_1_)
|
||||||
{
|
{
|
||||||
+ if (worldIn.isAirBlock(pos)) return true;
|
+ if (p_180685_0_.func_175623_d(p_180685_1_)) return true;
|
||||||
Block block = worldIn.getBlockState(pos).getBlock();
|
Block block = p_180685_0_.func_180495_p(p_180685_1_).func_177230_c();
|
||||||
Material material = block.blockMaterial;
|
Material material = block.field_149764_J;
|
||||||
return block == Blocks.fire || material == Material.air || material == Material.water || material == Material.lava;
|
return block == Blocks.field_150480_ab || material == Material.field_151579_a || material == Material.field_151586_h || material == Material.field_151587_i;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/block/BlockFarmland.java
|
--- ../src-base/minecraft/net/minecraft/block/BlockFarmland.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockFarmland.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockFarmland.java
|
||||||
@@ -89,7 +89,7 @@
|
@@ -89,7 +89,7 @@
|
||||||
private boolean hasCrops(World worldIn, BlockPos pos)
|
private boolean func_176529_d(World p_176529_1_, BlockPos p_176529_2_)
|
||||||
{
|
{
|
||||||
Block block = worldIn.getBlockState(pos.up()).getBlock();
|
Block block = p_176529_1_.func_180495_p(p_176529_2_.func_177984_a()).func_177230_c();
|
||||||
- return block instanceof BlockCrops || block instanceof BlockStem;
|
- return block instanceof BlockCrops || block instanceof BlockStem;
|
||||||
+ return block instanceof net.minecraftforge.common.IPlantable && canSustainPlant(worldIn, pos, net.minecraft.util.EnumFacing.UP, (net.minecraftforge.common.IPlantable)block);
|
+ return block instanceof net.minecraftforge.common.IPlantable && canSustainPlant(p_176529_1_, p_176529_2_, net.minecraft.util.EnumFacing.UP, (net.minecraftforge.common.IPlantable)block);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean hasWater(World worldIn, BlockPos pos)
|
private boolean func_176530_e(World p_176530_1_, BlockPos p_176530_2_)
|
||||||
|
|
|
@ -1,81 +1,81 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/block/BlockFire.java
|
--- ../src-base/minecraft/net/minecraft/block/BlockFire.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockFire.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockFire.java
|
||||||
@@ -41,18 +41,24 @@
|
@@ -41,18 +41,24 @@
|
||||||
int j = pos.getY();
|
int j = p_176221_3_.func_177956_o();
|
||||||
int k = pos.getZ();
|
int k = p_176221_3_.func_177952_p();
|
||||||
|
|
||||||
- if (!World.doesBlockHaveSolidTopSurface(worldIn, pos.down()) && !Blocks.fire.canCatchFire(worldIn, pos.down()))
|
- if (!World.func_175683_a(p_176221_2_, p_176221_3_.func_177977_b()) && !Blocks.field_150480_ab.func_176535_e(p_176221_2_, p_176221_3_.func_177977_b()))
|
||||||
+ if (!World.doesBlockHaveSolidTopSurface(worldIn, pos.down()) && !Blocks.fire.canCatchFire(worldIn, pos.down(), EnumFacing.UP))
|
+ if (!World.func_175683_a(p_176221_2_, p_176221_3_.func_177977_b()) && !Blocks.field_150480_ab.canCatchFire(p_176221_2_, p_176221_3_.func_177977_b(), EnumFacing.UP))
|
||||||
{
|
{
|
||||||
boolean flag = (i + j + k & 1) == 1;
|
boolean flag = (i + j + k & 1) == 1;
|
||||||
boolean flag1 = (i / 2 + j / 2 + k / 2 & 1) == 1;
|
boolean flag1 = (i / 2 + j / 2 + k / 2 & 1) == 1;
|
||||||
int l = 0;
|
int l = 0;
|
||||||
|
|
||||||
- if (this.canCatchFire(worldIn, pos.up()))
|
- if (this.func_176535_e(p_176221_2_, p_176221_3_.func_177984_a()))
|
||||||
+ if (this.canCatchFire(worldIn, pos.up(), EnumFacing.DOWN))
|
+ if (this.canCatchFire(p_176221_2_, p_176221_3_.func_177984_a(), EnumFacing.DOWN))
|
||||||
{
|
{
|
||||||
l = flag ? 1 : 2;
|
l = flag ? 1 : 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
- return state.withProperty(NORTH, Boolean.valueOf(this.canCatchFire(worldIn, pos.north()))).withProperty(EAST, Boolean.valueOf(this.canCatchFire(worldIn, pos.east()))).withProperty(SOUTH, Boolean.valueOf(this.canCatchFire(worldIn, pos.south()))).withProperty(WEST, Boolean.valueOf(this.canCatchFire(worldIn, pos.west()))).withProperty(UPPER, Integer.valueOf(l)).withProperty(FLIP, Boolean.valueOf(flag1)).withProperty(ALT, Boolean.valueOf(flag));
|
- return p_176221_1_.func_177226_a(field_176545_N, Boolean.valueOf(this.func_176535_e(p_176221_2_, p_176221_3_.func_177978_c()))).func_177226_a(field_176546_O, Boolean.valueOf(this.func_176535_e(p_176221_2_, p_176221_3_.func_177974_f()))).func_177226_a(field_176541_P, Boolean.valueOf(this.func_176535_e(p_176221_2_, p_176221_3_.func_177968_d()))).func_177226_a(field_176539_Q, Boolean.valueOf(this.func_176535_e(p_176221_2_, p_176221_3_.func_177976_e()))).func_177226_a(field_176542_R, Integer.valueOf(l)).func_177226_a(field_176540_b, Boolean.valueOf(flag1)).func_177226_a(field_176544_M, Boolean.valueOf(flag));
|
||||||
+ return state.withProperty(NORTH, Boolean.valueOf(this.canCatchFire(worldIn, pos.north(), EnumFacing.SOUTH)))
|
+ return p_176221_1_.func_177226_a(field_176545_N, Boolean.valueOf(this.canCatchFire(p_176221_2_, p_176221_3_.func_177978_c(), EnumFacing.SOUTH)))
|
||||||
+ .withProperty(EAST, Boolean.valueOf(this.canCatchFire(worldIn, pos.east(), EnumFacing.EAST )))
|
+ .func_177226_a(field_176546_O, Boolean.valueOf(this.canCatchFire(p_176221_2_, p_176221_3_.func_177974_f(), EnumFacing.EAST )))
|
||||||
+ .withProperty(SOUTH, Boolean.valueOf(this.canCatchFire(worldIn, pos.south(), EnumFacing.NORTH)))
|
+ .func_177226_a(field_176541_P, Boolean.valueOf(this.canCatchFire(p_176221_2_, p_176221_3_.func_177968_d(), EnumFacing.NORTH)))
|
||||||
+ .withProperty(WEST, Boolean.valueOf(this.canCatchFire(worldIn, pos.west(), EnumFacing.EAST )))
|
+ .func_177226_a(field_176539_Q, Boolean.valueOf(this.canCatchFire(p_176221_2_, p_176221_3_.func_177976_e(), EnumFacing.EAST )))
|
||||||
+ .withProperty(UPPER, Integer.valueOf(l))
|
+ .func_177226_a(field_176542_R, Integer.valueOf(l))
|
||||||
+ .withProperty(FLIP, Boolean.valueOf(flag1))
|
+ .func_177226_a(field_176540_b, Boolean.valueOf(flag1))
|
||||||
+ .withProperty(ALT, Boolean.valueOf(flag));
|
+ .func_177226_a(field_176544_M, Boolean.valueOf(flag));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -108,6 +114,7 @@
|
@@ -108,6 +114,7 @@
|
||||||
|
|
||||||
public void setFireInfo(Block blockIn, int encouragement, int flammability)
|
public void func_180686_a(Block p_180686_1_, int p_180686_2_, int p_180686_3_)
|
||||||
{
|
{
|
||||||
+ if (blockIn == Blocks.air) throw new IllegalArgumentException("Tried to set air on fire... This is bad.");
|
+ if (p_180686_1_ == Blocks.field_150350_a) throw new IllegalArgumentException("Tried to set air on fire... This is bad.");
|
||||||
this.encouragements.put(blockIn, Integer.valueOf(encouragement));
|
this.field_149849_a.put(p_180686_1_, Integer.valueOf(p_180686_2_));
|
||||||
this.flammabilities.put(blockIn, Integer.valueOf(flammability));
|
this.field_149848_b.put(p_180686_1_, Integer.valueOf(p_180686_3_));
|
||||||
}
|
}
|
||||||
@@ -147,13 +154,8 @@
|
@@ -147,13 +154,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
Block block = worldIn.getBlockState(pos.down()).getBlock();
|
Block block = p_180650_1_.func_180495_p(p_180650_2_.func_177977_b()).func_177230_c();
|
||||||
- boolean flag = block == Blocks.netherrack;
|
- boolean flag = block == Blocks.field_150424_aL;
|
||||||
+ boolean flag = block.isFireSource(worldIn, pos.down(), EnumFacing.UP);
|
+ boolean flag = block.isFireSource(p_180650_1_, p_180650_2_.func_177977_b(), EnumFacing.UP);
|
||||||
|
|
||||||
- if (worldIn.provider instanceof WorldProviderEnd && block == Blocks.bedrock)
|
- if (p_180650_1_.field_73011_w instanceof WorldProviderEnd && block == Blocks.field_150357_h)
|
||||||
- {
|
- {
|
||||||
- flag = true;
|
- flag = true;
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
if (!flag && worldIn.isRaining() && this.canDie(worldIn, pos))
|
if (!flag && p_180650_1_.func_72896_J() && this.func_176537_d(p_180650_1_, p_180650_2_))
|
||||||
{
|
{
|
||||||
worldIn.setBlockToAir(pos);
|
p_180650_1_.func_175698_g(p_180650_2_);
|
||||||
@@ -182,7 +184,7 @@
|
@@ -182,7 +184,7 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
- if (!this.canCatchFire(worldIn, pos.down()) && i == 15 && rand.nextInt(4) == 0)
|
- if (!this.func_176535_e(p_180650_1_, p_180650_2_.func_177977_b()) && i == 15 && p_180650_4_.nextInt(4) == 0)
|
||||||
+ if (!this.canCatchFire(worldIn, pos.down(), EnumFacing.UP) && i == 15 && rand.nextInt(4) == 0)
|
+ if (!this.canCatchFire(p_180650_1_, p_180650_2_.func_177977_b(), EnumFacing.UP) && i == 15 && p_180650_4_.nextInt(4) == 0)
|
||||||
{
|
{
|
||||||
worldIn.setBlockToAir(pos);
|
p_180650_1_.func_175698_g(p_180650_2_);
|
||||||
return;
|
return;
|
||||||
@@ -197,12 +199,12 @@
|
@@ -197,12 +199,12 @@
|
||||||
j = -50;
|
j = -50;
|
||||||
}
|
}
|
||||||
|
|
||||||
- this.catchOnFire(worldIn, pos.east(), 300 + j, rand, i);
|
- this.func_176536_a(p_180650_1_, p_180650_2_.func_177974_f(), 300 + j, p_180650_4_, i);
|
||||||
- this.catchOnFire(worldIn, pos.west(), 300 + j, rand, i);
|
- this.func_176536_a(p_180650_1_, p_180650_2_.func_177976_e(), 300 + j, p_180650_4_, i);
|
||||||
- this.catchOnFire(worldIn, pos.down(), 250 + j, rand, i);
|
- this.func_176536_a(p_180650_1_, p_180650_2_.func_177977_b(), 250 + j, p_180650_4_, i);
|
||||||
- this.catchOnFire(worldIn, pos.up(), 250 + j, rand, i);
|
- this.func_176536_a(p_180650_1_, p_180650_2_.func_177984_a(), 250 + j, p_180650_4_, i);
|
||||||
- this.catchOnFire(worldIn, pos.north(), 300 + j, rand, i);
|
- this.func_176536_a(p_180650_1_, p_180650_2_.func_177978_c(), 300 + j, p_180650_4_, i);
|
||||||
- this.catchOnFire(worldIn, pos.south(), 300 + j, rand, i);
|
- this.func_176536_a(p_180650_1_, p_180650_2_.func_177968_d(), 300 + j, p_180650_4_, i);
|
||||||
+ this.tryCatchFire(worldIn, pos.east(), 300 + j, rand, i, EnumFacing.WEST);
|
+ this.tryCatchFire(p_180650_1_, p_180650_2_.func_177974_f(), 300 + j, p_180650_4_, i, EnumFacing.WEST);
|
||||||
+ this.tryCatchFire(worldIn, pos.west(), 300 + j, rand, i, EnumFacing.EAST);
|
+ this.tryCatchFire(p_180650_1_, p_180650_2_.func_177976_e(), 300 + j, p_180650_4_, i, EnumFacing.EAST);
|
||||||
+ this.tryCatchFire(worldIn, pos.down(), 250 + j, rand, i, EnumFacing.UP);
|
+ this.tryCatchFire(p_180650_1_, p_180650_2_.func_177977_b(), 250 + j, p_180650_4_, i, EnumFacing.UP);
|
||||||
+ this.tryCatchFire(worldIn, pos.up(), 250 + j, rand, i, EnumFacing.DOWN);
|
+ this.tryCatchFire(p_180650_1_, p_180650_2_.func_177984_a(), 250 + j, p_180650_4_, i, EnumFacing.DOWN);
|
||||||
+ this.tryCatchFire(worldIn, pos.north(), 300 + j, rand, i, EnumFacing.SOUTH);
|
+ this.tryCatchFire(p_180650_1_, p_180650_2_.func_177978_c(), 300 + j, p_180650_4_, i, EnumFacing.SOUTH);
|
||||||
+ this.tryCatchFire(worldIn, pos.south(), 300 + j, rand, i, EnumFacing.NORTH);
|
+ this.tryCatchFire(p_180650_1_, p_180650_2_.func_177968_d(), 300 + j, p_180650_4_, i, EnumFacing.NORTH);
|
||||||
|
|
||||||
for (int k = -1; k <= 1; ++k)
|
for (int k = -1; k <= 1; ++k)
|
||||||
{
|
{
|
||||||
|
@ -84,39 +84,39 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
+ @Deprecated // Use Block.getFlammability
|
+ @Deprecated // Use Block.getFlammability
|
||||||
public int getFlammability(Block blockIn)
|
public int func_176532_c(Block p_176532_1_)
|
||||||
{
|
{
|
||||||
Integer integer = (Integer)this.flammabilities.get(blockIn);
|
Integer integer = (Integer)this.field_149848_b.get(p_176532_1_);
|
||||||
return integer == null ? 0 : integer.intValue();
|
return integer == null ? 0 : integer.intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
+ @Deprecated // Use Block.getFlammability
|
+ @Deprecated // Use Block.getFlammability
|
||||||
public int getEncouragement(Block blockIn)
|
public int func_176534_d(Block p_176534_1_)
|
||||||
{
|
{
|
||||||
Integer integer = (Integer)this.encouragements.get(blockIn);
|
Integer integer = (Integer)this.field_149849_a.get(p_176534_1_);
|
||||||
return integer == null ? 0 : integer.intValue();
|
return integer == null ? 0 : integer.intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
+ @Deprecated // Use tryCatchFire with face below
|
+ @Deprecated // Use tryCatchFire with face below
|
||||||
private void catchOnFire(World worldIn, BlockPos pos, int chance, Random random, int age)
|
private void func_176536_a(World p_176536_1_, BlockPos p_176536_2_, int p_176536_3_, Random p_176536_4_, int p_176536_5_)
|
||||||
{
|
{
|
||||||
- int i = this.getFlammability(worldIn.getBlockState(pos).getBlock());
|
- int i = this.func_176532_c(p_176536_1_.func_180495_p(p_176536_2_).func_177230_c());
|
||||||
+ this.tryCatchFire(worldIn, pos, chance, random, age, EnumFacing.UP);
|
+ this.tryCatchFire(p_176536_1_, p_176536_2_, p_176536_3_, p_176536_4_, p_176536_5_, EnumFacing.UP);
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
+ private void tryCatchFire(World worldIn, BlockPos pos, int chance, Random random, int age, EnumFacing face)
|
+ private void tryCatchFire(World p_176536_1_, BlockPos p_176536_2_, int p_176536_3_, Random p_176536_4_, int p_176536_5_, EnumFacing face)
|
||||||
+ {
|
+ {
|
||||||
+ int i = worldIn.getBlockState(pos).getBlock().getFlammability(worldIn, pos, face);
|
+ int i = p_176536_1_.func_180495_p(p_176536_2_).func_177230_c().getFlammability(p_176536_1_, p_176536_2_, face);
|
||||||
+
|
+
|
||||||
if (random.nextInt(chance) < i)
|
if (p_176536_4_.nextInt(p_176536_3_) < i)
|
||||||
{
|
{
|
||||||
IBlockState iblockstate = worldIn.getBlockState(pos);
|
IBlockState iblockstate = p_176536_1_.func_180495_p(p_176536_2_);
|
||||||
@@ -308,7 +318,7 @@
|
@@ -308,7 +318,7 @@
|
||||||
{
|
{
|
||||||
for (EnumFacing enumfacing : EnumFacing.values())
|
for (EnumFacing enumfacing : EnumFacing.values())
|
||||||
{
|
{
|
||||||
- if (this.canCatchFire(worldIn, pos.offset(enumfacing)))
|
- if (this.func_176535_e(p_176533_1_, p_176533_2_.func_177972_a(enumfacing)))
|
||||||
+ if (this.canCatchFire(worldIn, pos.offset(enumfacing), enumfacing.getOpposite()))
|
+ if (this.canCatchFire(p_176533_1_, p_176533_2_.func_177972_a(enumfacing), enumfacing.func_176734_d()))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -124,8 +124,8 @@
|
||||||
|
|
||||||
for (EnumFacing enumfacing : EnumFacing.values())
|
for (EnumFacing enumfacing : EnumFacing.values())
|
||||||
{
|
{
|
||||||
- i = Math.max(this.getEncouragement(worldIn.getBlockState(pos.offset(enumfacing)).getBlock()), i);
|
- i = Math.max(this.func_176534_d(p_176538_1_.func_180495_p(p_176538_2_.func_177972_a(enumfacing)).func_177230_c()), i);
|
||||||
+ i = Math.max(worldIn.getBlockState(pos.offset(enumfacing)).getBlock().getFlammability(worldIn, pos.offset(enumfacing), enumfacing.getOpposite()), i);
|
+ i = Math.max(p_176538_1_.func_180495_p(p_176538_2_.func_177972_a(enumfacing)).func_177230_c().getFlammability(p_176538_1_, p_176538_2_.func_177972_a(enumfacing), enumfacing.func_176734_d()), i);
|
||||||
}
|
}
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
|
@ -134,22 +134,22 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
+ @Deprecated // Use canCatchFire with face sensitive version below
|
+ @Deprecated // Use canCatchFire with face sensitive version below
|
||||||
public boolean canCatchFire(IBlockAccess worldIn, BlockPos pos)
|
public boolean func_176535_e(IBlockAccess p_176535_1_, BlockPos p_176535_2_)
|
||||||
{
|
{
|
||||||
- return this.getEncouragement(worldIn.getBlockState(pos).getBlock()) > 0;
|
- return this.func_176534_d(p_176535_1_.func_180495_p(p_176535_2_).func_177230_c()) > 0;
|
||||||
+ return canCatchFire(worldIn, pos, EnumFacing.UP);
|
+ return canCatchFire(p_176535_1_, p_176535_2_, EnumFacing.UP);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
|
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
|
||||||
@@ -382,9 +393,9 @@
|
@@ -382,9 +393,9 @@
|
||||||
worldIn.playSound((double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), (double)((float)pos.getZ() + 0.5F), "fire.fire", 1.0F + rand.nextFloat(), rand.nextFloat() * 0.7F + 0.3F, false);
|
p_180655_1_.func_72980_b((double)((float)p_180655_2_.func_177958_n() + 0.5F), (double)((float)p_180655_2_.func_177956_o() + 0.5F), (double)((float)p_180655_2_.func_177952_p() + 0.5F), "fire.fire", 1.0F + p_180655_4_.nextFloat(), p_180655_4_.nextFloat() * 0.7F + 0.3F, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
- if (!World.doesBlockHaveSolidTopSurface(worldIn, pos.down()) && !Blocks.fire.canCatchFire(worldIn, pos.down()))
|
- if (!World.func_175683_a(p_180655_1_, p_180655_2_.func_177977_b()) && !Blocks.field_150480_ab.func_176535_e(p_180655_1_, p_180655_2_.func_177977_b()))
|
||||||
+ if (!World.doesBlockHaveSolidTopSurface(worldIn, pos.down()) && !Blocks.fire.canCatchFire(worldIn, pos.down(), EnumFacing.UP))
|
+ if (!World.func_175683_a(p_180655_1_, p_180655_2_.func_177977_b()) && !Blocks.field_150480_ab.canCatchFire(p_180655_1_, p_180655_2_.func_177977_b(), EnumFacing.UP))
|
||||||
{
|
{
|
||||||
- if (Blocks.fire.canCatchFire(worldIn, pos.west()))
|
- if (Blocks.field_150480_ab.func_176535_e(p_180655_1_, p_180655_2_.func_177976_e()))
|
||||||
+ if (Blocks.fire.canCatchFire(worldIn, pos.west(), EnumFacing.EAST))
|
+ if (Blocks.field_150480_ab.canCatchFire(p_180655_1_, p_180655_2_.func_177976_e(), EnumFacing.EAST))
|
||||||
{
|
{
|
||||||
for (int j = 0; j < 2; ++j)
|
for (int j = 0; j < 2; ++j)
|
||||||
{
|
{
|
||||||
|
@ -157,8 +157,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- if (Blocks.fire.canCatchFire(worldIn, pos.east()))
|
- if (Blocks.field_150480_ab.func_176535_e(p_180655_1_, p_180655_2_.func_177974_f()))
|
||||||
+ if (Blocks.fire.canCatchFire(worldIn, pos.east(), EnumFacing.WEST))
|
+ if (Blocks.field_150480_ab.canCatchFire(p_180655_1_, p_180655_2_.func_177974_f(), EnumFacing.WEST))
|
||||||
{
|
{
|
||||||
for (int k = 0; k < 2; ++k)
|
for (int k = 0; k < 2; ++k)
|
||||||
{
|
{
|
||||||
|
@ -166,8 +166,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- if (Blocks.fire.canCatchFire(worldIn, pos.north()))
|
- if (Blocks.field_150480_ab.func_176535_e(p_180655_1_, p_180655_2_.func_177978_c()))
|
||||||
+ if (Blocks.fire.canCatchFire(worldIn, pos.north(), EnumFacing.SOUTH))
|
+ if (Blocks.field_150480_ab.canCatchFire(p_180655_1_, p_180655_2_.func_177978_c(), EnumFacing.SOUTH))
|
||||||
{
|
{
|
||||||
for (int l = 0; l < 2; ++l)
|
for (int l = 0; l < 2; ++l)
|
||||||
{
|
{
|
||||||
|
@ -175,8 +175,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- if (Blocks.fire.canCatchFire(worldIn, pos.south()))
|
- if (Blocks.field_150480_ab.func_176535_e(p_180655_1_, p_180655_2_.func_177968_d()))
|
||||||
+ if (Blocks.fire.canCatchFire(worldIn, pos.south(), EnumFacing.NORTH))
|
+ if (Blocks.field_150480_ab.canCatchFire(p_180655_1_, p_180655_2_.func_177968_d(), EnumFacing.NORTH))
|
||||||
{
|
{
|
||||||
for (int i1 = 0; i1 < 2; ++i1)
|
for (int i1 = 0; i1 < 2; ++i1)
|
||||||
{
|
{
|
||||||
|
@ -184,14 +184,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- if (Blocks.fire.canCatchFire(worldIn, pos.up()))
|
- if (Blocks.field_150480_ab.func_176535_e(p_180655_1_, p_180655_2_.func_177984_a()))
|
||||||
+ if (Blocks.fire.canCatchFire(worldIn, pos.up(), EnumFacing.DOWN))
|
+ if (Blocks.field_150480_ab.canCatchFire(p_180655_1_, p_180655_2_.func_177984_a(), EnumFacing.DOWN))
|
||||||
{
|
{
|
||||||
for (int j1 = 0; j1 < 2; ++j1)
|
for (int j1 = 0; j1 < 2; ++j1)
|
||||||
{
|
{
|
||||||
@@ -476,4 +487,19 @@
|
@@ -476,4 +487,19 @@
|
||||||
{
|
{
|
||||||
return new BlockState(this, new IProperty[] {AGE, NORTH, EAST, SOUTH, WEST, UPPER, FLIP, ALT});
|
return new BlockState(this, new IProperty[] {field_176543_a, field_176545_N, field_176546_O, field_176541_P, field_176539_Q, field_176542_R, field_176540_b, field_176544_M});
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ /*================================= Forge Start ======================================*/
|
+ /*================================= Forge Start ======================================*/
|
||||||
|
@ -205,7 +205,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public boolean canCatchFire(IBlockAccess world, BlockPos pos, EnumFacing face)
|
+ public boolean canCatchFire(IBlockAccess world, BlockPos pos, EnumFacing face)
|
||||||
+ {
|
+ {
|
||||||
+ return world.getBlockState(pos).getBlock().isFlammable(world, pos, face);
|
+ return world.func_180495_p(pos).func_177230_c().isFlammable(world, pos, face);
|
||||||
+ }
|
+ }
|
||||||
+ /*================================= Forge Start ======================================*/
|
+ /*================================= Forge Start ======================================*/
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,16 +2,16 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockFlowerPot.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockFlowerPot.java
|
||||||
@@ -169,13 +169,6 @@
|
@@ -169,13 +169,6 @@
|
||||||
|
|
||||||
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
|
public void func_180663_b(World p_180663_1_, BlockPos p_180663_2_, IBlockState p_180663_3_)
|
||||||
{
|
{
|
||||||
- TileEntityFlowerPot tileentityflowerpot = this.getTileEntity(worldIn, pos);
|
- TileEntityFlowerPot tileentityflowerpot = this.func_176442_d(p_180663_1_, p_180663_2_);
|
||||||
-
|
-
|
||||||
- if (tileentityflowerpot != null && tileentityflowerpot.getFlowerPotItem() != null)
|
- if (tileentityflowerpot != null && tileentityflowerpot.func_145965_a() != null)
|
||||||
- {
|
- {
|
||||||
- spawnAsEntity(worldIn, pos, new ItemStack(tileentityflowerpot.getFlowerPotItem(), 1, tileentityflowerpot.getFlowerPotData()));
|
- func_180635_a(p_180663_1_, p_180663_2_, new ItemStack(tileentityflowerpot.func_145965_a(), 1, tileentityflowerpot.func_145966_b()));
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
super.breakBlock(worldIn, pos, state);
|
super.func_180663_b(p_180663_1_, p_180663_2_, p_180663_3_);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -395,6 +388,31 @@
|
@@ -395,6 +388,31 @@
|
||||||
|
@ -24,9 +24,9 @@
|
||||||
+ public java.util.List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
+ public java.util.List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||||
+ {
|
+ {
|
||||||
+ java.util.List<ItemStack> ret = super.getDrops(world, pos, state, fortune);
|
+ java.util.List<ItemStack> ret = super.getDrops(world, pos, state, fortune);
|
||||||
+ TileEntityFlowerPot te = world.getTileEntity(pos) instanceof TileEntityFlowerPot ? (TileEntityFlowerPot)world.getTileEntity(pos) : null;
|
+ TileEntityFlowerPot te = world.func_175625_s(pos) instanceof TileEntityFlowerPot ? (TileEntityFlowerPot)world.func_175625_s(pos) : null;
|
||||||
+ if (te != null && te.getFlowerPotItem() != null)
|
+ if (te != null && te.func_145965_a() != null)
|
||||||
+ ret.add(new ItemStack(te.getFlowerPotItem(), 1, te.getFlowerPotData()));
|
+ ret.add(new ItemStack(te.func_145965_a(), 1, te.func_145966_b()));
|
||||||
+ return ret;
|
+ return ret;
|
||||||
+ }
|
+ }
|
||||||
+ @Override
|
+ @Override
|
||||||
|
@ -36,10 +36,10 @@
|
||||||
+ return super.removedByPlayer(world, pos, player, willHarvest);
|
+ return super.removedByPlayer(world, pos, player, willHarvest);
|
||||||
+ }
|
+ }
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public void harvestBlock(World world, EntityPlayer player, BlockPos pos, IBlockState state, TileEntity te)
|
+ public void func_180657_a(World world, EntityPlayer player, BlockPos pos, IBlockState state, TileEntity te)
|
||||||
+ {
|
+ {
|
||||||
+ super.harvestBlock(world, player, pos, state, te);
|
+ super.func_180657_a(world, player, pos, state, te);
|
||||||
+ world.setBlockToAir(pos);
|
+ world.func_175698_g(pos);
|
||||||
+ }
|
+ }
|
||||||
+ /*===========================FORGE END==========================================*/
|
+ /*===========================FORGE END==========================================*/
|
||||||
+
|
+
|
||||||
|
|
|
@ -2,28 +2,28 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockGrass.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockGrass.java
|
||||||
@@ -58,7 +58,7 @@
|
@@ -58,7 +58,7 @@
|
||||||
{
|
{
|
||||||
if (!worldIn.isRemote)
|
if (!p_180650_1_.field_72995_K)
|
||||||
{
|
{
|
||||||
- if (worldIn.getLightFromNeighbors(pos.up()) < 4 && worldIn.getBlockState(pos.up()).getBlock().getLightOpacity() > 2)
|
- if (p_180650_1_.func_175671_l(p_180650_2_.func_177984_a()) < 4 && p_180650_1_.func_180495_p(p_180650_2_.func_177984_a()).func_177230_c().func_149717_k() > 2)
|
||||||
+ if (worldIn.getLightFromNeighbors(pos.up()) < 4 && worldIn.getBlockState(pos.up()).getBlock().getLightOpacity(worldIn, pos.up()) > 2)
|
+ if (p_180650_1_.func_175671_l(p_180650_2_.func_177984_a()) < 4 && p_180650_1_.func_180495_p(p_180650_2_.func_177984_a()).func_177230_c().getLightOpacity(p_180650_1_, p_180650_2_.func_177984_a()) > 2)
|
||||||
{
|
{
|
||||||
worldIn.setBlockState(pos, Blocks.dirt.getDefaultState());
|
p_180650_1_.func_175656_a(p_180650_2_, Blocks.field_150346_d.func_176223_P());
|
||||||
}
|
}
|
||||||
@@ -72,7 +72,7 @@
|
@@ -72,7 +72,7 @@
|
||||||
Block block = worldIn.getBlockState(blockpos.up()).getBlock();
|
Block block = p_180650_1_.func_180495_p(blockpos.func_177984_a()).func_177230_c();
|
||||||
IBlockState iblockstate = worldIn.getBlockState(blockpos);
|
IBlockState iblockstate = p_180650_1_.func_180495_p(blockpos);
|
||||||
|
|
||||||
- if (iblockstate.getBlock() == Blocks.dirt && iblockstate.getValue(BlockDirt.VARIANT) == BlockDirt.DirtType.DIRT && worldIn.getLightFromNeighbors(blockpos.up()) >= 4 && block.getLightOpacity() <= 2)
|
- if (iblockstate.func_177230_c() == Blocks.field_150346_d && iblockstate.func_177229_b(BlockDirt.field_176386_a) == BlockDirt.DirtType.DIRT && p_180650_1_.func_175671_l(blockpos.func_177984_a()) >= 4 && block.func_149717_k() <= 2)
|
||||||
+ if (iblockstate.getBlock() == Blocks.dirt && iblockstate.getValue(BlockDirt.VARIANT) == BlockDirt.DirtType.DIRT && worldIn.getLightFromNeighbors(blockpos.up()) >= 4 && block.getLightOpacity(worldIn, blockpos.up()) <= 2)
|
+ if (iblockstate.func_177230_c() == Blocks.field_150346_d && iblockstate.func_177229_b(BlockDirt.field_176386_a) == BlockDirt.DirtType.DIRT && p_180650_1_.func_175671_l(blockpos.func_177984_a()) >= 4 && block.getLightOpacity(p_180650_1_, blockpos.func_177984_a()) <= 2)
|
||||||
{
|
{
|
||||||
worldIn.setBlockState(blockpos, Blocks.grass.getDefaultState());
|
p_180650_1_.func_175656_a(blockpos, Blocks.field_150349_c.func_176223_P());
|
||||||
}
|
}
|
||||||
@@ -110,7 +110,7 @@
|
@@ -110,7 +110,7 @@
|
||||||
{
|
{
|
||||||
if (j >= i / 16)
|
if (j >= i / 16)
|
||||||
{
|
{
|
||||||
- if (worldIn.getBlockState(blockpos1).getBlock().blockMaterial == Material.air)
|
- if (p_176474_1_.func_180495_p(blockpos1).func_177230_c().field_149764_J == Material.field_151579_a)
|
||||||
+ if (worldIn.isAirBlock(blockpos1))
|
+ if (p_176474_1_.func_175623_d(blockpos1))
|
||||||
{
|
{
|
||||||
if (rand.nextInt(8) == 0)
|
if (p_176474_2_.nextInt(8) == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/block/BlockHugeMushroom.java
|
--- ../src-base/minecraft/net/minecraft/block/BlockHugeMushroom.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockHugeMushroom.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockHugeMushroom.java
|
||||||
@@ -79,6 +79,20 @@
|
@@ -79,6 +79,20 @@
|
||||||
return new BlockState(this, new IProperty[] {VARIANT});
|
return new BlockState(this, new IProperty[] {field_176380_a});
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis)
|
+ public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis)
|
||||||
+ {
|
+ {
|
||||||
+ IBlockState state = world.getBlockState(pos);
|
+ IBlockState state = world.func_180495_p(pos);
|
||||||
+ for (IProperty prop : (java.util.Set<IProperty>)state.getProperties().keySet())
|
+ for (IProperty prop : (java.util.Set<IProperty>)state.func_177228_b().keySet())
|
||||||
+ {
|
+ {
|
||||||
+ if (prop.getName().equals("variant"))
|
+ if (prop.func_177701_a().equals("variant"))
|
||||||
+ {
|
+ {
|
||||||
+ world.setBlockState(pos, state.cycleProperty(prop));
|
+ world.func_175656_a(pos, state.func_177231_a(prop));
|
||||||
+ return true;
|
+ return true;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
|
|
@ -1,35 +1,35 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/block/BlockIce.java
|
--- ../src-base/minecraft/net/minecraft/block/BlockIce.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockIce.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockIce.java
|
||||||
@@ -38,14 +38,17 @@
|
@@ -38,14 +38,17 @@
|
||||||
player.triggerAchievement(StatList.mineBlockStatArray[Block.getIdFromBlock(this)]);
|
p_180657_2_.func_71029_a(StatList.field_75934_C[Block.func_149682_b(this)]);
|
||||||
player.addExhaustion(0.025F);
|
p_180657_2_.func_71020_j(0.025F);
|
||||||
|
|
||||||
- if (this.canSilkHarvest() && EnchantmentHelper.getSilkTouchModifier(player))
|
- if (this.func_149700_E() && EnchantmentHelper.func_77502_d(p_180657_2_))
|
||||||
+ if (this.canSilkHarvest(worldIn, pos, worldIn.getBlockState(pos), player) && EnchantmentHelper.getSilkTouchModifier(player))
|
+ if (this.canSilkHarvest(p_180657_1_, p_180657_3_, p_180657_1_.func_180495_p(p_180657_3_), p_180657_2_) && EnchantmentHelper.func_77502_d(p_180657_2_))
|
||||||
{
|
{
|
||||||
+ java.util.List<ItemStack> items = new java.util.ArrayList<ItemStack>();
|
+ java.util.List<ItemStack> items = new java.util.ArrayList<ItemStack>();
|
||||||
ItemStack itemstack = this.createStackedBlock(state);
|
ItemStack itemstack = this.func_180643_i(p_180657_4_);
|
||||||
|
|
||||||
- if (itemstack != null)
|
- if (itemstack != null)
|
||||||
- {
|
- {
|
||||||
- spawnAsEntity(worldIn, pos, itemstack);
|
- func_180635_a(p_180657_1_, p_180657_3_, itemstack);
|
||||||
- }
|
- }
|
||||||
+ if (itemstack != null) items.add(itemstack);
|
+ if (itemstack != null) items.add(itemstack);
|
||||||
+
|
+
|
||||||
+ net.minecraftforge.event.ForgeEventFactory.fireBlockHarvesting(items, worldIn, pos, worldIn.getBlockState(pos), 0, 1.0f, true, player);
|
+ net.minecraftforge.event.ForgeEventFactory.fireBlockHarvesting(items, p_180657_1_, p_180657_3_, p_180657_1_.func_180495_p(p_180657_3_), 0, 1.0f, true, p_180657_2_);
|
||||||
+
|
+
|
||||||
+ for (ItemStack is : items)
|
+ for (ItemStack is : items)
|
||||||
+ spawnAsEntity(worldIn, pos, is);
|
+ func_180635_a(p_180657_1_, p_180657_3_, is);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -56,7 +59,9 @@
|
@@ -56,7 +59,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
int i = EnchantmentHelper.getFortuneModifier(player);
|
int i = EnchantmentHelper.func_77517_e(p_180657_2_);
|
||||||
+ harvesters.set(player);
|
+ harvesters.set(p_180657_2_);
|
||||||
this.dropBlockAsItem(worldIn, pos, state, i);
|
this.func_176226_b(p_180657_1_, p_180657_3_, p_180657_4_, i);
|
||||||
+ harvesters.set(null);
|
+ harvesters.set(null);
|
||||||
Material material = worldIn.getBlockState(pos.down()).getBlock().getMaterial();
|
Material material = p_180657_1_.func_180495_p(p_180657_3_.func_177977_b()).func_177230_c().func_149688_o();
|
||||||
|
|
||||||
if (material.blocksMovement() || material.isLiquid())
|
if (material.func_76230_c() || material.func_76224_d())
|
||||||
|
|
|
@ -2,28 +2,28 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockLadder.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockLadder.java
|
||||||
@@ -78,7 +78,10 @@
|
@@ -78,7 +78,10 @@
|
||||||
|
|
||||||
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
|
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
|
||||||
{
|
{
|
||||||
- return worldIn.getBlockState(pos.west()).getBlock().isNormalCube() ? true : (worldIn.getBlockState(pos.east()).getBlock().isNormalCube() ? true : (worldIn.getBlockState(pos.north()).getBlock().isNormalCube() ? true : worldIn.getBlockState(pos.south()).getBlock().isNormalCube()));
|
- return p_176196_1_.func_180495_p(p_176196_2_.func_177976_e()).func_177230_c().func_149721_r() ? true : (p_176196_1_.func_180495_p(p_176196_2_.func_177974_f()).func_177230_c().func_149721_r() ? true : (p_176196_1_.func_180495_p(p_176196_2_.func_177978_c()).func_177230_c().func_149721_r() ? true : p_176196_1_.func_180495_p(p_176196_2_.func_177968_d()).func_177230_c().func_149721_r()));
|
||||||
+ return worldIn.isSideSolid(pos.west(), EnumFacing.EAST, true) ||
|
+ return p_176196_1_.isSideSolid(p_176196_2_.func_177976_e(), EnumFacing.EAST, true) ||
|
||||||
+ worldIn.isSideSolid(pos.east(), EnumFacing.WEST, true) ||
|
+ p_176196_1_.isSideSolid(p_176196_2_.func_177974_f(), EnumFacing.WEST, true) ||
|
||||||
+ worldIn.isSideSolid(pos.north(), EnumFacing.SOUTH, true) ||
|
+ p_176196_1_.isSideSolid(p_176196_2_.func_177978_c(), EnumFacing.SOUTH, true) ||
|
||||||
+ worldIn.isSideSolid(pos.south(), EnumFacing.NORTH, true);
|
+ p_176196_1_.isSideSolid(p_176196_2_.func_177968_d(), EnumFacing.NORTH, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
|
public IBlockState func_180642_a(World p_180642_1_, BlockPos p_180642_2_, EnumFacing p_180642_3_, float p_180642_4_, float p_180642_5_, float p_180642_6_, int p_180642_7_, EntityLivingBase p_180642_8_)
|
||||||
@@ -116,7 +119,7 @@
|
@@ -116,7 +119,7 @@
|
||||||
|
|
||||||
protected boolean canBlockStay(World worldIn, BlockPos pos, EnumFacing facing)
|
protected boolean func_176381_b(World p_176381_1_, BlockPos p_176381_2_, EnumFacing p_176381_3_)
|
||||||
{
|
{
|
||||||
- return worldIn.getBlockState(pos.offset(facing.getOpposite())).getBlock().isNormalCube();
|
- return p_176381_1_.func_180495_p(p_176381_2_.func_177972_a(p_176381_3_.func_176734_d())).func_177230_c().func_149721_r();
|
||||||
+ return worldIn.isSideSolid(pos.offset(facing.getOpposite()), facing, true);
|
+ return p_176381_1_.isSideSolid(p_176381_2_.func_177972_a(p_176381_3_.func_176734_d()), p_176381_3_, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IBlockState getStateFromMeta(int meta)
|
public IBlockState func_176203_a(int p_176203_1_)
|
||||||
@@ -146,4 +149,6 @@
|
@@ -146,4 +149,6 @@
|
||||||
{
|
{
|
||||||
return new BlockState(this, new IProperty[] {FACING});
|
return new BlockState(this, new IProperty[] {field_176382_a});
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ @Override public boolean isLadder(IBlockAccess world, BlockPos pos, EntityLivingBase entity) { return true; }
|
+ @Override public boolean isLadder(IBlockAccess world, BlockPos pos, EntityLivingBase entity) { return true; }
|
||||||
|
|
|
@ -7,43 +7,43 @@
|
||||||
-public abstract class BlockLeaves extends BlockLeavesBase
|
-public abstract class BlockLeaves extends BlockLeavesBase
|
||||||
+public abstract class BlockLeaves extends BlockLeavesBase implements net.minecraftforge.common.IShearable
|
+public abstract class BlockLeaves extends BlockLeavesBase implements net.minecraftforge.common.IShearable
|
||||||
{
|
{
|
||||||
public static final PropertyBool DECAYABLE = PropertyBool.create("decayable");
|
public static final PropertyBool field_176237_a = PropertyBool.func_177716_a("decayable");
|
||||||
public static final PropertyBool CHECK_DECAY = PropertyBool.create("check_decay");
|
public static final PropertyBool field_176236_b = PropertyBool.func_177716_a("check_decay");
|
||||||
@@ -75,9 +75,9 @@
|
@@ -75,9 +75,9 @@
|
||||||
BlockPos blockpos = pos.add(j1, k1, l1);
|
BlockPos blockpos = p_180663_2_.func_177982_a(j1, k1, l1);
|
||||||
IBlockState iblockstate = worldIn.getBlockState(blockpos);
|
IBlockState iblockstate = p_180663_1_.func_180495_p(blockpos);
|
||||||
|
|
||||||
- if (iblockstate.getBlock().getMaterial() == Material.leaves && !((Boolean)iblockstate.getValue(CHECK_DECAY)).booleanValue())
|
- if (iblockstate.func_177230_c().func_149688_o() == Material.field_151584_j && !((Boolean)iblockstate.func_177229_b(field_176236_b)).booleanValue())
|
||||||
+ if (iblockstate.getBlock().isLeaves(worldIn, blockpos))
|
+ if (iblockstate.func_177230_c().isLeaves(p_180663_1_, blockpos))
|
||||||
{
|
{
|
||||||
- worldIn.setBlockState(blockpos, iblockstate.withProperty(CHECK_DECAY, Boolean.valueOf(true)), 4);
|
- p_180663_1_.func_180501_a(blockpos, iblockstate.func_177226_a(field_176236_b, Boolean.valueOf(true)), 4);
|
||||||
+ iblockstate.getBlock().beginLeavesDecay(worldIn, blockpos);
|
+ iblockstate.func_177230_c().beginLeavesDecay(p_180663_1_, blockpos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -117,9 +117,9 @@
|
@@ -117,9 +117,9 @@
|
||||||
{
|
{
|
||||||
Block block = worldIn.getBlockState(blockpos$mutableblockpos.func_181079_c(k + i2, l + j2, i1 + k2)).getBlock();
|
Block block = p_180650_1_.func_180495_p(blockpos$mutableblockpos.func_181079_c(k + i2, l + j2, i1 + k2)).func_177230_c();
|
||||||
|
|
||||||
- if (block != Blocks.log && block != Blocks.log2)
|
- if (block != Blocks.field_150364_r && block != Blocks.field_150363_s)
|
||||||
+ if (!block.canSustainLeaves(worldIn, blockpos$mutableblockpos.func_181079_c(k + i2, l + j2, i1 + k2)))
|
+ if (!block.canSustainLeaves(p_180650_1_, blockpos$mutableblockpos.func_181079_c(k + i2, l + j2, i1 + k2)))
|
||||||
{
|
{
|
||||||
- if (block.getMaterial() == Material.leaves)
|
- if (block.func_149688_o() == Material.field_151584_j)
|
||||||
+ if (block.isLeaves(worldIn, blockpos$mutableblockpos.func_181079_c(k + i2, l + j2, i1 + k2)))
|
+ if (block.isLeaves(p_180650_1_, blockpos$mutableblockpos.func_181079_c(k + i2, l + j2, i1 + k2)))
|
||||||
{
|
{
|
||||||
this.surroundings[(i2 + l1) * k1 + (j2 + l1) * j1 + k2 + l1] = -2;
|
this.field_150128_a[(i2 + l1) * k1 + (j2 + l1) * j1 + k2 + l1] = -2;
|
||||||
}
|
}
|
||||||
@@ -226,40 +226,7 @@
|
@@ -226,40 +226,7 @@
|
||||||
|
|
||||||
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
|
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||||
{
|
{
|
||||||
- if (!worldIn.isRemote)
|
- if (!p_180653_1_.field_72995_K)
|
||||||
- {
|
- {
|
||||||
- int i = this.getSaplingDropChance(state);
|
- int i = this.func_176232_d(p_180653_3_);
|
||||||
-
|
-
|
||||||
- if (fortune > 0)
|
- if (p_180653_5_ > 0)
|
||||||
- {
|
- {
|
||||||
- i -= 2 << fortune;
|
- i -= 2 << p_180653_5_;
|
||||||
-
|
-
|
||||||
- if (i < 10)
|
- if (i < 10)
|
||||||
- {
|
- {
|
||||||
|
@ -51,17 +51,17 @@
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
- if (worldIn.rand.nextInt(i) == 0)
|
- if (p_180653_1_.field_73012_v.nextInt(i) == 0)
|
||||||
- {
|
- {
|
||||||
- Item item = this.getItemDropped(state, worldIn.rand, fortune);
|
- Item item = this.func_180660_a(p_180653_3_, p_180653_1_.field_73012_v, p_180653_5_);
|
||||||
- spawnAsEntity(worldIn, pos, new ItemStack(item, 1, this.damageDropped(state)));
|
- func_180635_a(p_180653_1_, p_180653_2_, new ItemStack(item, 1, this.func_180651_a(p_180653_3_)));
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
- i = 200;
|
- i = 200;
|
||||||
-
|
-
|
||||||
- if (fortune > 0)
|
- if (p_180653_5_ > 0)
|
||||||
- {
|
- {
|
||||||
- i -= 10 << fortune;
|
- i -= 10 << p_180653_5_;
|
||||||
-
|
-
|
||||||
- if (i < 40)
|
- if (i < 40)
|
||||||
- {
|
- {
|
||||||
|
@ -69,16 +69,16 @@
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
- this.dropApple(worldIn, pos, state, i);
|
- this.func_176234_a(p_180653_1_, p_180653_2_, p_180653_3_, i);
|
||||||
- }
|
- }
|
||||||
+ super.dropBlockAsItemWithChance(worldIn, pos, state, chance, fortune);
|
+ super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void dropApple(World worldIn, BlockPos pos, IBlockState state, int chance)
|
protected void func_176234_a(World p_176234_1_, BlockPos p_176234_2_, IBlockState p_176234_3_, int p_176234_4_)
|
||||||
@@ -296,4 +263,48 @@
|
@@ -296,4 +263,48 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract BlockPlanks.EnumType getWoodType(int meta);
|
public abstract BlockPlanks.EnumType func_176233_b(int p_176233_1_);
|
||||||
+
|
+
|
||||||
+ @Override public boolean isShearable(ItemStack item, IBlockAccess world, BlockPos pos){ return true; }
|
+ @Override public boolean isShearable(ItemStack item, IBlockAccess world, BlockPos pos){ return true; }
|
||||||
+ @Override public boolean isLeaves(IBlockAccess world, BlockPos pos){ return true; }
|
+ @Override public boolean isLeaves(IBlockAccess world, BlockPos pos){ return true; }
|
||||||
|
@ -86,10 +86,10 @@
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public void beginLeavesDecay(World world, BlockPos pos)
|
+ public void beginLeavesDecay(World world, BlockPos pos)
|
||||||
+ {
|
+ {
|
||||||
+ IBlockState state = world.getBlockState(pos);
|
+ IBlockState state = world.func_180495_p(pos);
|
||||||
+ if (!(Boolean)state.getValue(CHECK_DECAY))
|
+ if (!(Boolean)state.func_177229_b(field_176236_b))
|
||||||
+ {
|
+ {
|
||||||
+ world.setBlockState(pos, state.withProperty(CHECK_DECAY, true), 4);
|
+ world.func_180501_a(pos, state.func_177226_a(field_176236_b, true), 4);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
@ -97,8 +97,8 @@
|
||||||
+ public java.util.List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
+ public java.util.List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||||
+ {
|
+ {
|
||||||
+ java.util.List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
|
+ java.util.List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
|
||||||
+ Random rand = world instanceof World ? ((World)world).rand : new Random();
|
+ Random rand = world instanceof World ? ((World)world).field_73012_v : new Random();
|
||||||
+ int chance = this.getSaplingDropChance(state);
|
+ int chance = this.func_176232_d(state);
|
||||||
+
|
+
|
||||||
+ if (fortune > 0)
|
+ if (fortune > 0)
|
||||||
+ {
|
+ {
|
||||||
|
@ -107,7 +107,7 @@
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (rand.nextInt(chance) == 0)
|
+ if (rand.nextInt(chance) == 0)
|
||||||
+ ret.add(new ItemStack(getItemDropped(state, rand, fortune), 1, damageDropped(state)));
|
+ ret.add(new ItemStack(func_180660_a(state, rand, fortune), 1, func_180651_a(state)));
|
||||||
+
|
+
|
||||||
+ chance = 200;
|
+ chance = 200;
|
||||||
+ if (fortune > 0)
|
+ if (fortune > 0)
|
||||||
|
@ -118,7 +118,7 @@
|
||||||
+
|
+
|
||||||
+ this.captureDrops(true);
|
+ this.captureDrops(true);
|
||||||
+ if (world instanceof World)
|
+ if (world instanceof World)
|
||||||
+ this.dropApple((World)world, pos, state, chance); // Dammet mojang
|
+ this.func_176234_a((World)world, pos, state, chance); // Dammet mojang
|
||||||
+ ret.addAll(this.captureDrops(false));
|
+ ret.addAll(this.captureDrops(false));
|
||||||
+ return ret;
|
+ return ret;
|
||||||
+ }
|
+ }
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/block/BlockLever.java
|
--- ../src-base/minecraft/net/minecraft/block/BlockLever.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockLever.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockLever.java
|
||||||
@@ -237,6 +237,12 @@
|
@@ -237,6 +237,12 @@
|
||||||
return new BlockState(this, new IProperty[] {FACING, POWERED});
|
return new BlockState(this, new IProperty[] {field_176360_a, field_176359_b});
|
||||||
}
|
}
|
||||||
|
|
||||||
+
|
+
|
||||||
|
|
|
@ -2,18 +2,18 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockLog.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockLog.java
|
||||||
@@ -33,9 +33,9 @@
|
@@ -33,9 +33,9 @@
|
||||||
{
|
{
|
||||||
IBlockState iblockstate = worldIn.getBlockState(blockpos);
|
IBlockState iblockstate = p_180663_1_.func_180495_p(blockpos);
|
||||||
|
|
||||||
- if (iblockstate.getBlock().getMaterial() == Material.leaves && !((Boolean)iblockstate.getValue(BlockLeaves.CHECK_DECAY)).booleanValue())
|
- if (iblockstate.func_177230_c().func_149688_o() == Material.field_151584_j && !((Boolean)iblockstate.func_177229_b(BlockLeaves.field_176236_b)).booleanValue())
|
||||||
+ if (iblockstate.getBlock().isLeaves(worldIn, blockpos))
|
+ if (iblockstate.func_177230_c().isLeaves(p_180663_1_, blockpos))
|
||||||
{
|
{
|
||||||
- worldIn.setBlockState(blockpos, iblockstate.withProperty(BlockLeaves.CHECK_DECAY, Boolean.valueOf(true)), 4);
|
- p_180663_1_.func_180501_a(blockpos, iblockstate.func_177226_a(BlockLeaves.field_176236_b, Boolean.valueOf(true)), 4);
|
||||||
+ iblockstate.getBlock().beginLeavesDecay(worldIn, blockpos);
|
+ iblockstate.func_177230_c().beginLeavesDecay(p_180663_1_, blockpos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -46,6 +46,9 @@
|
@@ -46,6 +46,9 @@
|
||||||
return super.onBlockPlaced(worldIn, pos, facing, hitX, hitY, hitZ, meta, placer).withProperty(LOG_AXIS, BlockLog.EnumAxis.fromFacingAxis(facing.getAxis()));
|
return super.func_180642_a(p_180642_1_, p_180642_2_, p_180642_3_, p_180642_4_, p_180642_5_, p_180642_6_, p_180642_7_, p_180642_8_).func_177226_a(field_176299_a, BlockLog.EnumAxis.func_176870_a(p_180642_3_.func_176740_k()));
|
||||||
}
|
}
|
||||||
|
|
||||||
+ @Override public boolean canSustainLeaves(net.minecraft.world.IBlockAccess world, BlockPos pos){ return true; }
|
+ @Override public boolean canSustainLeaves(net.minecraft.world.IBlockAccess world, BlockPos pos){ return true; }
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/block/BlockMobSpawner.java
|
--- ../src-base/minecraft/net/minecraft/block/BlockMobSpawner.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockMobSpawner.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockMobSpawner.java
|
||||||
@@ -37,10 +37,14 @@
|
@@ -37,10 +37,14 @@
|
||||||
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
|
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||||
{
|
{
|
||||||
super.dropBlockAsItemWithChance(worldIn, pos, state, chance, fortune);
|
super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
|
||||||
- int i = 15 + worldIn.rand.nextInt(15) + worldIn.rand.nextInt(15);
|
- int i = 15 + p_180653_1_.field_73012_v.nextInt(15) + p_180653_1_.field_73012_v.nextInt(15);
|
||||||
- this.dropXpOnBlockBreak(worldIn, pos, i);
|
- this.func_180637_b(p_180653_1_, p_180653_2_, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ @Override
|
+ @Override
|
||||||
|
@ -14,6 +14,6 @@
|
||||||
+ return 15 + RANDOM.nextInt(15) + RANDOM.nextInt(15);
|
+ return 15 + RANDOM.nextInt(15) + RANDOM.nextInt(15);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
public boolean isOpaqueCube()
|
public boolean func_149662_c()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/block/BlockMushroom.java
|
--- ../src-base/minecraft/net/minecraft/block/BlockMushroom.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockMushroom.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockMushroom.java
|
||||||
@@ -71,7 +71,7 @@
|
@@ -71,7 +71,7 @@
|
||||||
if (pos.getY() >= 0 && pos.getY() < 256)
|
if (p_180671_2_.func_177956_o() >= 0 && p_180671_2_.func_177956_o() < 256)
|
||||||
{
|
{
|
||||||
IBlockState iblockstate = worldIn.getBlockState(pos.down());
|
IBlockState iblockstate = p_180671_1_.func_180495_p(p_180671_2_.func_177977_b());
|
||||||
- return iblockstate.getBlock() == Blocks.mycelium ? true : (iblockstate.getBlock() == Blocks.dirt && iblockstate.getValue(BlockDirt.VARIANT) == BlockDirt.DirtType.PODZOL ? true : worldIn.getLight(pos) < 13 && this.canPlaceBlockOn(iblockstate.getBlock()));
|
- return iblockstate.func_177230_c() == Blocks.field_150391_bh ? true : (iblockstate.func_177230_c() == Blocks.field_150346_d && iblockstate.func_177229_b(BlockDirt.field_176386_a) == BlockDirt.DirtType.PODZOL ? true : p_180671_1_.func_175699_k(p_180671_2_) < 13 && this.func_149854_a(iblockstate.func_177230_c()));
|
||||||
+ return iblockstate.getBlock() == Blocks.mycelium ? true : (iblockstate.getBlock() == Blocks.dirt && iblockstate.getValue(BlockDirt.VARIANT) == BlockDirt.DirtType.PODZOL ? true : worldIn.getLight(pos) < 13 && iblockstate.getBlock().canSustainPlant(worldIn, pos.down(), net.minecraft.util.EnumFacing.UP, this));
|
+ return iblockstate.func_177230_c() == Blocks.field_150391_bh ? true : (iblockstate.func_177230_c() == Blocks.field_150346_d && iblockstate.func_177229_b(BlockDirt.field_176386_a) == BlockDirt.DirtType.PODZOL ? true : p_180671_1_.func_175699_k(p_180671_2_) < 13 && iblockstate.func_177230_c().canSustainPlant(p_180671_1_, p_180671_2_.func_177977_b(), net.minecraft.util.EnumFacing.UP, this));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,19 +2,19 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockMycelium.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockMycelium.java
|
||||||
@@ -39,7 +39,7 @@
|
@@ -39,7 +39,7 @@
|
||||||
{
|
{
|
||||||
if (!worldIn.isRemote)
|
if (!p_180650_1_.field_72995_K)
|
||||||
{
|
{
|
||||||
- if (worldIn.getLightFromNeighbors(pos.up()) < 4 && worldIn.getBlockState(pos.up()).getBlock().getLightOpacity() > 2)
|
- if (p_180650_1_.func_175671_l(p_180650_2_.func_177984_a()) < 4 && p_180650_1_.func_180495_p(p_180650_2_.func_177984_a()).func_177230_c().func_149717_k() > 2)
|
||||||
+ if (worldIn.getLightFromNeighbors(pos.up()) < 4 && worldIn.getBlockState(pos.up()).getBlock().getLightOpacity(worldIn, pos.up()) > 2)
|
+ if (p_180650_1_.func_175671_l(p_180650_2_.func_177984_a()) < 4 && p_180650_1_.func_180495_p(p_180650_2_.func_177984_a()).func_177230_c().getLightOpacity(p_180650_1_, p_180650_2_.func_177984_a()) > 2)
|
||||||
{
|
{
|
||||||
worldIn.setBlockState(pos, Blocks.dirt.getDefaultState().withProperty(BlockDirt.VARIANT, BlockDirt.DirtType.DIRT));
|
p_180650_1_.func_175656_a(p_180650_2_, Blocks.field_150346_d.func_176223_P().func_177226_a(BlockDirt.field_176386_a, BlockDirt.DirtType.DIRT));
|
||||||
}
|
}
|
||||||
@@ -53,7 +53,7 @@
|
@@ -53,7 +53,7 @@
|
||||||
IBlockState iblockstate = worldIn.getBlockState(blockpos);
|
IBlockState iblockstate = p_180650_1_.func_180495_p(blockpos);
|
||||||
Block block = worldIn.getBlockState(blockpos.up()).getBlock();
|
Block block = p_180650_1_.func_180495_p(blockpos.func_177984_a()).func_177230_c();
|
||||||
|
|
||||||
- if (iblockstate.getBlock() == Blocks.dirt && iblockstate.getValue(BlockDirt.VARIANT) == BlockDirt.DirtType.DIRT && worldIn.getLightFromNeighbors(blockpos.up()) >= 4 && block.getLightOpacity() <= 2)
|
- if (iblockstate.func_177230_c() == Blocks.field_150346_d && iblockstate.func_177229_b(BlockDirt.field_176386_a) == BlockDirt.DirtType.DIRT && p_180650_1_.func_175671_l(blockpos.func_177984_a()) >= 4 && block.func_149717_k() <= 2)
|
||||||
+ if (iblockstate.getBlock() == Blocks.dirt && iblockstate.getValue(BlockDirt.VARIANT) == BlockDirt.DirtType.DIRT && worldIn.getLightFromNeighbors(blockpos.up()) >= 4 && block.getLightOpacity(worldIn, blockpos.up()) <= 2)
|
+ if (iblockstate.func_177230_c() == Blocks.field_150346_d && iblockstate.func_177229_b(BlockDirt.field_176386_a) == BlockDirt.DirtType.DIRT && p_180650_1_.func_175671_l(blockpos.func_177984_a()) >= 4 && block.getLightOpacity(p_180650_1_, blockpos.func_177984_a()) <= 2)
|
||||||
{
|
{
|
||||||
worldIn.setBlockState(blockpos, this.getDefaultState());
|
p_180650_1_.func_175656_a(blockpos, this.func_176223_P());
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,46 +2,46 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockNetherWart.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockNetherWart.java
|
||||||
@@ -38,7 +38,7 @@
|
@@ -38,7 +38,7 @@
|
||||||
|
|
||||||
public boolean canBlockStay(World worldIn, BlockPos pos, IBlockState state)
|
public boolean func_180671_f(World p_180671_1_, BlockPos p_180671_2_, IBlockState p_180671_3_)
|
||||||
{
|
{
|
||||||
- return this.canPlaceBlockOn(worldIn.getBlockState(pos.down()).getBlock());
|
- return this.func_149854_a(p_180671_1_.func_180495_p(p_180671_2_.func_177977_b()).func_177230_c());
|
||||||
+ return super.canBlockStay(worldIn, pos, state);
|
+ return super.func_180671_f(p_180671_1_, p_180671_2_, p_180671_3_);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand)
|
public void func_180650_b(World p_180650_1_, BlockPos p_180650_2_, IBlockState p_180650_3_, Random p_180650_4_)
|
||||||
@@ -54,9 +54,11 @@
|
@@ -54,9 +54,11 @@
|
||||||
super.updateTick(worldIn, pos, state, rand);
|
super.func_180650_b(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_4_);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ @SuppressWarnings("unused")
|
+ @SuppressWarnings("unused")
|
||||||
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
|
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||||
{
|
{
|
||||||
- if (!worldIn.isRemote)
|
- if (!p_180653_1_.field_72995_K)
|
||||||
+ super.dropBlockAsItemWithChance(worldIn, pos, state, chance, fortune);
|
+ super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
|
||||||
+ if (false && !worldIn.isRemote)
|
+ if (false && !p_180653_1_.field_72995_K)
|
||||||
{
|
{
|
||||||
int i = 1;
|
int i = 1;
|
||||||
|
|
||||||
@@ -107,4 +109,24 @@
|
@@ -107,4 +109,24 @@
|
||||||
{
|
{
|
||||||
return new BlockState(this, new IProperty[] {AGE});
|
return new BlockState(this, new IProperty[] {field_176486_a});
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public java.util.List<ItemStack> getDrops(net.minecraft.world.IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
+ public java.util.List<ItemStack> getDrops(net.minecraft.world.IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||||
+ {
|
+ {
|
||||||
+ java.util.List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
|
+ java.util.List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
|
||||||
+ Random rand = world instanceof World ? ((World)world).rand : new Random();
|
+ Random rand = world instanceof World ? ((World)world).field_73012_v : new Random();
|
||||||
+ int count = 1;
|
+ int count = 1;
|
||||||
+
|
+
|
||||||
+ if (((Integer)state.getValue(AGE)) >= 3)
|
+ if (((Integer)state.func_177229_b(field_176486_a)) >= 3)
|
||||||
+ {
|
+ {
|
||||||
+ count = 2 + rand.nextInt(3) + (fortune > 0 ? rand.nextInt(fortune + 1) : 0);
|
+ count = 2 + rand.nextInt(3) + (fortune > 0 ? rand.nextInt(fortune + 1) : 0);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ for (int i = 0; i < count; i++)
|
+ for (int i = 0; i < count; i++)
|
||||||
+ {
|
+ {
|
||||||
+ ret.add(new ItemStack(Items.nether_wart));
|
+ ret.add(new ItemStack(Items.field_151075_bm));
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ return ret;
|
+ return ret;
|
||||||
|
|
|
@ -2,23 +2,23 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockNewLeaf.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockNewLeaf.java
|
||||||
@@ -99,14 +99,15 @@
|
@@ -99,14 +99,15 @@
|
||||||
|
|
||||||
public void harvestBlock(World worldIn, EntityPlayer player, BlockPos pos, IBlockState state, TileEntity te)
|
public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, TileEntity p_180657_5_)
|
||||||
{
|
{
|
||||||
- if (!worldIn.isRemote && player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() == Items.shears)
|
- if (!p_180657_1_.field_72995_K && p_180657_2_.func_71045_bC() != null && p_180657_2_.func_71045_bC().func_77973_b() == Items.field_151097_aZ)
|
||||||
{
|
{
|
||||||
- player.triggerAchievement(StatList.mineBlockStatArray[Block.getIdFromBlock(this)]);
|
- p_180657_2_.func_71029_a(StatList.field_75934_C[Block.func_149682_b(this)]);
|
||||||
- spawnAsEntity(worldIn, pos, new ItemStack(Item.getItemFromBlock(this), 1, ((BlockPlanks.EnumType)state.getValue(VARIANT)).getMetadata() - 4));
|
- func_180635_a(p_180657_1_, p_180657_3_, new ItemStack(Item.func_150898_a(this), 1, ((BlockPlanks.EnumType)p_180657_4_.func_177229_b(field_176240_P)).func_176839_a() - 4));
|
||||||
- }
|
- }
|
||||||
- else
|
- else
|
||||||
- {
|
- {
|
||||||
super.harvestBlock(worldIn, player, pos, state, te);
|
super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public List<ItemStack> onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
|
+ public List<ItemStack> onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
|
||||||
+ {
|
+ {
|
||||||
+ IBlockState state = world.getBlockState(pos);
|
+ IBlockState state = world.func_180495_p(pos);
|
||||||
+ return new java.util.ArrayList(java.util.Arrays.asList(new ItemStack(this, 1, ((BlockPlanks.EnumType)state.getValue(VARIANT)).getMetadata() - 4)));
|
+ return new java.util.ArrayList(java.util.Arrays.asList(new ItemStack(this, 1, ((BlockPlanks.EnumType)state.func_177229_b(field_176240_P)).func_176839_a() - 4)));
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,20 +4,20 @@
|
||||||
if (tileentity instanceof TileEntityNote)
|
if (tileentity instanceof TileEntityNote)
|
||||||
{
|
{
|
||||||
TileEntityNote tileentitynote = (TileEntityNote)tileentity;
|
TileEntityNote tileentitynote = (TileEntityNote)tileentity;
|
||||||
+ int old = tileentitynote.note;
|
+ int old = tileentitynote.field_145879_a;
|
||||||
tileentitynote.changePitch();
|
tileentitynote.func_145877_a();
|
||||||
+ if (old == tileentitynote.note) return false;
|
+ if (old == tileentitynote.field_145879_a) return false;
|
||||||
tileentitynote.triggerNote(worldIn, pos);
|
tileentitynote.func_175108_a(p_180639_1_, p_180639_2_);
|
||||||
playerIn.triggerAchievement(StatList.field_181735_S);
|
p_180639_4_.func_71029_a(StatList.field_181735_S);
|
||||||
}
|
}
|
||||||
@@ -98,6 +100,10 @@
|
@@ -98,6 +100,10 @@
|
||||||
|
|
||||||
public boolean onBlockEventReceived(World worldIn, BlockPos pos, IBlockState state, int eventID, int eventParam)
|
public boolean func_180648_a(World p_180648_1_, BlockPos p_180648_2_, IBlockState p_180648_3_, int p_180648_4_, int p_180648_5_)
|
||||||
{
|
{
|
||||||
+ net.minecraftforge.event.world.NoteBlockEvent.Play e = new net.minecraftforge.event.world.NoteBlockEvent.Play(worldIn, pos, state, eventParam, eventID);
|
+ net.minecraftforge.event.world.NoteBlockEvent.Play e = new net.minecraftforge.event.world.NoteBlockEvent.Play(p_180648_1_, p_180648_2_, p_180648_3_, p_180648_5_, p_180648_4_);
|
||||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(e)) return false;
|
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(e)) return false;
|
||||||
+ eventID = e.instrument.ordinal();
|
+ p_180648_4_ = e.instrument.ordinal();
|
||||||
+ eventParam = e.getVanillaNoteId();
|
+ p_180648_5_ = e.getVanillaNoteId();
|
||||||
float f = (float)Math.pow(2.0D, (double)(eventParam - 12) / 12.0D);
|
float f = (float)Math.pow(2.0D, (double)(p_180648_5_ - 12) / 12.0D);
|
||||||
worldIn.playSoundEffect((double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, "note." + this.getInstrument(eventID), 3.0F, f);
|
p_180648_1_.func_72908_a((double)p_180648_2_.func_177958_n() + 0.5D, (double)p_180648_2_.func_177956_o() + 0.5D, (double)p_180648_2_.func_177952_p() + 0.5D, "note." + this.func_176433_b(p_180648_4_), 3.0F, f);
|
||||||
worldIn.spawnParticle(EnumParticleTypes.NOTE, (double)pos.getX() + 0.5D, (double)pos.getY() + 1.2D, (double)pos.getZ() + 0.5D, (double)eventParam / 24.0D, 0.0D, 0.0D, new int[0]);
|
p_180648_1_.func_175688_a(EnumParticleTypes.NOTE, (double)p_180648_2_.func_177958_n() + 0.5D, (double)p_180648_2_.func_177956_o() + 1.2D, (double)p_180648_2_.func_177952_p() + 0.5D, (double)p_180648_5_ / 24.0D, 0.0D, 0.0D, new int[0]);
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/block/BlockOldLeaf.java
|
--- ../src-base/minecraft/net/minecraft/block/BlockOldLeaf.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockOldLeaf.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockOldLeaf.java
|
||||||
@@ -142,11 +142,17 @@
|
@@ -142,11 +142,17 @@
|
||||||
if (!worldIn.isRemote && player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() == Items.shears)
|
if (!p_180657_1_.field_72995_K && p_180657_2_.func_71045_bC() != null && p_180657_2_.func_71045_bC().func_77973_b() == Items.field_151097_aZ)
|
||||||
{
|
{
|
||||||
player.triggerAchievement(StatList.mineBlockStatArray[Block.getIdFromBlock(this)]);
|
p_180657_2_.func_71029_a(StatList.field_75934_C[Block.func_149682_b(this)]);
|
||||||
- spawnAsEntity(worldIn, pos, new ItemStack(Item.getItemFromBlock(this), 1, ((BlockPlanks.EnumType)state.getValue(VARIANT)).getMetadata()));
|
- func_180635_a(p_180657_1_, p_180657_3_, new ItemStack(Item.func_150898_a(this), 1, ((BlockPlanks.EnumType)p_180657_4_.func_177229_b(field_176239_P)).func_176839_a()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
super.harvestBlock(worldIn, player, pos, state, te);
|
super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public List<ItemStack> onSheared(ItemStack item, IBlockAccess world, BlockPos pos, int fortune)
|
+ public List<ItemStack> onSheared(ItemStack item, IBlockAccess world, BlockPos pos, int fortune)
|
||||||
+ {
|
+ {
|
||||||
+ IBlockState state = world.getBlockState(pos);
|
+ IBlockState state = world.func_180495_p(pos);
|
||||||
+ return new java.util.ArrayList(java.util.Arrays.asList(new ItemStack(this, 1, ((BlockPlanks.EnumType)state.getValue(VARIANT)).getMetadata())));
|
+ return new java.util.ArrayList(java.util.Arrays.asList(new ItemStack(this, 1, ((BlockPlanks.EnumType)state.func_177229_b(field_176239_P)).func_176839_a())));
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,51 +1,51 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/block/BlockOre.java
|
--- ../src-base/minecraft/net/minecraft/block/BlockOre.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockOre.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockOre.java
|
||||||
@@ -58,34 +58,40 @@
|
@@ -58,34 +58,40 @@
|
||||||
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
|
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||||
{
|
{
|
||||||
super.dropBlockAsItemWithChance(worldIn, pos, state, chance, fortune);
|
super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
|
||||||
-
|
-
|
||||||
- if (this.getItemDropped(state, worldIn.rand, fortune) != Item.getItemFromBlock(this))
|
- if (this.func_180660_a(p_180653_3_, p_180653_1_.field_73012_v, p_180653_5_) != Item.func_150898_a(this))
|
||||||
+ }
|
+ }
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public int getExpDrop(net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
|
+ public int getExpDrop(net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
|
||||||
+ {
|
+ {
|
||||||
+ IBlockState state = world.getBlockState(pos);
|
+ IBlockState state = world.func_180495_p(pos);
|
||||||
+ Random rand = world instanceof World ? ((World)world).rand : new Random();
|
+ Random rand = world instanceof World ? ((World)world).field_73012_v : new Random();
|
||||||
+ if (this.getItemDropped(state, rand, fortune) != Item.getItemFromBlock(this))
|
+ if (this.func_180660_a(state, rand, fortune) != Item.func_150898_a(this))
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
if (this == Blocks.coal_ore)
|
if (this == Blocks.field_150365_q)
|
||||||
{
|
{
|
||||||
- i = MathHelper.getRandomIntegerInRange(worldIn.rand, 0, 2);
|
- i = MathHelper.func_76136_a(p_180653_1_.field_73012_v, 0, 2);
|
||||||
+ i = MathHelper.getRandomIntegerInRange(rand, 0, 2);
|
+ i = MathHelper.func_76136_a(rand, 0, 2);
|
||||||
}
|
}
|
||||||
else if (this == Blocks.diamond_ore)
|
else if (this == Blocks.field_150482_ag)
|
||||||
{
|
{
|
||||||
- i = MathHelper.getRandomIntegerInRange(worldIn.rand, 3, 7);
|
- i = MathHelper.func_76136_a(p_180653_1_.field_73012_v, 3, 7);
|
||||||
+ i = MathHelper.getRandomIntegerInRange(rand, 3, 7);
|
+ i = MathHelper.func_76136_a(rand, 3, 7);
|
||||||
}
|
}
|
||||||
else if (this == Blocks.emerald_ore)
|
else if (this == Blocks.field_150412_bA)
|
||||||
{
|
{
|
||||||
- i = MathHelper.getRandomIntegerInRange(worldIn.rand, 3, 7);
|
- i = MathHelper.func_76136_a(p_180653_1_.field_73012_v, 3, 7);
|
||||||
+ i = MathHelper.getRandomIntegerInRange(rand, 3, 7);
|
+ i = MathHelper.func_76136_a(rand, 3, 7);
|
||||||
}
|
}
|
||||||
else if (this == Blocks.lapis_ore)
|
else if (this == Blocks.field_150369_x)
|
||||||
{
|
{
|
||||||
- i = MathHelper.getRandomIntegerInRange(worldIn.rand, 2, 5);
|
- i = MathHelper.func_76136_a(p_180653_1_.field_73012_v, 2, 5);
|
||||||
+ i = MathHelper.getRandomIntegerInRange(rand, 2, 5);
|
+ i = MathHelper.func_76136_a(rand, 2, 5);
|
||||||
}
|
}
|
||||||
else if (this == Blocks.quartz_ore)
|
else if (this == Blocks.field_150449_bY)
|
||||||
{
|
{
|
||||||
- i = MathHelper.getRandomIntegerInRange(worldIn.rand, 2, 5);
|
- i = MathHelper.func_76136_a(p_180653_1_.field_73012_v, 2, 5);
|
||||||
+ i = MathHelper.getRandomIntegerInRange(rand, 2, 5);
|
+ i = MathHelper.func_76136_a(rand, 2, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
- this.dropXpOnBlockBreak(worldIn, pos, i);
|
- this.func_180637_b(p_180653_1_, p_180653_2_, i);
|
||||||
+ return i;
|
+ return i;
|
||||||
}
|
}
|
||||||
+ return 0;
|
+ return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getDamageValue(World worldIn, BlockPos pos)
|
public int func_176222_j(World p_176222_1_, BlockPos p_176222_2_)
|
||||||
|
|
|
@ -2,40 +2,40 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockPane.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockPane.java
|
||||||
@@ -38,7 +38,10 @@
|
@@ -38,7 +38,10 @@
|
||||||
|
|
||||||
public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos)
|
public IBlockState func_176221_a(IBlockState p_176221_1_, IBlockAccess p_176221_2_, BlockPos p_176221_3_)
|
||||||
{
|
{
|
||||||
- return state.withProperty(NORTH, Boolean.valueOf(this.canPaneConnectToBlock(worldIn.getBlockState(pos.north()).getBlock()))).withProperty(SOUTH, Boolean.valueOf(this.canPaneConnectToBlock(worldIn.getBlockState(pos.south()).getBlock()))).withProperty(WEST, Boolean.valueOf(this.canPaneConnectToBlock(worldIn.getBlockState(pos.west()).getBlock()))).withProperty(EAST, Boolean.valueOf(this.canPaneConnectToBlock(worldIn.getBlockState(pos.east()).getBlock())));
|
- return p_176221_1_.func_177226_a(field_176241_b, Boolean.valueOf(this.func_150098_a(p_176221_2_.func_180495_p(p_176221_3_.func_177978_c()).func_177230_c()))).func_177226_a(field_176243_N, Boolean.valueOf(this.func_150098_a(p_176221_2_.func_180495_p(p_176221_3_.func_177968_d()).func_177230_c()))).func_177226_a(field_176244_O, Boolean.valueOf(this.func_150098_a(p_176221_2_.func_180495_p(p_176221_3_.func_177976_e()).func_177230_c()))).func_177226_a(field_176242_M, Boolean.valueOf(this.func_150098_a(p_176221_2_.func_180495_p(p_176221_3_.func_177974_f()).func_177230_c())));
|
||||||
+ return state.withProperty(NORTH, canPaneConnectTo(worldIn, pos, EnumFacing.NORTH))
|
+ return p_176221_1_.func_177226_a(field_176241_b, canPaneConnectTo(p_176221_2_, p_176221_3_, EnumFacing.NORTH))
|
||||||
+ .withProperty(SOUTH, canPaneConnectTo(worldIn, pos, EnumFacing.SOUTH))
|
+ .func_177226_a(field_176243_N, canPaneConnectTo(p_176221_2_, p_176221_3_, EnumFacing.SOUTH))
|
||||||
+ .withProperty(WEST, canPaneConnectTo(worldIn, pos, EnumFacing.WEST))
|
+ .func_177226_a(field_176244_O, canPaneConnectTo(p_176221_2_, p_176221_3_, EnumFacing.WEST))
|
||||||
+ .withProperty(EAST, canPaneConnectTo(worldIn, pos, EnumFacing.EAST));
|
+ .func_177226_a(field_176242_M, canPaneConnectTo(p_176221_2_, p_176221_3_, EnumFacing.EAST));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Item getItemDropped(IBlockState state, Random rand, int fortune)
|
public Item func_180660_a(IBlockState p_180660_1_, Random p_180660_2_, int p_180660_3_)
|
||||||
@@ -64,10 +67,10 @@
|
@@ -64,10 +67,10 @@
|
||||||
|
|
||||||
public void addCollisionBoxesToList(World worldIn, BlockPos pos, IBlockState state, AxisAlignedBB mask, List<AxisAlignedBB> list, Entity collidingEntity)
|
public void func_180638_a(World p_180638_1_, BlockPos p_180638_2_, IBlockState p_180638_3_, AxisAlignedBB p_180638_4_, List<AxisAlignedBB> p_180638_5_, Entity p_180638_6_)
|
||||||
{
|
{
|
||||||
- boolean flag = this.canPaneConnectToBlock(worldIn.getBlockState(pos.north()).getBlock());
|
- boolean flag = this.func_150098_a(p_180638_1_.func_180495_p(p_180638_2_.func_177978_c()).func_177230_c());
|
||||||
- boolean flag1 = this.canPaneConnectToBlock(worldIn.getBlockState(pos.south()).getBlock());
|
- boolean flag1 = this.func_150098_a(p_180638_1_.func_180495_p(p_180638_2_.func_177968_d()).func_177230_c());
|
||||||
- boolean flag2 = this.canPaneConnectToBlock(worldIn.getBlockState(pos.west()).getBlock());
|
- boolean flag2 = this.func_150098_a(p_180638_1_.func_180495_p(p_180638_2_.func_177976_e()).func_177230_c());
|
||||||
- boolean flag3 = this.canPaneConnectToBlock(worldIn.getBlockState(pos.east()).getBlock());
|
- boolean flag3 = this.func_150098_a(p_180638_1_.func_180495_p(p_180638_2_.func_177974_f()).func_177230_c());
|
||||||
+ boolean flag = this.canPaneConnectTo(worldIn, pos, EnumFacing.NORTH);
|
+ boolean flag = this.canPaneConnectTo(p_180638_1_, p_180638_2_, EnumFacing.NORTH);
|
||||||
+ boolean flag1 = this.canPaneConnectTo(worldIn, pos, EnumFacing.SOUTH);
|
+ boolean flag1 = this.canPaneConnectTo(p_180638_1_, p_180638_2_, EnumFacing.SOUTH);
|
||||||
+ boolean flag2 = this.canPaneConnectTo(worldIn, pos, EnumFacing.WEST);
|
+ boolean flag2 = this.canPaneConnectTo(p_180638_1_, p_180638_2_, EnumFacing.WEST);
|
||||||
+ boolean flag3 = this.canPaneConnectTo(worldIn, pos, EnumFacing.EAST);
|
+ boolean flag3 = this.canPaneConnectTo(p_180638_1_, p_180638_2_, EnumFacing.EAST);
|
||||||
|
|
||||||
if ((!flag2 || !flag3) && (flag2 || flag3 || flag || flag1))
|
if ((!flag2 || !flag3) && (flag2 || flag3 || flag || flag1))
|
||||||
{
|
{
|
||||||
@@ -186,4 +189,11 @@
|
@@ -186,4 +189,11 @@
|
||||||
{
|
{
|
||||||
return new BlockState(this, new IProperty[] {NORTH, EAST, WEST, SOUTH});
|
return new BlockState(this, new IProperty[] {field_176241_b, field_176242_M, field_176244_O, field_176243_N});
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ public boolean canPaneConnectTo(IBlockAccess world, BlockPos pos, EnumFacing dir)
|
+ public boolean canPaneConnectTo(IBlockAccess world, BlockPos pos, EnumFacing dir)
|
||||||
+ {
|
+ {
|
||||||
+ BlockPos off = pos.offset(dir);
|
+ BlockPos off = pos.func_177972_a(dir);
|
||||||
+ Block block = world.getBlockState(off).getBlock();
|
+ Block block = world.func_180495_p(off).func_177230_c();
|
||||||
+ return canPaneConnectToBlock(block) || block.isSideSolid(world, off, dir.getOpposite());
|
+ return func_150098_a(block) || block.isSideSolid(world, off, dir.func_176734_d());
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,28 +4,28 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- if (!flag1 && block.getMaterial() != Material.air && canPush(block, worldIn, blockpos, enumfacing.getOpposite(), false) && (block.getMobilityFlag() == 0 || block == Blocks.piston || block == Blocks.sticky_piston))
|
- if (!flag1 && block.func_149688_o() != Material.field_151579_a && func_180696_a(block, p_180648_1_, blockpos, enumfacing.func_176734_d(), false) && (block.func_149656_h() == 0 || block == Blocks.field_150331_J || block == Blocks.field_150320_F))
|
||||||
+ if (!flag1 && !block.isAir(worldIn, blockpos) && canPush(block, worldIn, blockpos, enumfacing.getOpposite(), false) && (block.getMobilityFlag() == 0 || block == Blocks.piston || block == Blocks.sticky_piston))
|
+ if (!flag1 && !block.isAir(p_180648_1_, blockpos) && func_180696_a(block, p_180648_1_, blockpos, enumfacing.func_176734_d(), false) && (block.func_149656_h() == 0 || block == Blocks.field_150331_J || block == Blocks.field_150320_F))
|
||||||
{
|
{
|
||||||
this.doMove(worldIn, pos, enumfacing, false);
|
this.func_176319_a(p_180648_1_, p_180648_2_, enumfacing, false);
|
||||||
}
|
}
|
||||||
@@ -333,7 +333,7 @@
|
@@ -333,7 +333,7 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
- return !(blockIn instanceof ITileEntityProvider);
|
- return !(p_180696_0_ instanceof ITileEntityProvider);
|
||||||
+ return !(blockIn.hasTileEntity(worldIn.getBlockState(pos)));
|
+ return !(p_180696_0_.hasTileEntity(p_180696_1_.func_180495_p(p_180696_2_)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -371,7 +371,9 @@
|
@@ -371,7 +371,9 @@
|
||||||
{
|
{
|
||||||
BlockPos blockpos = (BlockPos)list1.get(j);
|
BlockPos blockpos = (BlockPos)list1.get(j);
|
||||||
Block block = worldIn.getBlockState(blockpos).getBlock();
|
Block block = p_176319_1_.func_180495_p(blockpos).func_177230_c();
|
||||||
- block.dropBlockAsItem(worldIn, blockpos, worldIn.getBlockState(blockpos), 0);
|
- block.func_176226_b(p_176319_1_, blockpos, p_176319_1_.func_180495_p(blockpos), 0);
|
||||||
+ //With our change to how snowballs are dropped this needs to disallow to mimic vanilla behavior.
|
+ //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;
|
+ float chance = block instanceof BlockSnow ? -1.0f : 1.0f;
|
||||||
+ block.dropBlockAsItemWithChance(worldIn, blockpos, worldIn.getBlockState(blockpos), chance, 0);
|
+ block.func_180653_a(p_176319_1_, blockpos, p_176319_1_.func_180495_p(blockpos), chance, 0);
|
||||||
worldIn.setBlockToAir(blockpos);
|
p_176319_1_.func_175698_g(blockpos);
|
||||||
--i;
|
--i;
|
||||||
ablock[i] = block;
|
ablock[i] = block;
|
||||||
|
|
|
@ -2,35 +2,35 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockPistonMoving.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockPistonMoving.java
|
||||||
@@ -109,16 +109,7 @@
|
@@ -109,16 +109,7 @@
|
||||||
|
|
||||||
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
|
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||||
{
|
{
|
||||||
- if (!worldIn.isRemote)
|
- if (!p_180653_1_.field_72995_K)
|
||||||
- {
|
- {
|
||||||
- TileEntityPiston tileentitypiston = this.getTileEntity(worldIn, pos);
|
- TileEntityPiston tileentitypiston = this.func_176422_e(p_180653_1_, p_180653_2_);
|
||||||
-
|
-
|
||||||
- if (tileentitypiston != null)
|
- if (tileentitypiston != null)
|
||||||
- {
|
- {
|
||||||
- IBlockState iblockstate = tileentitypiston.getPistonState();
|
- IBlockState iblockstate = tileentitypiston.func_174927_b();
|
||||||
- iblockstate.getBlock().dropBlockAsItem(worldIn, pos, iblockstate, 0);
|
- iblockstate.func_177230_c().func_176226_b(p_180653_1_, p_180653_2_, iblockstate, 0);
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
+ super.dropBlockAsItemWithChance(worldIn, pos, state, chance, fortune);
|
+ super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MovingObjectPosition collisionRayTrace(World worldIn, BlockPos pos, Vec3 start, Vec3 end)
|
public MovingObjectPosition func_180636_a(World p_180636_1_, BlockPos p_180636_2_, Vec3 p_180636_3_, Vec3 p_180636_4_)
|
||||||
@@ -282,4 +273,16 @@
|
@@ -282,4 +273,16 @@
|
||||||
{
|
{
|
||||||
return new BlockState(this, new IProperty[] {FACING, TYPE});
|
return new BlockState(this, new IProperty[] {field_176426_a, field_176425_b});
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public java.util.List<net.minecraft.item.ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
+ public java.util.List<net.minecraft.item.ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||||
+ {
|
+ {
|
||||||
+ TileEntityPiston tileentitypiston = this.getTileEntity(world, pos);
|
+ TileEntityPiston tileentitypiston = this.func_176422_e(world, pos);
|
||||||
+ if (tileentitypiston != null)
|
+ if (tileentitypiston != null)
|
||||||
+ {
|
+ {
|
||||||
+ IBlockState pushed = tileentitypiston.getPistonState();
|
+ IBlockState pushed = tileentitypiston.func_174927_b();
|
||||||
+ return pushed.getBlock().getDrops(world, pos, pushed, fortune);
|
+ return pushed.func_177230_c().getDrops(world, pos, pushed, fortune);
|
||||||
+ }
|
+ }
|
||||||
+ return new java.util.ArrayList();
|
+ return new java.util.ArrayList();
|
||||||
+ }
|
+ }
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/block/BlockPotato.java
|
--- ../src-base/minecraft/net/minecraft/block/BlockPotato.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockPotato.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockPotato.java
|
||||||
@@ -22,13 +22,14 @@
|
@@ -22,13 +22,14 @@
|
||||||
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
|
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||||
{
|
{
|
||||||
super.dropBlockAsItemWithChance(worldIn, pos, state, chance, fortune);
|
super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
|
||||||
-
|
-
|
||||||
- if (!worldIn.isRemote)
|
- if (!p_180653_1_.field_72995_K)
|
||||||
- {
|
- {
|
||||||
- if (((Integer)state.getValue(AGE)).intValue() >= 7 && worldIn.rand.nextInt(50) == 0)
|
- if (((Integer)p_180653_3_.func_177229_b(field_176488_a)).intValue() >= 7 && p_180653_1_.field_73012_v.nextInt(50) == 0)
|
||||||
- {
|
- {
|
||||||
- spawnAsEntity(worldIn, pos, new ItemStack(Items.poisonous_potato));
|
- func_180635_a(p_180653_1_, p_180653_2_, new ItemStack(Items.field_151170_bI));
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
}
|
}
|
||||||
|
@ -17,9 +17,9 @@
|
||||||
+ public java.util.List<net.minecraft.item.ItemStack> getDrops(net.minecraft.world.IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
+ public java.util.List<net.minecraft.item.ItemStack> getDrops(net.minecraft.world.IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||||
+ {
|
+ {
|
||||||
+ java.util.List<ItemStack> ret = super.getDrops(world, pos, state, fortune);
|
+ java.util.List<ItemStack> ret = super.getDrops(world, pos, state, fortune);
|
||||||
+ java.util.Random rand = world instanceof World ? ((World)world).rand : new java.util.Random();
|
+ java.util.Random rand = world instanceof World ? ((World)world).field_73012_v : new java.util.Random();
|
||||||
+ if (((Integer)state.getValue(AGE)) >= 7 && rand.nextInt(50) == 0)
|
+ if (((Integer)state.func_177229_b(field_176488_a)) >= 7 && rand.nextInt(50) == 0)
|
||||||
+ ret.add(new ItemStack(Items.poisonous_potato));
|
+ ret.add(new ItemStack(Items.field_151170_bI));
|
||||||
+ return ret;
|
+ return ret;
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockPumpkin.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockPumpkin.java
|
||||||
@@ -115,7 +115,7 @@
|
@@ -115,7 +115,7 @@
|
||||||
|
|
||||||
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
|
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
|
||||||
{
|
{
|
||||||
- return worldIn.getBlockState(pos).getBlock().blockMaterial.isReplaceable() && World.doesBlockHaveSolidTopSurface(worldIn, pos.down());
|
- return p_176196_1_.func_180495_p(p_176196_2_).func_177230_c().field_149764_J.func_76222_j() && World.func_175683_a(p_176196_1_, p_176196_2_.func_177977_b());
|
||||||
+ return worldIn.getBlockState(pos).getBlock().isReplaceable(worldIn, pos) && World.doesBlockHaveSolidTopSurface(worldIn, pos.down());
|
+ return p_176196_1_.func_180495_p(p_176196_2_).func_177230_c().func_176200_f(p_176196_1_, p_176196_2_) && World.func_175683_a(p_176196_1_, p_176196_2_.func_177977_b());
|
||||||
}
|
}
|
||||||
|
|
||||||
public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
|
public IBlockState func_180642_a(World p_180642_1_, BlockPos p_180642_2_, EnumFacing p_180642_3_, float p_180642_4_, float p_180642_5_, float p_180642_6_, int p_180642_7_, EntityLivingBase p_180642_8_)
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/block/BlockQuartz.java
|
--- ../src-base/minecraft/net/minecraft/block/BlockQuartz.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockQuartz.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockQuartz.java
|
||||||
@@ -90,6 +90,26 @@
|
@@ -90,6 +90,26 @@
|
||||||
return new BlockState(this, new IProperty[] {VARIANT});
|
return new BlockState(this, new IProperty[] {field_176335_a});
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis)
|
+ public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis)
|
||||||
+ {
|
+ {
|
||||||
+ IBlockState state = world.getBlockState(pos);
|
+ IBlockState state = world.func_180495_p(pos);
|
||||||
+ for (IProperty prop : (java.util.Set<IProperty>)state.getProperties().keySet())
|
+ for (IProperty prop : (java.util.Set<IProperty>)state.func_177228_b().keySet())
|
||||||
+ {
|
+ {
|
||||||
+ if (prop.getName().equals("variant") && prop.getValueClass() == EnumType.class)
|
+ if (prop.func_177701_a().equals("variant") && prop.func_177699_b() == EnumType.class)
|
||||||
+ {
|
+ {
|
||||||
+ EnumType current = (EnumType)state.getValue(prop);
|
+ EnumType current = (EnumType)state.func_177229_b(prop);
|
||||||
+ EnumType next = current == EnumType.LINES_X ? EnumType.LINES_Y :
|
+ EnumType next = current == EnumType.LINES_X ? EnumType.LINES_Y :
|
||||||
+ current == EnumType.LINES_Y ? EnumType.LINES_Z :
|
+ current == EnumType.LINES_Y ? EnumType.LINES_Z :
|
||||||
+ current == EnumType.LINES_Z ? EnumType.LINES_X : current;
|
+ current == EnumType.LINES_Z ? EnumType.LINES_X : current;
|
||||||
+ if (next == current)
|
+ if (next == current)
|
||||||
+ return false;
|
+ return false;
|
||||||
+ world.setBlockState(pos, state.withProperty(prop, next));
|
+ world.func_175656_a(pos, state.func_177226_a(prop, next));
|
||||||
+ return true;
|
+ return true;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/block/BlockRailBase.java
|
--- ../src-base/minecraft/net/minecraft/block/BlockRailBase.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockRailBase.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockRailBase.java
|
||||||
@@ -31,7 +31,7 @@
|
@@ -31,7 +31,7 @@
|
||||||
public static boolean isRailBlock(IBlockState state)
|
public static boolean func_176563_d(IBlockState p_176563_0_)
|
||||||
{
|
{
|
||||||
Block block = state.getBlock();
|
Block block = p_176563_0_.func_177230_c();
|
||||||
- return block == Blocks.rail || block == Blocks.golden_rail || block == Blocks.detector_rail || block == Blocks.activator_rail;
|
- return block == Blocks.field_150448_aq || block == Blocks.field_150318_D || block == Blocks.field_150319_E || block == Blocks.field_150408_cc;
|
||||||
+ return block instanceof BlockRailBase;
|
+ return block instanceof BlockRailBase;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected BlockRailBase(boolean isPowered)
|
protected BlockRailBase(boolean p_i45389_1_)
|
||||||
@@ -175,6 +175,81 @@
|
@@ -175,6 +175,81 @@
|
||||||
|
|
||||||
public abstract IProperty<BlockRailBase.EnumRailDirection> getShapeProperty();
|
public abstract IProperty<BlockRailBase.EnumRailDirection> func_176560_l();
|
||||||
|
|
||||||
+ /* ======================================== FORGE START =====================================*/
|
+ /* ======================================== FORGE START =====================================*/
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public boolean isFlexibleRail(IBlockAccess world, BlockPos pos)
|
+ public boolean isFlexibleRail(IBlockAccess world, BlockPos pos)
|
||||||
+ {
|
+ {
|
||||||
+ return !this.isPowered;
|
+ return !this.field_150053_a;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -74,12 +74,12 @@
|
||||||
+ */
|
+ */
|
||||||
+ public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis)
|
+ public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis)
|
||||||
+ {
|
+ {
|
||||||
+ IBlockState state = world.getBlockState(pos);
|
+ IBlockState state = world.func_180495_p(pos);
|
||||||
+ for (IProperty prop : (java.util.Set<IProperty>)state.getProperties().keySet())
|
+ for (IProperty prop : (java.util.Set<IProperty>)state.func_177228_b().keySet())
|
||||||
+ {
|
+ {
|
||||||
+ if (prop.getName().equals("shape"))
|
+ if (prop.func_177701_a().equals("shape"))
|
||||||
+ {
|
+ {
|
||||||
+ world.setBlockState(pos, state.cycleProperty(prop));
|
+ world.func_175656_a(pos, state.func_177231_a(prop));
|
||||||
+ return true;
|
+ return true;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
@ -92,20 +92,20 @@
|
||||||
{
|
{
|
||||||
NORTH_SOUTH(0, "north_south"),
|
NORTH_SOUTH(0, "north_south"),
|
||||||
@@ -245,6 +320,7 @@
|
@@ -245,6 +320,7 @@
|
||||||
private IBlockState state;
|
private IBlockState field_180366_e;
|
||||||
private final boolean isPowered;
|
private final boolean field_150656_f;
|
||||||
private final List<BlockPos> field_150657_g = Lists.<BlockPos>newArrayList();
|
private final List<BlockPos> field_150657_g = Lists.<BlockPos>newArrayList();
|
||||||
+ private final boolean canMakeSlopes;
|
+ private final boolean canMakeSlopes;
|
||||||
|
|
||||||
public Rail(World worldIn, BlockPos pos, IBlockState state)
|
public Rail(World p_i45739_2_, BlockPos p_i45739_3_, IBlockState p_i45739_4_)
|
||||||
{
|
{
|
||||||
@@ -253,7 +329,8 @@
|
@@ -253,7 +329,8 @@
|
||||||
this.state = state;
|
this.field_180366_e = p_i45739_4_;
|
||||||
this.block = (BlockRailBase)state.getBlock();
|
this.field_180365_d = (BlockRailBase)p_i45739_4_.func_177230_c();
|
||||||
BlockRailBase.EnumRailDirection blockrailbase$enumraildirection = (BlockRailBase.EnumRailDirection)state.getValue(BlockRailBase.this.getShapeProperty());
|
BlockRailBase.EnumRailDirection blockrailbase$enumraildirection = (BlockRailBase.EnumRailDirection)p_i45739_4_.func_177229_b(BlockRailBase.this.func_176560_l());
|
||||||
- this.isPowered = this.block.isPowered;
|
- this.field_150656_f = this.field_180365_d.field_150053_a;
|
||||||
+ this.isPowered = !this.block.isFlexibleRail(worldIn, pos);
|
+ this.field_150656_f = !this.field_180365_d.isFlexibleRail(p_i45739_2_, p_i45739_3_);
|
||||||
+ canMakeSlopes = this.block.canMakeSlopes(worldIn, pos);
|
+ canMakeSlopes = this.field_180365_d.canMakeSlopes(p_i45739_2_, p_i45739_3_);
|
||||||
this.func_180360_a(blockrailbase$enumraildirection);
|
this.func_180360_a(blockrailbase$enumraildirection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@
|
||||||
- if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.NORTH_SOUTH)
|
- if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.NORTH_SOUTH)
|
||||||
+ if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.NORTH_SOUTH && canMakeSlopes)
|
+ if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.NORTH_SOUTH && canMakeSlopes)
|
||||||
{
|
{
|
||||||
if (BlockRailBase.isRailBlock(this.world, blockpos.up()))
|
if (BlockRailBase.func_176562_d(this.field_150660_b, blockpos.func_177984_a()))
|
||||||
{
|
{
|
||||||
@@ -452,7 +529,7 @@
|
@@ -452,7 +529,7 @@
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@
|
||||||
- if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.EAST_WEST)
|
- if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.EAST_WEST)
|
||||||
+ if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.EAST_WEST && canMakeSlopes)
|
+ if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.EAST_WEST && canMakeSlopes)
|
||||||
{
|
{
|
||||||
if (BlockRailBase.isRailBlock(this.world, blockpos3.up()))
|
if (BlockRailBase.func_176562_d(this.field_150660_b, blockpos3.func_177984_a()))
|
||||||
{
|
{
|
||||||
@@ -595,7 +672,7 @@
|
@@ -595,7 +672,7 @@
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,7 @@
|
||||||
- if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.NORTH_SOUTH)
|
- if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.NORTH_SOUTH)
|
||||||
+ if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.NORTH_SOUTH && canMakeSlopes)
|
+ if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.NORTH_SOUTH && canMakeSlopes)
|
||||||
{
|
{
|
||||||
if (BlockRailBase.isRailBlock(this.world, blockpos.up()))
|
if (BlockRailBase.func_176562_d(this.field_150660_b, blockpos.func_177984_a()))
|
||||||
{
|
{
|
||||||
@@ -608,7 +685,7 @@
|
@@ -608,7 +685,7 @@
|
||||||
}
|
}
|
||||||
|
@ -143,5 +143,5 @@
|
||||||
- if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.EAST_WEST)
|
- if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.EAST_WEST)
|
||||||
+ if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.EAST_WEST && canMakeSlopes)
|
+ if (blockrailbase$enumraildirection == BlockRailBase.EnumRailDirection.EAST_WEST && canMakeSlopes)
|
||||||
{
|
{
|
||||||
if (BlockRailBase.isRailBlock(this.world, blockpos3.up()))
|
if (BlockRailBase.func_176562_d(this.field_150660_b, blockpos3.func_177984_a()))
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/block/BlockRedstoneComparator.java
|
--- ../src-base/minecraft/net/minecraft/block/BlockRedstoneComparator.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneComparator.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneComparator.java
|
||||||
@@ -295,6 +295,21 @@
|
@@ -295,6 +295,21 @@
|
||||||
return this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite()).withProperty(POWERED, Boolean.valueOf(false)).withProperty(MODE, BlockRedstoneComparator.Mode.COMPARE);
|
return this.func_176223_P().func_177226_a(field_176387_N, p_180642_8_.func_174811_aO().func_176734_d()).func_177226_a(field_176464_a, Boolean.valueOf(false)).func_177226_a(field_176463_b, BlockRedstoneComparator.Mode.COMPARE);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public void onNeighborChange(IBlockAccess world, BlockPos pos, BlockPos neighbor)
|
+ public void onNeighborChange(IBlockAccess world, BlockPos pos, BlockPos neighbor)
|
||||||
+ {
|
+ {
|
||||||
+ if (pos.getY() == neighbor.getY() && world instanceof World)
|
+ if (pos.func_177956_o() == neighbor.func_177956_o() && world instanceof World)
|
||||||
+ {
|
+ {
|
||||||
+ onNeighborBlockChange((World)world, pos, world.getBlockState(pos), world.getBlockState(neighbor).getBlock());
|
+ func_176204_a((World)world, pos, world.func_180495_p(pos), world.func_180495_p(neighbor).func_177230_c());
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneDiode.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneDiode.java
|
||||||
@@ -198,6 +198,8 @@
|
@@ -198,6 +198,8 @@
|
||||||
{
|
{
|
||||||
EnumFacing enumfacing = (EnumFacing)state.getValue(FACING);
|
EnumFacing enumfacing = (EnumFacing)p_176400_3_.func_177229_b(field_176387_N);
|
||||||
BlockPos blockpos = pos.offset(enumfacing.getOpposite());
|
BlockPos blockpos = p_176400_2_.func_177972_a(enumfacing.func_176734_d());
|
||||||
+ if(net.minecraftforge.event.ForgeEventFactory.onNeighborNotify(worldIn, pos, worldIn.getBlockState(pos), java.util.EnumSet.of(enumfacing.getOpposite())).isCanceled())
|
+ if(net.minecraftforge.event.ForgeEventFactory.onNeighborNotify(p_176400_1_, p_176400_2_, p_176400_1_.func_180495_p(p_176400_2_), java.util.EnumSet.of(enumfacing.func_176734_d())).isCanceled())
|
||||||
+ return;
|
+ return;
|
||||||
worldIn.notifyBlockOfStateChange(blockpos, this);
|
p_176400_1_.func_180496_d(blockpos, this);
|
||||||
worldIn.notifyNeighborsOfStateExcept(blockpos, this, enumfacing);
|
p_176400_1_.func_175695_a(blockpos, this, enumfacing);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/block/BlockRedstoneOre.java
|
--- ../src-base/minecraft/net/minecraft/block/BlockRedstoneOre.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneOre.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneOre.java
|
||||||
@@ -91,12 +91,16 @@
|
@@ -91,12 +91,16 @@
|
||||||
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
|
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||||
{
|
{
|
||||||
super.dropBlockAsItemWithChance(worldIn, pos, state, chance, fortune);
|
super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
- if (this.getItemDropped(state, worldIn.rand, fortune) != Item.getItemFromBlock(this))
|
- if (this.func_180660_a(p_180653_3_, p_180653_1_.field_73012_v, p_180653_5_) != Item.func_150898_a(this))
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public int getExpDrop(net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
|
+ public int getExpDrop(net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
|
||||||
+ {
|
+ {
|
||||||
+ if (this.getItemDropped(world.getBlockState(pos), RANDOM, fortune) != Item.getItemFromBlock(this))
|
+ if (this.func_180660_a(world.func_180495_p(pos), RANDOM, fortune) != Item.func_150898_a(this))
|
||||||
{
|
{
|
||||||
- int i = 1 + worldIn.rand.nextInt(5);
|
- int i = 1 + p_180653_1_.field_73012_v.nextInt(5);
|
||||||
- this.dropXpOnBlockBreak(worldIn, pos, i);
|
- this.func_180637_b(p_180653_1_, p_180653_2_, i);
|
||||||
+ return 1 + RANDOM.nextInt(5);
|
+ return 1 + RANDOM.nextInt(5);
|
||||||
}
|
}
|
||||||
+ return 0;
|
+ return 0;
|
||||||
|
|
|
@ -1,59 +1,59 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/block/BlockRedstoneWire.java
|
--- ../src-base/minecraft/net/minecraft/block/BlockRedstoneWire.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneWire.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneWire.java
|
||||||
@@ -58,10 +58,10 @@
|
@@ -58,10 +58,10 @@
|
||||||
BlockPos blockpos = pos.offset(direction);
|
BlockPos blockpos = p_176341_2_.func_177972_a(p_176341_3_);
|
||||||
Block block = worldIn.getBlockState(pos.offset(direction)).getBlock();
|
Block block = p_176341_1_.func_180495_p(p_176341_2_.func_177972_a(p_176341_3_)).func_177230_c();
|
||||||
|
|
||||||
- if (!canConnectTo(worldIn.getBlockState(blockpos), direction) && (block.isSolidFullCube() || !canConnectUpwardsTo(worldIn.getBlockState(blockpos.down()))))
|
- if (!func_176343_a(p_176341_1_.func_180495_p(blockpos), p_176341_3_) && (block.func_149637_q() || !func_176346_d(p_176341_1_.func_180495_p(blockpos.func_177977_b()))))
|
||||||
+ if (!canRestoneConnect(worldIn, blockpos, direction) && (block.isSolidFullCube() || !canRestoneConnect(worldIn, blockpos.down(), null)))
|
+ if (!canRestoneConnect(p_176341_1_, blockpos, p_176341_3_) && (block.func_149637_q() || !canRestoneConnect(p_176341_1_, blockpos.func_177977_b(), null)))
|
||||||
{
|
{
|
||||||
Block block1 = worldIn.getBlockState(pos.up()).getBlock();
|
Block block1 = p_176341_1_.func_180495_p(p_176341_2_.func_177984_a()).func_177230_c();
|
||||||
- return !block1.isSolidFullCube() && block.isSolidFullCube() && canConnectUpwardsTo(worldIn.getBlockState(blockpos.up())) ? BlockRedstoneWire.EnumAttachPosition.UP : BlockRedstoneWire.EnumAttachPosition.NONE;
|
- return !block1.func_149637_q() && block.func_149637_q() && func_176346_d(p_176341_1_.func_180495_p(blockpos.func_177984_a())) ? BlockRedstoneWire.EnumAttachPosition.UP : BlockRedstoneWire.EnumAttachPosition.NONE;
|
||||||
+ return !block1.isSolidFullCube() && block.isSolidFullCube() && canRestoneConnect(worldIn, blockpos.up(), null) ? BlockRedstoneWire.EnumAttachPosition.UP : BlockRedstoneWire.EnumAttachPosition.NONE;
|
+ return !block1.func_149637_q() && block.func_149637_q() && canRestoneConnect(p_176341_1_, blockpos.func_177984_a(), null) ? BlockRedstoneWire.EnumAttachPosition.UP : BlockRedstoneWire.EnumAttachPosition.NONE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -359,35 +359,24 @@
|
@@ -359,35 +359,24 @@
|
||||||
Block block = iblockstate.getBlock();
|
Block block = iblockstate.func_177230_c();
|
||||||
boolean flag = block.isNormalCube();
|
boolean flag = block.func_149721_r();
|
||||||
boolean flag1 = worldIn.getBlockState(pos.up()).getBlock().isNormalCube();
|
boolean flag1 = p_176339_1_.func_180495_p(p_176339_2_.func_177984_a()).func_177230_c().func_149721_r();
|
||||||
- return !flag1 && flag && canConnectUpwardsTo(worldIn, blockpos.up()) ? true : (canConnectTo(iblockstate, side) ? true : (block == Blocks.powered_repeater && iblockstate.getValue(BlockRedstoneDiode.FACING) == side ? true : !flag && canConnectUpwardsTo(worldIn, blockpos.down())));
|
- return !flag1 && flag && func_176340_e(p_176339_1_, blockpos.func_177984_a()) ? true : (func_176343_a(iblockstate, p_176339_3_) ? true : (block == Blocks.field_150416_aS && iblockstate.func_177229_b(BlockRedstoneDiode.field_176387_N) == p_176339_3_ ? true : !flag && func_176340_e(p_176339_1_, blockpos.func_177977_b())));
|
||||||
+ return !flag1 && flag && canRestoneConnect(worldIn, blockpos.up(), null) ? true : (canRestoneConnect(worldIn, blockpos, side) ? true : (block == Blocks.powered_repeater && iblockstate.getValue(BlockRedstoneDiode.FACING) == side ? true : !flag && canRestoneConnect(worldIn, blockpos.down(), null)));
|
+ return !flag1 && flag && canRestoneConnect(p_176339_1_, blockpos.func_177984_a(), null) ? true : (canRestoneConnect(p_176339_1_, blockpos, p_176339_3_) ? true : (block == Blocks.field_150416_aS && iblockstate.func_177229_b(BlockRedstoneDiode.field_176387_N) == p_176339_3_ ? true : !flag && canRestoneConnect(p_176339_1_, blockpos.func_177977_b(), null)));
|
||||||
}
|
}
|
||||||
|
|
||||||
- protected static boolean canConnectUpwardsTo(IBlockAccess worldIn, BlockPos pos)
|
- protected static boolean func_176340_e(IBlockAccess p_176340_0_, BlockPos p_176340_1_)
|
||||||
+ protected static boolean canRestoneConnect(IBlockAccess world, BlockPos pos, EnumFacing side)
|
+ protected static boolean canRestoneConnect(IBlockAccess world, BlockPos pos, EnumFacing side)
|
||||||
{
|
{
|
||||||
- return canConnectUpwardsTo(worldIn.getBlockState(pos));
|
- return func_176346_d(p_176340_0_.func_180495_p(p_176340_1_));
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
- protected static boolean canConnectUpwardsTo(IBlockState state)
|
- protected static boolean func_176346_d(IBlockState p_176346_0_)
|
||||||
- {
|
- {
|
||||||
- return canConnectTo(state, (EnumFacing)null);
|
- return func_176343_a(p_176346_0_, (EnumFacing)null);
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
- protected static boolean canConnectTo(IBlockState blockState, EnumFacing side)
|
- protected static boolean func_176343_a(IBlockState p_176343_0_, EnumFacing p_176343_1_)
|
||||||
- {
|
- {
|
||||||
- Block block = blockState.getBlock();
|
- Block block = p_176343_0_.func_177230_c();
|
||||||
-
|
-
|
||||||
- if (block == Blocks.redstone_wire)
|
- if (block == Blocks.field_150488_af)
|
||||||
+ IBlockState state = world.getBlockState(pos);
|
+ IBlockState state = world.func_180495_p(pos);
|
||||||
+ if (state.getBlock() == Blocks.redstone_wire)
|
+ if (state.func_177230_c() == Blocks.field_150488_af)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
- else if (Blocks.unpowered_repeater.isAssociated(block))
|
- else if (Blocks.field_150413_aR.func_149907_e(block))
|
||||||
+ else if (Blocks.unpowered_repeater.isAssociated(state.getBlock()))
|
+ else if (Blocks.field_150413_aR.func_149907_e(state.func_177230_c()))
|
||||||
{
|
{
|
||||||
- EnumFacing enumfacing = (EnumFacing)blockState.getValue(BlockRedstoneRepeater.FACING);
|
- EnumFacing enumfacing = (EnumFacing)p_176343_0_.func_177229_b(BlockRedstoneRepeater.field_176387_N);
|
||||||
- return enumfacing == side || enumfacing.getOpposite() == side;
|
- return enumfacing == p_176343_1_ || enumfacing.func_176734_d() == p_176343_1_;
|
||||||
+ EnumFacing direction = (EnumFacing)state.getValue(BlockRedstoneRepeater.FACING);
|
+ EnumFacing direction = (EnumFacing)state.func_177229_b(BlockRedstoneRepeater.field_176387_N);
|
||||||
+ return direction == side || direction.getOpposite() == side;
|
+ return direction == side || direction.func_176734_d() == side;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
- return block.canProvidePower() && side != null;
|
- return block.func_149744_f() && p_176343_1_ != null;
|
||||||
+ return state.getBlock().canConnectRedstone(world, pos, side);
|
+ return state.func_177230_c().canConnectRedstone(world, pos, side);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,19 +7,19 @@
|
||||||
-public class BlockReed extends Block
|
-public class BlockReed extends Block
|
||||||
+public class BlockReed extends Block implements net.minecraftforge.common.IPlantable
|
+public class BlockReed extends Block implements net.minecraftforge.common.IPlantable
|
||||||
{
|
{
|
||||||
public static final PropertyInteger AGE = PropertyInteger.create("age", 0, 15);
|
public static final PropertyInteger field_176355_a = PropertyInteger.func_177719_a("age", 0, 15);
|
||||||
|
|
||||||
@@ -65,6 +65,7 @@
|
@@ -65,6 +65,7 @@
|
||||||
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
|
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
|
||||||
{
|
{
|
||||||
Block block = worldIn.getBlockState(pos.down()).getBlock();
|
Block block = p_176196_1_.func_180495_p(p_176196_2_.func_177977_b()).func_177230_c();
|
||||||
+ if (block.canSustainPlant(worldIn, pos.down(), EnumFacing.UP, this)) return true;
|
+ if (block.canSustainPlant(p_176196_1_, p_176196_2_.func_177977_b(), EnumFacing.UP, this)) return true;
|
||||||
|
|
||||||
if (block == this)
|
if (block == this)
|
||||||
{
|
{
|
||||||
@@ -164,4 +165,15 @@
|
@@ -164,4 +165,15 @@
|
||||||
{
|
{
|
||||||
return new BlockState(this, new IProperty[] {AGE});
|
return new BlockState(this, new IProperty[] {field_176355_a});
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
|
@ -30,6 +30,6 @@
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public IBlockState getPlant(IBlockAccess world, BlockPos pos)
|
+ public IBlockState getPlant(IBlockAccess world, BlockPos pos)
|
||||||
+ {
|
+ {
|
||||||
+ return this.getDefaultState();
|
+ return this.func_176223_P();
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
+
|
+
|
||||||
+ public boolean rotateBlock(net.minecraft.world.World world, net.minecraft.util.BlockPos pos, EnumFacing axis)
|
+ public boolean rotateBlock(net.minecraft.world.World world, net.minecraft.util.BlockPos pos, EnumFacing axis)
|
||||||
+ {
|
+ {
|
||||||
+ net.minecraft.block.state.IBlockState state = world.getBlockState(pos);
|
+ net.minecraft.block.state.IBlockState state = world.func_180495_p(pos);
|
||||||
+ for (net.minecraft.block.properties.IProperty<?> prop : state.getProperties().keySet())
|
+ for (net.minecraft.block.properties.IProperty<?> prop : state.func_177228_b().keySet())
|
||||||
+ {
|
+ {
|
||||||
+ if (prop.getName().equals("axis"))
|
+ if (prop.func_177701_a().equals("axis"))
|
||||||
+ {
|
+ {
|
||||||
+ world.setBlockState(pos, state.cycleProperty(prop));
|
+ world.func_175656_a(pos, state.func_177231_a(prop));
|
||||||
+ return true;
|
+ return true;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockSapling.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockSapling.java
|
||||||
@@ -71,6 +71,7 @@
|
@@ -71,6 +71,7 @@
|
||||||
|
|
||||||
public void generateTree(World worldIn, BlockPos pos, IBlockState state, Random rand)
|
public void func_176476_e(World p_176476_1_, BlockPos p_176476_2_, IBlockState p_176476_3_, Random p_176476_4_)
|
||||||
{
|
{
|
||||||
+ if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(worldIn, rand, pos)) return;
|
+ if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(p_176476_1_, p_176476_4_, p_176476_2_)) return;
|
||||||
WorldGenerator worldgenerator = (WorldGenerator)(rand.nextInt(10) == 0 ? new WorldGenBigTree(true) : new WorldGenTrees(true));
|
WorldGenerator worldgenerator = (WorldGenerator)(p_176476_4_.nextInt(10) == 0 ? new WorldGenBigTree(true) : new WorldGenTrees(true));
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int j = 0;
|
int j = 0;
|
||||||
|
|
|
@ -1,57 +1,57 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/block/BlockSkull.java
|
--- ../src-base/minecraft/net/minecraft/block/BlockSkull.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockSkull.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockSkull.java
|
||||||
@@ -121,10 +121,6 @@
|
@@ -121,10 +121,6 @@
|
||||||
return tileentity instanceof TileEntitySkull ? ((TileEntitySkull)tileentity).getSkullType() : super.getDamageValue(worldIn, pos);
|
return tileentity instanceof TileEntitySkull ? ((TileEntitySkull)tileentity).func_145904_a() : super.func_176222_j(p_176222_1_, p_176222_2_);
|
||||||
}
|
}
|
||||||
|
|
||||||
- public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
|
- public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||||
- {
|
- {
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
public void onBlockHarvested(World worldIn, BlockPos pos, IBlockState state, EntityPlayer player)
|
public void func_176208_a(World p_176208_1_, BlockPos p_176208_2_, IBlockState p_176208_3_, EntityPlayer p_176208_4_)
|
||||||
{
|
{
|
||||||
if (player.capabilities.isCreativeMode)
|
if (p_176208_4_.field_71075_bZ.field_75098_d)
|
||||||
@@ -132,13 +128,18 @@
|
@@ -132,13 +128,18 @@
|
||||||
state = state.withProperty(NODROP, Boolean.valueOf(true));
|
p_176208_3_ = p_176208_3_.func_177226_a(field_176417_b, Boolean.valueOf(true));
|
||||||
worldIn.setBlockState(pos, state, 4);
|
p_176208_1_.func_180501_a(p_176208_2_, p_176208_3_, 4);
|
||||||
}
|
}
|
||||||
+ this.dropBlockAsItem(worldIn, pos, state, 0);
|
+ this.func_176226_b(p_176208_1_, p_176208_2_, p_176208_3_, 0);
|
||||||
|
|
||||||
super.onBlockHarvested(worldIn, pos, state, player);
|
super.func_176208_a(p_176208_1_, p_176208_2_, p_176208_3_, p_176208_4_);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
|
public void func_180663_b(World p_180663_1_, BlockPos p_180663_2_, IBlockState p_180663_3_)
|
||||||
{
|
{
|
||||||
- if (!worldIn.isRemote)
|
- if (!p_180663_1_.field_72995_K)
|
||||||
+ super.breakBlock(worldIn, pos, state);
|
+ super.func_180663_b(p_180663_1_, p_180663_2_, p_180663_3_);
|
||||||
+ }
|
+ }
|
||||||
+ public java.util.List<ItemStack> getDrops(IBlockAccess worldIn, BlockPos pos, IBlockState state, int fortune)
|
+ public java.util.List<ItemStack> getDrops(IBlockAccess p_180663_1_, BlockPos p_180663_2_, IBlockState p_180663_3_, int fortune)
|
||||||
+ {
|
+ {
|
||||||
+ java.util.List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
|
+ java.util.List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
|
||||||
{
|
{
|
||||||
if (!((Boolean)state.getValue(NODROP)).booleanValue())
|
if (!((Boolean)p_180663_3_.func_177229_b(field_176417_b)).booleanValue())
|
||||||
{
|
{
|
||||||
@@ -147,7 +148,7 @@
|
@@ -147,7 +148,7 @@
|
||||||
if (tileentity instanceof TileEntitySkull)
|
if (tileentity instanceof TileEntitySkull)
|
||||||
{
|
{
|
||||||
TileEntitySkull tileentityskull = (TileEntitySkull)tileentity;
|
TileEntitySkull tileentityskull = (TileEntitySkull)tileentity;
|
||||||
- ItemStack itemstack = new ItemStack(Items.skull, 1, this.getDamageValue(worldIn, pos));
|
- ItemStack itemstack = new ItemStack(Items.field_151144_bL, 1, this.func_176222_j(p_180663_1_, p_180663_2_));
|
||||||
+ ItemStack itemstack = new ItemStack(Items.skull, 1, tileentityskull.getSkullType());
|
+ ItemStack itemstack = new ItemStack(Items.field_151144_bL, 1, tileentityskull.func_145904_a());
|
||||||
|
|
||||||
if (tileentityskull.getSkullType() == 3 && tileentityskull.getPlayerProfile() != null)
|
if (tileentityskull.func_145904_a() == 3 && tileentityskull.func_152108_a() != null)
|
||||||
{
|
{
|
||||||
@@ -157,12 +158,11 @@
|
@@ -157,12 +158,11 @@
|
||||||
itemstack.getTagCompound().setTag("SkullOwner", nbttagcompound);
|
itemstack.func_77978_p().func_74782_a("SkullOwner", nbttagcompound);
|
||||||
}
|
}
|
||||||
|
|
||||||
- spawnAsEntity(worldIn, pos, itemstack);
|
- func_180635_a(p_180663_1_, p_180663_2_, itemstack);
|
||||||
+ ret.add(itemstack);
|
+ ret.add(itemstack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
-
|
-
|
||||||
- super.breakBlock(worldIn, pos, state);
|
- super.func_180663_b(p_180663_1_, p_180663_2_, p_180663_3_);
|
||||||
}
|
}
|
||||||
+ return ret;
|
+ return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Item getItemDropped(IBlockState state, Random rand, int fortune)
|
public Item func_180660_a(IBlockState p_180660_1_, Random p_180660_2_, int p_180660_3_)
|
||||||
|
|
|
@ -2,52 +2,52 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockSnow.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockSnow.java
|
||||||
@@ -79,7 +79,7 @@
|
@@ -79,7 +79,7 @@
|
||||||
{
|
{
|
||||||
IBlockState iblockstate = worldIn.getBlockState(pos.down());
|
IBlockState iblockstate = p_176196_1_.func_180495_p(p_176196_2_.func_177977_b());
|
||||||
Block block = iblockstate.getBlock();
|
Block block = iblockstate.func_177230_c();
|
||||||
- return block != Blocks.ice && block != Blocks.packed_ice ? (block.getMaterial() == Material.leaves ? true : (block == this && ((Integer)iblockstate.getValue(LAYERS)).intValue() >= 7 ? true : block.isOpaqueCube() && block.blockMaterial.blocksMovement())) : false;
|
- return block != Blocks.field_150432_aD && block != Blocks.field_150403_cj ? (block.func_149688_o() == Material.field_151584_j ? true : (block == this && ((Integer)iblockstate.func_177229_b(field_176315_a)).intValue() >= 7 ? true : block.func_149662_c() && block.field_149764_J.func_76230_c())) : false;
|
||||||
+ return block != Blocks.ice && block != Blocks.packed_ice ? (block.isLeaves(worldIn, pos.down()) ? true : (block == this && ((Integer)iblockstate.getValue(LAYERS)).intValue() == 7 ? true : block.isOpaqueCube() && block.blockMaterial.blocksMovement())) : false;
|
+ return block != Blocks.field_150432_aD && block != Blocks.field_150403_cj ? (block.isLeaves(p_176196_1_, p_176196_2_.func_177977_b()) ? true : (block == this && ((Integer)iblockstate.func_177229_b(field_176315_a)).intValue() == 7 ? true : block.func_149662_c() && block.field_149764_J.func_76230_c())) : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock)
|
public void func_176204_a(World p_176204_1_, BlockPos p_176204_2_, IBlockState p_176204_3_, Block p_176204_4_)
|
||||||
@@ -91,7 +91,6 @@
|
@@ -91,7 +91,6 @@
|
||||||
{
|
{
|
||||||
if (!this.canPlaceBlockAt(worldIn, p_176314_2_))
|
if (!this.func_176196_c(p_176314_1_, p_176314_2_))
|
||||||
{
|
{
|
||||||
- this.dropBlockAsItem(worldIn, p_176314_2_, p_176314_3_, 0);
|
- this.func_176226_b(p_176314_1_, p_176314_2_, p_176314_3_, 0);
|
||||||
worldIn.setBlockToAir(p_176314_2_);
|
p_176314_1_.func_175698_g(p_176314_2_);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -103,9 +102,8 @@
|
@@ -103,9 +102,8 @@
|
||||||
|
|
||||||
public void harvestBlock(World worldIn, EntityPlayer player, BlockPos pos, IBlockState state, TileEntity te)
|
public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, TileEntity p_180657_5_)
|
||||||
{
|
{
|
||||||
- spawnAsEntity(worldIn, pos, new ItemStack(Items.snowball, ((Integer)state.getValue(LAYERS)).intValue() + 1, 0));
|
- func_180635_a(p_180657_1_, p_180657_3_, new ItemStack(Items.field_151126_ay, ((Integer)p_180657_4_.func_177229_b(field_176315_a)).intValue() + 1, 0));
|
||||||
+ super.harvestBlock(worldIn, player, pos, state, te);
|
+ super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_);
|
||||||
worldIn.setBlockToAir(pos);
|
p_180657_1_.func_175698_g(p_180657_3_);
|
||||||
- player.triggerAchievement(StatList.mineBlockStatArray[Block.getIdFromBlock(this)]);
|
- p_180657_2_.func_71029_a(StatList.field_75934_C[Block.func_149682_b(this)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Item getItemDropped(IBlockState state, Random rand, int fortune)
|
public Item func_180660_a(IBlockState p_180660_1_, Random p_180660_2_, int p_180660_3_)
|
||||||
@@ -115,14 +113,13 @@
|
@@ -115,14 +113,13 @@
|
||||||
|
|
||||||
public int quantityDropped(Random random)
|
public int func_149745_a(Random p_149745_1_)
|
||||||
{
|
{
|
||||||
- return 0;
|
- return 0;
|
||||||
+ return 1;
|
+ return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand)
|
public void func_180650_b(World p_180650_1_, BlockPos p_180650_2_, IBlockState p_180650_3_, Random p_180650_4_)
|
||||||
{
|
{
|
||||||
if (worldIn.getLightFor(EnumSkyBlock.BLOCK, pos) > 11)
|
if (p_180650_1_.func_175642_b(EnumSkyBlock.BLOCK, p_180650_2_) > 11)
|
||||||
{
|
{
|
||||||
- this.dropBlockAsItem(worldIn, pos, worldIn.getBlockState(pos), 0);
|
- this.func_176226_b(p_180650_1_, p_180650_2_, p_180650_1_.func_180495_p(p_180650_2_), 0);
|
||||||
worldIn.setBlockToAir(pos);
|
p_180650_1_.func_175698_g(p_180650_2_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -152,4 +149,6 @@
|
@@ -152,4 +149,6 @@
|
||||||
{
|
{
|
||||||
return new BlockState(this, new IProperty[] {LAYERS});
|
return new BlockState(this, new IProperty[] {field_176315_a});
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ @Override public int quantityDropped(IBlockState state, int fortune, Random random){ return ((Integer)state.getValue(LAYERS)) + 1; }
|
+ @Override public int quantityDropped(IBlockState state, int fortune, Random random){ return ((Integer)state.func_177229_b(field_176315_a)) + 1; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,36 +1,39 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/block/BlockStem.java
|
--- ../src-base/minecraft/net/minecraft/block/BlockStem.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockStem.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockStem.java
|
||||||
@@ -94,7 +94,7 @@
|
@@ -94,7 +94,7 @@
|
||||||
pos = pos.offset(EnumFacing.Plane.HORIZONTAL.random(rand));
|
p_180650_2_ = p_180650_2_.func_177972_a(EnumFacing.Plane.HORIZONTAL.func_179518_a(p_180650_4_));
|
||||||
Block block = worldIn.getBlockState(pos.down()).getBlock();
|
Block block = p_180650_1_.func_180495_p(p_180650_2_.func_177977_b()).func_177230_c();
|
||||||
|
|
||||||
- if (worldIn.getBlockState(pos).getBlock().blockMaterial == Material.air && (block == Blocks.farmland || block == Blocks.dirt || block == Blocks.grass))
|
- if (p_180650_1_.func_180495_p(p_180650_2_).func_177230_c().field_149764_J == Material.field_151579_a && (block == Blocks.field_150458_ak || block == Blocks.field_150346_d || block == Blocks.field_150349_c))
|
||||||
+ if (worldIn.isAirBlock(pos) && (block.canSustainPlant(worldIn, pos.down(), EnumFacing.UP, this) || block == Blocks.dirt || block == Blocks.grass))
|
+ if (p_180650_1_.func_175623_d(p_180650_2_) && (block.canSustainPlant(p_180650_1_, p_180650_2_.func_177977_b(), EnumFacing.UP, this) || block == Blocks.field_150346_d || block == Blocks.field_150349_c))
|
||||||
{
|
{
|
||||||
worldIn.setBlockState(pos, this.crop.getDefaultState());
|
p_180650_1_.func_175656_a(p_180650_2_, this.field_149877_a.func_176223_P());
|
||||||
}
|
}
|
||||||
@@ -148,8 +148,12 @@
|
@@ -148,24 +148,29 @@
|
||||||
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
|
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||||
{
|
{
|
||||||
super.dropBlockAsItemWithChance(worldIn, pos, state, chance, fortune);
|
super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
- if (!worldIn.isRemote)
|
- if (!p_180653_1_.field_72995_K)
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public java.util.List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
+ public java.util.List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||||
+ {
|
+ {
|
||||||
+ java.util.List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
|
+ java.util.List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
|
||||||
{
|
{
|
||||||
Item item = this.getSeedItem();
|
Item item = this.func_176481_j();
|
||||||
|
|
||||||
@@ -159,13 +163,14 @@
|
if (item != null)
|
||||||
|
{
|
||||||
|
- int i = ((Integer)p_180653_3_.func_177229_b(field_176484_a)).intValue();
|
||||||
|
+ int i = ((Integer)state.func_177229_b(field_176484_a)).intValue();
|
||||||
|
|
||||||
for (int j = 0; j < 3; ++j)
|
for (int j = 0; j < 3; ++j)
|
||||||
{
|
{
|
||||||
- if (worldIn.rand.nextInt(15) <= i)
|
- if (p_180653_1_.field_73012_v.nextInt(15) <= i)
|
||||||
+ if (RANDOM.nextInt(15) <= i)
|
+ if (RANDOM.nextInt(15) <= i)
|
||||||
{
|
{
|
||||||
- spawnAsEntity(worldIn, pos, new ItemStack(item));
|
- func_180635_a(p_180653_1_, p_180653_2_, new ItemStack(item));
|
||||||
+ ret.add(new ItemStack(item));
|
+ ret.add(new ItemStack(item));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,4 +42,4 @@
|
||||||
+ return ret;
|
+ return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Item getSeedItem()
|
protected Item func_176481_j()
|
||||||
|
|
|
@ -7,38 +7,38 @@
|
||||||
-public class BlockTallGrass extends BlockBush implements IGrowable
|
-public class BlockTallGrass extends BlockBush implements IGrowable
|
||||||
+public class BlockTallGrass extends BlockBush implements IGrowable, net.minecraftforge.common.IShearable
|
+public class BlockTallGrass extends BlockBush implements IGrowable, net.minecraftforge.common.IShearable
|
||||||
{
|
{
|
||||||
public static final PropertyEnum<BlockTallGrass.EnumType> TYPE = PropertyEnum.<BlockTallGrass.EnumType>create("type", BlockTallGrass.EnumType.class);
|
public static final PropertyEnum<BlockTallGrass.EnumType> field_176497_a = PropertyEnum.<BlockTallGrass.EnumType>func_177709_a("type", BlockTallGrass.EnumType.class);
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@
|
@@ -43,7 +43,7 @@
|
||||||
|
|
||||||
public boolean canBlockStay(World worldIn, BlockPos pos, IBlockState state)
|
public boolean func_180671_f(World p_180671_1_, BlockPos p_180671_2_, IBlockState p_180671_3_)
|
||||||
{
|
{
|
||||||
- return this.canPlaceBlockOn(worldIn.getBlockState(pos.down()).getBlock());
|
- return this.func_149854_a(p_180671_1_.func_180495_p(p_180671_2_.func_177977_b()).func_177230_c());
|
||||||
+ return super.canBlockStay(worldIn, pos, state);
|
+ return super.func_180671_f(p_180671_1_, p_180671_2_, p_180671_3_);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isReplaceable(World worldIn, BlockPos pos)
|
public boolean func_176200_f(World p_176200_1_, BlockPos p_176200_2_)
|
||||||
@@ -53,7 +53,7 @@
|
@@ -53,7 +53,7 @@
|
||||||
|
|
||||||
public Item getItemDropped(IBlockState state, Random rand, int fortune)
|
public Item func_180660_a(IBlockState p_180660_1_, Random p_180660_2_, int p_180660_3_)
|
||||||
{
|
{
|
||||||
- return rand.nextInt(8) == 0 ? Items.wheat_seeds : null;
|
- return p_180660_2_.nextInt(8) == 0 ? Items.field_151014_N : null;
|
||||||
+ return null;
|
+ return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int quantityDroppedWithBonus(int fortune, Random random)
|
public int func_149679_a(int p_149679_1_, Random p_149679_2_)
|
||||||
@@ -63,13 +63,7 @@
|
@@ -63,13 +63,7 @@
|
||||||
|
|
||||||
public void harvestBlock(World worldIn, EntityPlayer player, BlockPos pos, IBlockState state, TileEntity te)
|
public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, TileEntity p_180657_5_)
|
||||||
{
|
{
|
||||||
- if (!worldIn.isRemote && player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() == Items.shears)
|
- if (!p_180657_1_.field_72995_K && p_180657_2_.func_71045_bC() != null && p_180657_2_.func_71045_bC().func_77973_b() == Items.field_151097_aZ)
|
||||||
{
|
{
|
||||||
- player.triggerAchievement(StatList.mineBlockStatArray[Block.getIdFromBlock(this)]);
|
- p_180657_2_.func_71029_a(StatList.field_75934_C[Block.func_149682_b(this)]);
|
||||||
- spawnAsEntity(worldIn, pos, new ItemStack(Blocks.tallgrass, 1, ((BlockTallGrass.EnumType)state.getValue(TYPE)).getMeta()));
|
- func_180635_a(p_180657_1_, p_180657_3_, new ItemStack(Blocks.field_150329_H, 1, ((BlockTallGrass.EnumType)p_180657_4_.func_177229_b(field_176497_a)).func_177044_a()));
|
||||||
- }
|
- }
|
||||||
- else
|
- else
|
||||||
- {
|
- {
|
||||||
super.harvestBlock(worldIn, player, pos, state, te);
|
super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -204,4 +198,22 @@
|
@@ -204,4 +198,22 @@
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
+ public List<ItemStack> onSheared(ItemStack item, IBlockAccess world, BlockPos pos, int fortune)
|
+ public List<ItemStack> onSheared(ItemStack item, IBlockAccess world, BlockPos pos, int fortune)
|
||||||
+ {
|
+ {
|
||||||
+ List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
|
+ List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
|
||||||
+ ret.add(new ItemStack(Blocks.tallgrass, 1, ((BlockTallGrass.EnumType)world.getBlockState(pos).getValue(TYPE)).getMeta()));
|
+ ret.add(new ItemStack(Blocks.field_150329_H, 1, ((BlockTallGrass.EnumType)world.func_180495_p(pos).func_177229_b(field_176497_a)).func_177044_a()));
|
||||||
+ return ret;
|
+ return ret;
|
||||||
+ }
|
+ }
|
||||||
+ @Override
|
+ @Override
|
||||||
|
|
|
@ -3,36 +3,36 @@
|
||||||
@@ -63,7 +63,7 @@
|
@@ -63,7 +63,7 @@
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Block block = worldIn.getBlockState(pos).getBlock();
|
Block block = p_176594_1_.func_180495_p(p_176594_2_).func_177230_c();
|
||||||
- return block instanceof BlockFence || block == Blocks.glass || block == Blocks.cobblestone_wall || block == Blocks.stained_glass;
|
- return block instanceof BlockFence || block == Blocks.field_150359_w || block == Blocks.field_150463_bK || block == Blocks.field_150399_cn;
|
||||||
+ return block.canPlaceTorchOnTop(worldIn, pos);
|
+ return block.canPlaceTorchOnTop(p_176594_1_, p_176594_2_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@
|
@@ -84,7 +84,7 @@
|
||||||
{
|
{
|
||||||
BlockPos blockpos = pos.offset(facing.getOpposite());
|
BlockPos blockpos = p_176595_2_.func_177972_a(p_176595_3_.func_176734_d());
|
||||||
boolean flag = facing.getAxis().isHorizontal();
|
boolean flag = p_176595_3_.func_176740_k().func_176722_c();
|
||||||
- return flag && worldIn.isBlockNormalCube(blockpos, true) || facing.equals(EnumFacing.UP) && this.canPlaceOn(worldIn, blockpos);
|
- return flag && p_176595_1_.func_175677_d(blockpos, true) || p_176595_3_.equals(EnumFacing.UP) && this.func_176594_d(p_176595_1_, blockpos);
|
||||||
+ return flag && worldIn.isSideSolid(blockpos, facing, true) || facing.equals(EnumFacing.UP) && this.canPlaceOn(worldIn, blockpos);
|
+ return flag && p_176595_1_.isSideSolid(blockpos, p_176595_3_, true) || p_176595_3_.equals(EnumFacing.UP) && this.func_176594_d(p_176595_1_, blockpos);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
|
public IBlockState func_180642_a(World p_180642_1_, BlockPos p_180642_2_, EnumFacing p_180642_3_, float p_180642_4_, float p_180642_5_, float p_180642_6_, int p_180642_7_, EntityLivingBase p_180642_8_)
|
||||||
@@ -97,7 +97,7 @@
|
@@ -97,7 +97,7 @@
|
||||||
{
|
{
|
||||||
for (EnumFacing enumfacing : EnumFacing.Plane.HORIZONTAL)
|
for (EnumFacing enumfacing : EnumFacing.Plane.HORIZONTAL)
|
||||||
{
|
{
|
||||||
- if (worldIn.isBlockNormalCube(pos.offset(enumfacing.getOpposite()), true))
|
- if (p_180642_1_.func_175677_d(p_180642_2_.func_177972_a(enumfacing.func_176734_d()), true))
|
||||||
+ if (worldIn.isSideSolid(pos.offset(enumfacing.getOpposite()), enumfacing, true))
|
+ if (p_180642_1_.isSideSolid(p_180642_2_.func_177972_a(enumfacing.func_176734_d()), enumfacing, true))
|
||||||
{
|
{
|
||||||
return this.getDefaultState().withProperty(FACING, enumfacing);
|
return this.func_176223_P().func_177226_a(field_176596_a, enumfacing);
|
||||||
}
|
}
|
||||||
@@ -130,7 +130,7 @@
|
@@ -130,7 +130,7 @@
|
||||||
EnumFacing enumfacing1 = enumfacing.getOpposite();
|
EnumFacing enumfacing1 = enumfacing.func_176734_d();
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
|
|
||||||
- if (enumfacing$axis.isHorizontal() && !worldIn.isBlockNormalCube(pos.offset(enumfacing1), true))
|
- if (enumfacing$axis.func_176722_c() && !p_176592_1_.func_175677_d(p_176592_2_.func_177972_a(enumfacing1), true))
|
||||||
+ if (enumfacing$axis.isHorizontal() && !worldIn.isSideSolid(pos.offset(enumfacing1), enumfacing1, true))
|
+ if (enumfacing$axis.func_176722_c() && !p_176592_1_.isSideSolid(p_176592_2_.func_177972_a(enumfacing1), enumfacing1, true))
|
||||||
{
|
{
|
||||||
flag = true;
|
flag = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,38 +6,38 @@
|
||||||
{
|
{
|
||||||
+ /** Set this to allow trapdoors to remain free-floating */
|
+ /** Set this to allow trapdoors to remain free-floating */
|
||||||
+ public static boolean disableValidation = false;
|
+ public static boolean disableValidation = false;
|
||||||
public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);
|
public static final PropertyDirection field_176284_a = PropertyDirection.func_177712_a("facing", EnumFacing.Plane.HORIZONTAL);
|
||||||
public static final PropertyBool OPEN = PropertyBool.create("open");
|
public static final PropertyBool field_176283_b = PropertyBool.func_177716_a("open");
|
||||||
public static final PropertyEnum<BlockTrapDoor.DoorHalf> HALF = PropertyEnum.<BlockTrapDoor.DoorHalf>create("half", BlockTrapDoor.DoorHalf.class);
|
public static final PropertyEnum<BlockTrapDoor.DoorHalf> field_176285_M = PropertyEnum.<BlockTrapDoor.DoorHalf>func_177709_a("half", BlockTrapDoor.DoorHalf.class);
|
||||||
@@ -140,9 +142,10 @@
|
@@ -140,9 +142,10 @@
|
||||||
{
|
{
|
||||||
if (!worldIn.isRemote)
|
if (!p_176204_1_.field_72995_K)
|
||||||
{
|
{
|
||||||
+ EnumFacing direction = (EnumFacing)state.getValue(FACING);
|
+ EnumFacing direction = (EnumFacing)p_176204_3_.func_177229_b(field_176284_a);
|
||||||
BlockPos blockpos = pos.offset(((EnumFacing)state.getValue(FACING)).getOpposite());
|
BlockPos blockpos = p_176204_2_.func_177972_a(((EnumFacing)p_176204_3_.func_177229_b(field_176284_a)).func_176734_d());
|
||||||
|
|
||||||
- if (!isValidSupportBlock(worldIn.getBlockState(blockpos).getBlock()))
|
- if (!func_150119_a(p_176204_1_.func_180495_p(blockpos).func_177230_c()))
|
||||||
+ if (!(isValidSupportBlock(worldIn.getBlockState(blockpos).getBlock()) || worldIn.isSideSolid(blockpos, direction, true)))
|
+ if (!(func_150119_a(p_176204_1_.func_180495_p(blockpos).func_177230_c()) || p_176204_1_.isSideSolid(blockpos, direction, true)))
|
||||||
{
|
{
|
||||||
worldIn.setBlockToAir(pos);
|
p_176204_1_.func_175698_g(p_176204_2_);
|
||||||
this.dropBlockAsItem(worldIn, pos, state, 0);
|
this.func_176226_b(p_176204_1_, p_176204_2_, p_176204_3_, 0);
|
||||||
@@ -186,7 +189,10 @@
|
@@ -186,7 +189,10 @@
|
||||||
|
|
||||||
public boolean canPlaceBlockOnSide(World worldIn, BlockPos pos, EnumFacing side)
|
public boolean func_176198_a(World p_176198_1_, BlockPos p_176198_2_, EnumFacing p_176198_3_)
|
||||||
{
|
{
|
||||||
- return !side.getAxis().isVertical() && isValidSupportBlock(worldIn.getBlockState(pos.offset(side.getOpposite())).getBlock());
|
- return !p_176198_3_.func_176740_k().func_176720_b() && func_150119_a(p_176198_1_.func_180495_p(p_176198_2_.func_177972_a(p_176198_3_.func_176734_d())).func_177230_c());
|
||||||
+ if (disableValidation) return true;
|
+ if (disableValidation) return true;
|
||||||
+ EnumFacing dir = side.getOpposite();
|
+ EnumFacing dir = p_176198_3_.func_176734_d();
|
||||||
+ pos = pos.offset(dir);
|
+ p_176198_2_ = p_176198_2_.func_177972_a(dir);
|
||||||
+ return !side.getAxis().isVertical() && (isValidSupportBlock(worldIn.getBlockState(pos).getBlock()) || worldIn.isSideSolid(pos, side, true));
|
+ return !p_176198_3_.func_176740_k().func_176720_b() && (func_150119_a(p_176198_1_.func_180495_p(p_176198_2_).func_177230_c()) || p_176198_1_.isSideSolid(p_176198_2_, p_176198_3_, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static EnumFacing getFacing(int meta)
|
protected static EnumFacing func_176281_b(int p_176281_0_)
|
||||||
@@ -223,6 +229,7 @@
|
@@ -223,6 +229,7 @@
|
||||||
|
|
||||||
private static boolean isValidSupportBlock(Block blockIn)
|
private static boolean func_150119_a(Block p_150119_0_)
|
||||||
{
|
{
|
||||||
+ if (disableValidation) return true;
|
+ if (disableValidation) return true;
|
||||||
return blockIn.blockMaterial.isOpaque() && blockIn.isFullCube() || blockIn == Blocks.glowstone || blockIn instanceof BlockSlab || blockIn 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,27 +2,27 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockTripWireHook.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockTripWireHook.java
|
||||||
@@ -58,14 +58,14 @@
|
@@ -58,14 +58,14 @@
|
||||||
|
|
||||||
public boolean canPlaceBlockOnSide(World worldIn, BlockPos pos, EnumFacing side)
|
public boolean func_176198_a(World p_176198_1_, BlockPos p_176198_2_, EnumFacing p_176198_3_)
|
||||||
{
|
{
|
||||||
- return side.getAxis().isHorizontal() && worldIn.getBlockState(pos.offset(side.getOpposite())).getBlock().isNormalCube();
|
- return p_176198_3_.func_176740_k().func_176722_c() && p_176198_1_.func_180495_p(p_176198_2_.func_177972_a(p_176198_3_.func_176734_d())).func_177230_c().func_149721_r();
|
||||||
+ return side.getAxis().isHorizontal() && worldIn.isSideSolid(pos.offset(side.getOpposite()), side, true);
|
+ return p_176198_3_.func_176740_k().func_176722_c() && p_176198_1_.isSideSolid(p_176198_2_.func_177972_a(p_176198_3_.func_176734_d()), p_176198_3_, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
|
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
|
||||||
{
|
{
|
||||||
for (EnumFacing enumfacing : EnumFacing.Plane.HORIZONTAL)
|
for (EnumFacing enumfacing : EnumFacing.Plane.HORIZONTAL)
|
||||||
{
|
{
|
||||||
- if (worldIn.getBlockState(pos.offset(enumfacing)).getBlock().isNormalCube())
|
- if (p_176196_1_.func_180495_p(p_176196_2_.func_177972_a(enumfacing)).func_177230_c().func_149721_r())
|
||||||
+ if (worldIn.isSideSolid(pos.offset(enumfacing), enumfacing.getOpposite(), true))
|
+ if (p_176196_1_.isSideSolid(p_176196_2_.func_177972_a(enumfacing), enumfacing.func_176734_d(), true))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -99,7 +99,7 @@
|
@@ -99,7 +99,7 @@
|
||||||
{
|
{
|
||||||
EnumFacing enumfacing = (EnumFacing)state.getValue(FACING);
|
EnumFacing enumfacing = (EnumFacing)p_176204_3_.func_177229_b(field_176264_a);
|
||||||
|
|
||||||
- if (!worldIn.getBlockState(pos.offset(enumfacing.getOpposite())).getBlock().isNormalCube())
|
- if (!p_176204_1_.func_180495_p(p_176204_2_.func_177972_a(enumfacing.func_176734_d())).func_177230_c().func_149721_r())
|
||||||
+ if (!worldIn.isSideSolid(pos.offset(enumfacing.getOpposite()), enumfacing, true))
|
+ if (!p_176204_1_.isSideSolid(p_176204_2_.func_177972_a(enumfacing.func_176734_d()), enumfacing, true))
|
||||||
{
|
{
|
||||||
this.dropBlockAsItem(worldIn, pos, state, 0);
|
this.func_176226_b(p_176204_1_, p_176204_2_, p_176204_3_, 0);
|
||||||
worldIn.setBlockToAir(pos);
|
p_176204_1_.func_175698_g(p_176204_2_);
|
||||||
|
|
|
@ -7,20 +7,20 @@
|
||||||
-public class BlockVine extends Block
|
-public class BlockVine extends Block
|
||||||
+public class BlockVine extends Block implements net.minecraftforge.common.IShearable
|
+public class BlockVine extends Block implements net.minecraftforge.common.IShearable
|
||||||
{
|
{
|
||||||
public static final PropertyBool UP = PropertyBool.create("up");
|
public static final PropertyBool field_176277_a = PropertyBool.func_177716_a("up");
|
||||||
public static final PropertyBool NORTH = PropertyBool.create("north");
|
public static final PropertyBool field_176273_b = PropertyBool.func_177716_a("north");
|
||||||
@@ -387,13 +387,7 @@
|
@@ -387,13 +387,7 @@
|
||||||
|
|
||||||
public void harvestBlock(World worldIn, EntityPlayer player, BlockPos pos, IBlockState state, TileEntity te)
|
public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, TileEntity p_180657_5_)
|
||||||
{
|
{
|
||||||
- if (!worldIn.isRemote && player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() == Items.shears)
|
- if (!p_180657_1_.field_72995_K && p_180657_2_.func_71045_bC() != null && p_180657_2_.func_71045_bC().func_77973_b() == Items.field_151097_aZ)
|
||||||
{
|
{
|
||||||
- player.triggerAchievement(StatList.mineBlockStatArray[Block.getIdFromBlock(this)]);
|
- p_180657_2_.func_71029_a(StatList.field_75934_C[Block.func_149682_b(this)]);
|
||||||
- spawnAsEntity(worldIn, pos, new ItemStack(Blocks.vine, 1, 0));
|
- func_180635_a(p_180657_1_, p_180657_3_, new ItemStack(Blocks.field_150395_bd, 1, 0));
|
||||||
- }
|
- }
|
||||||
- else
|
- else
|
||||||
- {
|
- {
|
||||||
super.harvestBlock(worldIn, player, pos, state, te);
|
super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -474,4 +468,14 @@
|
@@ -474,4 +468,14 @@
|
||||||
|
|
|
@ -2,28 +2,28 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/state/BlockPistonStructureHelper.java
|
+++ ../src-work/minecraft/net/minecraft/block/state/BlockPistonStructureHelper.java
|
||||||
@@ -78,7 +78,7 @@
|
@@ -78,7 +78,7 @@
|
||||||
{
|
{
|
||||||
Block block = this.world.getBlockState(origin).getBlock();
|
Block block = this.field_177261_a.func_180495_p(p_177251_1_).func_177230_c();
|
||||||
|
|
||||||
- if (block.getMaterial() == Material.air)
|
- if (block.func_149688_o() == Material.field_151579_a)
|
||||||
+ if (block.isAir(world, origin))
|
+ if (block.isAir(field_177261_a, p_177251_1_))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -109,7 +109,7 @@
|
@@ -109,7 +109,7 @@
|
||||||
BlockPos blockpos = origin.offset(this.moveDirection.getOpposite(), i);
|
BlockPos blockpos = p_177251_1_.func_177967_a(this.field_177257_d.func_176734_d(), i);
|
||||||
block = this.world.getBlockState(blockpos).getBlock();
|
block = this.field_177261_a.func_180495_p(blockpos).func_177230_c();
|
||||||
|
|
||||||
- if (block.getMaterial() == Material.air || !BlockPistonBase.canPush(block, this.world, blockpos, this.moveDirection, false) || blockpos.equals(this.pistonPos))
|
- if (block.func_149688_o() == Material.field_151579_a || !BlockPistonBase.func_180696_a(block, this.field_177261_a, blockpos, this.field_177257_d, false) || blockpos.equals(this.field_177259_b))
|
||||||
+ if (block.isAir(world, blockpos)|| !BlockPistonBase.canPush(block, this.world, blockpos, this.moveDirection, false) || blockpos.equals(this.pistonPos))
|
+ if (block.isAir(field_177261_a, blockpos)|| !BlockPistonBase.func_180696_a(block, this.field_177261_a, blockpos, this.field_177257_d, false) || blockpos.equals(this.field_177259_b))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -156,7 +156,7 @@
|
@@ -156,7 +156,7 @@
|
||||||
|
|
||||||
block = this.world.getBlockState(blockpos1).getBlock();
|
block = this.field_177261_a.func_180495_p(blockpos1).func_177230_c();
|
||||||
|
|
||||||
- if (block.getMaterial() == Material.air)
|
- if (block.func_149688_o() == Material.field_151579_a)
|
||||||
+ if (block.isAir(world, blockpos1))
|
+ if (block.isAir(field_177261_a, blockpos1))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/state/BlockState.java
|
+++ ../src-work/minecraft/net/minecraft/block/state/BlockState.java
|
||||||
@@ -38,6 +38,16 @@
|
@@ -38,6 +38,16 @@
|
||||||
|
|
||||||
public BlockState(Block blockIn, IProperty... properties)
|
public BlockState(Block p_i45663_1_, IProperty... p_i45663_2_)
|
||||||
{
|
{
|
||||||
+ this(blockIn, properties, null);
|
+ this(p_i45663_1_, p_i45663_2_, null);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ protected StateImplementation createState(Block block, ImmutableMap<IProperty, Comparable> properties, ImmutableMap<net.minecraftforge.common.property.IUnlistedProperty<?>, com.google.common.base.Optional<?>> unlistedProperties)
|
+ protected StateImplementation createState(Block block, ImmutableMap<IProperty, Comparable> properties, ImmutableMap<net.minecraftforge.common.property.IUnlistedProperty<?>, com.google.common.base.Optional<?>> unlistedProperties)
|
||||||
|
@ -12,17 +12,17 @@
|
||||||
+ return new StateImplementation(block, properties);
|
+ return new StateImplementation(block, properties);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ protected BlockState(Block blockIn, IProperty[] properties, ImmutableMap<net.minecraftforge.common.property.IUnlistedProperty<?>, com.google.common.base.Optional<?>> unlistedProperties)
|
+ protected BlockState(Block p_i45663_1_, IProperty[] p_i45663_2_, ImmutableMap<net.minecraftforge.common.property.IUnlistedProperty<?>, com.google.common.base.Optional<?>> unlistedProperties)
|
||||||
+ {
|
+ {
|
||||||
this.block = blockIn;
|
this.field_177627_c = p_i45663_1_;
|
||||||
Arrays.sort(properties, new Comparator<IProperty>()
|
Arrays.sort(p_i45663_2_, new Comparator<IProperty>()
|
||||||
{
|
{
|
||||||
@@ -53,7 +63,7 @@
|
@@ -53,7 +63,7 @@
|
||||||
for (List<Comparable> list1 : Cartesian.cartesianProduct(this.getAllowedValues()))
|
for (List<Comparable> list1 : Cartesian.func_179321_a(this.func_177620_e()))
|
||||||
{
|
{
|
||||||
Map<IProperty, Comparable> map1 = MapPopulator.<IProperty, Comparable>createMap(this.properties, list1);
|
Map<IProperty, Comparable> map1 = MapPopulator.<IProperty, Comparable>func_179400_b(this.field_177624_d, list1);
|
||||||
- BlockState.StateImplementation blockstate$stateimplementation = new BlockState.StateImplementation(blockIn, ImmutableMap.copyOf(map1));
|
- BlockState.StateImplementation blockstate$stateimplementation = new BlockState.StateImplementation(p_i45663_1_, ImmutableMap.copyOf(map1));
|
||||||
+ BlockState.StateImplementation blockstate$stateimplementation = createState(blockIn, ImmutableMap.copyOf(map1), unlistedProperties);
|
+ BlockState.StateImplementation blockstate$stateimplementation = createState(p_i45663_1_, ImmutableMap.copyOf(map1), unlistedProperties);
|
||||||
map.put(map1, blockstate$stateimplementation);
|
map.put(map1, blockstate$stateimplementation);
|
||||||
list.add(blockstate$stateimplementation);
|
list.add(blockstate$stateimplementation);
|
||||||
}
|
}
|
||||||
|
@ -32,22 +32,22 @@
|
||||||
|
|
||||||
+ protected StateImplementation(Block blockIn, ImmutableMap<IProperty, Comparable> propertiesIn, ImmutableTable<IProperty, Comparable, IBlockState> propertyValueTable)
|
+ protected StateImplementation(Block blockIn, ImmutableMap<IProperty, Comparable> propertiesIn, ImmutableTable<IProperty, Comparable, IBlockState> propertyValueTable)
|
||||||
+ {
|
+ {
|
||||||
+ this.block = blockIn;
|
+ this.field_177239_a = blockIn;
|
||||||
+ this.properties = propertiesIn;
|
+ this.field_177237_b = propertiesIn;
|
||||||
+ this.propertyValueTable = propertyValueTable;
|
+ this.field_177238_c = propertyValueTable;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
public <T extends Comparable<T>, V extends T> IBlockState withProperty(IProperty<T> property, V value)
|
public <T extends Comparable<T>, V extends T> IBlockState func_177226_a(IProperty<T> p_177226_1_, V p_177226_2_)
|
||||||
{
|
{
|
||||||
if (!this.properties.containsKey(property))
|
if (!this.field_177237_b.containsKey(p_177226_1_))
|
||||||
@@ -199,5 +216,10 @@
|
@@ -199,5 +216,10 @@
|
||||||
map.put(property, value);
|
map.put(p_177236_1_, p_177236_2_);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ public ImmutableTable<IProperty, Comparable, IBlockState> getPropertyValueTable()
|
+ public ImmutableTable<IProperty, Comparable, IBlockState> getPropertyValueTable()
|
||||||
+ {
|
+ {
|
||||||
+ return propertyValueTable;
|
+ return field_177238_c;
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +1,26 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/client/LoadingScreenRenderer.java
|
--- ../src-base/minecraft/net/minecraft/client/LoadingScreenRenderer.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/LoadingScreenRenderer.java
|
+++ ../src-work/minecraft/net/minecraft/client/LoadingScreenRenderer.java
|
||||||
@@ -139,6 +139,10 @@
|
@@ -139,6 +139,10 @@
|
||||||
GlStateManager.clear(16640);
|
GlStateManager.func_179086_m(16640);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ try
|
+ try
|
||||||
+ {
|
+ {
|
||||||
+ if (!net.minecraftforge.fml.client.FMLClientHandler.instance().handleLoadingScreen(scaledresolution)) //FML Don't render while FML's pre-screen is rendering
|
+ if (!net.minecraftforge.fml.client.FMLClientHandler.instance().handleLoadingScreen(scaledresolution)) //FML Don't render while FML's pre-screen is rendering
|
||||||
+ {
|
+ {
|
||||||
Tessellator tessellator = Tessellator.getInstance();
|
Tessellator tessellator = Tessellator.func_178181_a();
|
||||||
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
WorldRenderer worldrenderer = tessellator.func_178180_c();
|
||||||
this.mc.getTextureManager().bindTexture(Gui.optionsBackground);
|
this.field_73725_b.func_110434_K().func_110577_a(Gui.field_110325_k);
|
||||||
@@ -174,6 +178,12 @@
|
@@ -174,6 +178,12 @@
|
||||||
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
|
GlStateManager.func_179120_a(770, 771, 1, 0);
|
||||||
this.mc.fontRendererObj.drawStringWithShadow(this.currentlyDisplayedText, (float)((k - this.mc.fontRendererObj.getStringWidth(this.currentlyDisplayedText)) / 2), (float)(l / 2 - 4 - 16), 16777215);
|
this.field_73725_b.field_71466_p.func_175063_a(this.field_73726_c, (float)((k - this.field_73725_b.field_71466_p.func_78256_a(this.field_73726_c)) / 2), (float)(l / 2 - 4 - 16), 16777215);
|
||||||
this.mc.fontRendererObj.drawStringWithShadow(this.message, (float)((k - this.mc.fontRendererObj.getStringWidth(this.message)) / 2), (float)(l / 2 - 4 + 8), 16777215);
|
this.field_73725_b.field_71466_p.func_175063_a(this.field_73727_a, (float)((k - this.field_73725_b.field_71466_p.func_78256_a(this.field_73727_a)) / 2), (float)(l / 2 - 4 + 8), 16777215);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ catch (java.io.IOException e)
|
+ catch (java.io.IOException e)
|
||||||
+ {
|
+ {
|
||||||
+ com.google.common.base.Throwables.propagate(e);
|
+ com.google.common.base.Throwables.propagate(e);
|
||||||
+ } //FML End
|
+ } //FML End
|
||||||
this.framebuffer.unbindFramebuffer();
|
this.field_146588_g.func_147609_e();
|
||||||
|
|
||||||
if (OpenGlHelper.isFramebufferEnabled())
|
if (OpenGlHelper.func_148822_b())
|
||||||
|
|
|
@ -1,181 +1,181 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/client/Minecraft.java
|
--- ../src-base/minecraft/net/minecraft/client/Minecraft.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/Minecraft.java
|
+++ ../src-work/minecraft/net/minecraft/client/Minecraft.java
|
||||||
@@ -301,7 +301,6 @@
|
@@ -301,7 +301,6 @@
|
||||||
this.sessionService = (new YggdrasilAuthenticationService(gameConfig.userInfo.proxy, UUID.randomUUID().toString())).createMinecraftSessionService();
|
this.field_152355_az = (new YggdrasilAuthenticationService(p_i45547_1_.field_178745_a.field_178751_c, UUID.randomUUID().toString())).createMinecraftSessionService();
|
||||||
this.session = gameConfig.userInfo.session;
|
this.field_71449_j = p_i45547_1_.field_178745_a.field_178752_a;
|
||||||
logger.info("Setting user: " + this.session.getUsername());
|
field_147123_G.info("Setting user: " + this.field_71449_j.func_111285_a());
|
||||||
- logger.info("(Session ID is " + this.session.getSessionID() + ")");
|
- field_147123_G.info("(Session ID is " + this.field_71449_j.func_111286_b() + ")");
|
||||||
this.isDemo = gameConfig.gameInfo.isDemo;
|
this.field_71459_aj = p_i45547_1_.field_178741_d.field_178756_a;
|
||||||
this.displayWidth = gameConfig.displayInfo.width > 0 ? gameConfig.displayInfo.width : 1;
|
this.field_71443_c = p_i45547_1_.field_178743_b.field_178764_a > 0 ? p_i45547_1_.field_178743_b.field_178764_a : 1;
|
||||||
this.displayHeight = gameConfig.displayInfo.height > 0 ? gameConfig.displayInfo.height : 1;
|
this.field_71440_d = p_i45547_1_.field_178743_b.field_178762_b > 0 ? p_i45547_1_.field_178743_b.field_178762_b : 1;
|
||||||
@@ -415,10 +414,10 @@
|
@@ -415,10 +414,10 @@
|
||||||
this.mcResourceManager = new SimpleReloadableResourceManager(this.metadataSerializer_);
|
this.field_110451_am = new SimpleReloadableResourceManager(this.field_110452_an);
|
||||||
this.mcLanguageManager = new LanguageManager(this.metadataSerializer_, this.gameSettings.language);
|
this.field_135017_as = new LanguageManager(this.field_110452_an, this.field_71474_y.field_74363_ab);
|
||||||
this.mcResourceManager.registerReloadListener(this.mcLanguageManager);
|
this.field_110451_am.func_110542_a(this.field_135017_as);
|
||||||
- this.refreshResources();
|
- this.func_110436_a();
|
||||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().beginMinecraftLoading(this, this.defaultResourcePacks, this.mcResourceManager);
|
+ net.minecraftforge.fml.client.FMLClientHandler.instance().beginMinecraftLoading(this, this.field_110449_ao, this.field_110451_am);
|
||||||
this.renderEngine = new TextureManager(this.mcResourceManager);
|
this.field_71446_o = new TextureManager(this.field_110451_am);
|
||||||
this.mcResourceManager.registerReloadListener(this.renderEngine);
|
this.field_110451_am.func_110542_a(this.field_71446_o);
|
||||||
- this.drawSplashScreen(this.renderEngine);
|
- this.func_180510_a(this.field_71446_o);
|
||||||
+ net.minecraftforge.fml.client.SplashProgress.drawVanillaScreen(this.renderEngine);
|
+ net.minecraftforge.fml.client.SplashProgress.drawVanillaScreen(this.field_71446_o);
|
||||||
this.initStream();
|
this.func_175595_al();
|
||||||
this.skinManager = new SkinManager(this.renderEngine, new File(this.fileAssets, "skins"), this.sessionService);
|
this.field_152350_aA = new SkinManager(this.field_71446_o, new File(this.field_110446_Y, "skins"), this.field_152355_az);
|
||||||
this.saveLoader = new AnvilSaveConverter(new File(this.mcDataDir, "saves"));
|
this.field_71469_aa = new AnvilSaveConverter(new File(this.field_71412_D, "saves"));
|
||||||
@@ -453,6 +452,8 @@
|
@@ -453,6 +452,8 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.mouseHelper = new MouseHelper();
|
this.field_71417_B = new MouseHelper();
|
||||||
+ net.minecraftforge.fml.common.ProgressManager.ProgressBar bar= net.minecraftforge.fml.common.ProgressManager.push("Rendering Setup", 5, true);
|
+ net.minecraftforge.fml.common.ProgressManager.ProgressBar bar= net.minecraftforge.fml.common.ProgressManager.push("Rendering Setup", 5, true);
|
||||||
+ bar.step("GL Setup");
|
+ bar.step("GL Setup");
|
||||||
this.checkGLError("Pre startup");
|
this.func_71361_d("Pre startup");
|
||||||
GlStateManager.enableTexture2D();
|
GlStateManager.func_179098_w();
|
||||||
GlStateManager.shadeModel(7425);
|
GlStateManager.func_179103_j(7425);
|
||||||
@@ -466,17 +467,21 @@
|
@@ -466,17 +467,21 @@
|
||||||
GlStateManager.loadIdentity();
|
GlStateManager.func_179096_D();
|
||||||
GlStateManager.matrixMode(5888);
|
GlStateManager.func_179128_n(5888);
|
||||||
this.checkGLError("Startup");
|
this.func_71361_d("Startup");
|
||||||
- this.textureMapBlocks = new TextureMap("textures");
|
- this.field_147128_au = new TextureMap("textures");
|
||||||
+ bar.step("Loading Texture Map");
|
+ bar.step("Loading Texture Map");
|
||||||
+ this.textureMapBlocks = new TextureMap("textures",true);
|
+ this.field_147128_au = new TextureMap("textures",true);
|
||||||
this.textureMapBlocks.setMipmapLevels(this.gameSettings.mipmapLevels);
|
this.field_147128_au.func_147633_a(this.field_71474_y.field_151442_I);
|
||||||
this.renderEngine.loadTickableTexture(TextureMap.locationBlocksTexture, this.textureMapBlocks);
|
this.field_71446_o.func_110580_a(TextureMap.field_110575_b, this.field_147128_au);
|
||||||
this.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
this.field_71446_o.func_110577_a(TextureMap.field_110575_b);
|
||||||
this.textureMapBlocks.setBlurMipmapDirect(false, this.gameSettings.mipmapLevels > 0);
|
this.field_147128_au.func_174937_a(false, this.field_71474_y.field_151442_I > 0);
|
||||||
+ bar.step("Loading Model Manager");
|
+ bar.step("Loading Model Manager");
|
||||||
this.modelManager = new ModelManager(this.textureMapBlocks);
|
this.field_175617_aL = new ModelManager(this.field_147128_au);
|
||||||
this.mcResourceManager.registerReloadListener(this.modelManager);
|
this.field_110451_am.func_110542_a(this.field_175617_aL);
|
||||||
+ bar.step("Loading Item Renderer");
|
+ bar.step("Loading Item Renderer");
|
||||||
this.renderItem = new RenderItem(this.renderEngine, this.modelManager);
|
this.field_175621_X = new RenderItem(this.field_71446_o, this.field_175617_aL);
|
||||||
this.renderManager = new RenderManager(this.renderEngine, this.renderItem);
|
this.field_175616_W = new RenderManager(this.field_71446_o, this.field_175621_X);
|
||||||
this.itemRenderer = new ItemRenderer(this);
|
this.field_175620_Y = new ItemRenderer(this);
|
||||||
this.mcResourceManager.registerReloadListener(this.renderItem);
|
this.field_110451_am.func_110542_a(this.field_175621_X);
|
||||||
+ bar.step("Loading Entity Renderer");
|
+ bar.step("Loading Entity Renderer");
|
||||||
this.entityRenderer = new EntityRenderer(this, this.mcResourceManager);
|
this.field_71460_t = new EntityRenderer(this, this.field_110451_am);
|
||||||
this.mcResourceManager.registerReloadListener(this.entityRenderer);
|
this.field_110451_am.func_110542_a(this.field_71460_t);
|
||||||
this.blockRenderDispatcher = new BlockRendererDispatcher(this.modelManager.getBlockModelShapes(), this.gameSettings);
|
this.field_175618_aM = new BlockRendererDispatcher(this.field_175617_aL.func_174954_c(), this.field_71474_y);
|
||||||
@@ -486,22 +491,25 @@
|
@@ -486,22 +491,25 @@
|
||||||
this.guiAchievement = new GuiAchievement(this);
|
this.field_71458_u = new GuiAchievement(this);
|
||||||
GlStateManager.viewport(0, 0, this.displayWidth, this.displayHeight);
|
GlStateManager.func_179083_b(0, 0, this.field_71443_c, this.field_71440_d);
|
||||||
this.effectRenderer = new EffectRenderer(this.theWorld, this.renderEngine);
|
this.field_71452_i = new EffectRenderer(this.field_71441_e, this.field_71446_o);
|
||||||
+ net.minecraftforge.fml.common.ProgressManager.pop(bar);
|
+ net.minecraftforge.fml.common.ProgressManager.pop(bar);
|
||||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().finishMinecraftLoading();
|
+ net.minecraftforge.fml.client.FMLClientHandler.instance().finishMinecraftLoading();
|
||||||
this.checkGLError("Post startup");
|
this.func_71361_d("Post startup");
|
||||||
- this.ingameGUI = new GuiIngame(this);
|
- this.field_71456_v = new GuiIngame(this);
|
||||||
+ this.ingameGUI = new net.minecraftforge.client.GuiIngameForge(this);
|
+ this.field_71456_v = new net.minecraftforge.client.GuiIngameForge(this);
|
||||||
|
|
||||||
if (this.serverName != null)
|
if (this.field_71475_ae != null)
|
||||||
{
|
{
|
||||||
- this.displayGuiScreen(new GuiConnecting(new GuiMainMenu(), this, this.serverName, this.serverPort));
|
- this.func_147108_a(new GuiConnecting(new GuiMainMenu(), this, this.field_71475_ae, this.field_71477_af));
|
||||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().connectToServerAtStartup(this.serverName, this.serverPort);
|
+ net.minecraftforge.fml.client.FMLClientHandler.instance().connectToServerAtStartup(this.field_71475_ae, this.field_71477_af);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.displayGuiScreen(new GuiMainMenu());
|
this.func_147108_a(new GuiMainMenu());
|
||||||
}
|
}
|
||||||
|
|
||||||
- this.renderEngine.deleteTexture(this.mojangLogo);
|
- this.field_71446_o.func_147645_c(this.field_152354_ay);
|
||||||
+ net.minecraftforge.fml.client.SplashProgress.clearVanillaResources(renderEngine, mojangLogo);
|
+ net.minecraftforge.fml.client.SplashProgress.clearVanillaResources(field_71446_o, field_152354_ay);
|
||||||
this.mojangLogo = null;
|
this.field_152354_ay = null;
|
||||||
this.loadingScreen = new LoadingScreenRenderer(this);
|
this.field_71461_s = new LoadingScreenRenderer(this);
|
||||||
|
|
||||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().onInitializationComplete();
|
+ net.minecraftforge.fml.client.FMLClientHandler.instance().onInitializationComplete();
|
||||||
if (this.gameSettings.fullScreen && !this.fullscreen)
|
if (this.field_71474_y.field_74353_u && !this.field_71431_Q)
|
||||||
{
|
{
|
||||||
this.toggleFullscreen();
|
this.func_71352_k();
|
||||||
@@ -681,21 +689,23 @@
|
@@ -681,21 +689,23 @@
|
||||||
File file2 = new File(file1, "crash-" + (new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss")).format(new Date()) + "-client.txt");
|
File file2 = new File(file1, "crash-" + (new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss")).format(new Date()) + "-client.txt");
|
||||||
Bootstrap.printToSYSOUT(crashReportIn.getCompleteReport());
|
Bootstrap.func_179870_a(p_71377_1_.func_71502_e());
|
||||||
|
|
||||||
+ int retVal;
|
+ int retVal;
|
||||||
if (crashReportIn.getFile() != null)
|
if (p_71377_1_.func_71497_f() != null)
|
||||||
{
|
{
|
||||||
Bootstrap.printToSYSOUT("#@!@# Game crashed! Crash report saved to: #@!@# " + crashReportIn.getFile());
|
Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + p_71377_1_.func_71497_f());
|
||||||
- System.exit(-1);
|
- System.exit(-1);
|
||||||
+ retVal = -1;
|
+ retVal = -1;
|
||||||
}
|
}
|
||||||
else if (crashReportIn.saveToFile(file2))
|
else if (p_71377_1_.func_147149_a(file2))
|
||||||
{
|
{
|
||||||
Bootstrap.printToSYSOUT("#@!@# Game crashed! Crash report saved to: #@!@# " + file2.getAbsolutePath());
|
Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + file2.getAbsolutePath());
|
||||||
- System.exit(-1);
|
- System.exit(-1);
|
||||||
+ retVal = -1;
|
+ retVal = -1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Bootstrap.printToSYSOUT("#@?@# Game crashed! Crash report could not be saved. #@?@#");
|
Bootstrap.func_179870_a("#@?@# Game crashed! Crash report could not be saved. #@?@#");
|
||||||
- System.exit(-2);
|
- System.exit(-2);
|
||||||
+ retVal = -2;
|
+ retVal = -2;
|
||||||
}
|
}
|
||||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().handleExit(retVal);
|
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().handleExit(retVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isUnicode()
|
public boolean func_152349_b()
|
||||||
@@ -883,11 +893,6 @@
|
@@ -883,11 +893,6 @@
|
||||||
|
|
||||||
public void displayGuiScreen(GuiScreen guiScreenIn)
|
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 (guiScreenIn == null && this.theWorld == null)
|
if (p_147108_1_ == null && this.field_71441_e == null)
|
||||||
{
|
{
|
||||||
guiScreenIn = new GuiMainMenu();
|
p_147108_1_ = new GuiMainMenu();
|
||||||
@@ -897,6 +902,17 @@
|
@@ -897,6 +902,17 @@
|
||||||
guiScreenIn = new GuiGameOver();
|
p_147108_1_ = new GuiGameOver();
|
||||||
}
|
}
|
||||||
|
|
||||||
+ GuiScreen old = this.currentScreen;
|
+ GuiScreen old = this.field_71462_r;
|
||||||
+ net.minecraftforge.client.event.GuiOpenEvent event = new net.minecraftforge.client.event.GuiOpenEvent(guiScreenIn);
|
+ net.minecraftforge.client.event.GuiOpenEvent event = new net.minecraftforge.client.event.GuiOpenEvent(p_147108_1_);
|
||||||
+
|
+
|
||||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) return;
|
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) return;
|
||||||
+
|
+
|
||||||
+ guiScreenIn = event.gui;
|
+ p_147108_1_ = event.gui;
|
||||||
+ if (old != null && guiScreenIn != old)
|
+ if (old != null && p_147108_1_ != old)
|
||||||
+ {
|
+ {
|
||||||
+ old.onGuiClosed();
|
+ old.func_146281_b();
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
if (guiScreenIn instanceof GuiMainMenu)
|
if (p_147108_1_ instanceof GuiMainMenu)
|
||||||
{
|
{
|
||||||
this.gameSettings.showDebugInfo = false;
|
this.field_71474_y.field_74330_P = false;
|
||||||
@@ -1030,9 +1046,11 @@
|
@@ -1030,9 +1046,11 @@
|
||||||
|
|
||||||
if (!this.skipRenderWorld)
|
if (!this.field_71454_w)
|
||||||
{
|
{
|
||||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onRenderTickStart(this.timer.renderPartialTicks);
|
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onRenderTickStart(this.field_71428_T.field_74281_c);
|
||||||
this.mcProfiler.endStartSection("gameRenderer");
|
this.field_71424_I.func_76318_c("gameRenderer");
|
||||||
this.entityRenderer.func_181560_a(this.timer.renderPartialTicks, i);
|
this.field_71460_t.func_181560_a(this.field_71428_T.field_74281_c, i);
|
||||||
this.mcProfiler.endSection();
|
this.field_71424_I.func_76319_b();
|
||||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onRenderTickEnd(this.timer.renderPartialTicks);
|
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onRenderTickEnd(this.field_71428_T.field_74281_c);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mcProfiler.endSection();
|
this.field_71424_I.func_76319_b();
|
||||||
@@ -1377,7 +1395,7 @@
|
@@ -1377,7 +1395,7 @@
|
||||||
|
|
||||||
if (this.theWorld.getBlockState(blockpos).getBlock().getMaterial() != Material.air && this.playerController.func_180512_c(blockpos, this.objectMouseOver.sideHit))
|
if (this.field_71441_e.func_180495_p(blockpos).func_177230_c().func_149688_o() != Material.field_151579_a && this.field_71442_b.func_180512_c(blockpos, this.field_71476_x.field_178784_b))
|
||||||
{
|
{
|
||||||
- this.effectRenderer.addBlockHitEffects(blockpos, this.objectMouseOver.sideHit);
|
- this.field_71452_i.func_180532_a(blockpos, this.field_71476_x.field_178784_b);
|
||||||
+ this.effectRenderer.addBlockHitEffects(blockpos, this.objectMouseOver);
|
+ this.field_71452_i.addBlockHitEffects(blockpos, this.field_71476_x);
|
||||||
this.thePlayer.swingItem();
|
this.field_71439_g.func_71038_i();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1463,15 +1481,19 @@
|
@@ -1463,15 +1481,19 @@
|
||||||
case BLOCK:
|
case BLOCK:
|
||||||
BlockPos blockpos = this.objectMouseOver.getBlockPos();
|
BlockPos blockpos = this.field_71476_x.func_178782_a();
|
||||||
|
|
||||||
- if (this.theWorld.getBlockState(blockpos).getBlock().getMaterial() != Material.air)
|
- if (this.field_71441_e.func_180495_p(blockpos).func_177230_c().func_149688_o() != Material.field_151579_a)
|
||||||
+ if (!this.theWorld.isAirBlock(blockpos))
|
+ if (!this.field_71441_e.func_175623_d(blockpos))
|
||||||
{
|
{
|
||||||
int i = itemstack != null ? itemstack.stackSize : 0;
|
int i = itemstack != null ? itemstack.field_77994_a : 0;
|
||||||
|
|
||||||
+
|
+
|
||||||
+ boolean result = !net.minecraftforge.event.ForgeEventFactory.onPlayerInteract(thePlayer, net.minecraftforge.event.entity.player.PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK, this.theWorld, blockpos, this.objectMouseOver.sideHit).isCanceled();
|
+ boolean result = !net.minecraftforge.event.ForgeEventFactory.onPlayerInteract(field_71439_g, net.minecraftforge.event.entity.player.PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK, this.field_71441_e, blockpos, this.field_71476_x.field_178784_b).isCanceled();
|
||||||
+ if (result) { //Forge: Kept separate to simplify patch
|
+ if (result) { //Forge: Kept separate to simplify patch
|
||||||
if (this.playerController.func_178890_a(this.thePlayer, this.theWorld, itemstack, blockpos, this.objectMouseOver.sideHit, this.objectMouseOver.hitVec))
|
if (this.field_71442_b.func_178890_a(this.field_71439_g, this.field_71441_e, itemstack, blockpos, this.field_71476_x.field_178784_b, this.field_71476_x.field_72307_f))
|
||||||
{
|
{
|
||||||
flag = false;
|
flag = false;
|
||||||
this.thePlayer.swingItem();
|
this.field_71439_g.func_71038_i();
|
||||||
}
|
}
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
|
@ -183,23 +183,23 @@
|
||||||
{
|
{
|
||||||
@@ -1494,7 +1516,8 @@
|
@@ -1494,7 +1516,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))
|
- if (itemstack1 != null && this.field_71442_b.func_78769_a(this.field_71439_g, this.field_71441_e, itemstack1))
|
||||||
+ boolean result = !net.minecraftforge.event.ForgeEventFactory.onPlayerInteract(thePlayer, net.minecraftforge.event.entity.player.PlayerInteractEvent.Action.RIGHT_CLICK_AIR, theWorld, null, null).isCanceled();
|
+ boolean result = !net.minecraftforge.event.ForgeEventFactory.onPlayerInteract(field_71439_g, net.minecraftforge.event.entity.player.PlayerInteractEvent.Action.RIGHT_CLICK_AIR, field_71441_e, null, null).isCanceled();
|
||||||
+ if (result && itemstack1 != null && this.playerController.sendUseItem(this.thePlayer, this.theWorld, itemstack1))
|
+ 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();
|
||||||
}
|
}
|
||||||
@@ -1598,6 +1621,8 @@
|
@@ -1598,6 +1621,8 @@
|
||||||
--this.rightClickDelayTimer;
|
--this.field_71467_ac;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPreClientTick();
|
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPreClientTick();
|
||||||
+
|
+
|
||||||
this.mcProfiler.startSection("gui");
|
this.field_71424_I.func_76320_a("gui");
|
||||||
|
|
||||||
if (!this.isGamePaused)
|
if (!this.field_71445_n)
|
||||||
@@ -1690,6 +1715,8 @@
|
@@ -1690,6 +1715,8 @@
|
||||||
|
|
||||||
while (Mouse.next())
|
while (Mouse.next())
|
||||||
|
@ -207,16 +207,16 @@
|
||||||
+ if (net.minecraftforge.client.ForgeHooksClient.postMouseEvent()) continue;
|
+ if (net.minecraftforge.client.ForgeHooksClient.postMouseEvent()) continue;
|
||||||
+
|
+
|
||||||
int i = Mouse.getEventButton();
|
int i = Mouse.getEventButton();
|
||||||
KeyBinding.setKeyBindState(i - 100, Mouse.getEventButtonState());
|
KeyBinding.func_74510_a(i - 100, Mouse.getEventButtonState());
|
||||||
|
|
||||||
@@ -1745,6 +1772,7 @@
|
@@ -1745,6 +1772,7 @@
|
||||||
this.currentScreen.handleMouseInput();
|
this.field_71462_r.func_146274_d();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().fireMouseInput();
|
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().fireMouseInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.leftClickCounter > 0)
|
if (this.field_71429_W > 0)
|
||||||
@@ -1923,6 +1951,7 @@
|
@@ -1923,6 +1951,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -226,69 +226,69 @@
|
||||||
|
|
||||||
for (int l = 0; l < 9; ++l)
|
for (int l = 0; l < 9; ++l)
|
||||||
@@ -2119,12 +2148,15 @@
|
@@ -2119,12 +2148,15 @@
|
||||||
this.myNetworkManager.processReceivedPackets();
|
this.field_71453_ak.func_74428_b();
|
||||||
}
|
}
|
||||||
|
|
||||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPostClientTick();
|
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPostClientTick();
|
||||||
+
|
+
|
||||||
this.mcProfiler.endSection();
|
this.field_71424_I.func_76319_b();
|
||||||
this.systemTime = getSystemTime();
|
this.field_71423_H = func_71386_F();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void launchIntegratedServer(String folderName, String worldName, WorldSettings worldSettingsIn)
|
public void func_71371_a(String p_71371_1_, String p_71371_2_, WorldSettings p_71371_3_)
|
||||||
{
|
{
|
||||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().startIntegratedServer(folderName, worldName, worldSettingsIn);
|
+ net.minecraftforge.fml.client.FMLClientHandler.instance().startIntegratedServer(p_71371_1_, p_71371_2_, p_71371_3_);
|
||||||
this.loadWorld((WorldClient)null);
|
this.func_71403_a((WorldClient)null);
|
||||||
System.gc();
|
System.gc();
|
||||||
ISaveHandler isavehandler = this.saveLoader.getSaveLoader(folderName, false);
|
ISaveHandler isavehandler = this.field_71469_aa.func_75804_a(p_71371_1_, false);
|
||||||
@@ -2160,6 +2192,12 @@
|
@@ -2160,6 +2192,12 @@
|
||||||
|
|
||||||
while (!this.theIntegratedServer.serverIsInRunLoop())
|
while (!this.field_71437_Z.func_71200_ad())
|
||||||
{
|
{
|
||||||
+ if (!net.minecraftforge.fml.common.StartupQuery.check())
|
+ if (!net.minecraftforge.fml.common.StartupQuery.check())
|
||||||
+ {
|
+ {
|
||||||
+ loadWorld(null);
|
+ func_71403_a(null);
|
||||||
+ displayGuiScreen(null);
|
+ func_147108_a(null);
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
String s = this.theIntegratedServer.getUserMessage();
|
String s = this.field_71437_Z.func_71195_b_();
|
||||||
|
|
||||||
if (s != null)
|
if (s != null)
|
||||||
@@ -2185,8 +2223,14 @@
|
@@ -2185,8 +2223,14 @@
|
||||||
SocketAddress socketaddress = this.theIntegratedServer.getNetworkSystem().addLocalEndpoint();
|
SocketAddress socketaddress = this.field_71437_Z.func_147137_ag().func_151270_a();
|
||||||
NetworkManager networkmanager = NetworkManager.provideLocalClient(socketaddress);
|
NetworkManager networkmanager = NetworkManager.func_150722_a(socketaddress);
|
||||||
networkmanager.setNetHandler(new NetHandlerLoginClient(networkmanager, this, (GuiScreen)null));
|
networkmanager.func_150719_a(new NetHandlerLoginClient(networkmanager, this, (GuiScreen)null));
|
||||||
- networkmanager.sendPacket(new C00Handshake(47, socketaddress.toString(), 0, EnumConnectionState.LOGIN));
|
- networkmanager.func_179290_a(new C00Handshake(47, socketaddress.toString(), 0, EnumConnectionState.LOGIN));
|
||||||
- networkmanager.sendPacket(new C00PacketLoginStart(this.getSession().getProfile()));
|
- networkmanager.func_179290_a(new C00PacketLoginStart(this.func_110432_I().func_148256_e()));
|
||||||
+ networkmanager.sendPacket(new C00Handshake(47, socketaddress.toString(), 0, EnumConnectionState.LOGIN, true));
|
+ networkmanager.func_179290_a(new C00Handshake(47, socketaddress.toString(), 0, EnumConnectionState.LOGIN, true));
|
||||||
+ com.mojang.authlib.GameProfile gameProfile = this.getSession().getProfile();
|
+ com.mojang.authlib.GameProfile gameProfile = this.func_110432_I().func_148256_e();
|
||||||
+ if (!this.getSession().hasCachedProperties())
|
+ if (!this.func_110432_I().hasCachedProperties())
|
||||||
+ {
|
+ {
|
||||||
+ gameProfile = sessionService.fillProfileProperties(gameProfile, true); //Forge: Fill profile properties upon game load. Fixes MC-52974.
|
+ gameProfile = field_152355_az.fillProfileProperties(gameProfile, true); //Forge: Fill profile properties upon game load. Fixes MC-52974.
|
||||||
+ this.getSession().setProperties(gameProfile.getProperties());
|
+ this.func_110432_I().setProperties(gameProfile.getProperties());
|
||||||
+ }
|
+ }
|
||||||
+ networkmanager.sendPacket(new C00PacketLoginStart(gameProfile));
|
+ networkmanager.func_179290_a(new C00PacketLoginStart(gameProfile));
|
||||||
this.myNetworkManager = networkmanager;
|
this.field_71453_ak = networkmanager;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2197,6 +2241,8 @@
|
@@ -2197,6 +2241,8 @@
|
||||||
|
|
||||||
public void loadWorld(WorldClient worldClientIn, String loadingMessage)
|
public void func_71353_a(WorldClient p_71353_1_, String p_71353_2_)
|
||||||
{
|
{
|
||||||
+ if (theWorld != null) net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Unload(theWorld));
|
+ if (field_71441_e != null) net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Unload(field_71441_e));
|
||||||
+
|
+
|
||||||
if (worldClientIn == null)
|
if (p_71353_1_ == null)
|
||||||
{
|
{
|
||||||
NetHandlerPlayClient nethandlerplayclient = this.getNetHandler();
|
NetHandlerPlayClient nethandlerplayclient = this.func_147114_u();
|
||||||
@@ -2210,6 +2256,18 @@
|
@@ -2210,6 +2256,18 @@
|
||||||
{
|
{
|
||||||
this.theIntegratedServer.initiateShutdown();
|
this.field_71437_Z.func_71263_m();
|
||||||
this.theIntegratedServer.setStaticInstance();
|
this.field_71437_Z.func_175592_a();
|
||||||
+ if (loadingScreen != null)
|
+ if (field_71461_s != null)
|
||||||
+ {
|
+ {
|
||||||
+ this.loadingScreen.displayLoadingString(I18n.format("forge.client.shutdown.internal"));
|
+ this.field_71461_s.func_73719_c(I18n.func_135052_a("forge.client.shutdown.internal"));
|
||||||
+ }
|
+ }
|
||||||
+ while (!theIntegratedServer.isServerStopped())
|
+ while (!field_71437_Z.func_71241_aa())
|
||||||
+ {
|
+ {
|
||||||
+ try
|
+ try
|
||||||
+ {
|
+ {
|
||||||
|
@ -298,147 +298,147 @@
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
||||||
this.theIntegratedServer = null;
|
this.field_71437_Z = null;
|
||||||
@@ -2232,6 +2290,7 @@
|
@@ -2232,6 +2290,7 @@
|
||||||
this.ingameGUI.func_181029_i();
|
this.field_71456_v.func_181029_i();
|
||||||
this.setServerData((ServerData)null);
|
this.func_71351_a((ServerData)null);
|
||||||
this.integratedServerIsRunning = false;
|
this.field_71455_al = false;
|
||||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().handleClientWorldClosing(this.theWorld);
|
+ net.minecraftforge.fml.client.FMLClientHandler.instance().handleClientWorldClosing(this.field_71441_e);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mcSoundHandler.stopSounds();
|
this.field_147127_av.func_147690_c();
|
||||||
@@ -2336,126 +2395,10 @@
|
@@ -2336,126 +2395,10 @@
|
||||||
if (this.objectMouseOver != null)
|
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;
|
- int i = 0;
|
||||||
- boolean flag1 = false;
|
- boolean flag1 = false;
|
||||||
- TileEntity tileentity = null;
|
- TileEntity tileentity = null;
|
||||||
- Item item;
|
- Item item;
|
||||||
-
|
-
|
||||||
- if (this.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
- if (this.field_71476_x.field_72313_a == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||||
- {
|
- {
|
||||||
- BlockPos blockpos = this.objectMouseOver.getBlockPos();
|
- BlockPos blockpos = this.field_71476_x.func_178782_a();
|
||||||
- Block block = this.theWorld.getBlockState(blockpos).getBlock();
|
- Block block = this.field_71441_e.func_180495_p(blockpos).func_177230_c();
|
||||||
-
|
-
|
||||||
- if (block.getMaterial() == Material.air)
|
- if (block.func_149688_o() == Material.field_151579_a)
|
||||||
- {
|
- {
|
||||||
- return;
|
- return;
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
- item = block.getItem(this.theWorld, blockpos);
|
- item = block.func_180665_b(this.field_71441_e, blockpos);
|
||||||
-
|
-
|
||||||
- if (item == null)
|
- if (item == null)
|
||||||
- {
|
- {
|
||||||
- return;
|
- return;
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
- if (flag && GuiScreen.isCtrlKeyDown())
|
- if (flag && GuiScreen.func_146271_m())
|
||||||
- {
|
- {
|
||||||
- tileentity = this.theWorld.getTileEntity(blockpos);
|
- tileentity = this.field_71441_e.func_175625_s(blockpos);
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
- Block block1 = item instanceof ItemBlock && !block.isFlowerPot() ? Block.getBlockFromItem(item) : block;
|
- Block block1 = item instanceof ItemBlock && !block.func_149648_K() ? Block.func_149634_a(item) : block;
|
||||||
- i = block1.getDamageValue(this.theWorld, blockpos);
|
- i = block1.func_176222_j(this.field_71441_e, blockpos);
|
||||||
- flag1 = item.getHasSubtypes();
|
- flag1 = item.func_77614_k();
|
||||||
- }
|
- }
|
||||||
- else
|
- 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;
|
- 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;
|
- EntityItemFrame entityitemframe = (EntityItemFrame)this.field_71476_x.field_72308_g;
|
||||||
- ItemStack itemstack = entityitemframe.getDisplayedItem();
|
- ItemStack itemstack = entityitemframe.func_82335_i();
|
||||||
-
|
-
|
||||||
- if (itemstack == null)
|
- if (itemstack == null)
|
||||||
- {
|
- {
|
||||||
- item = Items.item_frame;
|
- item = Items.field_151160_bD;
|
||||||
- }
|
- }
|
||||||
- else
|
- else
|
||||||
- {
|
- {
|
||||||
- item = itemstack.getItem();
|
- item = itemstack.func_77973_b();
|
||||||
- i = itemstack.getMetadata();
|
- i = itemstack.func_77960_j();
|
||||||
- flag1 = true;
|
- 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;
|
||||||
-
|
-
|
||||||
- switch (entityminecart.getMinecartType())
|
- switch (entityminecart.func_180456_s())
|
||||||
- {
|
- {
|
||||||
- case FURNACE:
|
- case FURNACE:
|
||||||
- item = Items.furnace_minecart;
|
- item = Items.field_151109_aJ;
|
||||||
- break;
|
- break;
|
||||||
- case CHEST:
|
- case CHEST:
|
||||||
- item = Items.chest_minecart;
|
- item = Items.field_151108_aI;
|
||||||
- break;
|
- break;
|
||||||
- case TNT:
|
- case TNT:
|
||||||
- item = Items.tnt_minecart;
|
- item = Items.field_151142_bV;
|
||||||
- break;
|
- break;
|
||||||
- case HOPPER:
|
- case HOPPER:
|
||||||
- item = Items.hopper_minecart;
|
- item = Items.field_151140_bW;
|
||||||
- break;
|
- break;
|
||||||
- case COMMAND_BLOCK:
|
- case COMMAND_BLOCK:
|
||||||
- item = Items.command_block_minecart;
|
- item = Items.field_151095_cc;
|
||||||
- break;
|
- break;
|
||||||
- default:
|
- default:
|
||||||
- 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 if (this.objectMouseOver.entityHit instanceof EntityArmorStand)
|
- else if (this.field_71476_x.field_72308_g instanceof EntityArmorStand)
|
||||||
- {
|
- {
|
||||||
- item = Items.armor_stand;
|
- item = Items.field_179565_cj;
|
||||||
- }
|
- }
|
||||||
- else
|
- else
|
||||||
- {
|
- {
|
||||||
- item = Items.spawn_egg;
|
- item = Items.field_151063_bx;
|
||||||
- i = EntityList.getEntityID(this.objectMouseOver.entityHit);
|
- i = EntityList.func_75619_a(this.field_71476_x.field_72308_g);
|
||||||
- flag1 = true;
|
- flag1 = true;
|
||||||
-
|
-
|
||||||
- if (!EntityList.entityEggs.containsKey(Integer.valueOf(i)))
|
- if (!EntityList.field_75627_a.containsKey(Integer.valueOf(i)))
|
||||||
- {
|
- {
|
||||||
- return;
|
- return;
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
InventoryPlayer inventoryplayer = this.thePlayer.inventory;
|
InventoryPlayer inventoryplayer = this.field_71439_g.field_71071_by;
|
||||||
|
|
||||||
- if (tileentity == null)
|
- if (tileentity == null)
|
||||||
- {
|
- {
|
||||||
- inventoryplayer.setCurrentItem(item, i, flag1, flag);
|
- inventoryplayer.func_146030_a(item, i, flag1, flag);
|
||||||
- }
|
- }
|
||||||
- else
|
- else
|
||||||
- {
|
- {
|
||||||
- ItemStack itemstack1 = this.func_181036_a(item, i, tileentity);
|
- ItemStack itemstack1 = this.func_181036_a(item, i, tileentity);
|
||||||
- inventoryplayer.setInventorySlotContents(inventoryplayer.currentItem, itemstack1);
|
- inventoryplayer.func_70299_a(inventoryplayer.field_70461_c, itemstack1);
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
+ if (!net.minecraftforge.common.ForgeHooks.onPickBlock(this.objectMouseOver, this.thePlayer, this.theWorld)) return;
|
+ if (!net.minecraftforge.common.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
|
+ // We delete this code wholly instead of commenting it out, to make sure we detect changes in it between MC versions
|
||||||
if (flag)
|
if (flag)
|
||||||
{
|
{
|
||||||
int j = this.thePlayer.inventoryContainer.inventorySlots.size() - 9 + inventoryplayer.currentItem;
|
int j = this.field_71439_g.field_71069_bz.field_75151_b.size() - 9 + inventoryplayer.field_70461_c;
|
||||||
@@ -2756,18 +2699,8 @@
|
@@ -2756,18 +2699,8 @@
|
||||||
|
|
||||||
public static int getGLMaximumTextureSize()
|
public static int func_71369_N()
|
||||||
{
|
{
|
||||||
- for (int i = 16384; i > 0; i >>= 1)
|
- for (int i = 16384; i > 0; i >>= 1)
|
||||||
- {
|
- {
|
||||||
|
@ -456,4 +456,16 @@
|
||||||
+ return net.minecraftforge.fml.client.SplashProgress.getMaxTextureSize();
|
+ return net.minecraftforge.fml.client.SplashProgress.getMaxTextureSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSnooperEnabled()
|
public boolean func_70002_Q()
|
||||||
|
@@ -2924,9 +2857,9 @@
|
||||||
|
{
|
||||||
|
this.func_147108_a(new GuiYesNo(new GuiYesNoCallback()
|
||||||
|
{
|
||||||
|
- public void func_73878_a(boolean p_73878_1_, int p_73878_2_)
|
||||||
|
+ public void func_73878_a(boolean result, int id)
|
||||||
|
{
|
||||||
|
- if (p_73878_1_)
|
||||||
|
+ if (result)
|
||||||
|
{
|
||||||
|
Minecraft.this.func_152346_Z().func_152930_t();
|
||||||
|
}
|
||||||
|
|
|
@ -10,32 +10,32 @@
|
||||||
{
|
{
|
||||||
@@ -80,6 +81,7 @@
|
@@ -80,6 +81,7 @@
|
||||||
{
|
{
|
||||||
this.unloadSoundSystem();
|
this.func_148613_b();
|
||||||
this.loadSoundSystem();
|
this.func_148608_i();
|
||||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.sound.SoundLoadEvent(this));
|
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.sound.SoundLoadEvent(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void loadSoundSystem()
|
private synchronized void func_148608_i()
|
||||||
@@ -316,6 +318,9 @@
|
@@ -316,6 +318,9 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
+ sound = net.minecraftforge.client.ForgeHooksClient.playSound(this, sound);
|
+ p_148611_1_ = net.minecraftforge.client.ForgeHooksClient.playSound(this, p_148611_1_);
|
||||||
+ if (sound == null) return;
|
+ if (p_148611_1_ == null) return;
|
||||||
+
|
+
|
||||||
SoundEventAccessorComposite soundeventaccessorcomposite = this.sndHandler.getSound(sound.getSoundLocation());
|
SoundEventAccessorComposite soundeventaccessorcomposite = this.field_148622_c.func_147680_a(p_148611_1_.func_147650_b());
|
||||||
|
|
||||||
if (soundeventaccessorcomposite == null)
|
if (soundeventaccessorcomposite == null)
|
||||||
@@ -357,10 +362,12 @@
|
@@ -357,10 +362,12 @@
|
||||||
if (soundpoolentry.isStreamingSound())
|
if (soundpoolentry.func_148648_d())
|
||||||
{
|
{
|
||||||
this.sndSystem.newStreamingSource(false, s, getURLForSoundResource(resourcelocation), resourcelocation.toString(), flag, sound.getXPosF(), sound.getYPosF(), sound.getZPosF(), sound.getAttenuationType().getTypeInt(), f1);
|
this.field_148620_e.newStreamingSource(false, s, func_148612_a(resourcelocation), resourcelocation.toString(), flag, p_148611_1_.func_147649_g(), p_148611_1_.func_147654_h(), p_148611_1_.func_147651_i(), p_148611_1_.func_147656_j().func_148586_a(), f1);
|
||||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.sound.PlayStreamingSourceEvent(this, sound, s));
|
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.sound.PlayStreamingSourceEvent(this, p_148611_1_, s));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.sndSystem.newSource(false, s, getURLForSoundResource(resourcelocation), resourcelocation.toString(), flag, sound.getXPosF(), sound.getYPosF(), sound.getZPosF(), sound.getAttenuationType().getTypeInt(), f1);
|
this.field_148620_e.newSource(false, s, func_148612_a(resourcelocation), resourcelocation.toString(), flag, p_148611_1_.func_147649_g(), p_148611_1_.func_147654_h(), p_148611_1_.func_147651_i(), p_148611_1_.func_147656_j().func_148586_a(), f1);
|
||||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.sound.PlaySoundSourceEvent(this, sound, s));
|
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.sound.PlaySoundSourceEvent(this, p_148611_1_, s));
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.debug(LOG_MARKER, "Playing sound {} for event {} as channel {}", new Object[] {soundpoolentry.getSoundPoolEntryLocation(), soundeventaccessorcomposite.getSoundEventLocation(), s});
|
field_148621_b.debug(field_148623_a, "Playing sound {} for event {} as channel {}", new Object[] {soundpoolentry.func_148652_a(), soundeventaccessorcomposite.func_148729_c(), s});
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/client/entity/EntityPlayerSP.java
|
--- ../src-base/minecraft/net/minecraft/client/entity/EntityPlayerSP.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/entity/EntityPlayerSP.java
|
+++ ../src-work/minecraft/net/minecraft/client/entity/EntityPlayerSP.java
|
||||||
@@ -345,6 +345,15 @@
|
@@ -345,6 +345,15 @@
|
||||||
this.mc.ingameGUI.getChatGUI().printChatMessage(chatComponent);
|
this.field_71159_c.field_71456_v.func_146158_b().func_146227_a(p_146105_1_);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ private boolean isHeadspaceFree(BlockPos pos, int height)
|
+ private boolean isHeadspaceFree(BlockPos pos, int height)
|
||||||
+ {
|
+ {
|
||||||
+ for (int y = 0; y < height; y++)
|
+ for (int y = 0; y < height; y++)
|
||||||
+ {
|
+ {
|
||||||
+ if (isOpenBlockSpace(pos.add(0, y, 0))) return false;
|
+ if (func_175162_d(pos.func_177982_a(0, y, 0))) return false;
|
||||||
+ }
|
+ }
|
||||||
+ return true;
|
+ return true;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
protected boolean pushOutOfBlocks(double x, double y, double z)
|
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)
|
||||||
@@ -357,30 +366,34 @@
|
@@ -357,30 +366,34 @@
|
||||||
double d0 = x - (double)blockpos.getX();
|
double d0 = p_145771_1_ - (double)blockpos.func_177958_n();
|
||||||
double d1 = z - (double)blockpos.getZ();
|
double d1 = p_145771_5_ - (double)blockpos.func_177952_p();
|
||||||
|
|
||||||
- if (!this.isOpenBlockSpace(blockpos))
|
- if (!this.func_175162_d(blockpos))
|
||||||
+ int entHeight = Math.max(Math.round(this.height), 1);
|
+ int entHeight = Math.max(Math.round(this.field_70131_O), 1);
|
||||||
+
|
+
|
||||||
+ boolean inTranslucentBlock = this.isHeadspaceFree(blockpos, entHeight);
|
+ boolean inTranslucentBlock = this.isHeadspaceFree(blockpos, entHeight);
|
||||||
+
|
+
|
||||||
|
@ -30,42 +30,42 @@
|
||||||
int i = -1;
|
int i = -1;
|
||||||
double d2 = 9999.0D;
|
double d2 = 9999.0D;
|
||||||
|
|
||||||
- if (this.isOpenBlockSpace(blockpos.west()) && d0 < d2)
|
- if (this.func_175162_d(blockpos.func_177976_e()) && d0 < d2)
|
||||||
+ if (!this.isHeadspaceFree(blockpos.west(), entHeight) && d0 < d2)
|
+ if (!this.isHeadspaceFree(blockpos.func_177976_e(), entHeight) && d0 < d2)
|
||||||
{
|
{
|
||||||
d2 = d0;
|
d2 = d0;
|
||||||
i = 0;
|
i = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
- if (this.isOpenBlockSpace(blockpos.east()) && 1.0D - d0 < d2)
|
- if (this.func_175162_d(blockpos.func_177974_f()) && 1.0D - d0 < d2)
|
||||||
+ if (!this.isHeadspaceFree(blockpos.east(), entHeight) && 1.0D - d0 < d2)
|
+ if (!this.isHeadspaceFree(blockpos.func_177974_f(), entHeight) && 1.0D - d0 < d2)
|
||||||
{
|
{
|
||||||
d2 = 1.0D - d0;
|
d2 = 1.0D - d0;
|
||||||
i = 1;
|
i = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
- if (this.isOpenBlockSpace(blockpos.north()) && d1 < d2)
|
- if (this.func_175162_d(blockpos.func_177978_c()) && d1 < d2)
|
||||||
+ if (!this.isHeadspaceFree(blockpos.north(), entHeight) && d1 < d2)
|
+ if (!this.isHeadspaceFree(blockpos.func_177978_c(), entHeight) && d1 < d2)
|
||||||
{
|
{
|
||||||
d2 = d1;
|
d2 = d1;
|
||||||
i = 4;
|
i = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
- if (this.isOpenBlockSpace(blockpos.south()) && 1.0D - d1 < d2)
|
- if (this.func_175162_d(blockpos.func_177968_d()) && 1.0D - d1 < d2)
|
||||||
+ if (!this.isHeadspaceFree(blockpos.south(), entHeight) && 1.0D - d1 < d2)
|
+ if (!this.isHeadspaceFree(blockpos.func_177968_d(), entHeight) && 1.0D - d1 < d2)
|
||||||
{
|
{
|
||||||
d2 = 1.0D - d1;
|
d2 = 1.0D - d1;
|
||||||
i = 5;
|
i = 5;
|
||||||
@@ -448,6 +461,12 @@
|
@@ -448,6 +461,12 @@
|
||||||
|
|
||||||
public void playSound(String name, float volume, float pitch)
|
public void func_85030_a(String p_85030_1_, float p_85030_2_, float p_85030_3_)
|
||||||
{
|
{
|
||||||
+ net.minecraftforge.event.entity.PlaySoundAtEntityEvent event = net.minecraftforge.event.ForgeEventFactory.onPlaySoundAtEntity(this, name, volume, pitch);
|
+ net.minecraftforge.event.entity.PlaySoundAtEntityEvent event = net.minecraftforge.event.ForgeEventFactory.onPlaySoundAtEntity(this, p_85030_1_, p_85030_2_, p_85030_3_);
|
||||||
+ if (event.isCanceled() || event.name == null) return;
|
+ if (event.isCanceled() || event.name == null) return;
|
||||||
+ name = event.name;
|
+ p_85030_1_ = event.name;
|
||||||
+ volume = event.newVolume;
|
+ p_85030_2_ = event.newVolume;
|
||||||
+ pitch = event.newPitch;
|
+ p_85030_3_ = event.newPitch;
|
||||||
+
|
+
|
||||||
this.worldObj.playSound(this.posX, this.posY, this.posZ, name, volume, pitch, false);
|
this.field_70170_p.func_72980_b(this.field_70165_t, this.field_70163_u, this.field_70161_v, p_85030_1_, p_85030_2_, p_85030_3_, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/client/gui/FontRenderer.java
|
--- ../src-base/minecraft/net/minecraft/client/gui/FontRenderer.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/gui/FontRenderer.java
|
+++ ../src-work/minecraft/net/minecraft/client/gui/FontRenderer.java
|
||||||
@@ -57,7 +57,7 @@
|
@@ -57,7 +57,7 @@
|
||||||
this.locationFontTexture = p_i1035_2_;
|
this.field_111273_g = p_i1035_2_;
|
||||||
this.renderEngine = p_i1035_3_;
|
this.field_78298_i = p_i1035_3_;
|
||||||
this.unicodeFlag = p_i1035_4_;
|
this.field_78293_l = p_i1035_4_;
|
||||||
- p_i1035_3_.bindTexture(this.locationFontTexture);
|
- p_i1035_3_.func_110577_a(this.field_111273_g);
|
||||||
+ bindTexture(this.locationFontTexture);
|
+ bindTexture(this.field_111273_g);
|
||||||
|
|
||||||
for (int i = 0; i < 32; ++i)
|
for (int i = 0; i < 32; ++i)
|
||||||
{
|
{
|
||||||
@@ -97,6 +97,7 @@
|
@@ -97,6 +97,7 @@
|
||||||
public void onResourceManagerReload(IResourceManager resourceManager)
|
public void func_110549_a(IResourceManager p_110549_1_)
|
||||||
{
|
{
|
||||||
this.readFontTexture();
|
this.func_111272_d();
|
||||||
+ this.readGlyphSizes();
|
+ this.func_98306_d();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void readFontTexture()
|
private void func_111272_d()
|
||||||
@@ -105,7 +106,7 @@
|
@@ -105,7 +106,7 @@
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
- bufferedimage = TextureUtil.readBufferedImage(Minecraft.getMinecraft().getResourceManager().getResource(this.locationFontTexture).getInputStream());
|
- bufferedimage = TextureUtil.func_177053_a(Minecraft.func_71410_x().func_110442_L().func_110536_a(this.field_111273_g).func_110527_b());
|
||||||
+ bufferedimage = TextureUtil.readBufferedImage(getResourceInputStream(this.locationFontTexture));
|
+ bufferedimage = TextureUtil.func_177053_a(getResourceInputStream(this.field_111273_g));
|
||||||
}
|
}
|
||||||
catch (IOException ioexception)
|
catch (IOException ioexception)
|
||||||
{
|
{
|
||||||
|
@ -30,53 +30,53 @@
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
- inputstream = Minecraft.getMinecraft().getResourceManager().getResource(new ResourceLocation("font/glyph_sizes.bin")).getInputStream();
|
- inputstream = Minecraft.func_71410_x().func_110442_L().func_110536_a(new ResourceLocation("font/glyph_sizes.bin")).func_110527_b();
|
||||||
+ inputstream = getResourceInputStream(new ResourceLocation("font/glyph_sizes.bin"));
|
+ inputstream = getResourceInputStream(new ResourceLocation("font/glyph_sizes.bin"));
|
||||||
inputstream.read(this.glyphWidth);
|
inputstream.read(this.field_78287_e);
|
||||||
}
|
}
|
||||||
catch (IOException ioexception)
|
catch (IOException ioexception)
|
||||||
@@ -196,7 +197,7 @@
|
@@ -196,7 +197,7 @@
|
||||||
int i = p_78266_1_ % 16 * 8;
|
int i = p_78266_1_ % 16 * 8;
|
||||||
int j = p_78266_1_ / 16 * 8;
|
int j = p_78266_1_ / 16 * 8;
|
||||||
int k = p_78266_2_ ? 1 : 0;
|
int k = p_78266_2_ ? 1 : 0;
|
||||||
- this.renderEngine.bindTexture(this.locationFontTexture);
|
- this.field_78298_i.func_110577_a(this.field_111273_g);
|
||||||
+ bindTexture(this.locationFontTexture);
|
+ bindTexture(this.field_111273_g);
|
||||||
int l = this.charWidth[p_78266_1_];
|
int l = this.field_78286_d[p_78266_1_];
|
||||||
float f = (float)l - 0.01F;
|
float f = (float)l - 0.01F;
|
||||||
GL11.glBegin(GL11.GL_TRIANGLE_STRIP);
|
GL11.glBegin(GL11.GL_TRIANGLE_STRIP);
|
||||||
@@ -224,7 +225,7 @@
|
@@ -224,7 +225,7 @@
|
||||||
|
|
||||||
private void loadGlyphTexture(int p_78257_1_)
|
private void func_78257_a(int p_78257_1_)
|
||||||
{
|
{
|
||||||
- this.renderEngine.bindTexture(this.getUnicodePageLocation(p_78257_1_));
|
- this.field_78298_i.func_110577_a(this.func_111271_a(p_78257_1_));
|
||||||
+ bindTexture(this.getUnicodePageLocation(p_78257_1_));
|
+ bindTexture(this.func_111271_a(p_78257_1_));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected float renderUnicodeChar(char p_78277_1_, boolean p_78277_2_)
|
protected float func_78277_a(char p_78277_1_, boolean p_78277_2_)
|
||||||
@@ -271,7 +272,7 @@
|
@@ -271,7 +272,7 @@
|
||||||
|
|
||||||
public int drawString(String p_175065_1_, float p_175065_2_, float p_175065_3_, int p_175065_4_, boolean p_175065_5_)
|
public int func_175065_a(String p_175065_1_, float p_175065_2_, float p_175065_3_, int p_175065_4_, boolean p_175065_5_)
|
||||||
{
|
{
|
||||||
- GlStateManager.enableAlpha();
|
- GlStateManager.func_179141_d();
|
||||||
+ enableAlpha();
|
+ enableAlpha();
|
||||||
this.resetStyles();
|
this.func_78265_b();
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -341,7 +342,7 @@
|
@@ -341,7 +342,7 @@
|
||||||
|
|
||||||
int j1 = this.colorCode[i1];
|
int j1 = this.field_78285_g[i1];
|
||||||
this.textColor = j1;
|
this.field_78304_r = j1;
|
||||||
- GlStateManager.color((float)(j1 >> 16) / 255.0F, (float)(j1 >> 8 & 255) / 255.0F, (float)(j1 & 255) / 255.0F, this.alpha);
|
- GlStateManager.func_179131_c((float)(j1 >> 16) / 255.0F, (float)(j1 >> 8 & 255) / 255.0F, (float)(j1 & 255) / 255.0F, this.field_78305_q);
|
||||||
+ setColor((float)(j1 >> 16) / 255.0F, (float)(j1 >> 8 & 255) / 255.0F, (float)(j1 & 255) / 255.0F, this.alpha);
|
+ setColor((float)(j1 >> 16) / 255.0F, (float)(j1 >> 8 & 255) / 255.0F, (float)(j1 & 255) / 255.0F, this.field_78305_q);
|
||||||
}
|
}
|
||||||
else if (i1 == 16)
|
else if (i1 == 16)
|
||||||
{
|
{
|
||||||
@@ -370,7 +371,7 @@
|
@@ -370,7 +371,7 @@
|
||||||
this.strikethroughStyle = false;
|
this.field_78299_w = false;
|
||||||
this.underlineStyle = false;
|
this.field_78300_v = false;
|
||||||
this.italicStyle = false;
|
this.field_78301_u = false;
|
||||||
- GlStateManager.color(this.red, this.blue, this.green, this.alpha);
|
- GlStateManager.func_179131_c(this.field_78291_n, this.field_78292_o, this.field_78306_p, this.field_78305_q);
|
||||||
+ setColor(this.red, this.blue, this.green, this.alpha);
|
+ setColor(this.field_78291_n, this.field_78292_o, this.field_78306_p, this.field_78305_q);
|
||||||
}
|
}
|
||||||
|
|
||||||
++i;
|
++i;
|
||||||
|
@ -84,9 +84,9 @@
|
||||||
c0 = c1;
|
c0 = c1;
|
||||||
}
|
}
|
||||||
|
|
||||||
- float f1 = this.unicodeFlag ? 0.5F : 1.0F;
|
- float f1 = this.field_78293_l ? 0.5F : 1.0F;
|
||||||
+ float f1 = getCharWidth(c0) / 32f;
|
+ float f1 = func_78263_a(c0) / 32f;
|
||||||
boolean flag = (c0 == 0 || j == -1 || this.unicodeFlag) && p_78255_2_;
|
boolean flag = (c0 == 0 || j == -1 || this.field_78293_l) && p_78255_2_;
|
||||||
|
|
||||||
if (flag)
|
if (flag)
|
||||||
@@ -436,7 +437,16 @@
|
@@ -436,7 +437,16 @@
|
||||||
|
@ -103,21 +103,21 @@
|
||||||
+ {
|
+ {
|
||||||
+ {
|
+ {
|
||||||
+
|
+
|
||||||
if (this.strikethroughStyle)
|
if (this.field_78299_w)
|
||||||
{
|
{
|
||||||
Tessellator tessellator = Tessellator.getInstance();
|
Tessellator tessellator = Tessellator.func_178181_a();
|
||||||
@@ -509,7 +519,7 @@
|
@@ -509,7 +519,7 @@
|
||||||
this.blue = (float)(p_180455_4_ >> 8 & 255) / 255.0F;
|
this.field_78292_o = (float)(p_180455_4_ >> 8 & 255) / 255.0F;
|
||||||
this.green = (float)(p_180455_4_ & 255) / 255.0F;
|
this.field_78306_p = (float)(p_180455_4_ & 255) / 255.0F;
|
||||||
this.alpha = (float)(p_180455_4_ >> 24 & 255) / 255.0F;
|
this.field_78305_q = (float)(p_180455_4_ >> 24 & 255) / 255.0F;
|
||||||
- GlStateManager.color(this.red, this.blue, this.green, this.alpha);
|
- GlStateManager.func_179131_c(this.field_78291_n, this.field_78292_o, this.field_78306_p, this.field_78305_q);
|
||||||
+ setColor(this.red, this.blue, this.green, this.alpha);
|
+ setColor(this.field_78291_n, this.field_78292_o, this.field_78306_p, this.field_78305_q);
|
||||||
this.posX = p_180455_2_;
|
this.field_78295_j = p_180455_2_;
|
||||||
this.posY = p_180455_3_;
|
this.field_78296_k = p_180455_3_;
|
||||||
this.renderStringAtPos(p_180455_1_, p_180455_5_);
|
this.func_78255_a(p_180455_1_, p_180455_5_);
|
||||||
@@ -588,11 +598,6 @@
|
@@ -588,11 +598,6 @@
|
||||||
int j = this.glyphWidth[p_78263_1_] >>> 4;
|
int j = this.field_78287_e[p_78263_1_] >>> 4;
|
||||||
int k = this.glyphWidth[p_78263_1_] & 15;
|
int k = this.field_78287_e[p_78263_1_] & 15;
|
||||||
|
|
||||||
- if (k > 7)
|
- if (k > 7)
|
||||||
- {
|
- {
|
||||||
|
@ -128,29 +128,29 @@
|
||||||
++k;
|
++k;
|
||||||
return (k - j) / 2 + 1;
|
return (k - j) / 2 + 1;
|
||||||
@@ -846,6 +851,26 @@
|
@@ -846,6 +851,26 @@
|
||||||
return this.bidiFlag;
|
return this.field_78294_m;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ protected void setColor(float r, float g, float b, float a)
|
+ protected void setColor(float r, float g, float b, float a)
|
||||||
+ {
|
+ {
|
||||||
+ GlStateManager.color(r,g,b,a);
|
+ GlStateManager.func_179131_c(r,g,b,a);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ protected void enableAlpha()
|
+ protected void enableAlpha()
|
||||||
+ {
|
+ {
|
||||||
+ GlStateManager.enableAlpha();
|
+ GlStateManager.func_179141_d();
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ protected void bindTexture(ResourceLocation location)
|
+ protected void bindTexture(ResourceLocation location)
|
||||||
+ {
|
+ {
|
||||||
+ renderEngine.bindTexture(location);
|
+ field_78298_i.func_110577_a(location);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ protected InputStream getResourceInputStream(ResourceLocation location) throws IOException
|
+ protected InputStream getResourceInputStream(ResourceLocation location) throws IOException
|
||||||
+ {
|
+ {
|
||||||
+ return Minecraft.getMinecraft().getResourceManager().getResource(location).getInputStream();
|
+ return Minecraft.func_71410_x().func_110442_L().func_110536_a(location).func_110527_b();
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
public int getColorCode(char p_175064_1_)
|
public int func_175064_b(char p_175064_1_)
|
||||||
{
|
{
|
||||||
return this.colorCode["0123456789abcdef".indexOf(p_175064_1_)];
|
return this.field_78285_g["0123456789abcdef".indexOf(p_175064_1_)];
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/client/gui/GuiButton.java
|
--- ../src-base/minecraft/net/minecraft/client/gui/GuiButton.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiButton.java
|
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiButton.java
|
||||||
@@ -21,6 +21,7 @@
|
@@ -21,6 +21,7 @@
|
||||||
public boolean enabled;
|
public boolean field_146124_l;
|
||||||
public boolean visible;
|
public boolean field_146125_m;
|
||||||
protected boolean hovered;
|
protected boolean field_146123_n;
|
||||||
+ public int packedFGColour; //FML
|
+ public int packedFGColour; //FML
|
||||||
|
|
||||||
public GuiButton(int buttonId, int x, int y, String buttonText)
|
public GuiButton(int p_i1020_1_, int p_i1020_2_, int p_i1020_3_, String p_i1020_4_)
|
||||||
{
|
{
|
||||||
@@ -74,6 +75,11 @@
|
@@ -74,6 +75,11 @@
|
||||||
this.mouseDragged(mc, mouseX, mouseY);
|
this.func_146119_b(p_146112_1_, p_146112_2_, p_146112_3_);
|
||||||
int j = 14737632;
|
int j = 14737632;
|
||||||
|
|
||||||
+ if (packedFGColour != 0)
|
+ if (packedFGColour != 0)
|
||||||
|
@ -17,6 +17,6 @@
|
||||||
+ j = packedFGColour;
|
+ j = packedFGColour;
|
||||||
+ }
|
+ }
|
||||||
+ else
|
+ else
|
||||||
if (!this.enabled)
|
if (!this.field_146124_l)
|
||||||
{
|
{
|
||||||
j = 10526880;
|
j = 10526880;
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/client/gui/GuiChat.java
|
--- ../src-base/minecraft/net/minecraft/client/gui/GuiChat.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiChat.java
|
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiChat.java
|
||||||
@@ -215,13 +215,14 @@
|
@@ -215,13 +215,14 @@
|
||||||
this.mc.ingameGUI.getChatGUI().printChatMessageWithOptionalDeletion(new ChatComponentText(stringbuilder.toString()), 1);
|
this.field_146297_k.field_71456_v.func_146158_b().func_146234_a(new ChatComponentText(stringbuilder.toString()), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
- this.inputField.writeText((String)this.foundPlayerNames.get(this.autocompleteIndex++));
|
- this.field_146415_a.func_146191_b((String)this.field_146412_t.get(this.field_146413_s++));
|
||||||
+ this.inputField.writeText(net.minecraft.util.EnumChatFormatting.getTextWithoutFormattingCodes((String)this.foundPlayerNames.get(this.autocompleteIndex++)));
|
+ this.field_146415_a.func_146191_b(net.minecraft.util.EnumChatFormatting.func_110646_a((String)this.field_146412_t.get(this.field_146413_s++)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendAutocompleteRequest(String p_146405_1_, String p_146405_2_)
|
private void func_146405_a(String p_146405_1_, String p_146405_2_)
|
||||||
{
|
{
|
||||||
if (p_146405_1_.length() >= 1)
|
if (p_146405_1_.length() >= 1)
|
||||||
{
|
{
|
||||||
+ net.minecraftforge.client.ClientCommandHandler.instance.autoComplete(p_146405_1_, p_146405_2_);
|
+ net.minecraftforge.client.ClientCommandHandler.instance.autoComplete(p_146405_1_, p_146405_2_);
|
||||||
BlockPos blockpos = null;
|
BlockPos blockpos = null;
|
||||||
|
|
||||||
if (this.mc.objectMouseOver != null && this.mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
if (this.field_146297_k.field_71476_x != null && this.field_146297_k.field_71476_x.field_72313_a == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||||
@@ -281,6 +282,12 @@
|
@@ -281,6 +282,12 @@
|
||||||
this.playerNamesFound = false;
|
this.field_146417_i = false;
|
||||||
this.foundPlayerNames.clear();
|
this.field_146412_t.clear();
|
||||||
|
|
||||||
+ String[] complete = net.minecraftforge.client.ClientCommandHandler.instance.latestAutoComplete;
|
+ String[] complete = net.minecraftforge.client.ClientCommandHandler.instance.latestAutoComplete;
|
||||||
+ if (complete != null)
|
+ if (complete != null)
|
||||||
|
|
|
@ -4,33 +4,33 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ WorldType.worldTypes[this.selectedIndex].onGUICreateWorldPress();
|
+ WorldType.field_77139_a[this.field_146331_K].onGUICreateWorldPress();
|
||||||
+
|
+
|
||||||
WorldSettings.GameType worldsettings$gametype = WorldSettings.GameType.getByName(this.field_146342_r);
|
WorldSettings.GameType worldsettings$gametype = WorldSettings.GameType.func_77142_a(this.field_146342_r);
|
||||||
WorldSettings worldsettings = new WorldSettings(i, worldsettings$gametype, this.field_146341_s, this.field_146337_w, WorldType.worldTypes[this.selectedIndex]);
|
WorldSettings worldsettings = new WorldSettings(i, worldsettings$gametype, this.field_146341_s, this.field_146337_w, WorldType.field_77139_a[this.field_146331_K]);
|
||||||
worldsettings.setWorldName(this.chunkProviderSettingsJson);
|
worldsettings.func_82750_a(this.field_146334_a);
|
||||||
@@ -312,14 +314,7 @@
|
@@ -312,14 +314,7 @@
|
||||||
}
|
}
|
||||||
else if (button.id == 8)
|
else if (p_146284_1_.field_146127_k == 8)
|
||||||
{
|
{
|
||||||
- if (WorldType.worldTypes[this.selectedIndex] == WorldType.FLAT)
|
- if (WorldType.field_77139_a[this.field_146331_K] == WorldType.field_77138_c)
|
||||||
- {
|
- {
|
||||||
- this.mc.displayGuiScreen(new GuiCreateFlatWorld(this, this.chunkProviderSettingsJson));
|
- this.field_146297_k.func_147108_a(new GuiCreateFlatWorld(this, this.field_146334_a));
|
||||||
- }
|
- }
|
||||||
- else
|
- else
|
||||||
- {
|
- {
|
||||||
- this.mc.displayGuiScreen(new GuiCustomizeWorldScreen(this, this.chunkProviderSettingsJson));
|
- this.field_146297_k.func_147108_a(new GuiCustomizeWorldScreen(this, this.field_146334_a));
|
||||||
- }
|
- }
|
||||||
+ WorldType.worldTypes[this.selectedIndex].onCustomizeButton(mc, this);
|
+ WorldType.field_77139_a[this.field_146331_K].onCustomizeButton(field_146297_k, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -371,7 +366,7 @@
|
@@ -371,7 +366,7 @@
|
||||||
this.btnBonusItems.visible = this.field_146344_y;
|
this.field_146326_C.field_146125_m = this.field_146344_y;
|
||||||
this.btnMapType.visible = this.field_146344_y;
|
this.field_146320_D.field_146125_m = this.field_146344_y;
|
||||||
this.btnAllowCommands.visible = this.field_146344_y;
|
this.field_146321_E.field_146125_m = this.field_146344_y;
|
||||||
- this.btnCustomizeType.visible = this.field_146344_y && (WorldType.worldTypes[this.selectedIndex] == WorldType.FLAT || WorldType.worldTypes[this.selectedIndex] == WorldType.CUSTOMIZED);
|
- this.field_146322_F.field_146125_m = this.field_146344_y && (WorldType.field_77139_a[this.field_146331_K] == WorldType.field_77138_c || WorldType.field_77139_a[this.field_146331_K] == WorldType.field_180271_f);
|
||||||
+ this.btnCustomizeType.visible = this.field_146344_y && WorldType.worldTypes[this.selectedIndex].isCustomizable();
|
+ this.field_146322_F.field_146125_m = this.field_146344_y && WorldType.field_77139_a[this.field_146331_K].isCustomizable();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.func_146319_h();
|
this.func_146319_h();
|
||||||
|
|
|
@ -2,28 +2,28 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiIngameMenu.java
|
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiIngameMenu.java
|
||||||
@@ -30,8 +30,9 @@
|
@@ -30,8 +30,9 @@
|
||||||
|
|
||||||
this.buttonList.add(new GuiButton(4, this.width / 2 - 100, this.height / 4 + 24 + i, I18n.format("menu.returnToGame", new Object[0])));
|
this.field_146292_n.add(new GuiButton(4, this.field_146294_l / 2 - 100, this.field_146295_m / 4 + 24 + i, I18n.func_135052_a("menu.returnToGame", new Object[0])));
|
||||||
this.buttonList.add(new GuiButton(0, this.width / 2 - 100, this.height / 4 + 96 + i, 98, 20, I18n.format("menu.options", new Object[0])));
|
this.field_146292_n.add(new GuiButton(0, this.field_146294_l / 2 - 100, this.field_146295_m / 4 + 96 + i, 98, 20, I18n.func_135052_a("menu.options", new Object[0])));
|
||||||
+ this.buttonList.add(new GuiButton(12, this.width / 2 + 2, this.height / 4 + 96 + i, 98, 20, I18n.format("fml.menu.modoptions")));
|
+ this.field_146292_n.add(new GuiButton(12, this.field_146294_l / 2 + 2, this.field_146295_m / 4 + 96 + i, 98, 20, I18n.func_135052_a("fml.menu.modoptions")));
|
||||||
GuiButton guibutton;
|
GuiButton guibutton;
|
||||||
- this.buttonList.add(guibutton = new GuiButton(7, this.width / 2 + 2, this.height / 4 + 96 + i, 98, 20, I18n.format("menu.shareToLan", new Object[0])));
|
- this.field_146292_n.add(guibutton = new GuiButton(7, this.field_146294_l / 2 + 2, this.field_146295_m / 4 + 96 + i, 98, 20, I18n.func_135052_a("menu.shareToLan", new Object[0])));
|
||||||
+ this.buttonList.add(guibutton = new GuiButton(7, this.width / 2 - 100, this.height / 4 + 72 + i, 200, 20, I18n.format("menu.shareToLan", new Object[0])));
|
+ this.field_146292_n.add(guibutton = new GuiButton(7, this.field_146294_l / 2 - 100, this.field_146295_m / 4 + 72 + i, 200, 20, I18n.func_135052_a("menu.shareToLan", new Object[0])));
|
||||||
this.buttonList.add(new GuiButton(5, this.width / 2 - 100, this.height / 4 + 48 + i, 98, 20, I18n.format("gui.achievements", new Object[0])));
|
this.field_146292_n.add(new GuiButton(5, this.field_146294_l / 2 - 100, this.field_146295_m / 4 + 48 + i, 98, 20, I18n.func_135052_a("gui.achievements", new Object[0])));
|
||||||
this.buttonList.add(new GuiButton(6, this.width / 2 + 2, this.height / 4 + 48 + i, 98, 20, I18n.format("gui.stats", new Object[0])));
|
this.field_146292_n.add(new GuiButton(6, this.field_146294_l / 2 + 2, this.field_146295_m / 4 + 48 + i, 98, 20, I18n.func_135052_a("gui.stats", new Object[0])));
|
||||||
guibutton.enabled = this.mc.isSingleplayer() && !this.mc.getIntegratedServer().getPublic();
|
guibutton.field_146124_l = this.field_146297_k.func_71356_B() && !this.field_146297_k.func_71401_C().func_71344_c();
|
||||||
@@ -74,13 +75,19 @@
|
@@ -74,13 +75,19 @@
|
||||||
this.mc.setIngameFocus();
|
this.field_146297_k.func_71381_h();
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
+ if (this.mc.thePlayer != null)
|
+ if (this.field_146297_k.field_71439_g != null)
|
||||||
this.mc.displayGuiScreen(new GuiAchievements(this, this.mc.thePlayer.getStatFileWriter()));
|
this.field_146297_k.func_147108_a(new GuiAchievements(this, this.field_146297_k.field_71439_g.func_146107_m()));
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
+ if (this.mc.thePlayer != null)
|
+ if (this.field_146297_k.field_71439_g != null)
|
||||||
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()));
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
this.mc.displayGuiScreen(new GuiShareToLan(this));
|
this.field_146297_k.func_147108_a(new GuiShareToLan(this));
|
||||||
+ break;
|
+ break;
|
||||||
+ case 12:
|
+ case 12:
|
||||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().showInGameModOptions(this);
|
+ net.minecraftforge.fml.client.FMLClientHandler.instance().showInGameModOptions(this);
|
||||||
|
|
|
@ -1,44 +1,44 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/client/gui/GuiMainMenu.java
|
--- ../src-base/minecraft/net/minecraft/client/gui/GuiMainMenu.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiMainMenu.java
|
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiMainMenu.java
|
||||||
@@ -197,6 +197,11 @@
|
@@ -197,6 +197,11 @@
|
||||||
this.buttonList.add(new GuiButton(1, this.width / 2 - 100, p_73969_1_, I18n.format("menu.singleplayer", new Object[0])));
|
this.field_146292_n.add(new GuiButton(1, this.field_146294_l / 2 - 100, p_73969_1_, I18n.func_135052_a("menu.singleplayer", new Object[0])));
|
||||||
this.buttonList.add(new GuiButton(2, this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 1, I18n.format("menu.multiplayer", new Object[0])));
|
this.field_146292_n.add(new GuiButton(2, this.field_146294_l / 2 - 100, p_73969_1_ + p_73969_2_ * 1, I18n.func_135052_a("menu.multiplayer", new Object[0])));
|
||||||
this.buttonList.add(this.realmsButton = new GuiButton(14, this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 2, I18n.format("menu.online", new Object[0])));
|
this.field_146292_n.add(this.field_175372_K = new GuiButton(14, this.field_146294_l / 2 - 100, p_73969_1_ + p_73969_2_ * 2, I18n.func_135052_a("menu.online", new Object[0])));
|
||||||
+ GuiButton fmlModButton = new GuiButton(6, this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 2, I18n.format("fml.menu.mods"));
|
+ GuiButton fmlModButton = new GuiButton(6, this.field_146294_l / 2 - 100, p_73969_1_ + p_73969_2_ * 2, I18n.func_135052_a("fml.menu.mods"));
|
||||||
+ fmlModButton.xPosition = this.width / 2 + 2;
|
+ fmlModButton.field_146128_h = this.field_146294_l / 2 + 2;
|
||||||
+ realmsButton.width = 98;
|
+ field_175372_K.field_146120_f = 98;
|
||||||
+ fmlModButton.width = 98;
|
+ fmlModButton.field_146120_f = 98;
|
||||||
+ this.buttonList.add(fmlModButton);
|
+ this.field_146292_n.add(fmlModButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addDemoButtons(int p_73972_1_, int p_73972_2_)
|
private void func_73972_b(int p_73972_1_, int p_73972_2_)
|
||||||
@@ -244,6 +249,11 @@
|
@@ -244,6 +249,11 @@
|
||||||
this.mc.shutdown();
|
this.field_146297_k.func_71400_g();
|
||||||
}
|
}
|
||||||
|
|
||||||
+ if (button.id == 6)
|
+ if (p_146284_1_.field_146127_k == 6)
|
||||||
+ {
|
+ {
|
||||||
+ this.mc.displayGuiScreen(new net.minecraftforge.fml.client.GuiModList(this));
|
+ this.field_146297_k.func_147108_a(new net.minecraftforge.fml.client.GuiModList(this));
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
if (button.id == 11)
|
if (p_146284_1_.field_146127_k == 11)
|
||||||
{
|
{
|
||||||
this.mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.demoWorldSettings);
|
this.field_146297_k.func_71371_a("Demo_World", "Demo_World", DemoWorldServer.field_73071_a);
|
||||||
@@ -489,7 +499,16 @@
|
@@ -489,7 +499,16 @@
|
||||||
s = s + " Demo";
|
s = s + " Demo";
|
||||||
}
|
}
|
||||||
|
|
||||||
- this.drawString(this.fontRendererObj, s, 2, this.height - 10, -1);
|
- this.func_73731_b(this.field_146289_q, s, 2, this.field_146295_m - 10, -1);
|
||||||
+ java.util.List<String> brandings = com.google.common.collect.Lists.reverse(net.minecraftforge.fml.common.FMLCommonHandler.instance().getBrandings(true));
|
+ java.util.List<String> brandings = com.google.common.collect.Lists.reverse(net.minecraftforge.fml.common.FMLCommonHandler.instance().getBrandings(true));
|
||||||
+ for (int brdline = 0; brdline < brandings.size(); brdline++)
|
+ for (int brdline = 0; brdline < brandings.size(); brdline++)
|
||||||
+ {
|
+ {
|
||||||
+ String brd = brandings.get(brdline);
|
+ String brd = brandings.get(brdline);
|
||||||
+ if (!com.google.common.base.Strings.isNullOrEmpty(brd))
|
+ if (!com.google.common.base.Strings.isNullOrEmpty(brd))
|
||||||
+ {
|
+ {
|
||||||
+ this.drawString(this.fontRendererObj, brd, 2, this.height - ( 10 + brdline * (this.fontRendererObj.FONT_HEIGHT + 1)), 16777215);
|
+ this.func_73731_b(this.field_146289_q, brd, 2, this.field_146295_m - ( 10 + brdline * (this.field_146289_q.field_78288_b + 1)), 16777215);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ net.minecraftforge.client.ForgeHooksClient.renderMainMenu(this, this.fontRendererObj, this.width, this.height);
|
+ net.minecraftforge.client.ForgeHooksClient.renderMainMenu(this, this.field_146289_q, this.field_146294_l, this.field_146295_m);
|
||||||
String s1 = "Copyright Mojang AB. Do not distribute!";
|
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,19 +1,19 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/client/gui/GuiMultiplayer.java
|
--- ../src-base/minecraft/net/minecraft/client/gui/GuiMultiplayer.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiMultiplayer.java
|
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiMultiplayer.java
|
||||||
@@ -40,6 +40,7 @@
|
@@ -40,6 +40,7 @@
|
||||||
public GuiMultiplayer(GuiScreen parentScreen)
|
public GuiMultiplayer(GuiScreen p_i1040_1_)
|
||||||
{
|
{
|
||||||
this.parentScreen = parentScreen;
|
this.field_146798_g = p_i1040_1_;
|
||||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().setupServerList();
|
+ net.minecraftforge.fml.client.FMLClientHandler.instance().setupServerList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initGui()
|
public void func_73866_w_()
|
||||||
@@ -372,7 +373,7 @@
|
@@ -372,7 +373,7 @@
|
||||||
|
|
||||||
private void connectToServer(ServerData server)
|
private void func_146791_a(ServerData p_146791_1_)
|
||||||
{
|
{
|
||||||
- this.mc.displayGuiScreen(new GuiConnecting(this, this.mc, server));
|
- this.field_146297_k.func_147108_a(new GuiConnecting(this, this.field_146297_k, p_146791_1_));
|
||||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().connectToServer(this, server);
|
+ net.minecraftforge.fml.client.FMLClientHandler.instance().connectToServer(this, p_146791_1_);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void selectServer(int index)
|
public void func_146790_a(int p_146790_1_)
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java
|
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java
|
||||||
@@ -176,6 +176,9 @@
|
@@ -176,6 +176,9 @@
|
||||||
long l = j - k;
|
long l = j - k;
|
||||||
List<String> list = Lists.newArrayList(new String[] {String.format("Java: %s %dbit", new Object[]{System.getProperty("java.version"), Integer.valueOf(this.mc.isJava64bit() ? 64 : 32)}), String.format("Mem: % 2d%% %03d/%03dMB", new Object[]{Long.valueOf(l * 100L / i), Long.valueOf(bytesToMb(l)), Long.valueOf(bytesToMb(i))}), String.format("Allocated: % 2d%% %03dMB", new Object[]{Long.valueOf(j * 100L / i), Long.valueOf(bytesToMb(j))}), "", String.format("CPU: %s", new Object[]{OpenGlHelper.func_183029_j()}), "", String.format("Display: %dx%d (%s)", new Object[]{Integer.valueOf(Display.getWidth()), Integer.valueOf(Display.getHeight()), GL11.glGetString(GL11.GL_VENDOR)}), GL11.glGetString(GL11.GL_RENDERER), GL11.glGetString(GL11.GL_VERSION)});
|
List<String> list = Lists.newArrayList(new String[] {String.format("Java: %s %dbit", new Object[]{System.getProperty("java.version"), Integer.valueOf(this.field_175242_a.func_147111_S() ? 64 : 32)}), String.format("Mem: % 2d%% %03d/%03dMB", new Object[]{Long.valueOf(l * 100L / i), Long.valueOf(func_175240_a(l)), Long.valueOf(func_175240_a(i))}), String.format("Allocated: % 2d%% %03dMB", new Object[]{Long.valueOf(j * 100L / i), Long.valueOf(func_175240_a(j))}), "", String.format("CPU: %s", new Object[]{OpenGlHelper.func_183029_j()}), "", String.format("Display: %dx%d (%s)", new Object[]{Integer.valueOf(Display.getWidth()), Integer.valueOf(Display.getHeight()), GL11.glGetString(GL11.GL_VENDOR)}), GL11.glGetString(GL11.GL_RENDERER), GL11.glGetString(GL11.GL_VERSION)});
|
||||||
|
|
||||||
+ list.add("");
|
+ list.add("");
|
||||||
+ list.addAll(net.minecraftforge.fml.common.FMLCommonHandler.instance().getBrandings(false));
|
+ list.addAll(net.minecraftforge.fml.common.FMLCommonHandler.instance().getBrandings(false));
|
||||||
+
|
+
|
||||||
if (this.isReducedDebug())
|
if (this.func_175236_d())
|
||||||
{
|
{
|
||||||
return list;
|
return list;
|
||||||
|
|
|
@ -4,86 +4,86 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- this.drawHoveringText(list, x, y);
|
- this.func_146283_a(list, p_146285_2_, p_146285_3_);
|
||||||
+ FontRenderer font = stack.getItem().getFontRenderer(stack);
|
+ FontRenderer font = p_146285_1_.func_77973_b().getFontRenderer(p_146285_1_);
|
||||||
+ this.drawHoveringText(list, x, y, (font == null ? fontRendererObj : font));
|
+ this.drawHoveringText(list, p_146285_2_, p_146285_3_, (font == null ? field_146289_q : font));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void drawCreativeTabHoveringText(String tabName, int mouseX, int mouseY)
|
protected void func_146279_a(String p_146279_1_, int p_146279_2_, int p_146279_3_)
|
||||||
@@ -153,6 +154,11 @@
|
@@ -153,6 +154,11 @@
|
||||||
|
|
||||||
protected void drawHoveringText(List<String> textLines, int x, int y)
|
protected void func_146283_a(List<String> p_146283_1_, int p_146283_2_, int p_146283_3_)
|
||||||
{
|
{
|
||||||
+ drawHoveringText(textLines, x, y, fontRendererObj);
|
+ drawHoveringText(p_146283_1_, p_146283_2_, p_146283_3_, field_146289_q);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ protected void drawHoveringText(List<String> textLines, int x, int y, FontRenderer font)
|
+ protected void drawHoveringText(List<String> p_146283_1_, int p_146283_2_, int p_146283_3_, FontRenderer font)
|
||||||
+ {
|
+ {
|
||||||
if (!textLines.isEmpty())
|
if (!p_146283_1_.isEmpty())
|
||||||
{
|
{
|
||||||
GlStateManager.disableRescaleNormal();
|
GlStateManager.func_179101_C();
|
||||||
@@ -163,7 +169,7 @@
|
@@ -163,7 +169,7 @@
|
||||||
|
|
||||||
for (String s : textLines)
|
for (String s : p_146283_1_)
|
||||||
{
|
{
|
||||||
- int j = this.fontRendererObj.getStringWidth(s);
|
- int j = this.field_146289_q.func_78256_a(s);
|
||||||
+ int j = font.getStringWidth(s);
|
+ int j = font.func_78256_a(s);
|
||||||
|
|
||||||
if (j > i)
|
if (j > i)
|
||||||
{
|
{
|
||||||
@@ -208,7 +214,7 @@
|
@@ -208,7 +214,7 @@
|
||||||
for (int k1 = 0; k1 < textLines.size(); ++k1)
|
for (int k1 = 0; k1 < p_146283_1_.size(); ++k1)
|
||||||
{
|
{
|
||||||
String s1 = (String)textLines.get(k1);
|
String s1 = (String)p_146283_1_.get(k1);
|
||||||
- this.fontRendererObj.drawStringWithShadow(s1, (float)l1, (float)i2, -1);
|
- this.field_146289_q.func_175063_a(s1, (float)l1, (float)i2, -1);
|
||||||
+ font.drawStringWithShadow(s1, (float)l1, (float)i2, -1);
|
+ font.func_175063_a(s1, (float)l1, (float)i2, -1);
|
||||||
|
|
||||||
if (k1 == 0)
|
if (k1 == 0)
|
||||||
{
|
{
|
||||||
@@ -436,6 +442,7 @@
|
@@ -436,6 +442,7 @@
|
||||||
{
|
{
|
||||||
this.mc.ingameGUI.getChatGUI().addToSentMessages(msg);
|
this.field_146297_k.field_71456_v.func_146158_b().func_146239_a(p_175281_1_);
|
||||||
}
|
}
|
||||||
+ if (net.minecraftforge.client.ClientCommandHandler.instance.executeCommand(mc.thePlayer, msg) != 0) return;
|
+ if (net.minecraftforge.client.ClientCommandHandler.instance.func_71556_a(field_146297_k.field_71439_g, p_175281_1_) != 0) return;
|
||||||
|
|
||||||
this.mc.thePlayer.sendChatMessage(msg);
|
this.field_146297_k.field_71439_g.func_71165_d(p_175281_1_);
|
||||||
}
|
}
|
||||||
@@ -450,9 +457,15 @@
|
@@ -450,9 +457,15 @@
|
||||||
|
|
||||||
if (guibutton.mousePressed(this.mc, mouseX, mouseY))
|
if (guibutton.func_146116_c(this.field_146297_k, p_73864_1_, p_73864_2_))
|
||||||
{
|
{
|
||||||
+ net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent.Pre event = new net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent.Pre(this, guibutton, this.buttonList);
|
+ net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent.Pre event = new net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent.Pre(this, guibutton, this.field_146292_n);
|
||||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event))
|
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event))
|
||||||
+ break;
|
+ break;
|
||||||
+ guibutton = event.button;
|
+ guibutton = event.button;
|
||||||
this.selectedButton = guibutton;
|
this.field_146290_a = guibutton;
|
||||||
guibutton.playPressSound(this.mc.getSoundHandler());
|
guibutton.func_146113_a(this.field_146297_k.func_147118_V());
|
||||||
this.actionPerformed(guibutton);
|
this.func_146284_a(guibutton);
|
||||||
+ if (this.equals(this.mc.currentScreen))
|
+ if (this.equals(this.field_146297_k.field_71462_r))
|
||||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent.Post(this, event.button, this.buttonList));
|
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent.Post(this, event.button, this.field_146292_n));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -482,8 +495,12 @@
|
@@ -482,8 +495,12 @@
|
||||||
this.fontRendererObj = mc.fontRendererObj;
|
this.field_146289_q = p_146280_1_.field_71466_p;
|
||||||
this.width = width;
|
this.field_146294_l = p_146280_2_;
|
||||||
this.height = height;
|
this.field_146295_m = p_146280_3_;
|
||||||
+ if (!net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.InitGuiEvent.Pre(this, this.buttonList)))
|
+ if (!net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.InitGuiEvent.Pre(this, this.field_146292_n)))
|
||||||
+ {
|
+ {
|
||||||
this.buttonList.clear();
|
this.field_146292_n.clear();
|
||||||
this.initGui();
|
this.func_73866_w_();
|
||||||
+ }
|
+ }
|
||||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.InitGuiEvent.Post(this, this.buttonList));
|
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.InitGuiEvent.Post(this, this.field_146292_n));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initGui()
|
public void func_73866_w_()
|
||||||
@@ -496,7 +513,9 @@
|
@@ -496,7 +513,9 @@
|
||||||
{
|
{
|
||||||
while (Mouse.next())
|
while (Mouse.next())
|
||||||
{
|
{
|
||||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.MouseInputEvent.Pre(this))) continue;
|
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.MouseInputEvent.Pre(this))) continue;
|
||||||
this.handleMouseInput();
|
this.func_146274_d();
|
||||||
+ if (this.equals(this.mc.currentScreen)) net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.MouseInputEvent.Post(this));
|
+ if (this.equals(this.field_146297_k.field_71462_r)) net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.MouseInputEvent.Post(this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,8 +92,8 @@
|
||||||
while (Keyboard.next())
|
while (Keyboard.next())
|
||||||
{
|
{
|
||||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.KeyboardInputEvent.Pre(this))) continue;
|
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.KeyboardInputEvent.Pre(this))) continue;
|
||||||
this.handleKeyboardInput();
|
this.func_146282_l();
|
||||||
+ if (this.equals(this.mc.currentScreen)) net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.KeyboardInputEvent.Post(this));
|
+ if (this.equals(this.field_146297_k.field_71462_r)) net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.KeyboardInputEvent.Post(this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiSelectWorld.java
|
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiSelectWorld.java
|
||||||
@@ -186,7 +186,7 @@
|
@@ -186,7 +186,7 @@
|
||||||
|
|
||||||
if (this.mc.getSaveLoader().canLoadWorld(s))
|
if (this.field_146297_k.func_71359_d().func_90033_f(s))
|
||||||
{
|
{
|
||||||
- this.mc.launchIntegratedServer(s, s1, (WorldSettings)null);
|
- this.field_146297_k.func_71371_a(s, s1, (WorldSettings)null);
|
||||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().tryLoadExistingWorld(this, s, s1);
|
+ net.minecraftforge.fml.client.FMLClientHandler.instance().tryLoadExistingWorld(this, s, s1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
if (!s.isEmpty())
|
if (!s.isEmpty())
|
||||||
{
|
{
|
||||||
- this.mc.thePlayer.sendChatMessage(s);
|
- this.field_146297_k.field_71439_g.func_71165_d(s);
|
||||||
+ this.sendChatMessage(s); // Forge: fix vanilla not adding messages to the sent list while sleeping
|
+ this.func_175275_f(s); // Forge: fix vanilla not adding messages to the sent list while sleeping
|
||||||
}
|
}
|
||||||
|
|
||||||
this.inputField.setText("");
|
this.field_146415_a.func_146180_a("");
|
||||||
|
|
|
@ -1,39 +1,39 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/client/gui/GuiSlot.java
|
--- ../src-base/minecraft/net/minecraft/client/gui/GuiSlot.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiSlot.java
|
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiSlot.java
|
||||||
@@ -181,15 +181,8 @@
|
@@ -181,15 +181,8 @@
|
||||||
GlStateManager.disableFog();
|
GlStateManager.func_179106_n();
|
||||||
Tessellator tessellator = Tessellator.getInstance();
|
Tessellator tessellator = Tessellator.func_178181_a();
|
||||||
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
WorldRenderer worldrenderer = tessellator.func_178180_c();
|
||||||
- this.mc.getTextureManager().bindTexture(Gui.optionsBackground);
|
- this.field_148161_k.func_110434_K().func_110577_a(Gui.field_110325_k);
|
||||||
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
- GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
- float f = 32.0F;
|
- float f = 32.0F;
|
||||||
- worldrenderer.func_181668_a(7, DefaultVertexFormats.field_181709_i);
|
- worldrenderer.func_181668_a(7, DefaultVertexFormats.field_181709_i);
|
||||||
- worldrenderer.func_181662_b((double)this.left, (double)this.bottom, 0.0D).func_181673_a((double)((float)this.left / f), (double)((float)(this.bottom + (int)this.amountScrolled) / f)).func_181669_b(32, 32, 32, 255).func_181675_d();
|
- worldrenderer.func_181662_b((double)this.field_148152_e, (double)this.field_148154_c, 0.0D).func_181673_a((double)((float)this.field_148152_e / f), (double)((float)(this.field_148154_c + (int)this.field_148169_q) / f)).func_181669_b(32, 32, 32, 255).func_181675_d();
|
||||||
- worldrenderer.func_181662_b((double)this.right, (double)this.bottom, 0.0D).func_181673_a((double)((float)this.right / f), (double)((float)(this.bottom + (int)this.amountScrolled) / f)).func_181669_b(32, 32, 32, 255).func_181675_d();
|
- worldrenderer.func_181662_b((double)this.field_148151_d, (double)this.field_148154_c, 0.0D).func_181673_a((double)((float)this.field_148151_d / f), (double)((float)(this.field_148154_c + (int)this.field_148169_q) / f)).func_181669_b(32, 32, 32, 255).func_181675_d();
|
||||||
- worldrenderer.func_181662_b((double)this.right, (double)this.top, 0.0D).func_181673_a((double)((float)this.right / f), (double)((float)(this.top + (int)this.amountScrolled) / f)).func_181669_b(32, 32, 32, 255).func_181675_d();
|
- worldrenderer.func_181662_b((double)this.field_148151_d, (double)this.field_148153_b, 0.0D).func_181673_a((double)((float)this.field_148151_d / f), (double)((float)(this.field_148153_b + (int)this.field_148169_q) / f)).func_181669_b(32, 32, 32, 255).func_181675_d();
|
||||||
- worldrenderer.func_181662_b((double)this.left, (double)this.top, 0.0D).func_181673_a((double)((float)this.left / f), (double)((float)(this.top + (int)this.amountScrolled) / f)).func_181669_b(32, 32, 32, 255).func_181675_d();
|
- worldrenderer.func_181662_b((double)this.field_148152_e, (double)this.field_148153_b, 0.0D).func_181673_a((double)((float)this.field_148152_e / f), (double)((float)(this.field_148153_b + (int)this.field_148169_q) / f)).func_181669_b(32, 32, 32, 255).func_181675_d();
|
||||||
- tessellator.draw();
|
- tessellator.func_78381_a();
|
||||||
+ // Forge: background rendering moved into separate method.
|
+ // Forge: background rendering moved into separate method.
|
||||||
+ this.drawContainerBackground(tessellator);
|
+ this.drawContainerBackground(tessellator);
|
||||||
int k = this.left + this.width / 2 - this.getListWidth() / 2 + 2;
|
int k = this.field_148152_e + this.field_148155_a / 2 - this.func_148139_c() / 2 + 2;
|
||||||
int l = this.top + 4 - (int)this.amountScrolled;
|
int l = this.field_148153_b + 4 - (int)this.field_148169_q;
|
||||||
|
|
||||||
@@ -458,4 +451,18 @@
|
@@ -458,4 +451,18 @@
|
||||||
{
|
{
|
||||||
return this.slotHeight;
|
return this.field_148149_f;
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ protected void drawContainerBackground(Tessellator tessellator)
|
+ protected void drawContainerBackground(Tessellator tessellator)
|
||||||
+ {
|
+ {
|
||||||
+ WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
+ WorldRenderer worldrenderer = tessellator.func_178180_c();
|
||||||
+ this.mc.getTextureManager().bindTexture(Gui.optionsBackground);
|
+ this.field_148161_k.func_110434_K().func_110577_a(Gui.field_110325_k);
|
||||||
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
+ GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
+ float f = 32.0F;
|
+ float f = 32.0F;
|
||||||
+ worldrenderer.func_181668_a(7, DefaultVertexFormats.field_181709_i);
|
+ worldrenderer.func_181668_a(7, DefaultVertexFormats.field_181709_i);
|
||||||
+ worldrenderer.func_181662_b((double)this.left, (double)this.bottom, 0.0D).func_181673_a((double)((float)this.left / f), (double)((float)(this.bottom + (int)this.amountScrolled) / f)).func_181669_b(32, 32, 32, 255).func_181675_d();
|
+ worldrenderer.func_181662_b((double)this.field_148152_e, (double)this.field_148154_c, 0.0D).func_181673_a((double)((float)this.field_148152_e / f), (double)((float)(this.field_148154_c + (int)this.field_148169_q) / f)).func_181669_b(32, 32, 32, 255).func_181675_d();
|
||||||
+ worldrenderer.func_181662_b((double)this.right, (double)this.bottom, 0.0D).func_181673_a((double)((float)this.right / f), (double)((float)(this.bottom + (int)this.amountScrolled) / f)).func_181669_b(32, 32, 32, 255).func_181675_d();
|
+ worldrenderer.func_181662_b((double)this.field_148151_d, (double)this.field_148154_c, 0.0D).func_181673_a((double)((float)this.field_148151_d / f), (double)((float)(this.field_148154_c + (int)this.field_148169_q) / f)).func_181669_b(32, 32, 32, 255).func_181675_d();
|
||||||
+ worldrenderer.func_181662_b((double)this.right, (double)this.top, 0.0D).func_181673_a((double)((float)this.right / f), (double)((float)(this.top + (int)this.amountScrolled) / f)).func_181669_b(32, 32, 32, 255).func_181675_d();
|
+ worldrenderer.func_181662_b((double)this.field_148151_d, (double)this.field_148153_b, 0.0D).func_181673_a((double)((float)this.field_148151_d / f), (double)((float)(this.field_148153_b + (int)this.field_148169_q) / f)).func_181669_b(32, 32, 32, 255).func_181675_d();
|
||||||
+ worldrenderer.func_181662_b((double)this.left, (double)this.top, 0.0D).func_181673_a((double)((float)this.left / f), (double)((float)(this.top + (int)this.amountScrolled) / f)).func_181669_b(32, 32, 32, 255).func_181675_d();
|
+ worldrenderer.func_181662_b((double)this.field_148152_e, (double)this.field_148153_b, 0.0D).func_181673_a((double)((float)this.field_148152_e / f), (double)((float)(this.field_148153_b + (int)this.field_148169_q) / f)).func_181669_b(32, 32, 32, 255).func_181675_d();
|
||||||
+ tessellator.draw();
|
+ tessellator.func_78381_a();
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java
|
--- ../src-base/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java
|
+++ ../src-work/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java
|
||||||
@@ -82,7 +82,7 @@
|
@@ -82,7 +82,7 @@
|
||||||
boolean flag1 = this.field_148301_e.version < 47;
|
boolean flag1 = this.field_148301_e.field_82821_f < 47;
|
||||||
boolean flag2 = flag || flag1;
|
boolean flag2 = flag || flag1;
|
||||||
this.field_148300_d.fontRendererObj.drawString(this.field_148301_e.serverName, x + 32 + 3, y + 1, 16777215);
|
this.field_148300_d.field_71466_p.func_78276_b(this.field_148301_e.field_78847_a, p_180790_2_ + 32 + 3, p_180790_3_ + 1, 16777215);
|
||||||
- List<String> list = this.field_148300_d.fontRendererObj.listFormattedStringToWidth(this.field_148301_e.serverMOTD, listWidth - 32 - 2);
|
- List<String> list = this.field_148300_d.field_71466_p.func_78271_c(this.field_148301_e.field_78843_d, p_180790_4_ - 32 - 2);
|
||||||
+ List<String> list = this.field_148300_d.fontRendererObj.listFormattedStringToWidth(net.minecraftforge.fml.client.FMLClientHandler.instance().fixDescription(this.field_148301_e.serverMOTD), listWidth - 48 - 2);
|
+ List<String> list = this.field_148300_d.field_71466_p.func_78271_c(net.minecraftforge.fml.client.FMLClientHandler.instance().fixDescription(this.field_148301_e.field_78843_d), p_180790_4_ - 48 - 2);
|
||||||
|
|
||||||
for (int i = 0; i < Math.min(list.size(), 2); ++i)
|
for (int i = 0; i < Math.min(list.size(), 2); ++i)
|
||||||
{
|
{
|
||||||
@@ -176,6 +176,11 @@
|
@@ -176,6 +176,11 @@
|
||||||
int i1 = mouseX - x;
|
int i1 = p_180790_6_ - p_180790_2_;
|
||||||
int j1 = mouseY - y;
|
int j1 = p_180790_7_ - p_180790_3_;
|
||||||
|
|
||||||
+ String tooltip = net.minecraftforge.fml.client.FMLClientHandler.instance().enhanceServerListEntry(this, this.field_148301_e, x, listWidth, y, i1, j1);
|
+ String tooltip = net.minecraftforge.fml.client.FMLClientHandler.instance().enhanceServerListEntry(this, this.field_148301_e, p_180790_2_, p_180790_4_, p_180790_3_, i1, j1);
|
||||||
+ if (tooltip != null)
|
+ if (tooltip != null)
|
||||||
+ {
|
+ {
|
||||||
+ this.field_148303_c.func_146793_a(tooltip);
|
+ this.field_148303_c.func_146793_a(tooltip);
|
||||||
+ } else
|
+ } else
|
||||||
if (i1 >= listWidth - 15 && i1 <= listWidth - 5 && j1 >= 0 && j1 <= 8)
|
if (i1 >= p_180790_4_ - 15 && i1 <= p_180790_4_ - 5 && j1 >= 0 && j1 <= 8)
|
||||||
{
|
{
|
||||||
this.field_148303_c.func_146793_a(s1);
|
this.field_148303_c.func_146793_a(s1);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java
|
--- ../src-base/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java
|
+++ ../src-work/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java
|
||||||
@@ -49,6 +49,10 @@
|
@@ -49,6 +49,10 @@
|
||||||
private StatFileWriter statFileWriter;
|
private StatFileWriter field_146556_E;
|
||||||
private boolean loadingAchievements = true;
|
private boolean field_146558_F = true;
|
||||||
|
|
||||||
+ private int currentPage = -1;
|
+ private int currentPage = -1;
|
||||||
+ private GuiButton button;
|
+ private GuiButton button;
|
||||||
|
@ -10,13 +10,13 @@
|
||||||
+
|
+
|
||||||
public GuiAchievements(GuiScreen p_i45026_1_, StatFileWriter p_i45026_2_)
|
public GuiAchievements(GuiScreen p_i45026_1_, StatFileWriter p_i45026_2_)
|
||||||
{
|
{
|
||||||
this.parentScreen = p_i45026_1_;
|
this.field_146562_a = p_i45026_1_;
|
||||||
@@ -57,6 +61,14 @@
|
@@ -57,6 +61,14 @@
|
||||||
int j = 141;
|
int j = 141;
|
||||||
this.field_146569_s = this.field_146567_u = this.field_146565_w = (double)(AchievementList.openInventory.displayColumn * 24 - i / 2 - 12);
|
this.field_146569_s = this.field_146567_u = this.field_146565_w = (double)(AchievementList.field_76004_f.field_75993_a * 24 - i / 2 - 12);
|
||||||
this.field_146568_t = this.field_146566_v = this.field_146573_x = (double)(AchievementList.openInventory.displayRow * 24 - j / 2);
|
this.field_146568_t = this.field_146566_v = this.field_146573_x = (double)(AchievementList.field_76004_f.field_75991_b * 24 - j / 2);
|
||||||
+ minecraftAchievements.clear();
|
+ minecraftAchievements.clear();
|
||||||
+ for (Achievement achievement : AchievementList.achievementList)
|
+ for (Achievement achievement : AchievementList.field_76007_e)
|
||||||
+ {
|
+ {
|
||||||
+ if (!net.minecraftforge.common.AchievementPage.isAchievementInPages(achievement))
|
+ if (!net.minecraftforge.common.AchievementPage.isAchievementInPages(achievement))
|
||||||
+ {
|
+ {
|
||||||
|
@ -25,93 +25,93 @@
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initGui()
|
public void func_73866_w_()
|
||||||
@@ -64,6 +76,7 @@
|
@@ -64,6 +76,7 @@
|
||||||
this.mc.getNetHandler().addToSendQueue(new C16PacketClientStatus(C16PacketClientStatus.EnumState.REQUEST_STATS));
|
this.field_146297_k.func_147114_u().func_147297_a(new C16PacketClientStatus(C16PacketClientStatus.EnumState.REQUEST_STATS));
|
||||||
this.buttonList.clear();
|
this.field_146292_n.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.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.buttonList.add(button = new GuiButton(2, (width - field_146555_f) / 2 + 24, height / 2 + 74, 125, 20, net.minecraftforge.common.AchievementPage.getTitle(currentPage)));
|
+ this.field_146292_n.add(button = new GuiButton(2, (field_146294_l - field_146555_f) / 2 + 24, field_146295_m / 2 + 74, 125, 20, net.minecraftforge.common.AchievementPage.getTitle(currentPage)));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void actionPerformed(GuiButton button) throws IOException
|
protected void func_146284_a(GuiButton p_146284_1_) throws IOException
|
||||||
@@ -74,6 +87,16 @@
|
@@ -74,6 +87,16 @@
|
||||||
{
|
{
|
||||||
this.mc.displayGuiScreen(this.parentScreen);
|
this.field_146297_k.func_147108_a(this.field_146562_a);
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ if (button.id == 2)
|
+ if (p_146284_1_.field_146127_k == 2)
|
||||||
+ {
|
+ {
|
||||||
+ currentPage++;
|
+ currentPage++;
|
||||||
+ if (currentPage >= net.minecraftforge.common.AchievementPage.getAchievementPages().size())
|
+ if (currentPage >= net.minecraftforge.common.AchievementPage.getAchievementPages().size())
|
||||||
+ {
|
+ {
|
||||||
+ currentPage = -1;
|
+ currentPage = -1;
|
||||||
+ }
|
+ }
|
||||||
+ this.button.displayString = net.minecraftforge.common.AchievementPage.getTitle(currentPage);
|
+ this.button.field_146126_j = net.minecraftforge.common.AchievementPage.getTitle(currentPage);
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -257,7 +280,9 @@
|
@@ -257,7 +280,9 @@
|
||||||
GlStateManager.depthFunc(518);
|
GlStateManager.func_179143_c(518);
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.func_179094_E();
|
||||||
GlStateManager.translate((float)i1, (float)j1, -200.0F);
|
GlStateManager.func_179109_b((float)i1, (float)j1, -200.0F);
|
||||||
- GlStateManager.scale(1.0F / this.field_146570_r, 1.0F / this.field_146570_r, 0.0F);
|
- GlStateManager.func_179152_a(1.0F / this.field_146570_r, 1.0F / this.field_146570_r, 0.0F);
|
||||||
+ // FIXES models rendering weirdly in the acheivements pane
|
+ // FIXES models rendering weirdly in the acheivements pane
|
||||||
+ // see https://github.com/MinecraftForge/MinecraftForge/commit/1b7ce7592caafb760ec93066184182ae0711e793#commitcomment-10512284
|
+ // see https://github.com/MinecraftForge/MinecraftForge/commit/1b7ce7592caafb760ec93066184182ae0711e793#commitcomment-10512284
|
||||||
+ GlStateManager.scale(1.0F / this.field_146570_r, 1.0F / this.field_146570_r, 1.0F);
|
+ GlStateManager.func_179152_a(1.0F / this.field_146570_r, 1.0F / this.field_146570_r, 1.0F);
|
||||||
GlStateManager.enableTexture2D();
|
GlStateManager.func_179098_w();
|
||||||
GlStateManager.disableLighting();
|
GlStateManager.func_179140_f();
|
||||||
GlStateManager.enableRescaleNormal();
|
GlStateManager.func_179091_B();
|
||||||
@@ -331,11 +356,12 @@
|
@@ -331,11 +356,12 @@
|
||||||
GlStateManager.depthFunc(515);
|
GlStateManager.func_179143_c(515);
|
||||||
this.mc.getTextureManager().bindTexture(field_146561_C);
|
this.field_146297_k.func_110434_K().func_110577_a(field_146561_C);
|
||||||
|
|
||||||
- for (int j5 = 0; j5 < AchievementList.achievementList.size(); ++j5)
|
- for (int j5 = 0; j5 < AchievementList.field_76007_e.size(); ++j5)
|
||||||
+ java.util.List<Achievement> achievementList = (currentPage == -1 ? minecraftAchievements : net.minecraftforge.common.AchievementPage.getAchievementPage(currentPage).getAchievements());
|
+ java.util.List<Achievement> achievementList = (currentPage == -1 ? minecraftAchievements : net.minecraftforge.common.AchievementPage.getAchievementPage(currentPage).getAchievements());
|
||||||
+ for (int j5 = 0; j5 < achievementList.size(); ++j5)
|
+ for (int j5 = 0; j5 < achievementList.size(); ++j5)
|
||||||
{
|
{
|
||||||
- Achievement achievement1 = (Achievement)AchievementList.achievementList.get(j5);
|
- Achievement achievement1 = (Achievement)AchievementList.field_76007_e.get(j5);
|
||||||
+ Achievement achievement1 = achievementList.get(j5);
|
+ Achievement achievement1 = achievementList.get(j5);
|
||||||
|
|
||||||
- if (achievement1.parentAchievement != null)
|
- if (achievement1.field_75992_c != null)
|
||||||
+ if (achievement1.parentAchievement != null && achievementList.contains(achievement1.parentAchievement))
|
+ if (achievement1.field_75992_c != null && achievementList.contains(achievement1.field_75992_c))
|
||||||
{
|
{
|
||||||
int k5 = achievement1.displayColumn * 24 - i + 11;
|
int k5 = achievement1.field_75993_a * 24 - i + 11;
|
||||||
int l5 = achievement1.displayRow * 24 - j + 11;
|
int l5 = achievement1.field_75991_b * 24 - j + 11;
|
||||||
@@ -389,9 +415,9 @@
|
@@ -389,9 +415,9 @@
|
||||||
GlStateManager.enableRescaleNormal();
|
GlStateManager.func_179091_B();
|
||||||
GlStateManager.enableColorMaterial();
|
GlStateManager.func_179142_g();
|
||||||
|
|
||||||
- for (int i6 = 0; i6 < AchievementList.achievementList.size(); ++i6)
|
- for (int i6 = 0; i6 < AchievementList.field_76007_e.size(); ++i6)
|
||||||
+ for (int i6 = 0; i6 < achievementList.size(); ++i6)
|
+ for (int i6 = 0; i6 < achievementList.size(); ++i6)
|
||||||
{
|
{
|
||||||
- Achievement achievement2 = (Achievement)AchievementList.achievementList.get(i6);
|
- Achievement achievement2 = (Achievement)AchievementList.field_76007_e.get(i6);
|
||||||
+ Achievement achievement2 = achievementList.get(i6);
|
+ Achievement achievement2 = achievementList.get(i6);
|
||||||
int l6 = achievement2.displayColumn * 24 - i;
|
int l6 = achievement2.field_75993_a * 24 - i;
|
||||||
int j7 = achievement2.displayRow * 24 - j;
|
int j7 = achievement2.field_75991_b * 24 - j;
|
||||||
|
|
||||||
@@ -432,6 +458,7 @@
|
@@ -432,6 +458,7 @@
|
||||||
|
|
||||||
this.mc.getTextureManager().bindTexture(field_146561_C);
|
this.field_146297_k.func_110434_K().func_110577_a(field_146561_C);
|
||||||
|
|
||||||
+ GlStateManager.enableBlend(); // Forge: Specifically enable blend because it is needed here. And we fix Generic RenderItem's leakage of it.
|
+ GlStateManager.func_179147_l(); // Forge: Specifically enable blend because it is needed here. And we fix Generic RenderItem's leakage of it.
|
||||||
if (achievement2.getSpecial())
|
if (achievement2.func_75984_f())
|
||||||
{
|
{
|
||||||
this.drawTexturedModalRect(l6 - 2, j7 - 2, 26, 202, 26, 26);
|
this.func_73729_b(l6 - 2, j7 - 2, 26, 202, 26, 26);
|
||||||
@@ -440,6 +467,7 @@
|
@@ -440,6 +467,7 @@
|
||||||
{
|
{
|
||||||
this.drawTexturedModalRect(l6 - 2, j7 - 2, 0, 202, 26, 26);
|
this.func_73729_b(l6 - 2, j7 - 2, 0, 202, 26, 26);
|
||||||
}
|
}
|
||||||
+ GlStateManager.disableBlend(); //Forge: Cleanup states we set.
|
+ GlStateManager.func_179084_k(); //Forge: Cleanup states we set.
|
||||||
|
|
||||||
if (!this.statFileWriter.canUnlockAchievement(achievement2))
|
if (!this.field_146556_E.func_77442_b(achievement2))
|
||||||
{
|
{
|
||||||
@@ -448,7 +476,7 @@
|
@@ -448,7 +476,7 @@
|
||||||
this.itemRender.func_175039_a(false);
|
this.field_146296_j.func_175039_a(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
- GlStateManager.enableLighting();
|
- GlStateManager.func_179145_e();
|
||||||
+ GlStateManager.disableLighting(); //Forge: Make sure Lighting is disabled. Fixes MC-33065
|
+ GlStateManager.func_179140_f(); //Forge: Make sure Lighting is disabled. Fixes MC-33065
|
||||||
GlStateManager.enableCull();
|
GlStateManager.func_179089_o();
|
||||||
this.itemRender.renderItemAndEffectIntoGUI(achievement2.theItemStack, l6 + 3, j7 + 3);
|
this.field_146296_j.func_180450_b(achievement2.field_75990_d, l6 + 3, j7 + 3);
|
||||||
GlStateManager.blendFunc(770, 771);
|
GlStateManager.func_179112_b(770, 771);
|
||||||
|
|
|
@ -10,24 +10,24 @@
|
||||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
@@ -443,17 +445,18 @@
|
@@ -443,17 +445,18 @@
|
||||||
for (StatCrafting statcrafting : StatList.objectMineStats)
|
for (StatCrafting statcrafting : StatList.field_75939_e)
|
||||||
{
|
{
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
- int i = Item.getIdFromItem(statcrafting.func_150959_a());
|
- int i = Item.func_150891_b(statcrafting.func_150959_a());
|
||||||
+ int i = Block.getIdFromBlock(Block.getBlockFromItem(statcrafting.func_150959_a()));
|
+ int i = Block.func_149682_b(Block.func_149634_a(statcrafting.func_150959_a()));
|
||||||
+ int itemId = Item.getIdFromItem(statcrafting.func_150959_a());
|
+ int itemId = Item.func_150891_b(statcrafting.func_150959_a());
|
||||||
|
|
||||||
if (GuiStats.this.field_146546_t.readStat(statcrafting) > 0)
|
if (GuiStats.this.field_146546_t.func_77444_a(statcrafting) > 0)
|
||||||
{
|
{
|
||||||
flag = true;
|
flag = true;
|
||||||
}
|
}
|
||||||
- else if (StatList.objectUseStats[i] != null && GuiStats.this.field_146546_t.readStat(StatList.objectUseStats[i]) > 0)
|
- else if (StatList.field_75929_E[i] != null && GuiStats.this.field_146546_t.func_77444_a(StatList.field_75929_E[i]) > 0)
|
||||||
+ else if (StatList.objectUseStats[itemId] != null && GuiStats.this.field_146546_t.readStat(StatList.objectUseStats[itemId]) > 0)
|
+ else if (StatList.field_75929_E[itemId] != null && GuiStats.this.field_146546_t.func_77444_a(StatList.field_75929_E[itemId]) > 0)
|
||||||
{
|
{
|
||||||
flag = true;
|
flag = true;
|
||||||
}
|
}
|
||||||
- else if (StatList.objectCraftStats[i] != null && GuiStats.this.field_146546_t.readStat(StatList.objectCraftStats[i]) > 0)
|
- else if (StatList.field_75928_D[i] != null && GuiStats.this.field_146546_t.func_77444_a(StatList.field_75928_D[i]) > 0)
|
||||||
+ else if (StatList.objectCraftStats[itemId] != null && GuiStats.this.field_146546_t.readStat(StatList.objectCraftStats[itemId]) > 0)
|
+ else if (StatList.field_75928_D[itemId] != null && GuiStats.this.field_146546_t.func_77444_a(StatList.field_75928_D[itemId]) > 0)
|
||||||
{
|
{
|
||||||
flag = true;
|
flag = true;
|
||||||
}
|
}
|
||||||
|
@ -35,35 +35,35 @@
|
||||||
{
|
{
|
||||||
public int compare(StatCrafting p_compare_1_, StatCrafting p_compare_2_)
|
public int compare(StatCrafting p_compare_1_, StatCrafting p_compare_2_)
|
||||||
{
|
{
|
||||||
- int j = Item.getIdFromItem(p_compare_1_.func_150959_a());
|
- int j = Item.func_150891_b(p_compare_1_.func_150959_a());
|
||||||
- int k = Item.getIdFromItem(p_compare_2_.func_150959_a());
|
- int k = Item.func_150891_b(p_compare_2_.func_150959_a());
|
||||||
+ int j;
|
+ int j;
|
||||||
+ int k;
|
+ int k;
|
||||||
+ if (StatsBlock.this.field_148217_o == 2) {
|
+ if (StatsBlock.this.field_148217_o == 2) {
|
||||||
+ j = Block.getIdFromBlock(Block.getBlockFromItem(p_compare_1_.func_150959_a()));
|
+ j = Block.func_149682_b(Block.func_149634_a(p_compare_1_.func_150959_a()));
|
||||||
+ k = Block.getIdFromBlock(Block.getBlockFromItem(p_compare_2_.func_150959_a()));
|
+ k = Block.func_149682_b(Block.func_149634_a(p_compare_2_.func_150959_a()));
|
||||||
+ } else {
|
+ } else {
|
||||||
+ j = Item.getIdFromItem(p_compare_1_.func_150959_a());
|
+ j = Item.func_150891_b(p_compare_1_.func_150959_a());
|
||||||
+ k = Item.getIdFromItem(p_compare_2_.func_150959_a());
|
+ k = Item.func_150891_b(p_compare_2_.func_150959_a());
|
||||||
+ }
|
+ }
|
||||||
StatBase statbase = null;
|
StatBase statbase = null;
|
||||||
StatBase statbase1 = null;
|
StatBase statbase1 = null;
|
||||||
|
|
||||||
@@ -748,7 +758,7 @@
|
@@ -748,7 +758,7 @@
|
||||||
super(mcIn, GuiStats.this.width, GuiStats.this.height, 32, GuiStats.this.height - 64, GuiStats.this.fontRendererObj.FONT_HEIGHT * 4);
|
super(p_i45510_2_, GuiStats.this.field_146294_l, GuiStats.this.field_146295_m, 32, GuiStats.this.field_146295_m - 64, GuiStats.this.field_146289_q.field_78288_b * 4);
|
||||||
this.setShowSelectionBox(false);
|
this.func_148130_a(false);
|
||||||
|
|
||||||
- for (EntityList.EntityEggInfo entitylist$entityegginfo : EntityList.entityEggs.values())
|
- for (EntityList.EntityEggInfo entitylist$entityegginfo : EntityList.field_75627_a.values())
|
||||||
+ for (EntityList.EntityEggInfo entitylist$entityegginfo : com.google.common.collect.Iterables.concat(EntityList.entityEggs.values(), net.minecraftforge.fml.common.registry.EntityRegistry.getEggs().values()))
|
+ for (EntityList.EntityEggInfo entitylist$entityegginfo : com.google.common.collect.Iterables.concat(EntityList.field_75627_a.values(), net.minecraftforge.fml.common.registry.EntityRegistry.getEggs().values()))
|
||||||
{
|
{
|
||||||
if (GuiStats.this.field_146546_t.readStat(entitylist$entityegginfo.field_151512_d) > 0 || GuiStats.this.field_146546_t.readStat(entitylist$entityegginfo.field_151513_e) > 0)
|
if (GuiStats.this.field_146546_t.func_77444_a(entitylist$entityegginfo.field_151512_d) > 0 || GuiStats.this.field_146546_t.func_77444_a(entitylist$entityegginfo.field_151513_e) > 0)
|
||||||
{
|
{
|
||||||
@@ -784,7 +794,7 @@
|
@@ -784,7 +794,7 @@
|
||||||
protected void drawSlot(int entryID, int p_180791_2_, int p_180791_3_, int p_180791_4_, int p_180791_5_, int p_180791_6_)
|
protected void func_180791_a(int p_180791_1_, int p_180791_2_, int p_180791_3_, int p_180791_4_, int p_180791_5_, int p_180791_6_)
|
||||||
{
|
{
|
||||||
EntityList.EntityEggInfo entitylist$entityegginfo = (EntityList.EntityEggInfo)this.field_148222_l.get(entryID);
|
EntityList.EntityEggInfo entitylist$entityegginfo = (EntityList.EntityEggInfo)this.field_148222_l.get(p_180791_1_);
|
||||||
- String s = I18n.format("entity." + EntityList.getStringFromID(entitylist$entityegginfo.spawnedID) + ".name", new Object[0]);
|
- String s = I18n.func_135052_a("entity." + EntityList.func_75617_a(entitylist$entityegginfo.field_75613_a) + ".name", new Object[0]);
|
||||||
+ String s = I18n.format("entity." + entitylist$entityegginfo.name + ".name", new Object[0]);
|
+ String s = I18n.func_135052_a("entity." + entitylist$entityegginfo.name + ".name", new Object[0]);
|
||||||
int i = GuiStats.this.field_146546_t.readStat(entitylist$entityegginfo.field_151512_d);
|
int i = GuiStats.this.field_146546_t.func_77444_a(entitylist$entityegginfo.field_151512_d);
|
||||||
int j = GuiStats.this.field_146546_t.readStat(entitylist$entityegginfo.field_151513_e);
|
int j = GuiStats.this.field_146546_t.func_77444_a(entitylist$entityegginfo.field_151513_e);
|
||||||
String s1 = I18n.format("stat.entityKills", new Object[] {Integer.valueOf(i), s});
|
String s1 = I18n.func_135052_a("stat.entityKills", new Object[] {Integer.valueOf(i), s});
|
||||||
|
|
|
@ -1,45 +1,45 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java
|
--- ../src-base/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java
|
+++ ../src-work/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java
|
||||||
@@ -175,8 +175,11 @@
|
@@ -175,8 +175,11 @@
|
||||||
GlStateManager.translate(0.0F, 0.0F, 32.0F);
|
GlStateManager.func_179109_b(0.0F, 0.0F, 32.0F);
|
||||||
this.zLevel = 200.0F;
|
this.field_73735_i = 200.0F;
|
||||||
this.itemRender.zLevel = 200.0F;
|
this.field_146296_j.field_77023_b = 200.0F;
|
||||||
+ net.minecraft.client.gui.FontRenderer font = null;
|
+ net.minecraft.client.gui.FontRenderer font = null;
|
||||||
+ if (stack != null) font = stack.getItem().getFontRenderer(stack);
|
+ if (p_146982_1_ != null) font = p_146982_1_.func_77973_b().getFontRenderer(p_146982_1_);
|
||||||
+ if (font == null) font = fontRendererObj;
|
+ if (font == null) font = field_146289_q;
|
||||||
this.itemRender.renderItemAndEffectIntoGUI(stack, x, y);
|
this.field_146296_j.func_180450_b(p_146982_1_, p_146982_2_, p_146982_3_);
|
||||||
- this.itemRender.renderItemOverlayIntoGUI(this.fontRendererObj, stack, x, y - (this.draggedStack == null ? 0 : 8), altText);
|
- this.field_146296_j.func_180453_a(this.field_146289_q, p_146982_1_, p_146982_2_, p_146982_3_ - (this.field_147012_x == null ? 0 : 8), p_146982_4_);
|
||||||
+ this.itemRender.renderItemOverlayIntoGUI(font, stack, x, y - (this.draggedStack == null ? 0 : 8), altText);
|
+ this.field_146296_j.func_180453_a(font, p_146982_1_, p_146982_2_, p_146982_3_ - (this.field_147012_x == null ? 0 : 8), p_146982_4_);
|
||||||
this.zLevel = 0.0F;
|
this.field_73735_i = 0.0F;
|
||||||
this.itemRender.zLevel = 0.0F;
|
this.field_146296_j.field_77023_b = 0.0F;
|
||||||
}
|
}
|
||||||
@@ -239,13 +242,12 @@
|
@@ -239,13 +242,12 @@
|
||||||
|
|
||||||
if (itemstack == null)
|
if (itemstack == null)
|
||||||
{
|
{
|
||||||
- String s1 = slotIn.getSlotTexture();
|
- String s1 = p_146977_1_.func_178171_c();
|
||||||
+ TextureAtlasSprite textureatlassprite = slotIn.getBackgroundSprite();
|
+ TextureAtlasSprite textureatlassprite = p_146977_1_.getBackgroundSprite();
|
||||||
|
|
||||||
- if (s1 != null)
|
- if (s1 != null)
|
||||||
+ if (textureatlassprite != null)
|
+ if (textureatlassprite != null)
|
||||||
{
|
{
|
||||||
- TextureAtlasSprite textureatlassprite = this.mc.getTextureMapBlocks().getAtlasSprite(s1);
|
- TextureAtlasSprite textureatlassprite = this.field_146297_k.func_147117_R().func_110572_b(s1);
|
||||||
GlStateManager.disableLighting();
|
GlStateManager.func_179140_f();
|
||||||
- this.mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
|
- this.field_146297_k.func_110434_K().func_110577_a(TextureMap.field_110575_b);
|
||||||
+ this.mc.getTextureManager().bindTexture(slotIn.getBackgroundLocation());
|
+ this.field_146297_k.func_110434_K().func_110577_a(p_146977_1_.getBackgroundLocation());
|
||||||
this.drawTexturedModalRect(i, j, textureatlassprite, 16, 16);
|
this.func_175175_a(i, j, textureatlassprite, 16, 16);
|
||||||
GlStateManager.enableLighting();
|
GlStateManager.func_179145_e();
|
||||||
flag1 = true;
|
flag1 = true;
|
||||||
@@ -463,6 +465,7 @@
|
@@ -463,6 +465,7 @@
|
||||||
|
|
||||||
protected void mouseReleased(int mouseX, int mouseY, int state)
|
protected void func_146286_b(int p_146286_1_, int p_146286_2_, int p_146286_3_)
|
||||||
{
|
{
|
||||||
+ super.mouseReleased(mouseX, mouseY, state); //Forge, Call parent to release buttons
|
+ super.func_146286_b(p_146286_1_, p_146286_2_, p_146286_3_); //Forge, Call parent to release buttons
|
||||||
Slot slot = this.getSlotAtPosition(mouseX, mouseY);
|
Slot slot = this.func_146975_c(p_146286_1_, p_146286_2_);
|
||||||
int i = this.guiLeft;
|
int i = this.field_147003_i;
|
||||||
int j = this.guiTop;
|
int j = this.field_147009_r;
|
||||||
@@ -685,4 +688,16 @@
|
@@ -685,4 +688,16 @@
|
||||||
this.mc.thePlayer.closeScreen();
|
this.field_146297_k.field_71439_g.func_71053_j();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
+ */
|
+ */
|
||||||
+ public Slot getSlotUnderMouse()
|
+ public Slot getSlotUnderMouse()
|
||||||
+ {
|
+ {
|
||||||
+ return this.theSlot;
|
+ return this.field_147006_u;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /* ======================================== FORGE END =====================================*/
|
+ /* ======================================== FORGE END =====================================*/
|
||||||
|
|
|
@ -13,20 +13,20 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
- if (itemstack1 != null && itemstack2 != null && itemstack1.isItemEqual(itemstack2))
|
- if (itemstack1 != null && itemstack2 != null && itemstack1.func_77969_a(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) && ItemStack.func_77970_a(itemstack1, itemstack2)) //Forge: Bugfix, Compare NBT data, allow for deletion of enchanted books, MC-12770
|
||||||
{
|
{
|
||||||
if (clickedButton == 0)
|
if (p_146984_3_ == 0)
|
||||||
{
|
{
|
||||||
@@ -259,6 +261,13 @@
|
@@ -259,6 +261,13 @@
|
||||||
this.setCurrentCreativeTab(CreativeTabs.creativeTabArray[i]);
|
this.func_147050_b(CreativeTabs.field_78032_a[i]);
|
||||||
this.field_147059_E = new CreativeCrafting(this.mc);
|
this.field_147059_E = new CreativeCrafting(this.field_146297_k);
|
||||||
this.mc.thePlayer.inventoryContainer.addCraftingToCrafters(this.field_147059_E);
|
this.field_146297_k.field_71439_g.field_71069_bz.func_75132_a(this.field_147059_E);
|
||||||
+ int tabCount = CreativeTabs.creativeTabArray.length;
|
+ int tabCount = CreativeTabs.field_78032_a.length;
|
||||||
+ if (tabCount > 12)
|
+ if (tabCount > 12)
|
||||||
+ {
|
+ {
|
||||||
+ buttonList.add(new GuiButton(101, guiLeft, guiTop - 50, 20, 20, "<"));
|
+ field_146292_n.add(new GuiButton(101, field_147003_i, field_147009_r - 50, 20, 20, "<"));
|
||||||
+ buttonList.add(new GuiButton(102, guiLeft + xSize - 20, guiTop - 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;
|
+ maxPages = ((tabCount - 12) / 10) + 1;
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
@ -34,30 +34,30 @@
|
||||||
{
|
{
|
||||||
@@ -280,7 +289,7 @@
|
@@ -280,7 +289,7 @@
|
||||||
|
|
||||||
protected void keyTyped(char typedChar, int keyCode) throws IOException
|
protected void func_73869_a(char p_73869_1_, int p_73869_2_) throws IOException
|
||||||
{
|
{
|
||||||
- if (selectedTabIndex != CreativeTabs.tabAllSearch.getTabIndex())
|
- if (field_147058_w != CreativeTabs.field_78027_g.func_78021_a())
|
||||||
+ if (!CreativeTabs.creativeTabArray[selectedTabIndex].hasSearchBar())
|
+ 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))
|
||||||
{
|
{
|
||||||
@@ -318,6 +327,14 @@
|
@@ -318,6 +327,14 @@
|
||||||
GuiContainerCreative.ContainerCreative guicontainercreative$containercreative = (GuiContainerCreative.ContainerCreative)this.inventorySlots;
|
GuiContainerCreative.ContainerCreative guicontainercreative$containercreative = (GuiContainerCreative.ContainerCreative)this.field_147002_h;
|
||||||
guicontainercreative$containercreative.itemList.clear();
|
guicontainercreative$containercreative.field_148330_a.clear();
|
||||||
|
|
||||||
+ CreativeTabs tab = CreativeTabs.creativeTabArray[selectedTabIndex];
|
+ CreativeTabs tab = CreativeTabs.field_78032_a[field_147058_w];
|
||||||
+ if (tab.hasSearchBar() && tab != CreativeTabs.tabAllSearch)
|
+ if (tab.hasSearchBar() && tab != CreativeTabs.field_78027_g)
|
||||||
+ {
|
+ {
|
||||||
+ tab.displayAllReleventItems(guicontainercreative$containercreative.itemList);
|
+ tab.func_78018_a(guicontainercreative$containercreative.field_148330_a);
|
||||||
+ updateFilteredItems(guicontainercreative$containercreative);
|
+ updateFilteredItems(guicontainercreative$containercreative);
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
for (Item item : Item.itemRegistry)
|
for (Item item : Item.field_150901_e)
|
||||||
{
|
{
|
||||||
if (item != null && item.getCreativeTab() != null)
|
if (item != null && item.func_77640_w() != null)
|
||||||
@@ -325,7 +342,13 @@
|
@@ -325,7 +342,13 @@
|
||||||
item.getSubItems(item, (CreativeTabs)null, guicontainercreative$containercreative.itemList);
|
item.func_150895_a(item, (CreativeTabs)null, guicontainercreative$containercreative.field_148330_a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+ updateFilteredItems(guicontainercreative$containercreative);
|
+ updateFilteredItems(guicontainercreative$containercreative);
|
||||||
|
@ -66,126 +66,126 @@
|
||||||
+ //split from above for custom search tabs
|
+ //split from above for custom search tabs
|
||||||
+ private void updateFilteredItems(GuiContainerCreative.ContainerCreative guicontainercreative$containercreative)
|
+ private void updateFilteredItems(GuiContainerCreative.ContainerCreative guicontainercreative$containercreative)
|
||||||
+ {
|
+ {
|
||||||
+ if (CreativeTabs.creativeTabArray[selectedTabIndex] == CreativeTabs.tabAllSearch) // FORGE: Only add enchanted books to the regular search
|
+ if (CreativeTabs.field_78032_a[field_147058_w] == CreativeTabs.field_78027_g) // FORGE: Only add enchanted books to the regular search
|
||||||
for (Enchantment enchantment : Enchantment.enchantmentsBookList)
|
for (Enchantment enchantment : Enchantment.field_77331_b)
|
||||||
{
|
{
|
||||||
if (enchantment != null && enchantment.type != null)
|
if (enchantment != null && enchantment.field_77351_y != null)
|
||||||
@@ -333,7 +356,6 @@
|
@@ -333,7 +356,6 @@
|
||||||
Items.enchanted_book.getAll(enchantment, guicontainercreative$containercreative.itemList);
|
Items.field_151134_bR.func_92113_a(enchantment, guicontainercreative$containercreative.field_148330_a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
-
|
-
|
||||||
Iterator<ItemStack> iterator = guicontainercreative$containercreative.itemList.iterator();
|
Iterator<ItemStack> iterator = guicontainercreative$containercreative.field_148330_a.iterator();
|
||||||
String s1 = this.searchField.getText().toLowerCase();
|
String s1 = this.field_147062_A.func_146179_b().toLowerCase();
|
||||||
|
|
||||||
@@ -365,7 +387,7 @@
|
@@ -365,7 +387,7 @@
|
||||||
{
|
{
|
||||||
CreativeTabs creativetabs = CreativeTabs.creativeTabArray[selectedTabIndex];
|
CreativeTabs creativetabs = CreativeTabs.field_78032_a[field_147058_w];
|
||||||
|
|
||||||
- if (creativetabs.drawInForegroundOfTab())
|
- if (creativetabs.func_78019_g())
|
||||||
+ if (creativetabs != null && creativetabs.drawInForegroundOfTab())
|
+ if (creativetabs != null && creativetabs.func_78019_g())
|
||||||
{
|
{
|
||||||
GlStateManager.disableBlend();
|
GlStateManager.func_179084_k();
|
||||||
this.fontRendererObj.drawString(I18n.format(creativetabs.getTranslatedTabLabel(), new Object[0]), 8, 6, 4210752);
|
this.field_146289_q.func_78276_b(I18n.func_135052_a(creativetabs.func_78024_c(), new Object[0]), 8, 6, 4210752);
|
||||||
@@ -400,7 +422,7 @@
|
@@ -400,7 +422,7 @@
|
||||||
|
|
||||||
for (CreativeTabs creativetabs : CreativeTabs.creativeTabArray)
|
for (CreativeTabs creativetabs : CreativeTabs.field_78032_a)
|
||||||
{
|
{
|
||||||
- if (this.func_147049_a(creativetabs, i, j))
|
- if (this.func_147049_a(creativetabs, i, j))
|
||||||
+ if (creativetabs != null && this.func_147049_a(creativetabs, i, j))
|
+ if (creativetabs != null && this.func_147049_a(creativetabs, i, j))
|
||||||
{
|
{
|
||||||
this.setCurrentCreativeTab(creativetabs);
|
this.func_147050_b(creativetabs);
|
||||||
return;
|
return;
|
||||||
@@ -413,11 +435,13 @@
|
@@ -413,11 +435,13 @@
|
||||||
|
|
||||||
private boolean needsScrollBars()
|
private boolean func_147055_p()
|
||||||
{
|
{
|
||||||
+ if (CreativeTabs.creativeTabArray[selectedTabIndex] == null) return false;
|
+ if (CreativeTabs.field_78032_a[field_147058_w] == null) return false;
|
||||||
return selectedTabIndex != CreativeTabs.tabInventory.getTabIndex() && CreativeTabs.creativeTabArray[selectedTabIndex].shouldHidePlayerInventory() && ((GuiContainerCreative.ContainerCreative)this.inventorySlots).func_148328_e();
|
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;
|
+ if (p_147050_1_ == null) return;
|
||||||
int i = selectedTabIndex;
|
int i = field_147058_w;
|
||||||
selectedTabIndex = p_147050_1_.getTabIndex();
|
field_147058_w = p_147050_1_.func_78021_a();
|
||||||
GuiContainerCreative.ContainerCreative guicontainercreative$containercreative = (GuiContainerCreative.ContainerCreative)this.inventorySlots;
|
GuiContainerCreative.ContainerCreative guicontainercreative$containercreative = (GuiContainerCreative.ContainerCreative)this.field_147002_h;
|
||||||
@@ -483,12 +507,14 @@
|
@@ -483,12 +507,14 @@
|
||||||
|
|
||||||
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())
|
+ if (p_147050_1_.hasSearchBar())
|
||||||
{
|
{
|
||||||
this.searchField.setVisible(true);
|
this.field_147062_A.func_146189_e(true);
|
||||||
this.searchField.setCanLoseFocus(false);
|
this.field_147062_A.func_146205_d(false);
|
||||||
this.searchField.setFocused(true);
|
this.field_147062_A.func_146195_b(true);
|
||||||
this.searchField.setText("");
|
this.field_147062_A.func_146180_a("");
|
||||||
+ this.searchField.width = p_147050_1_.getSearchbarWidth();
|
+ this.field_147062_A.field_146218_h = p_147050_1_.getSearchbarWidth();
|
||||||
+ this.searchField.xPosition = this.guiLeft + (82 /*default left*/ + 89 /*default width*/) - this.searchField.width;
|
+ this.field_147062_A.field_146209_f = this.field_147003_i + (82 /*default left*/ + 89 /*default width*/) - this.field_147062_A.field_146218_h;
|
||||||
this.updateCreativeSearch();
|
this.func_147053_i();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -558,20 +584,43 @@
|
@@ -558,20 +584,43 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_);
|
||||||
+ int start = tabPage * 10;
|
+ int start = tabPage * 10;
|
||||||
+ int end = Math.min(CreativeTabs.creativeTabArray.length, ((tabPage + 1) * 10) + 2);
|
+ int end = Math.min(CreativeTabs.field_78032_a.length, ((tabPage + 1) * 10) + 2);
|
||||||
+ if (tabPage != 0) start += 2;
|
+ if (tabPage != 0) start += 2;
|
||||||
+ boolean rendered = false;
|
+ boolean rendered = false;
|
||||||
|
|
||||||
- for (CreativeTabs creativetabs : CreativeTabs.creativeTabArray)
|
- for (CreativeTabs creativetabs : CreativeTabs.field_78032_a)
|
||||||
+ for (CreativeTabs creativetabs : java.util.Arrays.copyOfRange(CreativeTabs.creativeTabArray,start,end))
|
+ for (CreativeTabs creativetabs : java.util.Arrays.copyOfRange(CreativeTabs.field_78032_a,start,end))
|
||||||
{
|
{
|
||||||
+ if (creativetabs == null) continue;
|
+ if (creativetabs == null) continue;
|
||||||
if (this.renderCreativeInventoryHoveringText(creativetabs, mouseX, mouseY))
|
if (this.func_147052_b(creativetabs, p_73863_1_, p_73863_2_))
|
||||||
{
|
{
|
||||||
+ rendered = true;
|
+ rendered = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ if (!rendered && renderCreativeInventoryHoveringText(CreativeTabs.tabAllSearch, mouseX, mouseY))
|
+ if (!rendered && func_147052_b(CreativeTabs.field_78027_g, p_73863_1_, p_73863_2_))
|
||||||
+ {
|
+ {
|
||||||
+ renderCreativeInventoryHoveringText(CreativeTabs.tabInventory, mouseX, mouseY);
|
+ func_147052_b(CreativeTabs.field_78036_m, p_73863_1_, p_73863_2_);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
if (this.field_147064_C != null && selectedTabIndex == CreativeTabs.tabInventory.getTabIndex() && this.isPointInRegion(this.field_147064_C.xDisplayPosition, this.field_147064_C.yDisplayPosition, 16, 16, mouseX, mouseY))
|
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]), mouseX, mouseY);
|
this.func_146279_a(I18n.func_135052_a("inventory.binSlot", new Object[0]), p_73863_1_, p_73863_2_);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ if (maxPages != 0)
|
+ if (maxPages != 0)
|
||||||
+ {
|
+ {
|
||||||
+ String page = String.format("%d / %d", tabPage + 1, maxPages + 1);
|
+ String page = String.format("%d / %d", tabPage + 1, maxPages + 1);
|
||||||
+ int width = fontRendererObj.getStringWidth(page);
|
+ int width = field_146289_q.func_78256_a(page);
|
||||||
+ GlStateManager.disableLighting();
|
+ GlStateManager.func_179140_f();
|
||||||
+ this.zLevel = 300.0F;
|
+ this.field_73735_i = 300.0F;
|
||||||
+ itemRender.zLevel = 300.0F;
|
+ field_146296_j.field_77023_b = 300.0F;
|
||||||
+ fontRendererObj.drawString(page, guiLeft + (xSize / 2) - (width / 2), guiTop - 44, -1);
|
+ field_146289_q.func_78276_b(page, field_147003_i + (field_146999_f / 2) - (width / 2), field_147009_r - 44, -1);
|
||||||
+ this.zLevel = 0.0F;
|
+ this.field_73735_i = 0.0F;
|
||||||
+ itemRender.zLevel = 0.0F;
|
+ field_146296_j.field_77023_b = 0.0F;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
GlStateManager.disableLighting();
|
GlStateManager.func_179140_f();
|
||||||
}
|
}
|
||||||
@@ -633,16 +682,35 @@
|
@@ -633,16 +682,35 @@
|
||||||
RenderHelper.enableGUIStandardItemLighting();
|
RenderHelper.func_74520_c();
|
||||||
CreativeTabs creativetabs = CreativeTabs.creativeTabArray[selectedTabIndex];
|
CreativeTabs creativetabs = CreativeTabs.field_78032_a[field_147058_w];
|
||||||
|
|
||||||
- for (CreativeTabs creativetabs1 : CreativeTabs.creativeTabArray)
|
- for (CreativeTabs creativetabs1 : CreativeTabs.field_78032_a)
|
||||||
+ int start = tabPage * 10;
|
+ int start = tabPage * 10;
|
||||||
+ int end = Math.min(CreativeTabs.creativeTabArray.length, ((tabPage + 1) * 10 + 2));
|
+ int end = Math.min(CreativeTabs.field_78032_a.length, ((tabPage + 1) * 10 + 2));
|
||||||
+ if (tabPage != 0) start += 2;
|
+ if (tabPage != 0) start += 2;
|
||||||
+
|
+
|
||||||
+ for (CreativeTabs creativetabs1 : java.util.Arrays.copyOfRange(CreativeTabs.creativeTabArray,start,end))
|
+ for (CreativeTabs creativetabs1 : java.util.Arrays.copyOfRange(CreativeTabs.field_78032_a,start,end))
|
||||||
{
|
{
|
||||||
this.mc.getTextureManager().bindTexture(creativeInventoryTabs);
|
this.field_146297_k.func_110434_K().func_110577_a(field_147061_u);
|
||||||
|
|
||||||
+ if (creativetabs1 == null) continue;
|
+ if (creativetabs1 == null) continue;
|
||||||
if (creativetabs1.getTabIndex() != selectedTabIndex)
|
if (creativetabs1.func_78021_a() != field_147058_w)
|
||||||
{
|
{
|
||||||
this.func_147051_a(creativetabs1);
|
this.func_147051_a(creativetabs1);
|
||||||
}
|
}
|
||||||
|
@ -193,28 +193,28 @@
|
||||||
|
|
||||||
+ if (tabPage != 0)
|
+ if (tabPage != 0)
|
||||||
+ {
|
+ {
|
||||||
+ if (creativetabs != CreativeTabs.tabAllSearch)
|
+ if (creativetabs != CreativeTabs.field_78027_g)
|
||||||
+ {
|
+ {
|
||||||
+ this.mc.getTextureManager().bindTexture(creativeInventoryTabs);
|
+ this.field_146297_k.func_110434_K().func_110577_a(field_147061_u);
|
||||||
+ func_147051_a(CreativeTabs.tabAllSearch);
|
+ func_147051_a(CreativeTabs.field_78027_g);
|
||||||
+ }
|
+ }
|
||||||
+ if (creativetabs != CreativeTabs.tabInventory)
|
+ if (creativetabs != CreativeTabs.field_78036_m)
|
||||||
+ {
|
+ {
|
||||||
+ this.mc.getTextureManager().bindTexture(creativeInventoryTabs);
|
+ this.field_146297_k.func_110434_K().func_110577_a(field_147061_u);
|
||||||
+ func_147051_a(CreativeTabs.tabInventory);
|
+ func_147051_a(CreativeTabs.field_78036_m);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
this.mc.getTextureManager().bindTexture(new ResourceLocation("textures/gui/container/creative_inventory/tab_" + creativetabs.getBackgroundImageName()));
|
this.field_146297_k.func_110434_K().func_110577_a(new ResourceLocation("textures/gui/container/creative_inventory/tab_" + creativetabs.func_78015_f()));
|
||||||
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
|
this.func_73729_b(this.field_147003_i, this.field_147009_r, 0, 0, this.field_146999_f, this.field_147000_g);
|
||||||
this.searchField.drawTextBox();
|
this.field_147062_A.func_146194_f();
|
||||||
@@ -657,6 +725,14 @@
|
@@ -657,6 +725,14 @@
|
||||||
this.drawTexturedModalRect(i, j + (int)((float)(k - j - 17) * this.currentScroll), 232 + (this.needsScrollBars() ? 0 : 12), 0, 12, 15);
|
this.func_73729_b(i, j + (int)((float)(k - j - 17) * this.field_147067_x), 232 + (this.func_147055_p() ? 0 : 12), 0, 12, 15);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ if (creativetabs == null || creativetabs.getTabPage() != tabPage)
|
+ 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;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
|
@ -222,44 +222,44 @@
|
||||||
+
|
+
|
||||||
this.func_147051_a(creativetabs);
|
this.func_147051_a(creativetabs);
|
||||||
|
|
||||||
if (creativetabs == CreativeTabs.tabInventory)
|
if (creativetabs == CreativeTabs.field_78036_m)
|
||||||
@@ -667,6 +743,14 @@
|
@@ -667,6 +743,14 @@
|
||||||
|
|
||||||
protected boolean func_147049_a(CreativeTabs p_147049_1_, int p_147049_2_, int p_147049_3_)
|
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_.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;
|
+ return false;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
int i = p_147049_1_.getTabColumn();
|
int i = p_147049_1_.func_78020_k();
|
||||||
int j = 28 * i;
|
int j = 28 * i;
|
||||||
int k = 0;
|
int k = 0;
|
||||||
@@ -763,6 +847,8 @@
|
@@ -763,6 +847,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
GlStateManager.disableLighting();
|
GlStateManager.func_179140_f();
|
||||||
+ GlStateManager.color(1F, 1F, 1F); //Forge: Reset color in case Items change it.
|
+ GlStateManager.func_179124_c(1F, 1F, 1F); //Forge: Reset color in case Items change it.
|
||||||
+ GlStateManager.enableBlend(); //Forge: Make sure blend is enabled else tabs show a white border.
|
+ GlStateManager.func_179147_l(); //Forge: Make sure blend is enabled else tabs show a white border.
|
||||||
this.drawTexturedModalRect(l, i1, j, k, 28, j1);
|
this.func_73729_b(l, i1, j, k, 28, j1);
|
||||||
this.zLevel = 100.0F;
|
this.field_73735_i = 100.0F;
|
||||||
this.itemRender.zLevel = 100.0F;
|
this.field_146296_j.field_77023_b = 100.0F;
|
||||||
@@ -789,6 +875,15 @@
|
@@ -789,6 +875,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 (button.id == 101)
|
+ if (p_146284_1_.field_146127_k == 101)
|
||||||
+ {
|
+ {
|
||||||
+ tabPage = Math.max(tabPage - 1, 0);
|
+ tabPage = Math.max(tabPage - 1, 0);
|
||||||
+ }
|
+ }
|
||||||
+ else if (button.id == 102)
|
+ else if (p_146284_1_.field_146127_k == 102)
|
||||||
+ {
|
+ {
|
||||||
+ tabPage = Math.min(tabPage + 1, maxPages);
|
+ tabPage = Math.min(tabPage + 1, maxPages);
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSelectedTabIndex()
|
public int func_147056_g()
|
||||||
|
|
|
@ -7,4 +7,4 @@
|
||||||
-@SideOnly(Side.CLIENT)
|
-@SideOnly(Side.CLIENT)
|
||||||
public abstract class ModelBase
|
public abstract class ModelBase
|
||||||
{
|
{
|
||||||
public float swingProgress;
|
public float field_78095_p;
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
-@SideOnly(Side.CLIENT)
|
-@SideOnly(Side.CLIENT)
|
||||||
public class ModelBox
|
public class ModelBox
|
||||||
{
|
{
|
||||||
private PositionTextureVertex[] vertexPositions;
|
private PositionTextureVertex[] field_78253_h;
|
||||||
@@ -81,6 +80,7 @@
|
@@ -81,6 +80,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ @SideOnly(Side.CLIENT)
|
+ @SideOnly(Side.CLIENT)
|
||||||
public void render(WorldRenderer p_178780_1_, float p_178780_2_)
|
public void func_178780_a(WorldRenderer p_178780_1_, float p_178780_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)
|
-@SideOnly(Side.CLIENT)
|
||||||
public class ModelRenderer
|
public class ModelRenderer
|
||||||
{
|
{
|
||||||
public float textureWidth;
|
public float field_78801_a;
|
||||||
@@ -109,6 +108,7 @@
|
@@ -109,6 +108,7 @@
|
||||||
this.rotationPointZ = p_78793_3_;
|
this.field_78798_e = p_78793_3_;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ @SideOnly(Side.CLIENT)
|
+ @SideOnly(Side.CLIENT)
|
||||||
public void render(float p_78785_1_)
|
public void func_78785_a(float p_78785_1_)
|
||||||
{
|
{
|
||||||
if (!this.isHidden)
|
if (!this.field_78807_k)
|
||||||
@@ -190,6 +190,7 @@
|
@@ -190,6 +190,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ @SideOnly(Side.CLIENT)
|
+ @SideOnly(Side.CLIENT)
|
||||||
public void renderWithRotation(float p_78791_1_)
|
public void func_78791_b(float p_78791_1_)
|
||||||
{
|
{
|
||||||
if (!this.isHidden)
|
if (!this.field_78807_k)
|
||||||
@@ -225,6 +226,7 @@
|
@@ -225,6 +226,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ @SideOnly(Side.CLIENT)
|
+ @SideOnly(Side.CLIENT)
|
||||||
public void postRender(float p_78794_1_)
|
public void func_78794_c(float p_78794_1_)
|
||||||
{
|
{
|
||||||
if (!this.isHidden)
|
if (!this.field_78807_k)
|
||||||
@@ -266,6 +268,7 @@
|
@@ -266,6 +268,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ @SideOnly(Side.CLIENT)
|
+ @SideOnly(Side.CLIENT)
|
||||||
private void compileDisplayList(float p_78788_1_)
|
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)
|
-@SideOnly(Side.CLIENT)
|
||||||
public class PositionTextureVertex
|
public class PositionTextureVertex
|
||||||
{
|
{
|
||||||
public Vec3 vector3D;
|
public Vec3 field_78243_a;
|
||||||
|
|
|
@ -10,4 +10,4 @@
|
||||||
-@SideOnly(Side.CLIENT)
|
-@SideOnly(Side.CLIENT)
|
||||||
public class TexturedQuad
|
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-base/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java
|
+++ ../src-work/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java
|
||||||
@@ -55,6 +55,7 @@
|
@@ -55,6 +55,7 @@
|
||||||
Chunk chunk = new Chunk(this.worldObj, p_73158_1_, p_73158_2_);
|
Chunk chunk = new Chunk(this.field_73235_d, p_73158_1_, p_73158_2_);
|
||||||
this.chunkMapping.add(ChunkCoordIntPair.chunkXZ2Int(p_73158_1_, p_73158_2_), chunk);
|
this.field_73236_b.func_76163_a(ChunkCoordIntPair.func_77272_a(p_73158_1_, p_73158_2_), chunk);
|
||||||
this.chunkListing.add(chunk);
|
this.field_73237_c.add(chunk);
|
||||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.ChunkEvent.Load(chunk));
|
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.ChunkEvent.Load(chunk));
|
||||||
chunk.setChunkLoaded(true);
|
chunk.func_177417_c(true);
|
||||||
return chunk;
|
return chunk;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/client/multiplayer/GuiConnecting.java
|
--- ../src-base/minecraft/net/minecraft/client/multiplayer/GuiConnecting.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/multiplayer/GuiConnecting.java
|
+++ ../src-work/minecraft/net/minecraft/client/multiplayer/GuiConnecting.java
|
||||||
@@ -67,7 +67,7 @@
|
@@ -67,7 +67,7 @@
|
||||||
inetaddress = InetAddress.getByName(ip);
|
inetaddress = InetAddress.getByName(p_146367_1_);
|
||||||
GuiConnecting.this.networkManager = NetworkManager.func_181124_a(inetaddress, port, GuiConnecting.this.mc.gameSettings.func_181148_f());
|
GuiConnecting.this.field_146371_g = NetworkManager.func_181124_a(inetaddress, p_146367_2_, GuiConnecting.this.field_146297_k.field_71474_y.func_181148_f());
|
||||||
GuiConnecting.this.networkManager.setNetHandler(new NetHandlerLoginClient(GuiConnecting.this.networkManager, GuiConnecting.this.mc, GuiConnecting.this.previousGuiScreen));
|
GuiConnecting.this.field_146371_g.func_150719_a(new NetHandlerLoginClient(GuiConnecting.this.field_146371_g, GuiConnecting.this.field_146297_k, GuiConnecting.this.field_146374_i));
|
||||||
- GuiConnecting.this.networkManager.sendPacket(new C00Handshake(47, ip, port, EnumConnectionState.LOGIN));
|
- GuiConnecting.this.field_146371_g.func_179290_a(new C00Handshake(47, p_146367_1_, p_146367_2_, EnumConnectionState.LOGIN));
|
||||||
+ GuiConnecting.this.networkManager.sendPacket(new C00Handshake(47, ip, port, EnumConnectionState.LOGIN, true));
|
+ GuiConnecting.this.field_146371_g.func_179290_a(new C00Handshake(47, p_146367_1_, p_146367_2_, EnumConnectionState.LOGIN, true));
|
||||||
GuiConnecting.this.networkManager.sendPacket(new C00PacketLoginStart(GuiConnecting.this.mc.getSession().getProfile()));
|
GuiConnecting.this.field_146371_g.func_179290_a(new C00PacketLoginStart(GuiConnecting.this.field_146297_k.func_110432_I().func_148256_e()));
|
||||||
}
|
}
|
||||||
catch (UnknownHostException unknownhostexception)
|
catch (UnknownHostException unknownhostexception)
|
||||||
|
|
|
@ -4,66 +4,66 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ ItemStack stack = mc.thePlayer.getCurrentEquippedItem();
|
+ ItemStack stack = field_78776_a.field_71439_g.func_71045_bC();
|
||||||
+ if (stack != null && stack.getItem() != null && stack.getItem().onBlockStartBreak(stack, pos, mc.thePlayer))
|
+ if (stack != null && stack.func_77973_b() != null && stack.func_77973_b().onBlockStartBreak(stack, p_178888_1_, field_78776_a.field_71439_g))
|
||||||
+ {
|
+ {
|
||||||
+ return false;
|
+ return false;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
if (this.currentGameType.isCreative() && this.mc.thePlayer.getHeldItem() != null && this.mc.thePlayer.getHeldItem().getItem() instanceof ItemSword)
|
if (this.field_78779_k.func_77145_d() && this.field_78776_a.field_71439_g.func_70694_bm() != null && this.field_78776_a.field_71439_g.func_70694_bm().func_77973_b() instanceof ItemSword)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@@ -128,7 +134,7 @@
|
@@ -128,7 +134,7 @@
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
world.playAuxSFX(2001, pos, Block.getStateId(iblockstate));
|
world.func_175718_b(2001, p_178888_1_, Block.func_176210_f(iblockstate));
|
||||||
- boolean flag = world.setBlockToAir(pos);
|
- boolean flag = world.func_175698_g(p_178888_1_);
|
||||||
+ boolean flag = block1.removedByPlayer(world, pos, mc.thePlayer, false);
|
+ boolean flag = block1.removedByPlayer(world, p_178888_1_, field_78776_a.field_71439_g, false);
|
||||||
|
|
||||||
if (flag)
|
if (flag)
|
||||||
{
|
{
|
||||||
@@ -356,11 +362,19 @@
|
@@ -356,11 +362,19 @@
|
||||||
{
|
{
|
||||||
if (this.currentGameType != WorldSettings.GameType.SPECTATOR)
|
if (this.field_78779_k != WorldSettings.GameType.SPECTATOR)
|
||||||
{
|
{
|
||||||
+
|
+
|
||||||
+ if (p_178890_3_ != null &&
|
+ if (p_178890_3_ != null &&
|
||||||
+ p_178890_3_.getItem() != null &&
|
+ p_178890_3_.func_77973_b() != null &&
|
||||||
+ p_178890_3_.getItem().onItemUseFirst(p_178890_3_, p_178890_1_, p_178890_2_, p_178890_4_, p_178890_5_, f, f1, f2))
|
+ p_178890_3_.func_77973_b().onItemUseFirst(p_178890_3_, p_178890_1_, p_178890_2_, p_178890_4_, p_178890_5_, f, f1, f2))
|
||||||
+ {
|
+ {
|
||||||
+ return true;
|
+ return true;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
IBlockState iblockstate = p_178890_2_.getBlockState(p_178890_4_);
|
IBlockState iblockstate = p_178890_2_.func_180495_p(p_178890_4_);
|
||||||
|
|
||||||
- if ((!p_178890_1_.isSneaking() || p_178890_1_.getHeldItem() == null) && iblockstate.getBlock().onBlockActivated(p_178890_2_, p_178890_4_, iblockstate, p_178890_1_, p_178890_5_, f, f1, f2))
|
- if ((!p_178890_1_.func_70093_af() || p_178890_1_.func_70694_bm() == null) && iblockstate.func_177230_c().func_180639_a(p_178890_2_, p_178890_4_, iblockstate, p_178890_1_, p_178890_5_, f, f1, f2))
|
||||||
+ if ((!p_178890_1_.isSneaking() || p_178890_1_.getHeldItem() == null || p_178890_1_.getHeldItem().getItem().doesSneakBypassUse(p_178890_2_, p_178890_4_, p_178890_1_)))
|
+ if ((!p_178890_1_.func_70093_af() || p_178890_1_.func_70694_bm() == null || p_178890_1_.func_70694_bm().func_77973_b().doesSneakBypassUse(p_178890_2_, p_178890_4_, p_178890_1_)))
|
||||||
{
|
{
|
||||||
- flag = true;
|
- flag = true;
|
||||||
+ flag = iblockstate.getBlock().onBlockActivated(p_178890_2_, p_178890_4_, iblockstate, p_178890_1_, p_178890_5_, f, f1, f2);
|
+ flag = iblockstate.func_177230_c().func_180639_a(p_178890_2_, p_178890_4_, iblockstate, p_178890_1_, p_178890_5_, f, f1, f2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!flag && p_178890_3_ != null && p_178890_3_.getItem() instanceof ItemBlock)
|
if (!flag && p_178890_3_ != null && p_178890_3_.func_77973_b() instanceof ItemBlock)
|
||||||
@@ -393,7 +407,9 @@
|
@@ -393,7 +407,9 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
- return p_178890_3_.onItemUse(p_178890_1_, p_178890_2_, p_178890_4_, p_178890_5_, f, f1, f2);
|
- return p_178890_3_.func_179546_a(p_178890_1_, p_178890_2_, p_178890_4_, p_178890_5_, f, f1, f2);
|
||||||
+ if (!p_178890_3_.onItemUse(p_178890_1_, p_178890_2_, p_178890_4_, p_178890_5_, f, f1, f2)) return false;
|
+ if (!p_178890_3_.func_179546_a(p_178890_1_, p_178890_2_, p_178890_4_, p_178890_5_, f, f1, f2)) return false;
|
||||||
+ if (p_178890_3_.stackSize <= 0) net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(p_178890_1_, p_178890_3_);
|
+ if (p_178890_3_.field_77994_a <= 0) net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(p_178890_1_, p_178890_3_);
|
||||||
+ return true;
|
+ return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -420,9 +436,10 @@
|
@@ -420,9 +436,10 @@
|
||||||
{
|
{
|
||||||
playerIn.inventory.mainInventory[playerIn.inventory.currentItem] = itemstack;
|
p_78769_1_.field_71071_by.field_70462_a[p_78769_1_.field_71071_by.field_70461_c] = itemstack;
|
||||||
|
|
||||||
- if (itemstack.stackSize == 0)
|
- if (itemstack.field_77994_a == 0)
|
||||||
+ if (itemstack.stackSize <= 0)
|
+ if (itemstack.field_77994_a <= 0)
|
||||||
{
|
{
|
||||||
playerIn.inventory.mainInventory[playerIn.inventory.currentItem] = null;
|
p_78769_1_.field_71071_by.field_70462_a[p_78769_1_.field_71071_by.field_70461_c] = null;
|
||||||
+ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(playerIn, itemstack);
|
+ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(p_78769_1_, itemstack);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/client/multiplayer/WorldClient.java
|
--- ../src-base/minecraft/net/minecraft/client/multiplayer/WorldClient.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/multiplayer/WorldClient.java
|
+++ ../src-work/minecraft/net/minecraft/client/multiplayer/WorldClient.java
|
||||||
@@ -52,12 +52,13 @@
|
@@ -52,12 +52,13 @@
|
||||||
super(new SaveHandlerMP(), new WorldInfo(p_i45063_2_, "MpServer"), WorldProvider.getProviderForDimension(p_i45063_3_), p_i45063_5_, true);
|
super(new SaveHandlerMP(), new WorldInfo(p_i45063_2_, "MpServer"), WorldProvider.func_76570_a(p_i45063_3_), p_i45063_5_, true);
|
||||||
this.sendQueue = p_i45063_1_;
|
this.field_73035_a = p_i45063_1_;
|
||||||
this.getWorldInfo().setDifficulty(p_i45063_4_);
|
this.func_72912_H().func_176144_a(p_i45063_4_);
|
||||||
- this.setSpawnPoint(new BlockPos(8, 64, 8));
|
- this.func_175652_B(new BlockPos(8, 64, 8));
|
||||||
this.provider.registerWorld(this);
|
this.field_73011_w.func_76558_a(this);
|
||||||
+ this.setSpawnPoint(new BlockPos(8, 64, 8)); //Forge: Moved below registerWorld to prevent NPE in our redirect.
|
+ this.func_175652_B(new BlockPos(8, 64, 8)); //Forge: Moved below registerWorld to prevent NPE in our redirect.
|
||||||
this.chunkProvider = this.createChunkProvider();
|
this.field_73020_y = this.func_72970_h();
|
||||||
this.mapStorage = new SaveDataMemoryStorage();
|
this.field_72988_C = new SaveDataMemoryStorage();
|
||||||
this.calculateInitialSkylight();
|
this.func_72966_v();
|
||||||
this.calculateInitialWeather();
|
this.func_72947_a();
|
||||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Load(this));
|
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Load(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void tick()
|
public void func_72835_b()
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/network/NetHandlerHandshakeMemory.java
|
+++ ../src-work/minecraft/net/minecraft/client/network/NetHandlerHandshakeMemory.java
|
||||||
@@ -23,6 +23,7 @@
|
@@ -23,6 +23,7 @@
|
||||||
|
|
||||||
public void processHandshake(C00Handshake packetIn)
|
public void func_147383_a(C00Handshake p_147383_1_)
|
||||||
{
|
{
|
||||||
+ if (!net.minecraftforge.fml.common.FMLCommonHandler.instance().handleServerHandshake(packetIn, this.networkManager)) return;
|
+ if (!net.minecraftforge.fml.common.FMLCommonHandler.instance().handleServerHandshake(p_147383_1_, this.field_147384_b)) return;
|
||||||
this.networkManager.setConnectionState(packetIn.getRequestedState());
|
this.field_147384_b.func_150723_a(p_147383_1_.func_149594_c());
|
||||||
this.networkManager.setNetHandler(new NetHandlerLoginServer(this.mcServer, this.networkManager));
|
this.field_147384_b.func_150719_a(new NetHandlerLoginServer(this.field_147385_a, this.field_147384_b));
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/network/NetHandlerLoginClient.java
|
+++ ../src-work/minecraft/net/minecraft/client/network/NetHandlerLoginClient.java
|
||||||
@@ -104,7 +104,10 @@
|
@@ -104,7 +104,10 @@
|
||||||
{
|
{
|
||||||
this.gameProfile = packetIn.getProfile();
|
this.field_175091_e = p_147390_1_.func_179730_a();
|
||||||
this.networkManager.setConnectionState(EnumConnectionState.PLAY);
|
this.field_147393_d.func_150723_a(EnumConnectionState.PLAY);
|
||||||
- this.networkManager.setNetHandler(new NetHandlerPlayClient(this.mc, this.previousGuiScreen, this.networkManager, this.gameProfile));
|
- this.field_147393_d.func_150719_a(new NetHandlerPlayClient(this.field_147394_b, this.field_147395_c, this.field_147393_d, this.field_175091_e));
|
||||||
+ net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.fmlClientHandshake(this.networkManager);
|
+ net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.fmlClientHandshake(this.field_147393_d);
|
||||||
+ NetHandlerPlayClient nhpc = new NetHandlerPlayClient(this.mc, this.previousGuiScreen, this.networkManager, this.gameProfile);
|
+ NetHandlerPlayClient nhpc = new NetHandlerPlayClient(this.field_147394_b, this.field_147395_c, this.field_147393_d, this.field_175091_e);
|
||||||
+ this.networkManager.setNetHandler(nhpc);
|
+ this.field_147393_d.func_150719_a(nhpc);
|
||||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().setPlayClient(nhpc);
|
+ net.minecraftforge.fml.client.FMLClientHandler.instance().setPlayClient(nhpc);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onDisconnect(IChatComponent reason)
|
public void func_147231_a(IChatComponent p_147231_1_)
|
||||||
|
|
|
@ -2,51 +2,51 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java
|
+++ ../src-work/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java
|
||||||
@@ -246,7 +246,7 @@
|
@@ -246,7 +246,7 @@
|
||||||
{
|
{
|
||||||
PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
|
PacketThreadUtil.func_180031_a(p_147282_1_, this, this.field_147299_f);
|
||||||
this.gameController.playerController = new PlayerControllerMP(this.gameController, this);
|
this.field_147299_f.field_71442_b = new PlayerControllerMP(this.field_147299_f, this);
|
||||||
- this.clientWorldController = new WorldClient(this, new WorldSettings(0L, packetIn.getGameType(), false, packetIn.isHardcoreMode(), packetIn.getWorldType()), packetIn.getDimension(), packetIn.getDifficulty(), this.gameController.mcProfiler);
|
- this.field_147300_g = new WorldClient(this, new WorldSettings(0L, p_147282_1_.func_149198_e(), false, p_147282_1_.func_149195_d(), p_147282_1_.func_149196_i()), p_147282_1_.func_149194_f(), p_147282_1_.func_149192_g(), this.field_147299_f.field_71424_I);
|
||||||
+ this.clientWorldController = new WorldClient(this, new WorldSettings(0L, packetIn.getGameType(), false, packetIn.isHardcoreMode(), packetIn.getWorldType()), net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.get(getNetworkManager()).getOverrideDimension(packetIn), packetIn.getDifficulty(), this.gameController.mcProfiler);
|
+ this.field_147300_g = new WorldClient(this, new WorldSettings(0L, p_147282_1_.func_149198_e(), false, p_147282_1_.func_149195_d(), p_147282_1_.func_149196_i()), net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.get(func_147298_b()).getOverrideDimension(p_147282_1_), p_147282_1_.func_149192_g(), this.field_147299_f.field_71424_I);
|
||||||
this.gameController.gameSettings.difficulty = packetIn.getDifficulty();
|
this.field_147299_f.field_71474_y.field_74318_M = p_147282_1_.func_149192_g();
|
||||||
this.gameController.loadWorld(this.clientWorldController);
|
this.field_147299_f.func_71403_a(this.field_147300_g);
|
||||||
this.gameController.thePlayer.dimension = packetIn.getDimension();
|
this.field_147299_f.field_71439_g.field_71093_bK = p_147282_1_.func_149194_f();
|
||||||
@@ -750,14 +750,16 @@
|
@@ -750,14 +750,16 @@
|
||||||
public void handleChat(S02PacketChat packetIn)
|
public void func_147251_a(S02PacketChat p_147251_1_)
|
||||||
{
|
{
|
||||||
PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
|
PacketThreadUtil.func_180031_a(p_147251_1_, this, this.field_147299_f);
|
||||||
+ net.minecraft.util.IChatComponent message = net.minecraftforge.event.ForgeEventFactory.onClientChat(packetIn.func_179841_c(), packetIn.func_148915_c());
|
+ net.minecraft.util.IChatComponent message = net.minecraftforge.event.ForgeEventFactory.onClientChat(p_147251_1_.func_179841_c(), p_147251_1_.func_148915_c());
|
||||||
+ if (message == null) return;
|
+ if (message == null) return;
|
||||||
|
|
||||||
if (packetIn.func_179841_c() == 2)
|
if (p_147251_1_.func_179841_c() == 2)
|
||||||
{
|
{
|
||||||
- this.gameController.ingameGUI.func_175188_a(packetIn.func_148915_c(), false);
|
- this.field_147299_f.field_71456_v.func_175188_a(p_147251_1_.func_148915_c(), false);
|
||||||
+ this.gameController.ingameGUI.func_175188_a(message, false);
|
+ this.field_147299_f.field_71456_v.func_175188_a(message, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
- this.gameController.ingameGUI.getChatGUI().printChatMessage(packetIn.func_148915_c());
|
- this.field_147299_f.field_71456_v.func_146158_b().func_146227_a(p_147251_1_.func_148915_c());
|
||||||
+ this.gameController.ingameGUI.getChatGUI().printChatMessage(message);
|
+ this.field_147299_f.field_71456_v.func_146158_b().func_146227_a(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -808,6 +810,11 @@
|
@@ -808,6 +810,11 @@
|
||||||
float f = (float)(packetIn.func_149028_l() * 360) / 256.0F;
|
float f = (float)(p_147281_1_.func_149028_l() * 360) / 256.0F;
|
||||||
float f1 = (float)(packetIn.func_149030_m() * 360) / 256.0F;
|
float f1 = (float)(p_147281_1_.func_149030_m() * 360) / 256.0F;
|
||||||
EntityLivingBase entitylivingbase = (EntityLivingBase)EntityList.createEntityByID(packetIn.func_149025_e(), this.gameController.theWorld);
|
EntityLivingBase entitylivingbase = (EntityLivingBase)EntityList.func_75616_a(p_147281_1_.func_149025_e(), this.field_147299_f.field_71441_e);
|
||||||
+ if (entitylivingbase == null)
|
+ if (entitylivingbase == null)
|
||||||
+ {
|
+ {
|
||||||
+ net.minecraftforge.fml.common.FMLLog.info("Server attempted to spawn an unknown entity using ID: {0} at ({1}, {2}, {3}) Skipping!", packetIn.func_149025_e(), d0, d1, d2);
|
+ net.minecraftforge.fml.common.FMLLog.info("Server attempted to spawn an unknown entity using ID: {0} at ({1}, {2}, {3}) Skipping!", p_147281_1_.func_149025_e(), d0, d1, d2);
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
entitylivingbase.serverPosX = packetIn.func_149023_f();
|
entitylivingbase.field_70118_ct = p_147281_1_.func_149023_f();
|
||||||
entitylivingbase.serverPosY = packetIn.func_149034_g();
|
entitylivingbase.field_70117_cu = p_147281_1_.func_149034_g();
|
||||||
entitylivingbase.serverPosZ = packetIn.func_149029_h();
|
entitylivingbase.field_70116_cv = p_147281_1_.func_149029_h();
|
||||||
@@ -1133,6 +1140,10 @@
|
@@ -1133,6 +1140,10 @@
|
||||||
{
|
{
|
||||||
tileentity.readFromNBT(packetIn.getNbtCompound());
|
tileentity.func_145839_a(p_147273_1_.func_148857_g());
|
||||||
}
|
}
|
||||||
+ else
|
+ else
|
||||||
+ {
|
+ {
|
||||||
+ tileentity.onDataPacket(netManager, packetIn);
|
+ tileentity.onDataPacket(field_147302_e, p_147273_1_);
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,8 +55,8 @@
|
||||||
|
|
||||||
if (entity instanceof EntityLivingBase)
|
if (entity instanceof EntityLivingBase)
|
||||||
{
|
{
|
||||||
- PotionEffect potioneffect = new PotionEffect(packetIn.func_149427_e(), packetIn.func_180755_e(), packetIn.func_149428_f(), false, packetIn.func_179707_f());
|
- PotionEffect potioneffect = new PotionEffect(p_147260_1_.func_149427_e(), p_147260_1_.func_180755_e(), p_147260_1_.func_149428_f(), false, p_147260_1_.func_179707_f());
|
||||||
+ PotionEffect potioneffect = new PotionEffect(packetIn.func_149427_e() & 0xff, packetIn.func_180755_e(), packetIn.func_149428_f(), false, packetIn.func_179707_f());
|
+ PotionEffect potioneffect = new PotionEffect(p_147260_1_.func_149427_e() & 0xff, p_147260_1_.func_180755_e(), p_147260_1_.func_149428_f(), false, p_147260_1_.func_179707_f());
|
||||||
potioneffect.setPotionDurationMax(packetIn.func_149429_c());
|
potioneffect.func_100012_b(p_147260_1_.func_149429_c());
|
||||||
((EntityLivingBase)entity).addPotionEffect(potioneffect);
|
((EntityLivingBase)entity).func_70690_d(potioneffect);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/client/network/OldServerPinger.java
|
--- ../src-base/minecraft/net/minecraft/client/network/OldServerPinger.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/network/OldServerPinger.java
|
+++ ../src-work/minecraft/net/minecraft/client/network/OldServerPinger.java
|
||||||
@@ -150,6 +150,7 @@
|
@@ -150,6 +150,7 @@
|
||||||
server.setBase64EncodedIconData((String)null);
|
p_147224_1_.func_147407_a((String)null);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().bindServerListData(server, serverstatusresponse);
|
+ net.minecraftforge.fml.client.FMLClientHandler.instance().bindServerListData(p_147224_1_, serverstatusresponse);
|
||||||
this.field_175092_e = Minecraft.getSystemTime();
|
this.field_175092_e = Minecraft.func_71386_F();
|
||||||
networkmanager.sendPacket(new C01PacketPing(this.field_175092_e));
|
networkmanager.func_179290_a(new C01PacketPing(this.field_175092_e));
|
||||||
this.field_147403_d = true;
|
this.field_147403_d = true;
|
||||||
|
|
|
@ -2,20 +2,20 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/particle/EffectRenderer.java
|
+++ ../src-work/minecraft/net/minecraft/client/particle/EffectRenderer.java
|
||||||
@@ -133,6 +133,7 @@
|
@@ -133,6 +133,7 @@
|
||||||
|
|
||||||
public void addEffect(EntityFX p_78873_1_)
|
public void func_78873_a(EntityFX p_78873_1_)
|
||||||
{
|
{
|
||||||
+ if (p_78873_1_ == null) return; //Forge: Prevent modders from being bad and adding nulls causing untraceable NPEs.
|
+ if (p_78873_1_ == null) return; //Forge: Prevent modders from being bad and adding nulls causing untraceable NPEs.
|
||||||
int i = p_78873_1_.getFXLayer();
|
int i = p_78873_1_.func_70537_b();
|
||||||
int j = p_78873_1_.func_174838_j() != 1.0F ? 0 : 1;
|
int j = p_78873_1_.func_174838_j() != 1.0F ? 0 : 1;
|
||||||
|
|
||||||
@@ -351,7 +352,7 @@
|
@@ -351,7 +352,7 @@
|
||||||
|
|
||||||
public void func_180533_a(BlockPos p_180533_1_, IBlockState p_180533_2_)
|
public void func_180533_a(BlockPos p_180533_1_, IBlockState p_180533_2_)
|
||||||
{
|
{
|
||||||
- if (p_180533_2_.getBlock().getMaterial() != Material.air)
|
- if (p_180533_2_.func_177230_c().func_149688_o() != Material.field_151579_a)
|
||||||
+ if (!p_180533_2_.getBlock().isAir(worldObj, p_180533_1_) && !p_180533_2_.getBlock().addDestroyEffects(worldObj, p_180533_1_, this))
|
+ if (!p_180533_2_.func_177230_c().isAir(field_78878_a, p_180533_1_) && !p_180533_2_.func_177230_c().addDestroyEffects(field_78878_a, p_180533_1_, this))
|
||||||
{
|
{
|
||||||
p_180533_2_ = p_180533_2_.getBlock().getActualState(p_180533_2_, this.worldObj, p_180533_1_);
|
p_180533_2_ = p_180533_2_.func_177230_c().func_176221_a(p_180533_2_, this.field_78878_a, p_180533_1_);
|
||||||
int i = 4;
|
int i = 4;
|
||||||
@@ -457,4 +458,13 @@
|
@@ -457,4 +458,13 @@
|
||||||
|
|
||||||
|
@ -24,10 +24,10 @@
|
||||||
+
|
+
|
||||||
+ public void addBlockHitEffects(BlockPos pos, net.minecraft.util.MovingObjectPosition target)
|
+ public void addBlockHitEffects(BlockPos pos, net.minecraft.util.MovingObjectPosition target)
|
||||||
+ {
|
+ {
|
||||||
+ Block block = worldObj.getBlockState(pos).getBlock();
|
+ Block block = field_78878_a.func_180495_p(pos).func_177230_c();
|
||||||
+ if (block != null && !block.addHitEffects(worldObj, target, this))
|
+ if (block != null && !block.addHitEffects(field_78878_a, target, this))
|
||||||
+ {
|
+ {
|
||||||
+ addBlockHitEffects(pos, target.sideHit);
|
+ func_180532_a(pos, target.field_178784_b);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/BlockRendererDispatcher.java
|
+++ ../src-work/minecraft/net/minecraft/client/renderer/BlockRendererDispatcher.java
|
||||||
@@ -24,7 +24,7 @@
|
@@ -24,7 +24,7 @@
|
||||||
{
|
{
|
||||||
private BlockModelShapes blockModelShapes;
|
private BlockModelShapes field_175028_a;
|
||||||
private final GameSettings gameSettings;
|
private final GameSettings field_175026_b;
|
||||||
- private final BlockModelRenderer blockModelRenderer = new BlockModelRenderer();
|
- private final BlockModelRenderer field_175027_c = new BlockModelRenderer();
|
||||||
+ private final BlockModelRenderer blockModelRenderer = new net.minecraftforge.client.model.pipeline.ForgeBlockModelRenderer();
|
+ private final BlockModelRenderer field_175027_c = new net.minecraftforge.client.model.pipeline.ForgeBlockModelRenderer();
|
||||||
private final ChestRenderer chestRenderer = new ChestRenderer();
|
private final ChestRenderer field_175024_d = new ChestRenderer();
|
||||||
private final BlockFluidRenderer fluidRenderer = new BlockFluidRenderer();
|
private final BlockFluidRenderer field_175025_e = new BlockFluidRenderer();
|
||||||
|
|
||||||
@@ -48,6 +48,24 @@
|
@@ -48,6 +48,24 @@
|
||||||
{
|
{
|
||||||
p_175020_1_ = block.getActualState(p_175020_1_, p_175020_4_, p_175020_2_);
|
p_175020_1_ = block.func_176221_a(p_175020_1_, p_175020_4_, p_175020_2_);
|
||||||
IBakedModel ibakedmodel = this.blockModelShapes.getModelForState(p_175020_1_);
|
IBakedModel ibakedmodel = this.field_175028_a.func_178125_b(p_175020_1_);
|
||||||
+
|
+
|
||||||
+ if(ibakedmodel instanceof net.minecraftforge.client.model.ISmartBlockModel)
|
+ if(ibakedmodel instanceof net.minecraftforge.client.model.ISmartBlockModel)
|
||||||
+ {
|
+ {
|
||||||
|
@ -24,18 +24,18 @@
|
||||||
+ net.minecraftforge.client.ForgeHooksClient.setRenderLayer(layer);
|
+ net.minecraftforge.client.ForgeHooksClient.setRenderLayer(layer);
|
||||||
+
|
+
|
||||||
+ IBakedModel targetLayer = ((net.minecraftforge.client.model.ISmartBlockModel)ibakedmodel).handleBlockState(extendedState);
|
+ IBakedModel targetLayer = ((net.minecraftforge.client.model.ISmartBlockModel)ibakedmodel).handleBlockState(extendedState);
|
||||||
+ IBakedModel damageModel = (new SimpleBakedModel.Builder(targetLayer, p_175020_3_)).makeBakedModel();
|
+ IBakedModel damageModel = (new SimpleBakedModel.Builder(targetLayer, p_175020_3_)).func_177645_b();
|
||||||
+ this.blockModelRenderer.renderModel(p_175020_4_, damageModel, p_175020_1_, p_175020_2_, Tessellator.getInstance().getWorldRenderer());
|
+ this.field_175027_c.func_178259_a(p_175020_4_, damageModel, p_175020_1_, p_175020_2_, Tessellator.func_178181_a().func_178180_c());
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
IBakedModel ibakedmodel1 = (new SimpleBakedModel.Builder(ibakedmodel, p_175020_3_)).makeBakedModel();
|
IBakedModel ibakedmodel1 = (new SimpleBakedModel.Builder(ibakedmodel, p_175020_3_)).func_177645_b();
|
||||||
this.blockModelRenderer.renderModel(p_175020_4_, ibakedmodel1, p_175020_1_, p_175020_2_, Tessellator.getInstance().getWorldRenderer());
|
this.field_175027_c.func_178259_a(p_175020_4_, ibakedmodel1, p_175020_1_, p_175020_2_, Tessellator.func_178181_a().func_178180_c());
|
||||||
}
|
}
|
||||||
@@ -128,6 +146,12 @@
|
@@ -128,6 +146,12 @@
|
||||||
ibakedmodel = ((WeightedBakedModel)ibakedmodel).getAlternativeModel(MathHelper.getPositionRandom(p_175022_3_));
|
ibakedmodel = ((WeightedBakedModel)ibakedmodel).func_177564_a(MathHelper.func_180186_a(p_175022_3_));
|
||||||
}
|
}
|
||||||
|
|
||||||
+ if(ibakedmodel instanceof net.minecraftforge.client.model.ISmartBlockModel)
|
+ if(ibakedmodel instanceof net.minecraftforge.client.model.ISmartBlockModel)
|
||||||
|
|
|
@ -4,172 +4,172 @@
|
||||||
|
|
||||||
if (d3 < d2 || d2 == 0.0D)
|
if (d3 < d2 || d2 == 0.0D)
|
||||||
{
|
{
|
||||||
- if (entity1 == entity.ridingEntity)
|
- if (entity1 == entity.field_70154_o)
|
||||||
+ if (entity1 == entity.ridingEntity && !entity.canRiderInteract())
|
+ if (entity1 == entity.field_70154_o && !entity.canRiderInteract())
|
||||||
{
|
{
|
||||||
if (d2 == 0.0D)
|
if (d2 == 0.0D)
|
||||||
{
|
{
|
||||||
@@ -576,14 +576,8 @@
|
@@ -576,14 +576,8 @@
|
||||||
{
|
{
|
||||||
BlockPos blockpos = new BlockPos(entity);
|
BlockPos blockpos = new BlockPos(entity);
|
||||||
IBlockState iblockstate = this.mc.theWorld.getBlockState(blockpos);
|
IBlockState iblockstate = this.field_78531_r.field_71441_e.func_180495_p(blockpos);
|
||||||
- Block block = iblockstate.getBlock();
|
- Block block = iblockstate.func_177230_c();
|
||||||
+ net.minecraftforge.client.ForgeHooksClient.orientBedCamera(this.mc.theWorld, blockpos, iblockstate, entity);
|
+ net.minecraftforge.client.ForgeHooksClient.orientBedCamera(this.field_78531_r.field_71441_e, blockpos, iblockstate, entity);
|
||||||
|
|
||||||
- if (block == Blocks.bed)
|
- if (block == Blocks.field_150324_C)
|
||||||
- {
|
- {
|
||||||
- int j = ((EnumFacing)iblockstate.getValue(BlockBed.FACING)).getHorizontalIndex();
|
- int j = ((EnumFacing)iblockstate.func_177229_b(BlockBed.field_176387_N)).func_176736_b();
|
||||||
- GlStateManager.rotate((float)(j * 90), 0.0F, 1.0F, 0.0F);
|
- GlStateManager.func_179114_b((float)(j * 90), 0.0F, 1.0F, 0.0F);
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
GlStateManager.rotate(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * p_78467_1_ + 180.0F, 0.0F, -1.0F, 0.0F);
|
GlStateManager.func_179114_b(entity.field_70126_B + (entity.field_70177_z - entity.field_70126_B) * p_78467_1_ + 180.0F, 0.0F, -1.0F, 0.0F);
|
||||||
GlStateManager.rotate(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * p_78467_1_, -1.0F, 0.0F, 0.0F);
|
GlStateManager.func_179114_b(entity.field_70127_C + (entity.field_70125_A - entity.field_70127_C) * p_78467_1_, -1.0F, 0.0F, 0.0F);
|
||||||
}
|
}
|
||||||
@@ -650,17 +644,20 @@
|
@@ -650,17 +644,20 @@
|
||||||
|
|
||||||
if (!this.mc.gameSettings.debugCamEnable)
|
if (!this.field_78531_r.field_71474_y.field_74325_U)
|
||||||
{
|
{
|
||||||
- GlStateManager.rotate(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * p_78467_1_, 1.0F, 0.0F, 0.0F);
|
- GlStateManager.func_179114_b(entity.field_70127_C + (entity.field_70125_A - entity.field_70127_C) * p_78467_1_, 1.0F, 0.0F, 0.0F);
|
||||||
-
|
-
|
||||||
+ float yaw = entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * p_78467_1_ + 180.0F;
|
+ float yaw = entity.field_70126_B + (entity.field_70177_z - entity.field_70126_B) * p_78467_1_ + 180.0F;
|
||||||
+ float pitch = entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * p_78467_1_;
|
+ float pitch = entity.field_70127_C + (entity.field_70125_A - entity.field_70127_C) * p_78467_1_;
|
||||||
+ float roll = 0.0F;
|
+ float roll = 0.0F;
|
||||||
if (entity instanceof EntityAnimal)
|
if (entity instanceof EntityAnimal)
|
||||||
{
|
{
|
||||||
EntityAnimal entityanimal = (EntityAnimal)entity;
|
EntityAnimal entityanimal = (EntityAnimal)entity;
|
||||||
- GlStateManager.rotate(entityanimal.prevRotationYawHead + (entityanimal.rotationYawHead - entityanimal.prevRotationYawHead) * p_78467_1_ + 180.0F, 0.0F, 1.0F, 0.0F);
|
- GlStateManager.func_179114_b(entityanimal.field_70758_at + (entityanimal.field_70759_as - entityanimal.field_70758_at) * p_78467_1_ + 180.0F, 0.0F, 1.0F, 0.0F);
|
||||||
+ yaw = entityanimal.prevRotationYawHead + (entityanimal.rotationYawHead - entityanimal.prevRotationYawHead) * p_78467_1_ + 180.0F;
|
+ yaw = entityanimal.field_70758_at + (entityanimal.field_70759_as - entityanimal.field_70758_at) * p_78467_1_ + 180.0F;
|
||||||
}
|
}
|
||||||
- else
|
- else
|
||||||
- {
|
- {
|
||||||
- GlStateManager.rotate(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * p_78467_1_ + 180.0F, 0.0F, 1.0F, 0.0F);
|
- GlStateManager.func_179114_b(entity.field_70126_B + (entity.field_70177_z - entity.field_70126_B) * p_78467_1_ + 180.0F, 0.0F, 1.0F, 0.0F);
|
||||||
- }
|
- }
|
||||||
+ Block block = ActiveRenderInfo.getBlockAtEntityViewpoint(this.mc.theWorld, entity, p_78467_1_);
|
+ Block block = ActiveRenderInfo.func_180786_a(this.field_78531_r.field_71441_e, entity, p_78467_1_);
|
||||||
+ net.minecraftforge.client.event.EntityViewRenderEvent.CameraSetup event = new net.minecraftforge.client.event.EntityViewRenderEvent.CameraSetup(this, entity, block, p_78467_1_, yaw, pitch, roll);
|
+ net.minecraftforge.client.event.EntityViewRenderEvent.CameraSetup event = new net.minecraftforge.client.event.EntityViewRenderEvent.CameraSetup(this, entity, block, p_78467_1_, yaw, pitch, roll);
|
||||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event);
|
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event);
|
||||||
+ GlStateManager.rotate(event.roll, 0.0F, 0.0F, 1.0F);
|
+ GlStateManager.func_179114_b(event.roll, 0.0F, 0.0F, 1.0F);
|
||||||
+ GlStateManager.rotate(event.pitch, 1.0F, 0.0F, 0.0F);
|
+ GlStateManager.func_179114_b(event.pitch, 1.0F, 0.0F, 0.0F);
|
||||||
+ GlStateManager.rotate(event.yaw, 0.0F, 1.0F, 0.0F);
|
+ GlStateManager.func_179114_b(event.yaw, 0.0F, 1.0F, 0.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
GlStateManager.translate(0.0F, -f, 0.0F);
|
GlStateManager.func_179109_b(0.0F, -f, 0.0F);
|
||||||
@@ -1103,7 +1100,7 @@
|
@@ -1103,7 +1100,7 @@
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
- this.mc.currentScreen.drawScreen(k1, l1, p_181560_1_);
|
- this.field_78531_r.field_71462_r.func_73863_a(k1, l1, p_181560_1_);
|
||||||
+ net.minecraftforge.client.ForgeHooksClient.drawScreen(this.mc.currentScreen, k1, l1, p_181560_1_);
|
+ net.minecraftforge.client.ForgeHooksClient.drawScreen(this.field_78531_r.field_71462_r, k1, l1, p_181560_1_);
|
||||||
}
|
}
|
||||||
catch (Throwable throwable)
|
catch (Throwable throwable)
|
||||||
{
|
{
|
||||||
@@ -1164,7 +1161,7 @@
|
@@ -1164,7 +1161,7 @@
|
||||||
|
|
||||||
if (this.mc.playerController.getCurrentGameType() == WorldSettings.GameType.SPECTATOR)
|
if (this.field_78531_r.field_71442_b.func_178889_l() == WorldSettings.GameType.SPECTATOR)
|
||||||
{
|
{
|
||||||
- flag = block.hasTileEntity() && this.mc.theWorld.getTileEntity(blockpos) instanceof IInventory;
|
- flag = block.func_149716_u() && this.field_78531_r.field_71441_e.func_175625_s(blockpos) instanceof IInventory;
|
||||||
+ flag = block.hasTileEntity(this.mc.theWorld.getBlockState(blockpos)) && this.mc.theWorld.getTileEntity(blockpos) instanceof IInventory;
|
+ flag = block.hasTileEntity(this.field_78531_r.field_71441_e.func_180495_p(blockpos)) && this.field_78531_r.field_71441_e.func_175625_s(blockpos) instanceof IInventory;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1314,7 +1311,9 @@
|
@@ -1314,7 +1311,9 @@
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.func_179094_E();
|
||||||
RenderHelper.enableStandardItemLighting();
|
RenderHelper.func_74519_b();
|
||||||
this.mc.mcProfiler.endStartSection("entities");
|
this.field_78531_r.field_71424_I.func_76318_c("entities");
|
||||||
+ net.minecraftforge.client.ForgeHooksClient.setRenderPass(0);
|
+ net.minecraftforge.client.ForgeHooksClient.setRenderPass(0);
|
||||||
renderglobal.renderEntities(entity, icamera, partialTicks);
|
renderglobal.func_180446_a(entity, icamera, p_175068_2_);
|
||||||
+ net.minecraftforge.client.ForgeHooksClient.setRenderPass(0);
|
+ net.minecraftforge.client.ForgeHooksClient.setRenderPass(0);
|
||||||
RenderHelper.disableStandardItemLighting();
|
RenderHelper.func_74518_a();
|
||||||
this.disableLightmap();
|
this.func_175072_h();
|
||||||
GlStateManager.matrixMode(5888);
|
GlStateManager.func_179128_n(5888);
|
||||||
@@ -1326,6 +1325,7 @@
|
@@ -1326,6 +1325,7 @@
|
||||||
EntityPlayer entityplayer = (EntityPlayer)entity;
|
EntityPlayer entityplayer = (EntityPlayer)entity;
|
||||||
GlStateManager.disableAlpha();
|
GlStateManager.func_179118_c();
|
||||||
this.mc.mcProfiler.endStartSection("outline");
|
this.field_78531_r.field_71424_I.func_76318_c("outline");
|
||||||
+ if (!net.minecraftforge.client.ForgeHooksClient.onDrawBlockHighlight(renderglobal, entityplayer, mc.objectMouseOver, 0, entityplayer.getHeldItem(), partialTicks))
|
+ if (!net.minecraftforge.client.ForgeHooksClient.onDrawBlockHighlight(renderglobal, entityplayer, field_78531_r.field_71476_x, 0, entityplayer.func_70694_bm(), p_175068_2_))
|
||||||
renderglobal.drawSelectionBox(entityplayer, this.mc.objectMouseOver, 0, partialTicks);
|
renderglobal.func_72731_b(entityplayer, this.field_78531_r.field_71476_x, 0, p_175068_2_);
|
||||||
GlStateManager.enableAlpha();
|
GlStateManager.func_179141_d();
|
||||||
}
|
}
|
||||||
@@ -1339,6 +1339,7 @@
|
@@ -1339,6 +1339,7 @@
|
||||||
EntityPlayer entityplayer1 = (EntityPlayer)entity;
|
EntityPlayer entityplayer1 = (EntityPlayer)entity;
|
||||||
GlStateManager.disableAlpha();
|
GlStateManager.func_179118_c();
|
||||||
this.mc.mcProfiler.endStartSection("outline");
|
this.field_78531_r.field_71424_I.func_76318_c("outline");
|
||||||
+ if (!net.minecraftforge.client.ForgeHooksClient.onDrawBlockHighlight(renderglobal, entityplayer1, mc.objectMouseOver, 0, entityplayer1.getHeldItem(), partialTicks))
|
+ if (!net.minecraftforge.client.ForgeHooksClient.onDrawBlockHighlight(renderglobal, entityplayer1, field_78531_r.field_71476_x, 0, entityplayer1.func_70694_bm(), p_175068_2_))
|
||||||
renderglobal.drawSelectionBox(entityplayer1, this.mc.objectMouseOver, 0, partialTicks);
|
renderglobal.func_72731_b(entityplayer1, this.field_78531_r.field_71476_x, 0, p_175068_2_);
|
||||||
GlStateManager.enableAlpha();
|
GlStateManager.func_179141_d();
|
||||||
}
|
}
|
||||||
@@ -1380,6 +1381,15 @@
|
@@ -1380,6 +1381,15 @@
|
||||||
GlStateManager.shadeModel(7425);
|
GlStateManager.func_179103_j(7425);
|
||||||
this.mc.mcProfiler.endStartSection("translucent");
|
this.field_78531_r.field_71424_I.func_76318_c("translucent");
|
||||||
renderglobal.renderBlockLayer(EnumWorldBlockLayer.TRANSLUCENT, (double)partialTicks, pass, entity);
|
renderglobal.func_174977_a(EnumWorldBlockLayer.TRANSLUCENT, (double)p_175068_2_, p_175068_1_, entity);
|
||||||
+ if (!this.debugView) //Only render if render pass 0 happens as well.
|
+ if (!this.field_175078_W) //Only render if render pass 0 happens as well.
|
||||||
+ {
|
+ {
|
||||||
+ RenderHelper.enableStandardItemLighting();
|
+ RenderHelper.func_74519_b();
|
||||||
+ this.mc.mcProfiler.endStartSection("entities");
|
+ this.field_78531_r.field_71424_I.func_76318_c("entities");
|
||||||
+ net.minecraftforge.client.ForgeHooksClient.setRenderPass(1);
|
+ net.minecraftforge.client.ForgeHooksClient.setRenderPass(1);
|
||||||
+ renderglobal.renderEntities(entity, icamera, partialTicks);
|
+ renderglobal.func_180446_a(entity, icamera, p_175068_2_);
|
||||||
+ net.minecraftforge.client.ForgeHooksClient.setRenderPass(-1);
|
+ net.minecraftforge.client.ForgeHooksClient.setRenderPass(-1);
|
||||||
+ RenderHelper.disableStandardItemLighting();
|
+ RenderHelper.func_74518_a();
|
||||||
+ }
|
+ }
|
||||||
GlStateManager.shadeModel(7424);
|
GlStateManager.func_179103_j(7424);
|
||||||
GlStateManager.depthMask(true);
|
GlStateManager.func_179132_a(true);
|
||||||
GlStateManager.enableCull();
|
GlStateManager.func_179089_o();
|
||||||
@@ -1392,8 +1402,12 @@
|
@@ -1392,8 +1402,12 @@
|
||||||
this.renderCloudsCheck(renderglobal, partialTicks, pass);
|
this.func_180437_a(renderglobal, p_175068_2_, p_175068_1_);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ this.mc.mcProfiler.endStartSection("forge_render_last");
|
+ this.field_78531_r.field_71424_I.func_76318_c("forge_render_last");
|
||||||
+ net.minecraftforge.client.ForgeHooksClient.dispatchRenderLast(renderglobal, partialTicks);
|
+ net.minecraftforge.client.ForgeHooksClient.dispatchRenderLast(renderglobal, p_175068_2_);
|
||||||
+
|
+
|
||||||
this.mc.mcProfiler.endStartSection("hand");
|
this.field_78531_r.field_71424_I.func_76318_c("hand");
|
||||||
|
|
||||||
+ if (!net.minecraftforge.client.ForgeHooksClient.renderFirstPersonHand(renderglobal, partialTicks, pass))
|
+ if (!net.minecraftforge.client.ForgeHooksClient.renderFirstPersonHand(renderglobal, p_175068_2_, p_175068_1_))
|
||||||
if (this.renderHand)
|
if (this.field_175074_C)
|
||||||
{
|
{
|
||||||
GlStateManager.clear(256);
|
GlStateManager.func_179086_m(256);
|
||||||
@@ -1505,6 +1519,13 @@
|
@@ -1505,6 +1519,13 @@
|
||||||
|
|
||||||
protected void renderRainSnow(float partialTicks)
|
protected void func_78474_d(float p_78474_1_)
|
||||||
{
|
{
|
||||||
+ net.minecraftforge.client.IRenderHandler renderer = this.mc.theWorld.provider.getWeatherRenderer();
|
+ net.minecraftforge.client.IRenderHandler renderer = this.field_78531_r.field_71441_e.field_73011_w.getWeatherRenderer();
|
||||||
+ if (renderer != null)
|
+ if (renderer != null)
|
||||||
+ {
|
+ {
|
||||||
+ renderer.render(partialTicks, this.mc.theWorld, mc);
|
+ renderer.render(p_78474_1_, this.field_78531_r.field_71441_e, field_78531_r);
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
float f = this.mc.theWorld.getRainStrength(partialTicks);
|
float f = this.field_78531_r.field_71441_e.func_72867_j(p_78474_1_);
|
||||||
|
|
||||||
if (f > 0.0F)
|
if (f > 0.0F)
|
||||||
@@ -1830,6 +1851,13 @@
|
@@ -1830,6 +1851,13 @@
|
||||||
this.fogColorBlue = f7;
|
this.field_175081_S = f7;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ net.minecraftforge.client.event.EntityViewRenderEvent.FogColors event = new net.minecraftforge.client.event.EntityViewRenderEvent.FogColors(this, entity, block, partialTicks, this.fogColorRed, this.fogColorGreen, this.fogColorBlue);
|
+ net.minecraftforge.client.event.EntityViewRenderEvent.FogColors event = new net.minecraftforge.client.event.EntityViewRenderEvent.FogColors(this, entity, block, p_78466_1_, this.field_175080_Q, this.field_175082_R, this.field_175081_S);
|
||||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event);
|
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event);
|
||||||
+
|
+
|
||||||
+ this.fogColorRed = event.red;
|
+ this.field_175080_Q = event.red;
|
||||||
+ this.fogColorGreen = event.green;
|
+ this.field_175082_R = event.green;
|
||||||
+ this.fogColorBlue = event.blue;
|
+ this.field_175081_S = event.blue;
|
||||||
+
|
+
|
||||||
GlStateManager.clearColor(this.fogColorRed, this.fogColorGreen, this.fogColorBlue, 0.0F);
|
GlStateManager.func_179082_a(this.field_175080_Q, this.field_175082_R, this.field_175081_S, 0.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1848,6 +1876,10 @@
|
@@ -1848,6 +1876,10 @@
|
||||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
Block block = ActiveRenderInfo.getBlockAtEntityViewpoint(this.mc.theWorld, entity, partialTicks);
|
Block block = ActiveRenderInfo.func_180786_a(this.field_78531_r.field_71441_e, entity, p_78468_2_);
|
||||||
|
|
||||||
+ float hook = net.minecraftforge.client.ForgeHooksClient.getFogDensity(this, entity, block, partialTicks, 0.1F);
|
+ float hook = net.minecraftforge.client.ForgeHooksClient.getFogDensity(this, entity, block, p_78468_2_, 0.1F);
|
||||||
+ if (hook >= 0)
|
+ if (hook >= 0)
|
||||||
+ GlStateManager.setFogDensity(hook);
|
+ GlStateManager.func_179095_a(hook);
|
||||||
+ else
|
+ else
|
||||||
if (entity instanceof EntityLivingBase && ((EntityLivingBase)entity).isPotionActive(Potion.blindness))
|
if (entity instanceof EntityLivingBase && ((EntityLivingBase)entity).func_70644_a(Potion.field_76440_q))
|
||||||
{
|
{
|
||||||
float f1 = 5.0F;
|
float f1 = 5.0F;
|
||||||
@@ -1925,6 +1957,7 @@
|
@@ -1925,6 +1957,7 @@
|
||||||
GlStateManager.setFogStart(f * 0.05F);
|
GlStateManager.func_179102_b(f * 0.05F);
|
||||||
GlStateManager.setFogEnd(Math.min(f, 192.0F) * 0.5F);
|
GlStateManager.func_179153_c(Math.min(f, 192.0F) * 0.5F);
|
||||||
}
|
}
|
||||||
+ net.minecraftforge.client.ForgeHooksClient.onFogRender(this, entity, block, partialTicks, p_78468_1_, f);
|
+ net.minecraftforge.client.ForgeHooksClient.onFogRender(this, entity, block, p_78468_2_, p_78468_1_, f);
|
||||||
}
|
}
|
||||||
|
|
||||||
GlStateManager.enableColorMaterial();
|
GlStateManager.func_179142_g();
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/client/renderer/InventoryEffectRenderer.java
|
--- ../src-base/minecraft/net/minecraft/client/renderer/InventoryEffectRenderer.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/InventoryEffectRenderer.java
|
+++ ../src-work/minecraft/net/minecraft/client/renderer/InventoryEffectRenderer.java
|
||||||
@@ -80,6 +80,8 @@
|
@@ -80,6 +80,8 @@
|
||||||
this.drawTexturedModalRect(i + 6, j + 7, 0 + i1 % 8 * 18, 198 + i1 / 8 * 18, 18, 18);
|
this.func_73729_b(i + 6, j + 7, 0 + i1 % 8 * 18, 198 + i1 / 8 * 18, 18, 18);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ potion.renderInventoryEffect(i, j, potioneffect, mc);
|
+ potion.renderInventoryEffect(i, j, potioneffect, field_146297_k);
|
||||||
+ if (!potion.shouldRenderInvText(potioneffect)) continue;
|
+ if (!potion.shouldRenderInvText(potioneffect)) continue;
|
||||||
String s1 = I18n.format(potion.getName(), new Object[0]);
|
String s1 = I18n.func_135052_a(potion.func_76393_a(), new Object[0]);
|
||||||
|
|
||||||
if (potioneffect.getAmplifier() == 1)
|
if (potioneffect.func_76458_c() == 1)
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
|
|
||||||
+ if(ibakedmodel instanceof net.minecraftforge.client.model.ISmartItemModel)
|
+ if(ibakedmodel instanceof net.minecraftforge.client.model.ISmartItemModel)
|
||||||
+ {
|
+ {
|
||||||
+ ibakedmodel = ((net.minecraftforge.client.model.ISmartItemModel)ibakedmodel).handleItemState(stack);
|
+ ibakedmodel = ((net.minecraftforge.client.model.ISmartItemModel)ibakedmodel).handleItemState(p_178089_1_);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
if (ibakedmodel == null)
|
if (ibakedmodel == null)
|
||||||
{
|
{
|
||||||
ibakedmodel = this.modelManager.getMissingModel();
|
ibakedmodel = this.field_178090_d.func_174951_a();
|
||||||
|
|
|
@ -2,57 +2,57 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/ItemRenderer.java
|
+++ ../src-work/minecraft/net/minecraft/client/renderer/ItemRenderer.java
|
||||||
@@ -313,7 +313,7 @@
|
@@ -313,7 +313,7 @@
|
||||||
|
|
||||||
if (this.itemToRender != null)
|
if (this.field_78453_b != null)
|
||||||
{
|
{
|
||||||
- if (this.itemToRender.getItem() == Items.filled_map)
|
- if (this.field_78453_b.func_77973_b() == Items.field_151098_aY)
|
||||||
+ if (this.itemToRender.getItem() instanceof net.minecraft.item.ItemMap)
|
+ if (this.field_78453_b.func_77973_b() instanceof net.minecraft.item.ItemMap)
|
||||||
{
|
{
|
||||||
this.func_178097_a(abstractclientplayer, f2, f, f1);
|
this.func_178097_a(abstractclientplayer, f2, f, f1);
|
||||||
}
|
}
|
||||||
@@ -365,6 +365,7 @@
|
@@ -365,6 +365,7 @@
|
||||||
if (this.mc.thePlayer.isEntityInsideOpaqueBlock())
|
if (this.field_78455_a.field_71439_g.func_70094_T())
|
||||||
{
|
{
|
||||||
IBlockState iblockstate = this.mc.theWorld.getBlockState(new BlockPos(this.mc.thePlayer));
|
IBlockState iblockstate = this.field_78455_a.field_71441_e.func_180495_p(new BlockPos(this.field_78455_a.field_71439_g));
|
||||||
+ BlockPos overlayPos = new BlockPos(this.mc.thePlayer);
|
+ BlockPos overlayPos = new BlockPos(this.field_78455_a.field_71439_g);
|
||||||
EntityPlayer entityplayer = this.mc.thePlayer;
|
EntityPlayer entityplayer = this.field_78455_a.field_71439_g;
|
||||||
|
|
||||||
for (int i = 0; i < 8; ++i)
|
for (int i = 0; i < 8; ++i)
|
||||||
@@ -378,11 +379,13 @@
|
@@ -378,11 +379,13 @@
|
||||||
if (iblockstate1.getBlock().isVisuallyOpaque())
|
if (iblockstate1.func_177230_c().func_176214_u())
|
||||||
{
|
{
|
||||||
iblockstate = iblockstate1;
|
iblockstate = iblockstate1;
|
||||||
+ overlayPos = blockpos;
|
+ overlayPos = blockpos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iblockstate.getBlock().getRenderType() != -1)
|
if (iblockstate.func_177230_c().func_149645_b() != -1)
|
||||||
{
|
{
|
||||||
+ if (!net.minecraftforge.event.ForgeEventFactory.renderBlockOverlay(mc.thePlayer, p_78447_1_, net.minecraftforge.client.event.RenderBlockOverlayEvent.OverlayType.BLOCK, iblockstate, overlayPos))
|
+ if (!net.minecraftforge.event.ForgeEventFactory.renderBlockOverlay(field_78455_a.field_71439_g, p_78447_1_, net.minecraftforge.client.event.RenderBlockOverlayEvent.OverlayType.BLOCK, iblockstate, overlayPos))
|
||||||
this.func_178108_a(p_78447_1_, this.mc.getBlockRendererDispatcher().getBlockModelShapes().getTexture(iblockstate));
|
this.func_178108_a(p_78447_1_, this.field_78455_a.func_175602_ab().func_175023_a().func_178122_a(iblockstate));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -391,11 +394,13 @@
|
@@ -391,11 +394,13 @@
|
||||||
{
|
{
|
||||||
if (this.mc.thePlayer.isInsideOfMaterial(Material.water))
|
if (this.field_78455_a.field_71439_g.func_70055_a(Material.field_151586_h))
|
||||||
{
|
{
|
||||||
+ if (!net.minecraftforge.event.ForgeEventFactory.renderWaterOverlay(mc.thePlayer, p_78447_1_))
|
+ if (!net.minecraftforge.event.ForgeEventFactory.renderWaterOverlay(field_78455_a.field_71439_g, p_78447_1_))
|
||||||
this.renderWaterOverlayTexture(p_78447_1_);
|
this.func_78448_c(p_78447_1_);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.mc.thePlayer.isBurning())
|
if (this.field_78455_a.field_71439_g.func_70027_ad())
|
||||||
{
|
{
|
||||||
+ if (!net.minecraftforge.event.ForgeEventFactory.renderFireOverlay(mc.thePlayer, p_78447_1_))
|
+ if (!net.minecraftforge.event.ForgeEventFactory.renderFireOverlay(field_78455_a.field_71439_g, p_78447_1_))
|
||||||
this.renderFireInFirstPerson(p_78447_1_);
|
this.func_78442_d(p_78447_1_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -512,6 +517,12 @@
|
@@ -512,6 +517,12 @@
|
||||||
{
|
{
|
||||||
if (!this.itemToRender.getIsItemStackEqual(itemstack))
|
if (!this.field_78453_b.func_179549_c(itemstack))
|
||||||
{
|
{
|
||||||
+ if (!this.itemToRender.getItem().shouldCauseReequipAnimation(this.itemToRender, itemstack, equippedItemSlot != entityplayer.inventory.currentItem))
|
+ if (!this.field_78453_b.func_77973_b().shouldCauseReequipAnimation(this.field_78453_b, itemstack, field_78450_g != entityplayer.field_71071_by.field_70461_c))
|
||||||
+ {
|
+ {
|
||||||
+ this.itemToRender = itemstack;
|
+ this.field_78453_b = itemstack;
|
||||||
+ this.equippedItemSlot = entityplayer.inventory.currentItem;
|
+ this.field_78450_g = entityplayer.field_71071_by.field_70461_c;
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
flag = true;
|
flag = true;
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/client/renderer/OpenGlHelper.java
|
--- ../src-base/minecraft/net/minecraft/client/renderer/OpenGlHelper.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/OpenGlHelper.java
|
+++ ../src-work/minecraft/net/minecraft/client/renderer/OpenGlHelper.java
|
||||||
@@ -83,6 +83,10 @@
|
@@ -83,6 +83,10 @@
|
||||||
public static int GL_ARRAY_BUFFER;
|
public static int field_176089_P;
|
||||||
public static int GL_STATIC_DRAW;
|
public static int field_148826_e;
|
||||||
|
|
||||||
+ /* Stores the last values sent into setLightmapTextureCoords */
|
+ /* Stores the last values sent into setLightmapTextureCoords */
|
||||||
+ public static float lastBrightnessX = 0.0f;
|
+ public static float lastBrightnessX = 0.0f;
|
||||||
+ public static float lastBrightnessY = 0.0f;
|
+ public static float lastBrightnessY = 0.0f;
|
||||||
+
|
+
|
||||||
public static void initializeTextures()
|
public static void func_77474_a()
|
||||||
{
|
{
|
||||||
ContextCapabilities contextcapabilities = GLContext.getCapabilities();
|
ContextCapabilities contextcapabilities = GLContext.getCapabilities();
|
||||||
@@ -843,6 +847,12 @@
|
@@ -843,6 +847,12 @@
|
||||||
|
@ -16,11 +16,11 @@
|
||||||
GL13.glMultiTexCoord2f(p_77475_0_, p_77475_1_, p_77475_2_);
|
GL13.glMultiTexCoord2f(p_77475_0_, p_77475_1_, p_77475_2_);
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ if (p_77475_0_ == lightmapTexUnit)
|
+ if (p_77475_0_ == field_77476_b)
|
||||||
+ {
|
+ {
|
||||||
+ lastBrightnessX = p_77475_1_;
|
+ lastBrightnessX = p_77475_1_;
|
||||||
+ lastBrightnessY = p_77475_2_;
|
+ 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_)
|
||||||
|
|
|
@ -2,116 +2,116 @@
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/RenderGlobal.java
|
+++ ../src-work/minecraft/net/minecraft/client/renderer/RenderGlobal.java
|
||||||
@@ -525,8 +525,10 @@
|
@@ -525,8 +525,10 @@
|
||||||
|
|
||||||
public void renderEntities(Entity p_180446_1_, ICamera p_180446_2_, float partialTicks)
|
public void func_180446_a(Entity p_180446_1_, ICamera p_180446_2_, float p_180446_3_)
|
||||||
{
|
{
|
||||||
+ int pass = net.minecraftforge.client.MinecraftForgeClient.getRenderPass();
|
+ int pass = net.minecraftforge.client.MinecraftForgeClient.getRenderPass();
|
||||||
if (this.renderEntitiesStartupCounter > 0)
|
if (this.field_72740_G > 0)
|
||||||
{
|
{
|
||||||
+ if (pass > 0) return;
|
+ if (pass > 0) return;
|
||||||
--this.renderEntitiesStartupCounter;
|
--this.field_72740_G;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -537,9 +539,12 @@
|
@@ -537,9 +539,12 @@
|
||||||
this.theWorld.theProfiler.startSection("prepare");
|
this.field_72769_h.field_72984_F.func_76320_a("prepare");
|
||||||
TileEntityRendererDispatcher.instance.cacheActiveRenderInfo(this.theWorld, this.mc.getTextureManager(), this.mc.fontRendererObj, this.mc.getRenderViewEntity(), partialTicks);
|
TileEntityRendererDispatcher.field_147556_a.func_178470_a(this.field_72769_h, this.field_72777_q.func_110434_K(), this.field_72777_q.field_71466_p, this.field_72777_q.func_175606_aa(), p_180446_3_);
|
||||||
this.renderManager.cacheActiveRenderInfo(this.theWorld, this.mc.fontRendererObj, this.mc.getRenderViewEntity(), this.mc.pointedEntity, this.mc.gameSettings, partialTicks);
|
this.field_175010_j.func_180597_a(this.field_72769_h, this.field_72777_q.field_71466_p, this.field_72777_q.func_175606_aa(), this.field_72777_q.field_147125_j, this.field_72777_q.field_71474_y, p_180446_3_);
|
||||||
+ if(pass == 0)
|
+ if(pass == 0)
|
||||||
+ {
|
+ {
|
||||||
this.countEntitiesTotal = 0;
|
this.field_72748_H = 0;
|
||||||
this.countEntitiesRendered = 0;
|
this.field_72749_I = 0;
|
||||||
this.countEntitiesHidden = 0;
|
this.field_72750_J = 0;
|
||||||
+ }
|
+ }
|
||||||
Entity entity = this.mc.getRenderViewEntity();
|
Entity entity = this.field_72777_q.func_175606_aa();
|
||||||
double d3 = entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * (double)partialTicks;
|
double d3 = entity.field_70142_S + (entity.field_70165_t - entity.field_70142_S) * (double)p_180446_3_;
|
||||||
double d4 = entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * (double)partialTicks;
|
double d4 = entity.field_70137_T + (entity.field_70163_u - entity.field_70137_T) * (double)p_180446_3_;
|
||||||
@@ -551,11 +556,15 @@
|
@@ -551,11 +556,15 @@
|
||||||
this.mc.entityRenderer.enableLightmap();
|
this.field_72777_q.field_71460_t.func_180436_i();
|
||||||
this.theWorld.theProfiler.endStartSection("global");
|
this.field_72769_h.field_72984_F.func_76318_c("global");
|
||||||
List<Entity> list = this.theWorld.getLoadedEntityList();
|
List<Entity> list = this.field_72769_h.func_72910_y();
|
||||||
+ if (pass == 0)
|
+ if (pass == 0)
|
||||||
+ {
|
+ {
|
||||||
this.countEntitiesTotal = list.size();
|
this.field_72748_H = list.size();
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
for (int i = 0; i < this.theWorld.weatherEffects.size(); ++i)
|
for (int i = 0; i < this.field_72769_h.field_73007_j.size(); ++i)
|
||||||
{
|
{
|
||||||
Entity entity1 = (Entity)this.theWorld.weatherEffects.get(i);
|
Entity entity1 = (Entity)this.field_72769_h.field_73007_j.get(i);
|
||||||
+ if (!entity1.shouldRenderInPass(pass)) continue;
|
+ if (!entity1.shouldRenderInPass(pass)) continue;
|
||||||
++this.countEntitiesRendered;
|
++this.field_72749_I;
|
||||||
|
|
||||||
if (entity1.isInRangeToRender3d(d0, d1, d2))
|
if (entity1.func_145770_h(d0, d1, d2))
|
||||||
@@ -577,6 +586,7 @@
|
@@ -577,6 +586,7 @@
|
||||||
for (int j = 0; j < list.size(); ++j)
|
for (int j = 0; j < list.size(); ++j)
|
||||||
{
|
{
|
||||||
Entity entity3 = (Entity)list.get(j);
|
Entity entity3 = (Entity)list.get(j);
|
||||||
+ if (!entity3.shouldRenderInPass(pass)) continue;
|
+ if (!entity3.shouldRenderInPass(pass)) continue;
|
||||||
boolean flag = this.mc.getRenderViewEntity() instanceof EntityLivingBase && ((EntityLivingBase)this.mc.getRenderViewEntity()).isPlayerSleeping();
|
boolean flag = this.field_72777_q.func_175606_aa() instanceof EntityLivingBase && ((EntityLivingBase)this.field_72777_q.func_175606_aa()).func_70608_bn();
|
||||||
boolean flag1 = entity3.isInRangeToRender3d(d0, d1, d2) && (entity3.ignoreFrustumCheck || p_180446_2_.isBoundingBoxInFrustum(entity3.getEntityBoundingBox()) || entity3.riddenByEntity == this.mc.thePlayer) && entity3 instanceof EntityPlayer;
|
boolean flag1 = entity3.func_145770_h(d0, d1, d2) && (entity3.field_70158_ak || p_180446_2_.func_78546_a(entity3.func_174813_aQ()) || entity3.field_70153_n == this.field_72777_q.field_71439_g) && entity3 instanceof EntityPlayer;
|
||||||
|
|
||||||
@@ -626,6 +636,7 @@
|
@@ -626,6 +636,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
entity2 = (Entity)iterator.next();
|
entity2 = (Entity)iterator.next();
|
||||||
+ if (!entity2.shouldRenderInPass(pass)) continue;
|
+ if (!entity2.shouldRenderInPass(pass)) continue;
|
||||||
flag2 = this.renderManager.shouldRender(entity2, p_180446_2_, d0, d1, d2) || entity2.riddenByEntity == this.mc.thePlayer;
|
flag2 = this.field_175010_j.func_178635_a(entity2, p_180446_2_, d0, d1, d2) || entity2.field_70153_n == this.field_72777_q.field_71439_g;
|
||||||
|
|
||||||
if (!flag2)
|
if (!flag2)
|
||||||
@@ -662,6 +673,7 @@
|
@@ -662,6 +673,7 @@
|
||||||
{
|
{
|
||||||
for (TileEntity tileentity2 : list1)
|
for (TileEntity tileentity2 : list1)
|
||||||
{
|
{
|
||||||
+ if (!tileentity2.shouldRenderInPass(pass) || !p_180446_2_.isBoundingBoxInFrustum(tileentity2.getRenderBoundingBox())) continue;
|
+ if (!tileentity2.shouldRenderInPass(pass) || !p_180446_2_.func_78546_a(tileentity2.getRenderBoundingBox())) continue;
|
||||||
TileEntityRendererDispatcher.instance.renderTileEntity(tileentity2, partialTicks, -1);
|
TileEntityRendererDispatcher.field_147556_a.func_180546_a(tileentity2, p_180446_3_, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -671,6 +683,7 @@
|
@@ -671,6 +683,7 @@
|
||||||
{
|
{
|
||||||
for (TileEntity tileentity : this.field_181024_n)
|
for (TileEntity tileentity : this.field_181024_n)
|
||||||
{
|
{
|
||||||
+ if (!tileentity.shouldRenderInPass(pass) || !p_180446_2_.isBoundingBoxInFrustum(tileentity.getRenderBoundingBox())) continue;
|
+ if (!tileentity.shouldRenderInPass(pass) || !p_180446_2_.func_78546_a(tileentity.getRenderBoundingBox())) continue;
|
||||||
TileEntityRendererDispatcher.instance.renderTileEntity(tileentity, partialTicks, -1);
|
TileEntityRendererDispatcher.field_147556_a.func_180546_a(tileentity, p_180446_3_, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -700,7 +713,7 @@
|
@@ -700,7 +713,7 @@
|
||||||
|
|
||||||
Block block = this.theWorld.getBlockState(blockpos).getBlock();
|
Block block = this.field_72769_h.func_180495_p(blockpos).func_177230_c();
|
||||||
|
|
||||||
- if (tileentity1 != null && (block instanceof BlockChest || block instanceof BlockEnderChest || block instanceof BlockSign || block instanceof BlockSkull))
|
- if (tileentity1 != null && (block instanceof BlockChest || block instanceof BlockEnderChest || block instanceof BlockSign || block instanceof BlockSkull))
|
||||||
+ if (tileentity1 != null && tileentity1.shouldRenderInPass(pass) && tileentity1.canRenderBreaking() && p_180446_2_.isBoundingBoxInFrustum(tileentity1.getRenderBoundingBox()))
|
+ if (tileentity1 != null && tileentity1.shouldRenderInPass(pass) && tileentity1.canRenderBreaking() && p_180446_2_.func_78546_a(tileentity1.getRenderBoundingBox()))
|
||||||
{
|
{
|
||||||
TileEntityRendererDispatcher.instance.renderTileEntity(tileentity1, partialTicks, destroyblockprogress.getPartialBlockDamage());
|
TileEntityRendererDispatcher.field_147556_a.func_180546_a(tileentity1, p_180446_3_, destroyblockprogress.func_73106_e());
|
||||||
}
|
}
|
||||||
@@ -1161,6 +1174,12 @@
|
@@ -1161,6 +1174,12 @@
|
||||||
|
|
||||||
public void renderSky(float partialTicks, int pass)
|
public void func_174976_a(float p_174976_1_, int p_174976_2_)
|
||||||
{
|
{
|
||||||
+ net.minecraftforge.client.IRenderHandler renderer = this.theWorld.provider.getSkyRenderer();
|
+ net.minecraftforge.client.IRenderHandler renderer = this.field_72769_h.field_73011_w.getSkyRenderer();
|
||||||
+ if (renderer != null)
|
+ if (renderer != null)
|
||||||
+ {
|
+ {
|
||||||
+ renderer.render(partialTicks, theWorld, mc);
|
+ renderer.render(p_174976_1_, field_72769_h, field_72777_q);
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
if (this.mc.theWorld.provider.getDimensionId() == 1)
|
if (this.field_72777_q.field_71441_e.field_73011_w.func_177502_q() == 1)
|
||||||
{
|
{
|
||||||
this.renderSkyEnd();
|
this.func_180448_r();
|
||||||
@@ -1378,6 +1397,12 @@
|
@@ -1378,6 +1397,12 @@
|
||||||
|
|
||||||
public void renderClouds(float p_180447_1_, int p_180447_2_)
|
public void func_180447_b(float p_180447_1_, int p_180447_2_)
|
||||||
{
|
{
|
||||||
+ net.minecraftforge.client.IRenderHandler renderer = this.mc.theWorld.provider.getCloudRenderer();
|
+ net.minecraftforge.client.IRenderHandler renderer = this.field_72777_q.field_71441_e.field_73011_w.getCloudRenderer();
|
||||||
+ if (renderer != null)
|
+ if (renderer != null)
|
||||||
+ {
|
+ {
|
||||||
+ renderer.render(p_180447_1_, this.mc.theWorld, mc);
|
+ renderer.render(p_180447_1_, this.field_72777_q.field_71441_e, field_72777_q);
|
||||||
+ return;
|
+ 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.func_181147_e() == 2)
|
if (this.field_72777_q.field_71474_y.func_181147_e() == 2)
|
||||||
@@ -1793,8 +1818,11 @@
|
@@ -1793,8 +1818,11 @@
|
||||||
double d4 = (double)blockpos.getY() - d1;
|
double d4 = (double)blockpos.func_177956_o() - d1;
|
||||||
double d5 = (double)blockpos.getZ() - d2;
|
double d5 = (double)blockpos.func_177952_p() - d2;
|
||||||
Block block = this.theWorld.getBlockState(blockpos).getBlock();
|
Block block = this.field_72769_h.func_180495_p(blockpos).func_177230_c();
|
||||||
+ TileEntity te = this.theWorld.getTileEntity(blockpos);
|
+ TileEntity te = this.field_72769_h.func_175625_s(blockpos);
|
||||||
+ boolean hasBreak = block instanceof BlockChest || block instanceof BlockEnderChest || block instanceof BlockSign || block instanceof BlockSkull;
|
+ boolean hasBreak = block instanceof BlockChest || block instanceof BlockEnderChest || block instanceof BlockSign || block instanceof BlockSkull;
|
||||||
+ if (!hasBreak) hasBreak = te != null && te.canRenderBreaking();
|
+ if (!hasBreak) hasBreak = te != null && te.canRenderBreaking();
|
||||||
|
|
||||||
|
@ -121,20 +121,20 @@
|
||||||
if (d3 * d3 + d4 * d4 + d5 * d5 > 1024.0D)
|
if (d3 * d3 + d4 * d4 + d5 * d5 > 1024.0D)
|
||||||
{
|
{
|
||||||
@@ -1949,13 +1977,16 @@
|
@@ -1949,13 +1977,16 @@
|
||||||
if (recordName != null)
|
if (p_174961_1_ != null)
|
||||||
{
|
{
|
||||||
ItemRecord itemrecord = ItemRecord.getRecord(recordName);
|
ItemRecord itemrecord = ItemRecord.func_150926_b(p_174961_1_);
|
||||||
+ ResourceLocation resource = null;
|
+ ResourceLocation resource = null;
|
||||||
|
|
||||||
if (itemrecord != null)
|
if (itemrecord != null)
|
||||||
{
|
{
|
||||||
this.mc.ingameGUI.setRecordPlayingMessage(itemrecord.getRecordNameLocal());
|
this.field_72777_q.field_71456_v.func_73833_a(itemrecord.func_150927_i());
|
||||||
+ resource = itemrecord.getRecordResource(recordName);
|
+ resource = itemrecord.getRecordResource(p_174961_1_);
|
||||||
}
|
}
|
||||||
|
|
||||||
- PositionedSoundRecord positionedsoundrecord = PositionedSoundRecord.create(new ResourceLocation(recordName), (float)blockPosIn.getX(), (float)blockPosIn.getY(), (float)blockPosIn.getZ());
|
- PositionedSoundRecord positionedsoundrecord = PositionedSoundRecord.func_147675_a(new ResourceLocation(p_174961_1_), (float)p_174961_2_.func_177958_n(), (float)p_174961_2_.func_177956_o(), (float)p_174961_2_.func_177952_p());
|
||||||
+ if (resource == null) resource = new ResourceLocation(recordName);
|
+ if (resource == null) resource = new ResourceLocation(p_174961_1_);
|
||||||
+ PositionedSoundRecord positionedsoundrecord = PositionedSoundRecord.create(resource, (float)blockPosIn.getX(), (float)blockPosIn.getY(), (float)blockPosIn.getZ());
|
+ PositionedSoundRecord positionedsoundrecord = PositionedSoundRecord.func_147675_a(resource, (float)p_174961_2_.func_177958_n(), (float)p_174961_2_.func_177956_o(), (float)p_174961_2_.func_177952_p());
|
||||||
this.mapSoundPositions.put(blockPosIn, positionedsoundrecord);
|
this.field_147593_P.put(p_174961_2_, positionedsoundrecord);
|
||||||
this.mc.getSoundHandler().playSound(positionedsoundrecord);
|
this.field_72777_q.func_147118_V().func_147682_a(positionedsoundrecord);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
+ public void checkAndGrow()
|
+ public void checkAndGrow()
|
||||||
+ {
|
+ {
|
||||||
+ this.func_181670_b(vertexFormat.getNextOffset()/* / 4 * 4 */);
|
+ this.func_181670_b(field_179011_q.func_177338_f()/* / 4 * 4 */);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
|
|
@ -6,41 +6,41 @@
|
||||||
{
|
{
|
||||||
+ // moved to VertexFormatElement.preDraw
|
+ // moved to VertexFormatElement.preDraw
|
||||||
VertexFormatElement vertexformatelement = (VertexFormatElement)list.get(j);
|
VertexFormatElement vertexformatelement = (VertexFormatElement)list.get(j);
|
||||||
- VertexFormatElement.EnumUsage vertexformatelement$enumusage = vertexformatelement.getUsage();
|
- VertexFormatElement.EnumUsage vertexformatelement$enumusage = vertexformatelement.func_177375_c();
|
||||||
- int k = vertexformatelement.getType().getGlConstant();
|
- int k = vertexformatelement.func_177367_b().func_177397_c();
|
||||||
- int l = vertexformatelement.getIndex();
|
- int l = vertexformatelement.func_177369_e();
|
||||||
- bytebuffer.position(vertexformat.func_181720_d(j));
|
- bytebuffer.position(vertexformat.func_181720_d(j));
|
||||||
-
|
-
|
||||||
- switch (vertexformatelement$enumusage)
|
- switch (vertexformatelement$enumusage)
|
||||||
- {
|
- {
|
||||||
- case POSITION:
|
- case POSITION:
|
||||||
- GL11.glVertexPointer(vertexformatelement.getElementCount(), k, i, bytebuffer);
|
- GL11.glVertexPointer(vertexformatelement.func_177370_d(), k, i, bytebuffer);
|
||||||
- GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
- GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY);
|
||||||
- break;
|
- break;
|
||||||
- case UV:
|
- case UV:
|
||||||
- OpenGlHelper.setClientActiveTexture(OpenGlHelper.defaultTexUnit + l);
|
- OpenGlHelper.func_77472_b(OpenGlHelper.field_77478_a + l);
|
||||||
- GL11.glTexCoordPointer(vertexformatelement.getElementCount(), k, i, bytebuffer);
|
- GL11.glTexCoordPointer(vertexformatelement.func_177370_d(), k, i, bytebuffer);
|
||||||
- GL11.glEnableClientState(GL11.GL_TEXTURE_COORD_ARRAY);
|
- GL11.glEnableClientState(GL11.GL_TEXTURE_COORD_ARRAY);
|
||||||
- OpenGlHelper.setClientActiveTexture(OpenGlHelper.defaultTexUnit);
|
- OpenGlHelper.func_77472_b(OpenGlHelper.field_77478_a);
|
||||||
- break;
|
- break;
|
||||||
- case COLOR:
|
- case COLOR:
|
||||||
- GL11.glColorPointer(vertexformatelement.getElementCount(), k, i, bytebuffer);
|
- GL11.glColorPointer(vertexformatelement.func_177370_d(), k, i, bytebuffer);
|
||||||
- GL11.glEnableClientState(GL11.GL_COLOR_ARRAY);
|
- GL11.glEnableClientState(GL11.GL_COLOR_ARRAY);
|
||||||
- break;
|
- break;
|
||||||
- case NORMAL:
|
- case NORMAL:
|
||||||
- GL11.glNormalPointer(k, i, bytebuffer);
|
- GL11.glNormalPointer(k, i, bytebuffer);
|
||||||
- GL11.glEnableClientState(GL11.GL_NORMAL_ARRAY);
|
- GL11.glEnableClientState(GL11.GL_NORMAL_ARRAY);
|
||||||
- }
|
- }
|
||||||
+ vertexformatelement.getUsage().preDraw(vertexformat, j, i, bytebuffer);
|
+ vertexformatelement.func_177375_c().preDraw(vertexformat, j, i, bytebuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glDrawArrays(p_181679_1_.getDrawMode(), 0, p_181679_1_.getVertexCount());
|
GL11.glDrawArrays(p_181679_1_.func_178979_i(), 0, p_181679_1_.func_178989_h());
|
||||||
@@ -57,26 +34,8 @@
|
@@ -57,26 +34,8 @@
|
||||||
for (int j1 = list.size(); i1 < j1; ++i1)
|
for (int j1 = list.size(); i1 < j1; ++i1)
|
||||||
{
|
{
|
||||||
VertexFormatElement vertexformatelement1 = (VertexFormatElement)list.get(i1);
|
VertexFormatElement vertexformatelement1 = (VertexFormatElement)list.get(i1);
|
||||||
- VertexFormatElement.EnumUsage vertexformatelement$enumusage1 = vertexformatelement1.getUsage();
|
- VertexFormatElement.EnumUsage vertexformatelement$enumusage1 = vertexformatelement1.func_177375_c();
|
||||||
- int k1 = vertexformatelement1.getIndex();
|
- int k1 = vertexformatelement1.func_177369_e();
|
||||||
-
|
-
|
||||||
- switch (vertexformatelement$enumusage1)
|
- switch (vertexformatelement$enumusage1)
|
||||||
- {
|
- {
|
||||||
|
@ -48,19 +48,19 @@
|
||||||
- GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY);
|
- GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY);
|
||||||
- break;
|
- break;
|
||||||
- case UV:
|
- case UV:
|
||||||
- OpenGlHelper.setClientActiveTexture(OpenGlHelper.defaultTexUnit + k1);
|
- OpenGlHelper.func_77472_b(OpenGlHelper.field_77478_a + k1);
|
||||||
- GL11.glDisableClientState(GL11.GL_TEXTURE_COORD_ARRAY);
|
- GL11.glDisableClientState(GL11.GL_TEXTURE_COORD_ARRAY);
|
||||||
- OpenGlHelper.setClientActiveTexture(OpenGlHelper.defaultTexUnit);
|
- OpenGlHelper.func_77472_b(OpenGlHelper.field_77478_a);
|
||||||
- break;
|
- break;
|
||||||
- case COLOR:
|
- case COLOR:
|
||||||
- GL11.glDisableClientState(GL11.GL_COLOR_ARRAY);
|
- GL11.glDisableClientState(GL11.GL_COLOR_ARRAY);
|
||||||
- GlStateManager.resetColor();
|
- GlStateManager.func_179117_G();
|
||||||
- break;
|
- break;
|
||||||
- case NORMAL:
|
- case NORMAL:
|
||||||
- GL11.glDisableClientState(GL11.GL_NORMAL_ARRAY);
|
- GL11.glDisableClientState(GL11.GL_NORMAL_ARRAY);
|
||||||
- }
|
- }
|
||||||
+ // moved to VertexFormatElement.postDraw
|
+ // moved to VertexFormatElement.postDraw
|
||||||
+ vertexformatelement1.getUsage().postDraw(vertexformat, i1, i, bytebuffer);
|
+ vertexformatelement1.func_177375_c().postDraw(vertexformat, i1, i, bytebuffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,6 @@
|
||||||
+public class BakedQuad implements net.minecraftforge.client.model.pipeline.IVertexProducer
|
+public class BakedQuad implements net.minecraftforge.client.model.pipeline.IVertexProducer
|
||||||
{
|
{
|
||||||
+ @Override public void pipe(net.minecraftforge.client.model.pipeline.IVertexConsumer consumer) { net.minecraftforge.client.model.pipeline.LightUtil.putBakedQuad(consumer, this); }
|
+ @Override public void pipe(net.minecraftforge.client.model.pipeline.IVertexConsumer consumer) { net.minecraftforge.client.model.pipeline.LightUtil.putBakedQuad(consumer, this); }
|
||||||
protected final int[] vertexData;
|
protected final int[] field_178215_a;
|
||||||
protected final int tintIndex;
|
protected final int field_178213_b;
|
||||||
protected final EnumFacing face;
|
protected final EnumFacing field_178214_c;
|
||||||
|
|
|
@ -1,68 +1,82 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/client/renderer/block/model/FaceBakery.java
|
--- ../src-base/minecraft/net/minecraft/client/renderer/block/model/FaceBakery.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/block/model/FaceBakery.java
|
+++ ../src-work/minecraft/net/minecraft/client/renderer/block/model/FaceBakery.java
|
||||||
@@ -20,6 +20,11 @@
|
@@ -20,7 +20,12 @@
|
||||||
|
|
||||||
public BakedQuad makeBakedQuad(Vector3f posFrom, Vector3f posTo, BlockPartFace face, TextureAtlasSprite sprite, EnumFacing facing, ModelRotation modelRotationIn, BlockPartRotation partRotation, boolean uvLocked, boolean shade)
|
public BakedQuad func_178414_a(Vector3f p_178414_1_, Vector3f p_178414_2_, BlockPartFace p_178414_3_, TextureAtlasSprite p_178414_4_, EnumFacing p_178414_5_, ModelRotation p_178414_6_, BlockPartRotation p_178414_7_, boolean p_178414_8_, boolean p_178414_9_)
|
||||||
{
|
{
|
||||||
+ return makeBakedQuad(posFrom, posTo, face, sprite, facing, (net.minecraftforge.client.model.ITransformation)modelRotationIn, partRotation, uvLocked, shade);
|
- int[] aint = this.func_178405_a(p_178414_3_, p_178414_4_, p_178414_5_, this.func_178403_a(p_178414_1_, p_178414_2_), p_178414_6_, p_178414_7_, p_178414_8_, p_178414_9_);
|
||||||
|
+ return makeBakedQuad(p_178414_1_, p_178414_2_, p_178414_3_, p_178414_4_, p_178414_5_, (net.minecraftforge.client.model.ITransformation)p_178414_6_, p_178414_7_, p_178414_8_, p_178414_9_);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public BakedQuad makeBakedQuad(Vector3f posFrom, Vector3f posTo, BlockPartFace face, TextureAtlasSprite sprite, EnumFacing facing, net.minecraftforge.client.model.ITransformation modelRotationIn, BlockPartRotation partRotation, boolean uvLocked, boolean shade)
|
+ public BakedQuad makeBakedQuad(Vector3f p_178414_1_, Vector3f p_178414_2_, BlockPartFace p_178414_3_, TextureAtlasSprite p_178414_4_, EnumFacing p_178414_5_, net.minecraftforge.client.model.ITransformation p_178414_6_, BlockPartRotation p_178414_7_, boolean p_178414_8_, boolean p_178414_9_)
|
||||||
+ {
|
+ {
|
||||||
int[] aint = this.makeQuadVertexData(face, sprite, facing, this.getPositionsDiv16(posFrom, posTo), modelRotationIn, partRotation, uvLocked, shade);
|
+ int[] aint = this.makeQuadVertexData(p_178414_3_, p_178414_4_, p_178414_5_, this.func_178403_a(p_178414_1_, p_178414_2_), p_178414_6_, p_178414_7_, p_178414_8_, p_178414_9_);
|
||||||
EnumFacing enumfacing = getFacingFromVertexData(aint);
|
EnumFacing enumfacing = func_178410_a(aint);
|
||||||
|
|
||||||
@@ -33,11 +38,17 @@
|
if (p_178414_8_)
|
||||||
|
@@ -33,16 +38,22 @@
|
||||||
this.func_178408_a(aint, enumfacing);
|
this.func_178408_a(aint, enumfacing);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ net.minecraftforge.client.ForgeHooksClient.fillNormal(aint, enumfacing);
|
+ net.minecraftforge.client.ForgeHooksClient.fillNormal(aint, enumfacing);
|
||||||
return new BakedQuad(aint, face.tintIndex, enumfacing);
|
return new BakedQuad(aint, p_178414_3_.field_178245_c, enumfacing);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int[] makeQuadVertexData(BlockPartFace p_178405_1_, TextureAtlasSprite p_178405_2_, EnumFacing p_178405_3_, float[] p_178405_4_, ModelRotation p_178405_5_, BlockPartRotation p_178405_6_, boolean p_178405_7_, boolean shade)
|
private int[] func_178405_a(BlockPartFace p_178405_1_, TextureAtlasSprite p_178405_2_, EnumFacing p_178405_3_, float[] p_178405_4_, ModelRotation p_178405_5_, BlockPartRotation p_178405_6_, boolean p_178405_7_, boolean p_178405_8_)
|
||||||
{
|
{
|
||||||
+ return makeQuadVertexData(p_178405_1_, p_178405_2_, p_178405_3_, p_178405_4_, p_178405_5_, p_178405_6_, p_178405_7_, shade);
|
+ return func_178405_a(p_178405_1_, p_178405_2_, p_178405_3_, p_178405_4_, p_178405_5_, p_178405_6_, p_178405_7_, p_178405_8_);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ private int[] makeQuadVertexData(BlockPartFace p_178405_1_, TextureAtlasSprite p_178405_2_, EnumFacing p_178405_3_, float[] p_178405_4_, net.minecraftforge.client.model.ITransformation p_178405_5_, BlockPartRotation p_178405_6_, boolean p_178405_7_, boolean shade)
|
+ private int[] makeQuadVertexData(BlockPartFace p_178405_1_, TextureAtlasSprite p_178405_2_, EnumFacing p_178405_3_, float[] p_178405_4_, net.minecraftforge.client.model.ITransformation p_178405_5_, BlockPartRotation p_178405_6_, boolean p_178405_7_, boolean p_178405_8_)
|
||||||
+ {
|
+ {
|
||||||
int[] aint = new int[28];
|
int[] aint = new int[28];
|
||||||
|
|
||||||
for (int i = 0; i < 4; ++i)
|
for (int i = 0; i < 4; ++i)
|
||||||
@@ -88,7 +99,12 @@
|
{
|
||||||
|
- this.func_178402_a(aint, i, p_178405_3_, p_178405_1_, p_178405_4_, p_178405_2_, p_178405_5_, p_178405_6_, p_178405_7_, p_178405_8_);
|
||||||
|
+ this.fillVertexData(aint, i, p_178405_3_, p_178405_1_, p_178405_4_, p_178405_2_, p_178405_5_, p_178405_6_, p_178405_7_, p_178405_8_);
|
||||||
|
}
|
||||||
|
|
||||||
private void fillVertexData(int[] faceData, int vertexIndex, EnumFacing facing, BlockPartFace partFace, float[] p_178402_5_, TextureAtlasSprite sprite, ModelRotation modelRotationIn, BlockPartRotation partRotation, boolean uvLocked, boolean shade)
|
return aint;
|
||||||
|
@@ -88,12 +99,17 @@
|
||||||
|
|
||||||
|
private void func_178402_a(int[] p_178402_1_, int p_178402_2_, EnumFacing p_178402_3_, BlockPartFace p_178402_4_, float[] p_178402_5_, TextureAtlasSprite p_178402_6_, ModelRotation p_178402_7_, BlockPartRotation p_178402_8_, boolean p_178402_9_, boolean p_178402_10_)
|
||||||
{
|
{
|
||||||
- EnumFacing enumfacing = modelRotationIn.rotateFace(facing);
|
- EnumFacing enumfacing = p_178402_7_.func_177523_a(p_178402_3_);
|
||||||
+ fillVertexData(faceData, vertexIndex, facing, partFace, p_178402_5_, sprite, modelRotationIn, partRotation, uvLocked, shade);
|
+ func_178402_a(p_178402_1_, p_178402_2_, p_178402_3_, p_178402_4_, p_178402_5_, p_178402_6_, p_178402_7_, p_178402_8_, p_178402_9_, p_178402_10_);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ private void fillVertexData(int[] faceData, int vertexIndex, EnumFacing facing, BlockPartFace partFace, float[] p_178402_5_, TextureAtlasSprite sprite, net.minecraftforge.client.model.ITransformation modelRotationIn, BlockPartRotation partRotation, boolean uvLocked, boolean shade)
|
+ private void fillVertexData(int[] p_178402_1_, int p_178402_2_, EnumFacing p_178402_3_, BlockPartFace p_178402_4_, float[] p_178402_5_, TextureAtlasSprite p_178402_6_, net.minecraftforge.client.model.ITransformation p_178402_7_, BlockPartRotation p_178402_8_, boolean p_178402_9_, boolean p_178402_10_)
|
||||||
+ {
|
+ {
|
||||||
+ EnumFacing enumfacing = modelRotationIn.rotate(facing);
|
+ EnumFacing enumfacing = p_178402_7_.rotate(p_178402_3_);
|
||||||
int i = shade ? this.getFaceShadeColor(enumfacing) : -1;
|
int i = p_178402_10_ ? this.func_178413_a(enumfacing) : -1;
|
||||||
EnumFaceDirection.VertexInformation enumfacedirection$vertexinformation = EnumFaceDirection.getFacing(facing).func_179025_a(vertexIndex);
|
EnumFaceDirection.VertexInformation enumfacedirection$vertexinformation = EnumFaceDirection.func_179027_a(p_178402_3_).func_179025_a(p_178402_2_);
|
||||||
Vector3f vector3f = new Vector3f(p_178402_5_[enumfacedirection$vertexinformation.field_179184_a], p_178402_5_[enumfacedirection$vertexinformation.field_179182_b], p_178402_5_[enumfacedirection$vertexinformation.field_179183_c]);
|
Vector3f vector3f = new Vector3f(p_178402_5_[enumfacedirection$vertexinformation.field_179184_a], p_178402_5_[enumfacedirection$vertexinformation.field_179182_b], p_178402_5_[enumfacedirection$vertexinformation.field_179183_c]);
|
||||||
|
this.func_178407_a(vector3f, p_178402_8_);
|
||||||
|
- int j = this.func_178415_a(vector3f, p_178402_3_, p_178402_2_, p_178402_7_, p_178402_9_);
|
||||||
|
+ int j = this.rotateVertex(vector3f, p_178402_3_, p_178402_2_, p_178402_7_, p_178402_9_);
|
||||||
|
this.func_178404_a(p_178402_1_, j, p_178402_2_, vector3f, i, p_178402_6_, p_178402_4_.field_178243_e);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -154,14 +170,19 @@
|
@@ -154,14 +170,19 @@
|
||||||
|
|
||||||
public int rotateVertex(Vector3f position, EnumFacing facing, int vertexIndex, ModelRotation modelRotationIn, boolean uvLocked)
|
public int func_178415_a(Vector3f p_178415_1_, EnumFacing p_178415_2_, int p_178415_3_, ModelRotation p_178415_4_, boolean p_178415_5_)
|
||||||
{
|
{
|
||||||
+ return rotateVertex(position, facing, vertexIndex, modelRotationIn, uvLocked);
|
+ return func_178415_a(p_178415_1_, p_178415_2_, p_178415_3_, p_178415_4_, p_178415_5_);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public int rotateVertex(Vector3f position, EnumFacing facing, int vertexIndex, net.minecraftforge.client.model.ITransformation modelRotationIn, boolean uvLocked)
|
+ public int rotateVertex(Vector3f p_178415_1_, EnumFacing p_178415_2_, int p_178415_3_, net.minecraftforge.client.model.ITransformation p_178415_4_, boolean p_178415_5_)
|
||||||
+ {
|
+ {
|
||||||
if (modelRotationIn == ModelRotation.X0_Y0)
|
if (p_178415_4_ == ModelRotation.X0_Y0)
|
||||||
{
|
{
|
||||||
return vertexIndex;
|
return p_178415_3_;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
- this.rotateScale(position, new Vector3f(0.5F, 0.5F, 0.5F), modelRotationIn.getMatrix4d(), new Vector3f(1.0F, 1.0F, 1.0F));
|
- this.func_178406_a(p_178415_1_, new Vector3f(0.5F, 0.5F, 0.5F), p_178415_4_.func_177525_a(), new Vector3f(1.0F, 1.0F, 1.0F));
|
||||||
- return modelRotationIn.rotateVertex(facing, vertexIndex);
|
- return p_178415_4_.func_177520_a(p_178415_2_, p_178415_3_);
|
||||||
+ net.minecraftforge.client.ForgeHooksClient.transform(position, modelRotationIn.getMatrix());
|
+ net.minecraftforge.client.ForgeHooksClient.transform(p_178415_1_, p_178415_4_.getMatrix());
|
||||||
+ return modelRotationIn.rotate(facing, vertexIndex);
|
+ return p_178415_4_.rotate(p_178415_2_, p_178415_3_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue