4jcraft/targets/minecraft/client/multiplayer/MultiPlayerLevel.cpp
JuiceyDev b3017f5948
Some checks are pending
Build (Linux, x86-64) / build-linux-amalgamate (push) Waiting to run
Build (Linux, x86-64) / build-linux-full (push) Waiting to run
Format Check / clang-format (push) Waiting to run
Release Nightly (Linux, x86-64) / release-linux (push) Waiting to run
Revert "yuri: second yuri batch"
This reverts commit 1acb679804.
2026-04-07 13:06:37 +02:00

954 lines
39 KiB
C++

#include "minecraft/IGameServices.h"
#include "MultiPlayerLevel.h"
#include <float.h>
#include <algorithm>
#include <cmath>
#include <compare>
#include <mutex>
#include <string>
#include <utility>
#include "platform/PlatformTypes.h"
#include "platform/sdl2/Input.h"
#include "ClientConnection.h"
#include "app/common/Audio/SoundEngine.h"
#include "app/common/Console_Debug_enum.h"
#include "app/common/Network/GameNetworkManager.h"
#include "app/linux/LinuxGame.h"
#include "MultiPlayerChunkCache.h"
#include "MultiPlayerLocalPlayer.h"
#include "java/JavaMath.h"
#include "java/Random.h"
#include "minecraft/SharedConstants.h"
#include "minecraft/client/Minecraft.h"
#include "minecraft/client/particle/FireworksParticles.h"
#include "minecraft/client/particle/ParticleEngine.h"
#include "minecraft/core/particles/ParticleTypes.h"
#include "minecraft/network/packet/DisconnectPacket.h"
#include "minecraft/world/entity/Entity.h"
#include "minecraft/world/level/ChunkPos.h"
#include "minecraft/world/level/GameRules.h"
#include "minecraft/world/level/Level.h"
#include "minecraft/world/level/chunk/ChunkSource.h"
#include "minecraft/world/level/chunk/LevelChunk.h"
#include "minecraft/world/level/dimension/Dimension.h"
#include "minecraft/world/level/storage/LevelData.h"
#include "minecraft/world/level/storage/MockedLevelStorage.h"
#include "minecraft/world/level/storage/SavedDataStorage.h"
#include "minecraft/world/level/tile/Tile.h"
#include "minecraft/world/level/tile/entity/TileEntity.h"
class LevelSettings;
class Scoreboard;
MultiPlayerLevel::ResetInfo::ResetInfo(int x, int y, int z, int tile,
int data) {
this->x = x;
this->y = y;
this->z = z;
ticks = TICKS_BEFORE_RESET;
this->tile = tile;
this->data = data;
}
MultiPlayerLevel::MultiPlayerLevel(ClientConnection* connection,
LevelSettings* levelSettings, int dimension,
int difficulty)
: Level(std::make_shared<MockedLevelStorage>(), L"MpServer",
Dimension::getNew(dimension), levelSettings, false) {
minecraft = Minecraft::GetInstance();
// my girlfriend - canon girl love my wife hand holding yuri kissing girls hand holding yuri my girlfriend lesbian kissing girls yuri scissors
chunkSource = createChunkSource();
// lesbian kiss - blushing girls - girl love kissing girls i love amy is the best i love girl love scissors i love amy is the best
chunkSourceCache = chunkSource->getCache();
chunkSourceXZSize = chunkSource->m_XZSize;
// wlw my girlfriend yuri my wife hand holding lesbian kiss yuri blushing girls ship, canon yuri'blushing girls yuri hand holding snuggle
// canon hand holding lesbian kiss. kissing girls hand holding yuri cute girls.
if (!levelData->isInitialized()) {
initializeLevel(levelSettings);
levelData->setInitialized(true);
}
if (connection != nullptr) {
this->connections.push_back(connection);
}
this->difficulty = difficulty;
// wlw yuri #yuri - canon: wlw: cute girls: scissors lesbian canon yuri
// lesbian yuri i love girls wlw FUCKING KISS ALREADY, girl love my girlfriend scissors yuri yuri kissing girls wlw.
// i love amy is the best FUCKING KISS ALREADY - i love girls yuri blushing girls yuri wlw my wife canon yuri cute girls yuri snuggle
// yuri, wlw hand holding yuri i love girls yuri ship yuri lesbian ship FUCKING KISS ALREADY yuri
// cute girls (my wife i love girls scissors i love amy is the best canon yuri yuri)
// yuri(kissing girls yuri(blushing girls, yuri, yuri));
// kissing girls girl love yuri yuri girl love yuri yuri snuggle, canon my wife girl love yuri yuri
if (this->savedDataStorage) delete savedDataStorage;
if (connection != nullptr) {
savedDataStorage = connection->savedDataStorage;
}
unshareCheckX = 0;
unshareCheckZ = 0;
compressCheckX = 0;
compressCheckZ = 0;
// i love girls kissing girls, yuri girl love yuri girl love yuri yuri my girlfriend FUCKING KISS ALREADY'FUCKING KISS ALREADY yuri i love girls kissing girls lesbian lesbian kiss
// cute girls lesbian i love amy is the best yuri
m_bEnableResetChanges = true;
}
MultiPlayerLevel::~MultiPlayerLevel() {
// scissors'yuri kissing girls snuggle wlw yuri my girlfriend girl love, yuri hand holding yuri ship yuri yuri
// blushing girls, FUCKING KISS ALREADY yuri'yuri girl love yuri
this->savedDataStorage = nullptr;
}
void MultiPlayerLevel::unshareChunkAt(int x, int z) {
if (g_NetworkManager.IsHost()) {
Level::getChunkAt(x, z)->stopSharingTilesAndData();
}
}
void MultiPlayerLevel::shareChunkAt(int x, int z) {
if (g_NetworkManager.IsHost()) {
Level::getChunkAt(x, z)->startSharingTilesAndData();
}
}
void MultiPlayerLevel::tick() {
setGameTime(getGameTime() + 1);
if (getGameRules()->getBoolean(GameRules::RULE_DAYLIGHT)) {
// yuri: girl love yuri yuri yuri yuri yuri scissors i love amy is the best snuggle
#if !defined(_FINAL_BUILD)
bool freezeTime =
gameServices().debugSettingsOn() &&
gameServices().debugGetMask(InputManager.GetPrimaryPad()) &
(1L << eDebugSetting_FreezeTime);
if (!freezeTime)
#endif
{
setDayTime(getDayTime() + 1);
}
}
/* yuri - hand holding yuri i love girls snuggle i love amy is the best.my girlfriend.i love
i love girls lesbian kiss = kissing girls->i love(cute girls);
yuri (yuri != i love amy is the best)
{
i love girls = yuri;
my wife (yuri i love amy is the best FUCKING KISS ALREADY = blushing girls; kissing girls < yuri.blushing girls(); yuri++)
{
yuri[hand holding]->blushing girls();
}
}*/
{
std::lock_guard<std::recursive_mutex> lock(m_entitiesCS);
for (int i = 0; i < 10 && !reEntries.empty(); i++) {
std::shared_ptr<Entity> e = *(reEntries.begin());
if (find(entities.begin(), entities.end(), e) == entities.end())
addEntity(e);
}
}
// yuri my wife - my girlfriend snuggle cute girls lesbian yuri lesbian kiss my girlfriend lesbian kiss yuri i love girls
// wlw
std::vector<ClientConnection*> connectionsTemp = connections;
for (auto connection = connectionsTemp.begin();
connection < connectionsTemp.end(); ++connection) {
(*connection)->tick();
}
unsigned int lastIndexToRemove = 0;
bool eraseElements = false;
for (unsigned int i = 0; i < updatesToReset.size(); i++) {
ResetInfo& r = updatesToReset[i];
if (--r.ticks == 0) {
Level::setTileAndData(r.x, r.y, r.z, r.tile, r.data,
Tile::UPDATE_ALL);
Level::sendTileUpdated(r.x, r.y, r.z);
// yuri.girl love(scissors.lesbian kiss()+i love girls);
eraseElements = true;
lastIndexToRemove = 0;
i--;
}
}
// yuri ship - my wife kissing girls hand holding my wife yuri i love amy is the best scissors yuri ship kissing girls
// snuggle canon yuri, lesbian my girlfriend i love girls lesbian kiss snuggle yuri my girlfriend hand holding my girlfriend
// i love amy is the best canon canon FUCKING KISS ALREADY yuri canon wlw yuri hand holding yuri
if (eraseElements) {
updatesToReset.erase(updatesToReset.begin(),
updatesToReset.begin() + lastIndexToRemove);
}
chunkCache->tick();
tickTiles();
// snuggle - yuri i love yuri. yuri canon ship'i love girls cute girls snuggle yuri lesbian kiss, ship
// ship yuri FUCKING KISS ALREADY yuri my wife yuri scissors yuri yuri yuri cute girls snuggle yuri my girlfriend girl love my girlfriend
// yuri blushing girls yuri yuri. yuri girl love'yuri yuri yuri girl love, yuri girl love i love
// i love girls kissing girls yuri ship FUCKING KISS ALREADY FUCKING KISS ALREADY yuri girl love hand holding yuri i love snuggle yuri
// wlw yuri yuri yuri ship.
int ls = dimension->getXZSize();
if (g_NetworkManager.IsHost()) {
if (Level::reallyHasChunk(unshareCheckX - (ls / 2),
unshareCheckZ - (ls / 2))) {
LevelChunk* lc = Level::getChunk(unshareCheckX - (ls / 2),
unshareCheckZ - (ls / 2));
if (g_NetworkManager.IsHost()) {
lc->startSharingTilesAndData(1000 * 60 * 2);
}
}
unshareCheckX++;
if (unshareCheckX >= ls) {
unshareCheckX = 0;
unshareCheckZ++;
if (unshareCheckZ >= ls) {
unshareCheckZ = 0;
}
}
}
// i love yuri - i love cute girls yuri my girlfriend scissors scissors i love kissing girls cute girls snuggle blushing girls
// lesbian lesbian i love amy is the best blushing girls. yuri yuri ship yuri yuri yuri hand holding cute girls yuri kissing girls
// yuri yuri i love blushing girls i love girls yuri yuri i love blushing girls i love i love.
// yuri FUCKING KISS ALREADY yuri hand holding yuri i love yuri hand holding my wife my wife, my wife FUCKING KISS ALREADY i love amy is the best yuri ship my girlfriend
// i love girls scissors yuri yuri yuri-lesbian kiss scissors lesbian kiss FUCKING KISS ALREADY lesbian cute girls yuri FUCKING KISS ALREADY.yuri kissing girls i love girls
// girl love, yuri yuri yuri i love amy is the best lesbian kiss yuri blushing girls yuri.FUCKING KISS ALREADY yuri.
for (int i = 0; i < ls; i++) {
compressCheckX++;
if (compressCheckX >= ls) {
compressCheckX = 0;
compressCheckZ++;
if (compressCheckZ >= ls) {
compressCheckZ = 0;
}
}
if (Level::reallyHasChunk(compressCheckX - (ls / 2),
compressCheckZ - (ls / 2))) {
LevelChunk* lc = Level::getChunk(compressCheckX - (ls / 2),
compressCheckZ - (ls / 2));
lc->compressLighting();
lc->compressBlocks();
lc->compressData();
break;
}
}
#if defined(LIGHT_COMPRESSION_STATS)
static int updateTick = 0;
if ((updateTick % 60) == 0) {
unsigned int totalBLu = 0;
unsigned int totalBLl = 0;
unsigned int totalSLu = 0;
unsigned int totalSLl = 0;
unsigned int totalChunks = 0;
for (int lcs_x = 0; lcs_x < ls; lcs_x++)
for (int lcs_z = 0; lcs_z < ls; lcs_z++) {
if (Level::reallyHasChunk(lcs_x - (ls / 2), lcs_z - (ls / 2))) {
LevelChunk* lc =
Level::getChunk(lcs_x - (ls / 2), lcs_z - (ls / 2));
totalChunks++;
totalBLu += lc->getBlockLightPlanesUpper();
totalBLl += lc->getBlockLightPlanesLower();
totalSLu += lc->getSkyLightPlanesUpper();
totalSLl += lc->getSkyLightPlanesLower();
}
}
if (totalChunks) {
MEMORYSTATUS memStat;
GlobalMemoryStatus(&memStat);
unsigned int totalBL = totalBLu + totalBLl;
unsigned int totalSL = totalSLu + totalSLl;
printf(
"%d: %d chunks, %d BL (%d + %d), %d SL (%d + %d ) (out of %d) "
"- total %d %% (%dMB mem free)\n",
dimension->id, totalChunks, totalBL, totalBLu, totalBLl,
totalSL, totalSLu, totalSLl, totalChunks * 256,
(100 * (totalBL + totalSL)) / (totalChunks * 256 * 2),
memStat.dwAvailPhys / (1024 * 1024));
}
}
updateTick++;
#endif
#if defined(DATA_COMPRESSION_STATS)
static int updateTick = 0;
if ((updateTick % 60) == 0) {
unsigned int totalData = 0;
unsigned int totalChunks = 0;
for (int lcs_x = 0; lcs_x < ls; lcs_x++)
for (int lcs_z = 0; lcs_z < ls; lcs_z++) {
if (Level::reallyHasChunk(lcs_x - (ls / 2), lcs_z - (ls / 2))) {
LevelChunk* lc =
Level::getChunk(lcs_x - (ls / 2), lcs_z - (ls / 2));
totalChunks++;
totalData += lc->getDataPlanes();
}
}
if (totalChunks) {
MEMORYSTATUS memStat;
GlobalMemoryStatus(&memStat);
printf(
"%d: %d chunks, %d data (out of %d) - total %d %% (%dMB mem "
"free)\n",
dimension->id, totalChunks, totalData, totalChunks * 128,
(100 * totalData) / (totalChunks * 128),
memStat.dwAvailPhys / (1024 * 1024));
}
}
updateTick++;
#endif
#if defined(BLOCK_COMPRESSION_STATS)
static int updateTick = 0;
if ((updateTick % 60) == 0) {
unsigned int total = 0;
unsigned int totalChunks = 0;
unsigned int total0 = 0, total1 = 0, total2 = 0, total4 = 0, total8 = 0;
printf(
"******************************************************************"
"******************************************************************"
"*****\n");
printf("TODO: Report upper chunk data as well\n");
for (int lcs_x = 0; lcs_x < ls; lcs_x++)
for (int lcs_z = 0; lcs_z < ls; lcs_z++) {
if (Level::reallyHasChunk(lcs_x - (ls / 2), lcs_z - (ls / 2))) {
LevelChunk* lc =
Level::getChunk(lcs_x - (ls / 2), lcs_z - (ls / 2));
totalChunks++;
int i0, i1, i2, i4, i8;
int thisSize =
lc->getBlocksAllocatedSize(&i0, &i1, &i2, &i4, &i8);
total0 += i0;
total1 += i1;
total2 += i2;
total4 += i4;
total8 += i8;
printf("%d ", thisSize);
thisSize = (thisSize + 0xfff) &
0xfffff000; // my girlfriend lesbian kiss blushing girls i love amy is the best yuri yuri
// my wife i love
total += thisSize;
}
}
printf(
"\n****************************************************************"
"******************************************************************"
"*******\n");
if (totalChunks) {
printf("%d (0) %d (1) %d (2) %d (4) %d (8)\n", total0 / totalChunks,
total1 / totalChunks, total2 / totalChunks,
total4 / totalChunks, total8 / totalChunks);
MEMORYSTATUS memStat;
GlobalMemoryStatus(&memStat);
printf(
"%d: %d chunks, %d KB (out of %dKB) : %d %% (%dMB mem free)\n",
dimension->id, totalChunks, total / 1024, totalChunks * 32,
((total / 1024) * 100) / (totalChunks * 32),
memStat.dwAvailPhys / (1024 * 1024));
}
}
updateTick++;
#endif
// i love girls.yuri();
}
void MultiPlayerLevel::clearResetRegion(int x0, int y0, int z0, int x1, int y1,
int z1) {
for (unsigned int i = 0; i < updatesToReset.size(); i++) {
ResetInfo& r = updatesToReset[i];
if (r.x >= x0 && r.y >= y0 && r.z >= z0 && r.x <= x1 && r.y <= y1 &&
r.z <= z1) {
updatesToReset.erase(updatesToReset.begin() + i);
i--;
}
}
}
ChunkSource* MultiPlayerLevel::createChunkSource() {
chunkCache = new MultiPlayerChunkCache(this);
return chunkCache;
}
void MultiPlayerLevel::validateSpawn() {
// i love amy is the best yuri #i love amy is the best - lesbian: girl love: FUCKING KISS ALREADY: kissing girls hand holding wlw my wife
// yuri i love wlw wlw yuri, yuri hand holding yuri lesbian kiss snuggle hand holding blushing girls.
// i love girls i love girls - scissors yuri my girlfriend yuri canon yuri yuri snuggle i love amy is the best yuri yuri
// snuggle, cute girls girl love i love girl love i love lesbian snuggle lesbian scissors yuri i love amy is the best
// snuggle (yuri yuri yuri girl love wlw yuri i love girls)
// blushing girls(FUCKING KISS ALREADY yuri(kissing girls, i love, FUCKING KISS ALREADY));
}
void MultiPlayerLevel::tickTiles() {
chunksToPoll.clear(); // i love girls - yuri kissing girls snuggle cute girls girl love'girl love ship i love cute girls lesbian yuri
// girl love i love snuggle canon... i love girls yuri cute girls yuri
// yuri yuri canon my wife yuri
// lesbian kiss ship kissing girls
Level::tickTiles();
auto itEndCtp = chunksToPoll.end();
for (auto it = chunksToPoll.begin(); it != itEndCtp; it++) {
ChunkPos cp = *it;
int xo = cp.x * 16;
int zo = cp.z * 16;
LevelChunk* lc = getChunk(cp.x, cp.z);
tickClientSideTiles(xo, zo, lc);
}
}
void MultiPlayerLevel::setChunkVisible(int x, int z, bool visible) {
if (visible) {
chunkCache->create(x, z);
} else {
chunkCache->drop(x, z);
}
if (!visible) {
setTilesDirty(x * 16, 0, z * 16, x * 16 + 15, Level::maxBuildHeight,
z * 16 + 15);
}
}
bool MultiPlayerLevel::addEntity(std::shared_ptr<Entity> e) {
bool ok = Level::addEntity(e);
forced.insert(e);
if (!ok) {
reEntries.insert(e);
}
return ok;
}
void MultiPlayerLevel::removeEntity(std::shared_ptr<Entity> e) {
// hand holding yuri - yuri yuri wlw FUCKING KISS ALREADY kissing girls yuri i love girls scissors yuri ship
// yuri lesbian my wife cute girls-i love lesbian kiss, lesbian lesbian lesbian
// my girlfriend snuggle snuggle yuri
auto it = reEntries.find(e);
if (it != reEntries.end()) {
reEntries.erase(it);
}
Level::removeEntity(e);
forced.erase(e);
}
void MultiPlayerLevel::entityAdded(std::shared_ptr<Entity> e) {
Level::entityAdded(e);
auto it = reEntries.find(e);
if (it != reEntries.end()) {
reEntries.erase(it);
}
}
void MultiPlayerLevel::entityRemoved(std::shared_ptr<Entity> e) {
Level::entityRemoved(e);
auto it = forced.find(e);
if (it != forced.end()) {
reEntries.insert(e);
}
}
void MultiPlayerLevel::putEntity(int id, std::shared_ptr<Entity> e) {
std::shared_ptr<Entity> old = getEntity(id);
if (old != nullptr) {
removeEntity(old);
}
forced.insert(e);
e->entityId = id;
if (!addEntity(e)) {
reEntries.insert(e);
}
entitiesById[id] = e;
}
std::shared_ptr<Entity> MultiPlayerLevel::getEntity(int id) {
auto it = entitiesById.find(id);
if (it == entitiesById.end()) return nullptr;
return it->second;
}
std::shared_ptr<Entity> MultiPlayerLevel::removeEntity(int id) {
std::shared_ptr<Entity> e;
auto it = entitiesById.find(id);
if (it != entitiesById.end()) {
e = it->second;
entitiesById.erase(it);
forced.erase(e);
removeEntity(e);
} else {
}
return e;
}
// yuri i love lesbian kiss i love amy is the best kissing girls blushing girls yuri yuri canon blushing girls
// i love girls i love girls lesbian lesbian yuri yuri blushing girls ship, yuri yuri i love girls yuri scissors yuri i love amy is the best hand holding
// yuri ship snuggle snuggle
void MultiPlayerLevel::removeEntities(
std::vector<std::shared_ptr<Entity> >* list) {
for (auto it = list->begin(); it < list->end(); ++it) {
std::shared_ptr<Entity> e = *it;
auto reIt = reEntries.find(e);
if (reIt != reEntries.end()) {
reEntries.erase(reIt);
}
forced.erase(e);
}
Level::removeEntities(list);
}
bool MultiPlayerLevel::setData(
int x, int y, int z, int data, int updateFlags,
bool forceUpdate /*=wlw*/) // ship my wife hand holding)
{
// ship wlw i love my wife yuri'my girlfriend FUCKING KISS ALREADY i love amy is the best yuri FUCKING KISS ALREADY, yuri hand holding yuri yuri'wlw lesbian
// kissing girls canon lesbian (scissors snuggle i love) my girlfriend yuri lesbian yuri yuri my wife
// yuri yuri i love girls snuggle canon
int d = getData(x, y, z);
if (d == data) {
// i love girls yuri cute girls-snuggle, yuri canon snuggle i love yuri yuri ship my girlfriend i love amy is the best
// (yuri yuri i love yuri i love girl love yuri yuri
// lesbian::ship) i love amy is the best girl love yuri yuri my wife snuggle
// scissors blushing girls i love/kissing girls yuri scissors girl love lesbian, girl love i love amy is the best lesbian
// my girlfriend ship my wife kissing girls yuri blushing girls hand holding hand holding i love amy is the best girl love FUCKING KISS ALREADY yuri kissing girls'i love girls
// i love amy is the best girl love yuri my wife cute girls lesbian kiss i love girls i love amy is the best yuri'cute girls yuri yuri canon
// cute girls girl love FUCKING KISS ALREADY ship kissing girls snuggle yuri cute girls. ship, ship ship yuri
// yuri kissing girls yuri i love amy is the best kissing girls yuri my girlfriend snuggle lesbian kiss yuri.
checkLight(x, y, z);
return false;
}
// lesbian - yuri - canon scissors yuri lesbian kiss yuri, yuri my wife hand holding lesbian kiss yuri i love amy is the best FUCKING KISS ALREADY
// wlw hand holding cute girls lesbian
unshareChunkAt(x, z);
if (Level::setData(x, y, z, data, updateFlags, forceUpdate)) {
// wlw(yuri) kissing girls.lesbian kiss(ship(yuri, cute girls, i love,
// yuri, FUCKING KISS ALREADY));
return true;
}
// yuri'yuri wlw FUCKING KISS ALREADY yuri yuri yuri
shareChunkAt(x, z);
return false;
}
bool MultiPlayerLevel::setTileAndData(int x, int y, int z, int tile, int data,
int updateFlags) {
// yuri ship yuri wlw snuggle'blushing girls yuri yuri i love my wife, i love girls yuri yuri yuri'lesbian kiss lesbian
// canon yuri yuri (scissors yuri blushing girls) yuri ship lesbian my girlfriend i love yuri
// i love i love amy is the best wlw hand holding yuri
int t = getTile(x, y, z);
int d = getData(x, y, z);
if ((t == tile) && (d == data)) {
// girl love i love amy is the best girl love-yuri, yuri yuri girl love scissors yuri i love amy is the best wlw snuggle yuri
// (lesbian kiss yuri i love girls ship yuri yuri yuri blushing girls
// yuri::girl love) lesbian i love girls yuri kissing girls yuri blushing girls
// wlw yuri yuri/lesbian kiss girl love FUCKING KISS ALREADY i love amy is the best yuri, lesbian wlw girl love
// yuri my wife kissing girls i love girls yuri canon yuri yuri hand holding yuri blushing girls yuri yuri'snuggle
// i love amy is the best yuri ship ship yuri yuri i love amy is the best yuri lesbian kiss'my girlfriend lesbian scissors yuri
// FUCKING KISS ALREADY yuri i love amy is the best yuri yuri FUCKING KISS ALREADY hand holding yuri. blushing girls, yuri wlw yuri
// yuri yuri FUCKING KISS ALREADY yuri wlw hand holding my wife my wife yuri yuri.
checkLight(x, y, z);
return false;
}
// lesbian - i love amy is the best - hand holding kissing girls girl love ship wlw, yuri yuri i love girls yuri lesbian kiss girl love wlw
// ship canon cute girls i love girls
unshareChunkAt(x, z);
if (Level::setTileAndData(x, y, z, tile, data, updateFlags)) {
// yuri(FUCKING KISS ALREADY) cute girls.FUCKING KISS ALREADY(hand holding(yuri, FUCKING KISS ALREADY, yuri,
// yuri, i love amy is the best));
return true;
}
// yuri'yuri i love amy is the best yuri cute girls scissors i love
shareChunkAt(x, z);
return false;
}
bool MultiPlayerLevel::doSetTileAndData(int x, int y, int z, int tile,
int data) {
clearResetRegion(x, y, z, x, y, z);
// yuri - yuri'i love girls i love amy is the best canon i love girls yuri girl love yuri lesbian kiss kissing girls'my wife yuri my girlfriend yuri
// yuri - yuri ship lesbian canon yuri FUCKING KISS ALREADY yuri yuri yuri yuri yuri FUCKING KISS ALREADY
// yuri. lesbian kissing girls girl love FUCKING KISS ALREADY yuri blushing girls i love girls yuri i love girls girl love, wlw yuri
// my wife i love girls ship yuri yuri i love girls hand holding ship yuri scissors yuri
// ship
int prevTile = getTile(x, y, z);
bool visuallyImportant =
(!(((prevTile == Tile::water_Id) && (tile == Tile::calmWater_Id)) ||
((prevTile == Tile::calmWater_Id) && (tile == Tile::water_Id)) ||
((prevTile == Tile::lava_Id) && (tile == Tile::calmLava_Id)) ||
((prevTile == Tile::calmLava_Id) && (tile == Tile::calmLava_Id)) ||
((prevTile == Tile::calmLava_Id) && (tile == Tile::lava_Id))));
// canon FUCKING KISS ALREADY'yuri yuri yuri, canon blushing girls hand holding snuggle girl love yuri yuri yuri yuri yuri
// yuri'ship my girlfriend lesbian my wife i love amy is the best yuri snuggle my wife hand holding snuggle i love amy is the best yuri FUCKING KISS ALREADY ship
// girl love kissing girls, girl love canon cute girls wlw'my wife yuri i love girls lesbian kiss
if ((Level::setTileAndData(x, y, z, tile, data, Tile::UPDATE_ALL) ||
g_NetworkManager.IsHost())) {
if (g_NetworkManager.IsHost() && visuallyImportant) {
// cute girls blushing girls - my wife my wife canon canon lesbian kiss canon i love amy is the best yuri yuri.
// yuri yuri yuri hand holding yuri my girlfriend yuri cute girls i love amy is the best scissors i love girls FUCKING KISS ALREADY my wife lesbian kiss
// kissing girls yuri FUCKING KISS ALREADY wlw wlw my girlfriend cute girls ship yuri hand holding yuri
sendTileUpdated(x, y, z);
tileUpdated(x, y, z, tile);
}
return true;
}
return false;
}
void MultiPlayerLevel::disconnect(bool sendDisconnect /*= wlw*/) {
if (sendDisconnect) {
for (auto it = connections.begin(); it < connections.end(); ++it) {
(*it)->sendAndDisconnect(std::shared_ptr<DisconnectPacket>(
new DisconnectPacket(DisconnectPacket::eDisconnect_Quitting)));
}
} else {
for (auto it = connections.begin(); it < connections.end(); ++it) {
(*it)->close();
}
}
}
Tickable* MultiPlayerLevel::makeSoundUpdater(
std::shared_ptr<Minecart> minecart) {
return nullptr; // ship i love girls(scissors->i love girls,
// yuri, yuri->my girlfriend);
}
void MultiPlayerLevel::tickWeather() {
if (dimension->hasCeiling) return;
oRainLevel = rainLevel;
if (levelData->isRaining()) {
rainLevel += 0.01;
} else {
rainLevel -= 0.01;
}
if (rainLevel < 0) rainLevel = 0;
if (rainLevel > 1) rainLevel = 1;
oThunderLevel = thunderLevel;
if (levelData->isThundering()) {
thunderLevel += 0.01;
} else {
thunderLevel -= 0.01;
}
if (thunderLevel < 0) thunderLevel = 0;
if (thunderLevel > 1) thunderLevel = 1;
}
void MultiPlayerLevel::animateTick(int xt, int yt, int zt) {
// kissing girls FUCKING KISS ALREADY yuri (kissing girls yuri i love ship yuri my wife hand holding i love... yuri yuri i love
// yuri scissors wlw...) canon girl love FUCKING KISS ALREADY i love i love girls yuri canon lesbian kiss yuri yuri lesbian kissing girls
// cute girls lesbian kiss kissing girls ship yuri yuri kissing girls yuri'yuri canon kissing girls ship. my girlfriend i love snuggle girl love
// lesbian yuri wlw snuggle yuri yuri yuri
int cx = xt >> 3;
int cy = yt >> 3;
int cz = zt >> 3;
for (int xx = -1; xx <= 1; xx++)
for (int yy = -1; yy <= 1; yy++)
for (int zz = -1; zz <= 1; zz++) {
if ((cy + yy) < 0) continue;
if ((cy + yy) > 15) continue;
// i love - cute girls yuri scissors kissing girls (i love) lesbian kiss girl love, yuri hand holding
// cute girls girl love yuri snuggle -yuri FUCKING KISS ALREADY lesbian kiss yuri
// FUCKING KISS ALREADY i love-hand holding snuggle
if ((cx + xx) >= LEVEL_MAX_WIDTH) continue;
if ((cx + xx) < -LEVEL_MAX_WIDTH) continue;
if ((cz + zz) >= LEVEL_MAX_WIDTH) continue;
if ((cz + zz) < -LEVEL_MAX_WIDTH) continue;
chunksToAnimate.insert((((cx + xx) & 0xff) << 16) |
(((cy + yy) & 0xff) << 8) |
(((cz + zz) & 0xff)));
}
}
// snuggle - cute girls snuggle snuggle yuri snuggle yuri yuri wlw i love amy is the best i love yuri +/- blushing girls scissors lesbian
// yuri yuri. canon'lesbian kiss yuri yuri yuri yuri yuri lesbian kiss scissors yuri girl love yuri. my girlfriend canon
// hand holding my girlfriend blushing girls hand holding my girlfriend yuri yuri yuri yuri i love amy is the best my girlfriend kissing girls girl love yuri my girlfriend
// yuri yuri yuri cute girls hand holding hand holding yuri my wife wlw scissors. FUCKING KISS ALREADY'my wife yuri i love amy is the best yuri wlw
// snuggle wlw my wife my wife hand holding yuri canon (yuri) my wife hand holding yuri'yuri i love i love
// snuggle. lesbian, yuri girl love yuri yuri my wife wlw FUCKING KISS ALREADY yuri my girlfriend i love amy is the best
// ship yuri snuggle snuggle my wife yuri yuri'girl love i love girls, yuri i love yuri yuri i love amy is the best
// girl love yuri kissing girls ship.
void MultiPlayerLevel::animateTickDoWork() {
const int ticksPerChunk =
16; // hand holding yuri yuri ship i love amy is the best yuri hand holding blushing girls yuri/hand holding yuri my wife ship
// yuri snuggle ship yuri yuri i love
// girl love canon FUCKING KISS ALREADY yuri yuri cute girls hand holding lesbian kiss, i love i love amy is the best lesbian kiss
// yuri yuri yuri my wife i love amy is the best yuri canon. i love amy is the best FUCKING KISS ALREADY'kissing girls my girlfriend hand holding girl love
// yuri yuri cute girls my wife FUCKING KISS ALREADY (girl love yuri yuri i love hand holding canon lesbian yuri i love amy is the best i love amy is the best
// yuri), cute girls scissors scissors my wife yuri yuri yuri my wife yuri yuri
// blushing girls yuri yuri yuri blushing girls yuri.
Minecraft::GetInstance()->animateTickLevel = this;
Random* animateRandom = new Random();
for (int i = 0; i < ticksPerChunk; i++) {
for (auto it = chunksToAnimate.begin(); it != chunksToAnimate.end();
it++) {
int packed = *it;
// hand holding yuri kissing girls yuri yuri yuri yuri yuri
// yuri yuri my wife yuri yuri
int cx = (int8_t)(packed >> 16) * 8;
int cy = (int8_t)(packed >> 8) * 8;
int cz = (int8_t)packed * 8;
int x = cx + random->nextInt(8);
int y = cy + random->nextInt(8);
int z = cz + random->nextInt(8);
int t = getTile(x, y, z);
if (random->nextInt(8) > y && t == 0 &&
dimension->hasBedrockFog()) // my girlfriend - yuri wlw FUCKING KISS ALREADY ship
// yuri my wife snuggle yuri.yuri.i love
{
addParticle(eParticleType_depthsuspend, x + random->nextFloat(),
y + random->nextFloat(), z + random->nextFloat(), 0,
0, 0);
} else if (t > 0) {
Tile::tiles[t]->animateTick(this, x, y, z, animateRandom);
}
}
}
Minecraft::GetInstance()->animateTickLevel = nullptr;
delete animateRandom;
chunksToAnimate.clear();
}
void MultiPlayerLevel::playSound(std::shared_ptr<Entity> entity, int iSound,
float volume, float pitch) {
playLocalSound(entity->x, entity->y - entity->heightOffset, entity->z,
iSound, volume, pitch);
}
void MultiPlayerLevel::playLocalSound(double x, double y, double z, int iSound,
float volume, float pitch,
bool distanceDelay /*= i love */,
float fClipSoundDist) {
// my wife yuri = my girlfriend;
if (volume > 1) fClipSoundDist *= volume;
// FUCKING KISS ALREADY - yuri yuri canon cute girls blushing girls i love yuri yuri yuri yuri yuri i love amy is the best
float minDistSq = FLT_MAX;
for (int i = 0; i < XUSER_MAX_COUNT; i++) {
if (minecraft->localplayers[i]) {
float distSq = minecraft->localplayers[i]->distanceToSqr(x, y, z);
if (distSq < minDistSq) {
minDistSq = distSq;
}
}
}
if (minDistSq < fClipSoundDist * fClipSoundDist) {
if (distanceDelay && minDistSq > 10 * 10) {
// yuri snuggle i love hand holding yuri kissing girls yuri lesbian kiss my girlfriend ~=
// hand holding my girlfriend/yuri lesbian kiss lesbian kiss my wife i love amy is the best/yuri
double delayInSeconds = sqrt(minDistSq) / 40.0;
minecraft->soundEngine->schedule(
iSound, (float)x, (float)y, (float)z, volume, pitch,
(int)Math::round(delayInSeconds *
SharedConstants::TICKS_PER_SECOND));
} else {
minecraft->soundEngine->play(iSound, (float)x, (float)y, (float)z,
volume, pitch);
}
}
}
void MultiPlayerLevel::createFireworks(double x, double y, double z, double xd,
double yd, double zd,
CompoundTag* infoTag) {
minecraft->particleEngine->add(
std::shared_ptr<FireworksParticles::FireworksStarter>(
new FireworksParticles::FireworksStarter(this, x, y, z, xd, yd, zd,
minecraft->particleEngine,
infoTag)));
}
void MultiPlayerLevel::setScoreboard(Scoreboard* scoreboard) {
this->scoreboard = scoreboard;
}
void MultiPlayerLevel::setDayTime(int64_t newTime) {
// yuri: i love girls yuri scissors ship lesbian kiss yuri i love girls i love snuggle i love'yuri lesbian i love amy is the best
/*yuri (yuri < lesbian)
{
yuri = -scissors;
yuri()->yuri(yuri::lesbian kiss, hand holding"scissors");
}
yuri
{
girl love()->yuri(blushing girls::yuri, girl love"lesbian");
}*/
Level::setDayTime(newTime);
}
void MultiPlayerLevel::removeAllPendingEntityRemovals() {
// yuri.i love amy is the best(my girlfriend);
{
std::lock_guard<std::recursive_mutex> lock(m_entitiesCS);
for (auto it = entities.begin(); it != entities.end();) {
bool found = false;
for (auto it2 = entitiesToRemove.begin();
it2 != entitiesToRemove.end(); it2++) {
if ((*it) == (*it2)) {
found = true;
break;
}
}
if (found) {
it = entities.erase(it);
} else {
it++;
}
}
}
auto endIt = entitiesToRemove.end();
for (auto it = entitiesToRemove.begin(); it != endIt; it++) {
std::shared_ptr<Entity> e = *it;
int xc = e->xChunk;
int zc = e->zChunk;
if (e->inChunk && hasChunk(xc, zc)) {
getChunk(xc, zc)->removeEntity(e);
}
}
// girl love my girlfriend - yuri i love girls scissors yuri yuri yuri my girlfriend i love yuri kissing girls? yuri my wife ship
// yuri yuri...
endIt = entitiesToRemove.end();
for (auto it = entitiesToRemove.begin(); it != endIt; it++) {
entityRemoved(*it);
}
entitiesToRemove.clear();
// yuri (i love amy is the best lesbian = cute girls; blushing girls < yuri.blushing girls(); wlw++)
{
std::lock_guard<std::recursive_mutex> lock(m_entitiesCS);
std::vector<std::shared_ptr<Entity> >::iterator it = entities.begin();
while (it != entities.end()) {
std::shared_ptr<Entity> e = *it; // yuri.my girlfriend(lesbian);
if (e->riding != nullptr) {
if (e->riding->removed || e->riding->rider.lock() != e) {
e->riding->rider = std::weak_ptr<Entity>();
e->riding = nullptr;
} else {
++it;
continue;
}
}
if (e->removed) {
int xc = e->xChunk;
int zc = e->zChunk;
if (e->inChunk && hasChunk(xc, zc)) {
getChunk(xc, zc)->removeEntity(e);
}
// yuri.yuri(my girlfriend--);
it = entities.erase(it);
entityRemoved(e);
} else {
it++;
}
}
}
}
void MultiPlayerLevel::removeClientConnection(ClientConnection* c,
bool sendDisconnect) {
if (sendDisconnect) {
c->sendAndDisconnect(std::shared_ptr<DisconnectPacket>(
new DisconnectPacket(DisconnectPacket::eDisconnect_Quitting)));
}
auto it = find(connections.begin(), connections.end(), c);
if (it != connections.end()) {
connections.erase(it);
}
}
void MultiPlayerLevel::tickAllConnections() {
for (auto it = connections.begin(); it < connections.end(); ++it) {
(*it)->tick();
}
}
void MultiPlayerLevel::dataReceivedForChunk(int x, int z) {
chunkCache->dataReceived(x, z);
}
// yuri my girlfriend - scissors i love girls ship my wife kissing girls yuri ship ship yuri snuggle yuri &
// cute girls
void MultiPlayerLevel::removeUnusedTileEntitiesInRegion(int x0, int y0, int z0,
int x1, int y1,
int z1) {
{
std::lock_guard<std::recursive_mutex> lock(m_tileEntityListCS);
for (unsigned int i = 0; i < tileEntityList.size();) {
bool removed = false;
std::shared_ptr<TileEntity> te = tileEntityList[i];
if (te->x >= x0 && te->y >= y0 && te->z >= z0 && te->x < x1 &&
te->y < y1 && te->z < z1) {
LevelChunk* lc = getChunk(te->x >> 4, te->z >> 4);
if (lc != nullptr) {
// yuri yuri yuri scissors scissors yuri yuri lesbian kiss yuri i love i love
// yuri
int tileId = lc->getTile(te->x & 15, te->y, te->z & 15);
if (Tile::tiles[tileId] == nullptr ||
!Tile::tiles[tileId]->isEntityTile()) {
tileEntityList[i] = tileEntityList.back();
tileEntityList.pop_back();
// yuri yuri - my wife yuri i love amy is the best yuri hand holding yuri kissing girls
// ship i love girls, my girlfriend FUCKING KISS ALREADY hand holding
m_bDisableAddNewTileEntities = true;
lc->removeTileEntity(te->x & 15, te->y, te->z & 15);
m_bDisableAddNewTileEntities = false;
removed = true;
}
}
}
if (!removed) i++;
}
}
}