Esempio n. 1
0
void ButtonTile::neighborChanged(TileSource* region, int x, int y, int z, int newX, int newY, int newZ) {
	if(!canSurvive(region, x, y, z)) {
		popResource(region, x, y, z, ItemInstance(this));
		region->removeTile(x, y, z);
		region->scheduleBlockUpdate(x, y, z, id, 0);
	}
}
void NotGateTile::neighborChanged(NotGateTile* self, TileSource* region, int x, int y, int z, int xx, int yy, int zz) {
    if(!canSurvive(self, region, x, y, z)) {
		region->setTileAndData(x, y, z, 0, 0, 0);
		//self->popResource(region, x, y, z, ItemInstance(tiles[self->getResource()], 1, 0));
    }
    region->scheduleBlockUpdate(x, y, z, self->id, 2);
}
Esempio n. 3
0
void RedstoneWireTile::neighborChanged(TileSource* region, int x, int y, int z, int newX, int newY, int newZ) {
	if(!canSurvive(region, x, y, z)) {
		popResource(region, x, y, z, ItemInstance(Item::items[getResource(NULL, 0, 0)]));
		region->removeTile(x, y, z);
		return;
	}
	recalculate(region, x, y, z);
	Tile::neighborChanged(region, x, y, z, newX, newY, newZ);
}