use of net.minecraft.block.BlockGlass in project SpringFestival by TeamCovertDragon.
the class BlockHangingFirecracker method canBlockStay.
public boolean canBlockStay(World worldIn, BlockPos pos) {
pos = pos.up();
IBlockState state = worldIn.getBlockState(pos);
Block block = state.getBlock();
if (state.isSideSolid(worldIn, pos, EnumFacing.DOWN) || state.getBlockFaceShape(worldIn, pos, EnumFacing.DOWN) == BlockFaceShape.SOLID) {
return block != Blocks.END_GATEWAY && !(block instanceof BlockPistonBase);
} else if (block instanceof BlockHangingFirecracker) {
return state.getValue(COUNT) == 0;
} else {
return block.isLeaves(state, worldIn, pos) || block instanceof BlockFence || block instanceof BlockGlass || block instanceof BlockWall || block instanceof BlockStainedGlass;
}
}
Aggregations