Fix single slabs and stairs to allow chest opening (#268)
This commit is contained in:
@@ -22,6 +22,12 @@ package appeng.block;
|
||||
import com.google.common.base.Preconditions;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockStairs;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
|
||||
public abstract class AEBaseStairBlock extends BlockStairs {
|
||||
@@ -43,4 +49,9 @@ public abstract class AEBaseStairBlock extends BlockStairs {
|
||||
return this.getClass().getSimpleName() + "[" + regName + "]";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesSideBlockChestOpening(@Nonnull IBlockState blockState, @Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nonnull EnumFacing side) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,10 +10,13 @@ import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Random;
|
||||
|
||||
@@ -97,6 +100,8 @@ public abstract class BlockSlabCommon extends BlockSlab {
|
||||
return Variant.DEFAULT;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static class Double extends BlockSlabCommon {
|
||||
|
||||
private final Block halfSlabBlock;
|
||||
@@ -134,6 +139,11 @@ public abstract class BlockSlabCommon extends BlockSlab {
|
||||
public boolean isDouble() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesSideBlockChestOpening(@Nonnull IBlockState blockState, @Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nonnull EnumFacing side) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public enum Variant implements IStringSerializable {
|
||||
|
||||
Reference in New Issue
Block a user