mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-29 20:23:38 +00:00
13 lines
422 B
C++
13 lines
422 B
C++
#include "GravelTile.h"
|
|
|
|
#include "java/Random.h"
|
|
#include "minecraft/world/item/Item.h"
|
|
#include "minecraft/world/level/tile/HeavyTile.h"
|
|
|
|
GravelTile::GravelTile(int type) : HeavyTile(type) {}
|
|
|
|
int GravelTile::getResource(int data, Random* random, int playerBonusLevel) {
|
|
if (playerBonusLevel > 3) playerBonusLevel = 3;
|
|
if (random->nextInt(10 - playerBonusLevel * 3) == 0) return Item::flint->id;
|
|
return id;
|
|
} |