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

Method updateTick

src/main/java/net/minecraft/block/BlockReed.java:32–61  ·  view source on GitHub ↗
(World worldIn, BlockPos pos, IBlockState state, Random rand)

Source from the content-addressed store, hash-verified

30 }
31
32 public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand)
33 {
34 if (worldIn.getBlockState(pos.down()).getBlock() == Blocks.reeds || this.checkForDrop(worldIn, pos, state))
35 {
36 if (worldIn.isAirBlock(pos.up()))
37 {
38 int i;
39
40 for (i = 1; worldIn.getBlockState(pos.down(i)).getBlock() == this; ++i)
41 {
42 ;
43 }
44
45 if (i < 3)
46 {
47 int j = state.getValue(AGE);
48
49 if (j == 15)
50 {
51 worldIn.setBlockState(pos.up(), this.getDefaultState());
52 worldIn.setBlockState(pos, state.withProperty(AGE, 0), 4);
53 }
54 else
55 {
56 worldIn.setBlockState(pos, state.withProperty(AGE, j + 1), 4);
57 }
58 }
59 }
60 }
61 }
62
63 public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
64 {

Callers

nothing calls this directly

Calls 10

checkForDropMethod · 0.95
downMethod · 0.80
upMethod · 0.80
getDefaultStateMethod · 0.80
getBlockMethod · 0.65
getBlockStateMethod · 0.65
isAirBlockMethod · 0.65
getValueMethod · 0.65
withPropertyMethod · 0.65
setBlockStateMethod · 0.45

Tested by

no test coverage detected