Get the actual Block state of this Block at the given position. This applies properties not visible in the metadata, such as fence connections.
(IBlockState state, IBlockAccess worldIn, BlockPos pos)
| 38 | * metadata, such as fence connections. |
| 39 | */ |
| 40 | public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos) |
| 41 | { |
| 42 | int i = pos.getX(); |
| 43 | int j = pos.getY(); |
| 44 | int k = pos.getZ(); |
| 45 | |
| 46 | if (!World.doesBlockHaveSolidTopSurface(worldIn, pos.down()) && !Blocks.fire.canCatchFire(worldIn, pos.down())) |
| 47 | { |
| 48 | boolean flag = (i + j + k & 1) == 1; |
| 49 | boolean flag1 = (i / 2 + j / 2 + k / 2 & 1) == 1; |
| 50 | int l = 0; |
| 51 | |
| 52 | if (this.canCatchFire(worldIn, pos.up())) |
| 53 | { |
| 54 | l = flag ? 1 : 2; |
| 55 | } |
| 56 | |
| 57 | return state.withProperty(NORTH, this.canCatchFire(worldIn, pos.north())).withProperty(EAST, this.canCatchFire(worldIn, pos.east())).withProperty(SOUTH, this.canCatchFire(worldIn, pos.south())).withProperty(WEST, this.canCatchFire(worldIn, pos.west())).withProperty(UPPER, l).withProperty(FLIP, flag1).withProperty(ALT, flag); |
| 58 | } |
| 59 | else |
| 60 | { |
| 61 | return this.getDefaultState(); |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | protected BlockFire() |
| 66 | { |
nothing calls this directly
no test coverage detected