1
0
mirror of https://github.com/p2r3/bareiron.git synced 2025-10-02 07:35:08 +02:00

implement block mining conditions

This commit is contained in:
p2r3
2025-08-13 20:57:58 +03:00
parent 94b3682f0a
commit 2ab196e5f0
7 changed files with 75 additions and 15 deletions

View File

@@ -386,14 +386,7 @@ int cs_playerAction (int client_fd) {
// block was mined in survival
uint8_t block = getBlockAt(x, y, z);
uint16_t item, tmp;
if (block == B_oak_leaves) {
if (sequence % 200 < 2) item = I_apple;
else if (sequence % 50 < 2) item = I_stick;
else if (sequence % 40 < 2) item = I_oak_sapling;
else item = 0;
} else item = B_to_I[block];
uint16_t tmp, item = getMiningResult(client_fd, block);
makeBlockChange(x, y, z, 0);