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

@@ -7,7 +7,7 @@
#include "../Util/AABB.h"
PistonMovingPiece::PistonMovingPiece(int id)
: EntityTile(id, Material::piston, false) {
: BaseEntityTile(id, Material::piston, false) {
setDestroyTime(INDESTRUCTIBLE_DESTROY_TIME);
}
@@ -24,7 +24,7 @@ void PistonMovingPiece::onRemove(Level* level, int x, int y, int z, int id,
std::dynamic_pointer_cast<PistonPieceEntity>(tileEntity) != NULL) {
std::dynamic_pointer_cast<PistonPieceEntity>(tileEntity)->finalTick();
} else {
EntityTile::onRemove(level, x, y, z, id, data);
BaseEntityTile::onRemove(level, x, y, z, id, data);
}
}
@@ -52,7 +52,7 @@ bool PistonMovingPiece::use(
// blocks in the world
if (!level->isClientSide && level->getTileEntity(x, y, z) == NULL) {
// this block is no longer valid
level->setTile(x, y, z, 0);
level->removeTile(x, y, z);
return true;
}
return false;
@@ -78,7 +78,8 @@ void PistonMovingPiece::spawnResources(Level* level, int x, int y, int z,
void PistonMovingPiece::neighborChanged(Level* level, int x, int y, int z,
int type) {
if (!level->isClientSide && level->getTileEntity(x, y, z) == NULL) {
if (!level->isClientSide) {
level->getTileEntity(x, y, z) == NULL;
}
}