MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / getActualState

Method getActualState

src/main/java/net/minecraft/block/BlockFire.java:40–63  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 13

canCatchFireMethod · 0.95
downMethod · 0.80
upMethod · 0.80
northMethod · 0.80
eastMethod · 0.80
southMethod · 0.80
westMethod · 0.80
getDefaultStateMethod · 0.80
getXMethod · 0.65
getYMethod · 0.65
getZMethod · 0.65

Tested by

no test coverage detected