Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-17 05:20:05 +01:00
Fixed crash when breaking gravel with a high fortune enchant
Dieser Commit ist enthalten in:
Ursprung
eb7bd5f23b
Commit
139ad8c34a
15
src/main/java/net/minecraft/server/BlockGravel.java
Normale Datei
15
src/main/java/net/minecraft/server/BlockGravel.java
Normale Datei
@ -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;
|
||||||
|
}
|
||||||
|
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren