Skip to content

Commit 6d07eb3

Browse files
authored
Merge pull request WayofTime#2007
fix randomTicks for BlockTau
2 parents d4feb5f + 518833c commit 6d07eb3

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/main/java/wayoftime/bloodmagic/common/block/BlockTau.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
import java.util.List;
44
import java.util.Random;
55

6+
import net.minecraft.util.RandomSource;
67
import net.minecraft.world.level.block.state.BlockBehaviour;
78
import net.minecraft.world.level.block.Block;
89
import net.minecraft.world.level.block.state.BlockState;
910
import net.minecraft.world.level.block.Blocks;
1011
import net.minecraft.world.level.block.CropBlock;
1112
import net.minecraft.world.entity.LivingEntity;
12-
import net.minecraft.world.damagesource.DamageSource;
1313
import net.minecraft.world.level.ItemLike;
1414
import net.minecraft.world.phys.AABB;
1515
import net.minecraft.core.BlockPos;
@@ -60,7 +60,8 @@ public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos,
6060
/**
6161
* Performs a random tick on a block.
6262
*/
63-
public void randomTick(BlockState state, ServerLevel worldIn, BlockPos pos, Random random)
63+
@Override
64+
public void randomTick(BlockState state, ServerLevel worldIn, BlockPos pos, RandomSource random)
6465
{
6566
if (!worldIn.isAreaLoaded(pos, 1))
6667
return; // Forge: prevent loading unloaded chunks when checking neighbor's light
@@ -110,14 +111,8 @@ public void randomTick(BlockState state, ServerLevel worldIn, BlockPos pos, Rand
110111
}
111112
}
112113

113-
/**
114-
* Whether this IGrowable can grow
115-
*/
116-
public boolean isValidBonemealTarget(BlockGetter worldIn, BlockPos pos, BlockState state, boolean isClient)
117-
{
118-
return !this.isMaxAge(state);
119-
}
120114

115+
//REVIEW: method not called. Add @override and change Random to RandomSource
121116
public boolean isBonemealSuccess(Level worldIn, Random rand, BlockPos pos, BlockState state)
122117
{
123118
return false;

0 commit comments

Comments
 (0)