|
3 | 3 | import java.util.List; |
4 | 4 | import java.util.Random; |
5 | 5 |
|
| 6 | +import net.minecraft.util.RandomSource; |
6 | 7 | import net.minecraft.world.level.block.state.BlockBehaviour; |
7 | 8 | import net.minecraft.world.level.block.Block; |
8 | 9 | import net.minecraft.world.level.block.state.BlockState; |
9 | 10 | import net.minecraft.world.level.block.Blocks; |
10 | 11 | import net.minecraft.world.level.block.CropBlock; |
11 | 12 | import net.minecraft.world.entity.LivingEntity; |
12 | | -import net.minecraft.world.damagesource.DamageSource; |
13 | 13 | import net.minecraft.world.level.ItemLike; |
14 | 14 | import net.minecraft.world.phys.AABB; |
15 | 15 | import net.minecraft.core.BlockPos; |
@@ -60,7 +60,8 @@ public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, |
60 | 60 | /** |
61 | 61 | * Performs a random tick on a block. |
62 | 62 | */ |
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) |
64 | 65 | { |
65 | 66 | if (!worldIn.isAreaLoaded(pos, 1)) |
66 | 67 | 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 |
110 | 111 | } |
111 | 112 | } |
112 | 113 |
|
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 | | - } |
120 | 114 |
|
| 115 | + //REVIEW: method not called. Add @override and change Random to RandomSource |
121 | 116 | public boolean isBonemealSuccess(Level worldIn, Random rand, BlockPos pos, BlockState state) |
122 | 117 | { |
123 | 118 | return false; |
|
0 commit comments