From ae4290e73e72a799869a2a9419c4ec78916c8a12 Mon Sep 17 00:00:00 2001 From: p2r3 Date: Tue, 12 Aug 2025 04:52:45 +0300 Subject: [PATCH] drop apples and sticks from leaves --- src/packets.c | 6 ++++-- src/registries.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/packets.c b/src/packets.c index 94767ac..0bb0b1d 100644 --- a/src/packets.c +++ b/src/packets.c @@ -364,8 +364,10 @@ int cs_playerAction (int client_fd) { uint16_t item, tmp; if (block == B_oak_leaves) { - if (sequence % 40 < 2) item = I_oak_sapling; - else item = I_air; + 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]; uint8_t *inventory = getPlayerInventory(client_fd); diff --git a/src/registries.h b/src/registries.h index 39649a2..5ebafa8 100644 --- a/src/registries.h +++ b/src/registries.h @@ -524,5 +524,7 @@ extern uint16_t block_palette[256]; // Block palette #define I_white_wool 213 #define I_wither_rose 243 #define I_yellow_wool 217 +#define I_apple 857 +#define I_stick 905 #endif