fix(TU20): Piston and StemTile fixes (#6)

- fixed "Two pistons stacked facing up and the top piston is powered with a repeater will cause the top piston to lock in place."
- fixed "Fix for issue where destroying planted pumpkin and melon seeds drops an incorrect number of seeds."

---------

Co-authored-by: pieeebot <10+pieeebot@noreply.neolegacy.dev>
Reviewed-on: https://git.neolegacy.dev/pieeebot/mc_pieLCE/pulls/6
Co-authored-by: qloak <realminecart@gmail.com>
Co-committed-by: qloak <realminecart@gmail.com>
This commit was merged in pull request #6.
This commit is contained in:
2026-07-15 20:33:38 +01:00
committed by pieeebot
co-authored by pieeebot
parent b1189eb6c9
commit b08d478d73
2 changed files with 13 additions and 1 deletions
+4 -1
View File
@@ -189,7 +189,10 @@ void StemTile::spawnResources(Level *level, int x, int y, int z, int data, float
if (fruit == Tile::melon) seed = Item::seeds_melon;
for (int i = 0; i < 3; i++)
{
popResource(level, x, y, z, shared_ptr<ItemInstance>(new ItemInstance(seed)));
if (level->random->nextInt(15) <= data)
{
popResource(level, x, y, z, shared_ptr<ItemInstance>(new ItemInstance(seed)));
}
}
}