TU19: merge Minecraft.World/Blocks
This commit is contained in:
1 parent
f25cd66f4d
commit
9b6046cb83
241 files changed
+8070
-4644
No files matched your search
@@ -93,10 +93,9 @@ void CakeTile::eat(Level* level, int x, int y, int z,
|
||||
|
||||
int d = level->getData(x, y, z) + 1;
|
||||
if (d >= 6) {
|
||||
level->setTile(x, y, z, 0);
|
||||
level->removeTile(x, y, z);
|
||||
} else {
|
||||
level->setData(x, y, z, d);
|
||||
level->setTileDirty(x, y, z);
|
||||
level->setData(x, y, z, d, Tile::UPDATE_CLIENTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -109,8 +108,7 @@ bool CakeTile::mayPlace(Level* level, int x, int y, int z) {
|
||||
|
||||
void CakeTile::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->removeTile(x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,4 +124,4 @@ int CakeTile::getResource(int data, Random* random, int playerBonusLevel) {
|
||||
|
||||
int CakeTile::cloneTileId(Level* level, int x, int y, int z) {
|
||||
return Item::cake_Id;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user