ForgePatch/patches/minecraft/net/minecraft/block/BlockPistonBase.java.patch

66 lines
2.5 KiB
Diff
Raw Normal View History

--- ../src-base/minecraft/net/minecraft/block/BlockPistonBase.java
+++ ../src-work/minecraft/net/minecraft/block/BlockPistonBase.java
@@ -11,6 +11,7 @@
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
+import net.minecraft.server.management.PlayerManager;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityPiston;
import net.minecraft.util.AxisAlignedBB;
@@ -360,7 +361,8 @@
return false;
}
- return !(p_150080_0_ instanceof ITileEntityProvider);
+ return !(p_150080_1_.func_147439_a(p_150080_2_, p_150080_3_, p_150080_4_).hasTileEntity(p_150080_1_.getBlockMetadata(p_150080_2_, p_150080_3_, p_150080_4_)));
+
}
}
@@ -375,14 +377,14 @@
{
2013-01-12 07:45:38 +00:00
if (l1 < 13)
{
2013-01-12 07:45:38 +00:00
- if (j1 <= 0 || j1 >= 255)
+ if (j1 <= 0 || j1 >= p_150077_0_.getHeight())
{
return false;
}
Block block = p_150077_0_.func_147439_a(i1, j1, k1);
- if (block.func_149688_o() != Material.field_151579_a)
+ if (!block.isAir(p_150077_0_, i1, j1, k1))
{
if (!func_150080_a(block, p_150077_0_, i1, j1, k1, true))
{
@@ -420,14 +422,14 @@
{
2013-01-12 07:45:38 +00:00
if (l1 < 13)
{
2013-01-12 07:45:38 +00:00
- if (j1 <= 0 || j1 >= 255)
+ if (j1 <= 0 || j1 >= p_150079_1_.getHeight())
{
return false;
}
Block block = p_150079_1_.func_147439_a(i1, j1, k1);
- if (block.func_149688_o() != Material.field_151579_a)
+ if (!block.isAir(p_150079_1_, i1, j1, k1))
{
if (!func_150080_a(block, p_150079_1_, i1, j1, k1, true))
{
@@ -448,7 +450,9 @@
continue;
}
- block.func_149697_b(p_150079_1_, i1, j1, k1, p_150079_1_.getBlockMetadata(i1, j1, k1), 0);
+ //With our change to how snowballs are dropped this needs to disallow to mimic vanilla behavior.
+ float chance = block instanceof BlockSnow ? -1.0f : 1.0f;
+ block.func_149690_a(p_150079_1_, i1, j1, k1, p_150079_1_.getBlockMetadata(i1, j1, k1), chance, 0);
p_150079_1_.func_147468_f(i1, j1, k1);
}
}