88 lines
3.2 KiB
Diff
88 lines
3.2 KiB
Diff
--- ../src_base/common/net/minecraft/src/BlockLadder.java
|
|
+++ ../src_work/common/net/minecraft/src/BlockLadder.java
|
|
@@ -3,6 +3,8 @@
|
|
import cpw.mods.fml.common.Side;
|
|
import cpw.mods.fml.common.asm.SideOnly;
|
|
import java.util.Random;
|
|
+import net.minecraftforge.common.ForgeDirection;
|
|
+import static net.minecraftforge.common.ForgeDirection.*;
|
|
|
|
public class BlockLadder extends Block
|
|
{
|
|
@@ -107,7 +109,10 @@
|
|
*/
|
|
public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
|
|
{
|
|
- return par1World.isBlockNormalCube(par2 - 1, par3, par4) ? true : (par1World.isBlockNormalCube(par2 + 1, par3, par4) ? true : (par1World.isBlockNormalCube(par2, par3, par4 - 1) ? true : par1World.isBlockNormalCube(par2, par3, par4 + 1)));
|
|
+ return par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST ) ||
|
|
+ par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST ) ||
|
|
+ par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH) ||
|
|
+ par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH);
|
|
}
|
|
|
|
/**
|
|
@@ -117,22 +122,22 @@
|
|
{
|
|
int var9 = par1World.getBlockMetadata(par2, par3, par4);
|
|
|
|
- if ((var9 == 0 || par5 == 2) && par1World.isBlockNormalCube(par2, par3, par4 + 1))
|
|
+ if ((var9 == 0 || par5 == 2) && par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH))
|
|
{
|
|
var9 = 2;
|
|
}
|
|
|
|
- if ((var9 == 0 || par5 == 3) && par1World.isBlockNormalCube(par2, par3, par4 - 1))
|
|
+ if ((var9 == 0 || par5 == 3) && par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH))
|
|
{
|
|
var9 = 3;
|
|
}
|
|
|
|
- if ((var9 == 0 || par5 == 4) && par1World.isBlockNormalCube(par2 + 1, par3, par4))
|
|
+ if ((var9 == 0 || par5 == 4) && par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST))
|
|
{
|
|
var9 = 4;
|
|
}
|
|
|
|
- if ((var9 == 0 || par5 == 5) && par1World.isBlockNormalCube(par2 - 1, par3, par4))
|
|
+ if ((var9 == 0 || par5 == 5) && par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST))
|
|
{
|
|
var9 = 5;
|
|
}
|
|
@@ -149,22 +154,22 @@
|
|
int var6 = par1World.getBlockMetadata(par2, par3, par4);
|
|
boolean var7 = false;
|
|
|
|
- if (var6 == 2 && par1World.isBlockNormalCube(par2, par3, par4 + 1))
|
|
+ if (var6 == 2 && par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH))
|
|
{
|
|
var7 = true;
|
|
}
|
|
|
|
- if (var6 == 3 && par1World.isBlockNormalCube(par2, par3, par4 - 1))
|
|
+ if (var6 == 3 && par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH))
|
|
{
|
|
var7 = true;
|
|
}
|
|
|
|
- if (var6 == 4 && par1World.isBlockNormalCube(par2 + 1, par3, par4))
|
|
+ if (var6 == 4 && par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST))
|
|
{
|
|
var7 = true;
|
|
}
|
|
|
|
- if (var6 == 5 && par1World.isBlockNormalCube(par2 - 1, par3, par4))
|
|
+ if (var6 == 5 && par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST))
|
|
{
|
|
var7 = true;
|
|
}
|
|
@@ -185,4 +190,10 @@
|
|
{
|
|
return 1;
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public boolean isLadder(World world, int x, int y, int z)
|
|
+ {
|
|
+ return true;
|
|
+ }
|
|
}
|