mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-15 12:02:49 +01:00
Fixed crash when breaking gravel with a high fortune enchant
This commit is contained in:
parent
eb7bd5f23b
commit
139ad8c34a
1 changed files with 15 additions and 0 deletions
15
src/main/java/net/minecraft/server/BlockGravel.java
Normal file
15
src/main/java/net/minecraft/server/BlockGravel.java
Normal file
|
@ -0,0 +1,15 @@
|
|||
package net.minecraft.server;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockGravel extends BlockSand {
|
||||
|
||||
public BlockGravel(int i, int j) {
|
||||
super(i, j);
|
||||
}
|
||||
|
||||
public int a(int i, Random random, int j) {
|
||||
j = Math.max(j, 3); // CraftBukkit - added to fix crash when j > 3
|
||||
return random.nextInt(10 - j * 3) == 0 ? Item.FLINT.id : this.id;
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue