mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-07-08 17:49:12 +00:00
TU19: merge Minecraft.World/Blocks
This commit is contained in:
@@ -23,10 +23,11 @@ void CactusTile::tick(Level* level, int x, int y, int z, Random* random) {
|
||||
if (height < 3) {
|
||||
int age = level->getData(x, y, z);
|
||||
if (age == 15) {
|
||||
level->setTile(x, y + 1, z, id);
|
||||
level->setData(x, y, z, 0);
|
||||
level->setTileAndUpdate(x, y + 1, z, id);
|
||||
level->setData(x, y, z, 0, Tile::UPDATE_NONE);
|
||||
neighborChanged(level, x, y + 1, z, id);
|
||||
} else {
|
||||
level->setData(x, y, z, age + 1);
|
||||
level->setData(x, y, z, age + 1, Tile::UPDATE_NONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -64,8 +65,7 @@ bool CactusTile::mayPlace(Level* level, int x, int y, int z) {
|
||||
|
||||
void CactusTile::neighborChanged(Level* level, int x, int y, int z, int type) {
|
||||
if (!canSurvive(level, x, y, z)) {
|
||||
this->spawnResources(level, x, y, z, level->getData(x, y, z), 0);
|
||||
level->setTile(x, y, z, 0);
|
||||
level->destroyTile(x, y, z, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user