mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 23:13:15 +00:00
31 lines
1.7 KiB
Diff
31 lines
1.7 KiB
Diff
--- ../src-base/minecraft/net/minecraft/block/BlockLadder.java
|
|
+++ ../src-work/minecraft/net/minecraft/block/BlockLadder.java
|
|
@@ -61,7 +61,10 @@
|
|
|
|
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
|
|
{
|
|
- return worldIn.getBlockState(pos.west()).func_185915_l() ? true : (worldIn.getBlockState(pos.east()).func_185915_l() ? true : (worldIn.getBlockState(pos.north()).func_185915_l() ? true : worldIn.getBlockState(pos.south()).func_185915_l()));
|
|
+ return worldIn.getBlockState(pos.west()).isSideSolid(worldIn, pos.west(), EnumFacing.EAST) ||
|
|
+ worldIn.getBlockState(pos.east()).isSideSolid(worldIn, pos.east(), EnumFacing.WEST) ||
|
|
+ worldIn.getBlockState(pos.north()).isSideSolid(worldIn, pos.north(), EnumFacing.SOUTH) ||
|
|
+ worldIn.getBlockState(pos.south()).isSideSolid(worldIn, pos.south(), EnumFacing.NORTH);
|
|
}
|
|
|
|
public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
|
|
@@ -99,7 +102,7 @@
|
|
|
|
protected boolean canBlockStay(World worldIn, BlockPos pos, EnumFacing facing)
|
|
{
|
|
- return worldIn.getBlockState(pos.offset(facing.getOpposite())).func_185915_l();
|
|
+ return worldIn.getBlockState(pos.offset(facing.getOpposite())).isSideSolid(worldIn, pos.offset(facing.getOpposite()), facing);
|
|
}
|
|
|
|
public IBlockState getStateFromMeta(int meta)
|
|
@@ -139,4 +142,6 @@
|
|
{
|
|
return new BlockStateContainer(this, new IProperty[] {FACING});
|
|
}
|
|
+
|
|
+ @Override public boolean isLadder(IBlockState state, IBlockAccess world, BlockPos pos, EntityLivingBase entity) { return true; }
|
|
}
|