TU19: merge Minecraft.World/Blocks

This commit is contained in:
Tropical
2026-03-21 15:52:50 -05:00
parent f25cd66f4d
commit 9b6046cb83
242 changed files with 8083 additions and 4657 deletions

View File

@@ -8,14 +8,16 @@ void Bush::_init() {
updateDefaultShape();
}
Bush::Bush(int id, Material* material) : Tile(id, material, false) { _init(); }
Bush::Bush(int id, Material* material) : Tile(id, material, false) {
_init();
}
Bush::Bush(int id) : Tile(id, Material::plant, false) { _init(); }
// 4J Added override
void Bush::updateDefaultShape() {
float ss = 0.2f;
this->setShape(0.5f - ss, 0, 0.5f - ss, 0.5f + ss, ss * 3, 0.5f + ss);
setShape(0.5f - ss, 0, 0.5f - ss, 0.5f + ss, ss * 3, 0.5f + ss);
}
bool Bush::mayPlace(Level* level, int x, int y, int z) {
@@ -40,7 +42,7 @@ void Bush::tick(Level* level, int x, int y, int z, Random* random) {
void Bush::checkAlive(Level* level, int x, int y, int z) {
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->setTileAndData(x, y, z, 0, 0, UPDATE_CLIENTS);
}
}