diff --git a/Minecraft.Client/Platform/Common/GameRules/ConsoleSchematicFile.cpp b/Minecraft.Client/Platform/Common/GameRules/ConsoleSchematicFile.cpp index e48113989..217a7ffb8 100644 --- a/Minecraft.Client/Platform/Common/GameRules/ConsoleSchematicFile.cpp +++ b/Minecraft.Client/Platform/Common/GameRules/ConsoleSchematicFile.cpp @@ -155,7 +155,8 @@ void ConsoleSchematicFile::load(DataInputStream* dis) { // app.DebugPrintf(1,"Loaded entity type %d at // (%f,%f,%f)\n",(int)type,x,y,z); #endif - m_entities.push_back(std::pair(Vec3(x, y, z), (CompoundTag*)eTag->copy())); + m_entities.push_back(std::pair( + Vec3(x, y, z), (CompoundTag*)eTag->copy())); } } delete tag; diff --git a/Minecraft.Client/Platform/Common/Tutorial/AreaHint.cpp b/Minecraft.Client/Platform/Common/Tutorial/AreaHint.cpp index ced909db9..87dc976bf 100644 --- a/Minecraft.Client/Platform/Common/Tutorial/AreaHint.cpp +++ b/Minecraft.Client/Platform/Common/Tutorial/AreaHint.cpp @@ -28,8 +28,7 @@ int AreaHint::tick() { if ((m_displayState == e_Tutorial_State_Any || m_tutorial->getCurrentState() == m_displayState) && - m_hintNeeded && - area->contains(&player_pos) == contains) { + m_hintNeeded && area->contains(&player_pos) == contains) { if (m_completeState == e_Tutorial_State_None) { m_hintNeeded = false; } else if (m_tutorial->isStateCompleted(m_completeState)) { diff --git a/Minecraft.Client/Platform/Common/Tutorial/ChangeStateConstraint.cpp b/Minecraft.Client/Platform/Common/Tutorial/ChangeStateConstraint.cpp index 252d85f7d..e1f93eecb 100644 --- a/Minecraft.Client/Platform/Common/Tutorial/ChangeStateConstraint.cpp +++ b/Minecraft.Client/Platform/Common/Tutorial/ChangeStateConstraint.cpp @@ -87,8 +87,7 @@ void ChangeStateConstraint::tick(int iPad) { } Vec3 ipad_player = minecraft->localplayers[iPad]->getPos(1); if (!m_bHasChanged && inASourceState && - movementArea->contains(&ipad_player) == - contains) { + movementArea->contains(&ipad_player) == contains) { m_bHasChanged = true; m_changedFromState = m_tutorial->getCurrentState(); m_tutorial->changeTutorialState(m_targetState); @@ -126,8 +125,7 @@ void ChangeStateConstraint::tick(int iPad) { } } } else if (m_bHasChanged && - movementArea->contains( - &ipad_player) != contains) { + movementArea->contains(&ipad_player) != contains) { m_bHasChanged = false; m_tutorial->changeTutorialState(m_changedFromState); diff --git a/Minecraft.Client/Platform/PS3/SPU_Tasks/ChunkUpdate/Tile_SPU.cpp b/Minecraft.Client/Platform/PS3/SPU_Tasks/ChunkUpdate/Tile_SPU.cpp index 9da02ae9f..c12e1def6 100644 --- a/Minecraft.Client/Platform/PS3/SPU_Tasks/ChunkUpdate/Tile_SPU.cpp +++ b/Minecraft.Client/Platform/PS3/SPU_Tasks/ChunkUpdate/Tile_SPU.cpp @@ -316,8 +316,8 @@ bool Tile_SPU::isSolidRender(bool isServerLevel) { return true; } // double yo = level->random->nextFloat() * s + (1 - s) * 0.5; // double zo = level->random->nextFloat() * s + (1 - s) * 0.5; // std::shared_ptr item = std::shared_ptr( new -// ItemEntity(level, x + xo, y + yo, z + zo, itemInstance ) ); item->throwTime = -// 10; level->addEntity(item); +// ItemEntity(level, x + xo, y + yo, z + zo, itemInstance ) ); item->throwTime +// = 10; level->addEntity(item); // } // // // Brought forward for TU7 @@ -328,8 +328,8 @@ bool Tile_SPU::isSolidRender(bool isServerLevel) { return true; } // while (amount > 0) // { // int newCount = -// ExperienceOrb::getExperienceValue(amount); amount -= newCount; -// level->addEntity(std::shared_ptr( new +// ExperienceOrb::getExperienceValue(amount); amount -= +// newCount; level->addEntity(std::shared_ptr( new // ExperienceOrb(level, x + .5, y + .5, z + .5, newCount))); // } // } @@ -366,14 +366,14 @@ bool Tile_SPU::isSolidRender(bool isServerLevel) { return true; } // Vec3 *closest = NULL; // // if (containsX(xh0) && (closest == NULL || a->distanceTo(xh0) < -// a->distanceTo(closest))) closest = xh0; if (containsX(xh1) && (closest == -// NULL || a->distanceTo(xh1) < a->distanceTo(closest))) closest = xh1; if -// (containsY(yh0) && (closest == NULL || a->distanceTo(yh0) < -// a->distanceTo(closest))) closest = yh0; if (containsY(yh1) && (closest == -// NULL || a->distanceTo(yh1) < a->distanceTo(closest))) closest = yh1; if -// (containsZ(zh0) && (closest == NULL || a->distanceTo(zh0) < -// a->distanceTo(closest))) closest = zh0; if (containsZ(zh1) && (closest == -// NULL || a->distanceTo(zh1) < a->distanceTo(closest))) closest = zh1; +// a->distanceTo(closest))) closest = xh0; if (containsX(xh1) && (closest +// == NULL || a->distanceTo(xh1) < a->distanceTo(closest))) closest = xh1; +// if (containsY(yh0) && (closest == NULL || a->distanceTo(yh0) < +// a->distanceTo(closest))) closest = yh0; if (containsY(yh1) && (closest +// == NULL || a->distanceTo(yh1) < a->distanceTo(closest))) closest = yh1; +// if (containsZ(zh0) && (closest == NULL || a->distanceTo(zh0) < +// a->distanceTo(closest))) closest = zh0; if (containsZ(zh1) && (closest +// == NULL || a->distanceTo(zh1) < a->distanceTo(closest))) closest = zh1; // // LeaveCriticalSection(&m_csShape); // @@ -525,7 +525,8 @@ void Tile_SPU::updateDefaultShape() {} // player->awardStat(Stats::blocksMined[id], 1); // } // player->awardStat(Stats::totalBlocksMined, 1); // 4J : WESTY : Added -// for other award. player->causeFoodExhaustion(FoodConstants::EXHAUSTION_MINE); +// for other award. +// player->causeFoodExhaustion(FoodConstants::EXHAUSTION_MINE); // // if( id == Tile_SPU::treeTrunk_Id ) // player->awardStat(Achievements::mineWood); diff --git a/Minecraft.Client/Player/LocalPlayer.cpp b/Minecraft.Client/Player/LocalPlayer.cpp index 1f6e17a08..4a8e126e5 100644 --- a/Minecraft.Client/Player/LocalPlayer.cpp +++ b/Minecraft.Client/Player/LocalPlayer.cpp @@ -550,7 +550,8 @@ void LocalPlayer::closeContainer() { void LocalPlayer::openTextEdit(std::shared_ptr tileEntity) { #ifdef ENABLE_JAVA_GUIS if (tileEntity->GetType() == eTYPE_SIGNTILEENTITY) { - minecraft->setScreen(new TextEditScreen(std::dynamic_pointer_cast(tileEntity))); + minecraft->setScreen(new TextEditScreen( + std::dynamic_pointer_cast(tileEntity))); bool success = true; } #else @@ -782,8 +783,7 @@ void LocalPlayer::awardStat(Stat* stat, byteArray param) { // storage device, so needs a primary player, and the player may not // have been a primary player when they first 'got' the award so let the // award manager figure it out - if (!minecraft->stats[m_iPad]->hasTaken(ach)) - { + if (!minecraft->stats[m_iPad]->hasTaken(ach)) { // 4J-PB - Don't display the java popup #ifdef ENABLE_JAVA_GUIS minecraft->achievementPopup->popup(ach); diff --git a/Minecraft.Client/Rendering/Camera.h b/Minecraft.Client/Rendering/Camera.h index 4ce2d8419..894a01967 100644 --- a/Minecraft.Client/Rendering/Camera.h +++ b/Minecraft.Client/Rendering/Camera.h @@ -27,7 +27,7 @@ public: static TilePos* getCameraTilePos(std::shared_ptr player, double alpha); static Vec3 getCameraPos(std::shared_ptr player, - double alpha); + double alpha); static int getBlockAt(Level* level, std::shared_ptr player, float alpha); }; diff --git a/Minecraft.Client/Rendering/EntityRenderers/FishingHookRenderer.cpp b/Minecraft.Client/Rendering/EntityRenderers/FishingHookRenderer.cpp index b43acd1dd..1bd178e64 100644 --- a/Minecraft.Client/Rendering/EntityRenderers/FishingHookRenderer.cpp +++ b/Minecraft.Client/Rendering/EntityRenderers/FishingHookRenderer.cpp @@ -60,11 +60,11 @@ void FishingHookRenderer::render(std::shared_ptr _hook, double x, Vec3 vv(-0.5, 0.03, 0.8); vv.xRot(-(hook->owner->xRotO + - (hook->owner->xRot - hook->owner->xRotO) * a) * - PI / 180); + (hook->owner->xRot - hook->owner->xRotO) * a) * + PI / 180); vv.yRot(-(hook->owner->yRotO + - (hook->owner->yRot - hook->owner->yRotO) * a) * - PI / 180); + (hook->owner->yRot - hook->owner->yRotO) * a) * + PI / 180); vv.yRot(swing2 * 0.5f); vv.xRot(-swing2 * 0.7f); diff --git a/Minecraft.World/Blocks/LiquidTile.cpp b/Minecraft.World/Blocks/LiquidTile.cpp index 2b3cda562..af1ee85b4 100644 --- a/Minecraft.World/Blocks/LiquidTile.cpp +++ b/Minecraft.World/Blocks/LiquidTile.cpp @@ -137,14 +137,13 @@ Vec3 LiquidTile::getFlow(LevelSource* level, int x, int y, int z) { if (t >= 0) { int dir = t - (mid - 8); flow = flow.add((xt - x) * dir, (yt - y) * dir, - (zt - z) * dir); + (zt - z) * dir); } } } else { if (t >= 0) { int dir = t - mid; - flow = - flow.add((xt - x) * dir, (yt - y) * dir, (zt - z) * dir); + flow = flow.add((xt - x) * dir, (yt - y) * dir, (zt - z) * dir); } } } @@ -308,10 +307,8 @@ void LiquidTile::animateTick(Level* level, int x, int y, int z, double LiquidTile::getSlopeAngle(LevelSource* level, int x, int y, int z, Material* m) { Vec3 flow; - if (m == Material::water) - flow = Tile::water->getFlow(level, x, y, z); - if (m == Material::lava) - flow = Tile::lava->getFlow(level, x, y, z); + if (m == Material::water) flow = Tile::water->getFlow(level, x, y, z); + if (m == Material::lava) flow = Tile::lava->getFlow(level, x, y, z); if (flow.x == 0 && flow.z == 0) return -1000; return atan2(flow.z, flow.x) - PI / 2; } diff --git a/Minecraft.World/Entities/LivingEntity.cpp b/Minecraft.World/Entities/LivingEntity.cpp index 00a5de704..b4b870baf 100644 --- a/Minecraft.World/Entities/LivingEntity.cpp +++ b/Minecraft.World/Entities/LivingEntity.cpp @@ -794,12 +794,12 @@ void LivingEntity::breakItem(std::shared_ptr itemInstance) { for (int i = 0; i < 5; i++) { Vec3 d = Vec3((random->nextFloat() - 0.5) * 0.1, - Math::random() * 0.1 + 0.1, 0); + Math::random() * 0.1 + 0.1, 0); d.xRot(-xRot * PI / 180); d.yRot(-yRot * PI / 180); Vec3 p = Vec3((random->nextFloat() - 0.5) * 0.3, - -random->nextFloat() * 0.6 - 0.3, 0.6); + -random->nextFloat() * 0.6 - 0.3, 0.6); p.xRot(-xRot * PI / 180); p.yRot(-yRot * PI / 180); p = p.add(x, y + getHeadHeight(), z); diff --git a/Minecraft.World/Entities/Mobs/EnderDragon.cpp b/Minecraft.World/Entities/Mobs/EnderDragon.cpp index 828eeb982..4625557e2 100644 --- a/Minecraft.World/Entities/Mobs/EnderDragon.cpp +++ b/Minecraft.World/Entities/Mobs/EnderDragon.cpp @@ -1024,8 +1024,7 @@ void EnderDragon::findNewTarget() { if (getSynchedAction() == e_EnderdragonAction_Takeoff) { Vec3 v = getHeadLookVector(1); - targetNodeIndex = - findClosestNode(-v.x * 40, 105.0, -v.z * 40); + targetNodeIndex = findClosestNode(-v.x * 40, 105.0, -v.z * 40); } else { if (random->nextInt(8) == 0) { m_holdingPatternClockwise = !m_holdingPatternClockwise; diff --git a/Minecraft.World/Entities/Mobs/Minecart.cpp b/Minecraft.World/Entities/Mobs/Minecart.cpp index 511764cb6..8f0350096 100644 --- a/Minecraft.World/Entities/Mobs/Minecart.cpp +++ b/Minecraft.World/Entities/Mobs/Minecart.cpp @@ -551,7 +551,8 @@ void Minecart::applyNaturalSlowdown() { } } -std::optional Minecart::getPosOffs(double x, double y, double z, double offs) { +std::optional Minecart::getPosOffs(double x, double y, double z, + double offs) { int xt = Mth::floor(x); int yt = Mth::floor(y); int zt = Mth::floor(z); diff --git a/Minecraft.World/Entities/Mobs/Minecart.h b/Minecraft.World/Entities/Mobs/Minecart.h index 3e96f1fc3..1fc6e2919 100644 --- a/Minecraft.World/Entities/Mobs/Minecart.h +++ b/Minecraft.World/Entities/Mobs/Minecart.h @@ -78,7 +78,8 @@ protected: virtual void moveAlongTrack(int xt, int yt, int zt, double maxSpeed, double slideSpeed, int tile, int data); virtual void applyNaturalSlowdown(); - virtual std::optional getPosOffs(double x, double y, double z, double offs); + virtual std::optional getPosOffs(double x, double y, double z, + double offs); virtual std::optional getPos(double x, double y, double z); protected: diff --git a/Minecraft.World/Items/BoatItem.cpp b/Minecraft.World/Items/BoatItem.cpp index 0d3b1749c..d84290919 100644 --- a/Minecraft.World/Items/BoatItem.cpp +++ b/Minecraft.World/Items/BoatItem.cpp @@ -84,9 +84,8 @@ std::shared_ptr BoatItem::use( bool hitEntity = false; float overlap = 1; std::vector >* objects = level->getEntities( - player, - player->bb->expand(b.x * (range), b.y * (range), b.z * (range)) - ->grow(overlap, overlap, overlap)); + player, player->bb->expand(b.x * (range), b.y * (range), b.z * (range)) + ->grow(overlap, overlap, overlap)); // for (int i = 0; i < objects.size(); i++) { for (AUTO_VAR(it, objects->begin()); it != objects->end(); ++it) { std::shared_ptr e = *it; // objects.get(i); diff --git a/Minecraft.World/Level/Explosion.cpp b/Minecraft.World/Level/Explosion.cpp index 752586bd6..a82786ebe 100644 --- a/Minecraft.World/Level/Explosion.cpp +++ b/Minecraft.World/Level/Explosion.cpp @@ -26,9 +26,7 @@ Explosion::Explosion(Level* level, std::shared_ptr source, double x, size = 16; } -Explosion::~Explosion() { - delete random; -} +Explosion::~Explosion() { delete random; } void Explosion::explode() { float oR = r; diff --git a/Minecraft.World/Player/Player.cpp b/Minecraft.World/Player/Player.cpp index 64e17333a..a345d2087 100644 --- a/Minecraft.World/Player/Player.cpp +++ b/Minecraft.World/Player/Player.cpp @@ -528,13 +528,13 @@ void Player::spawnEatParticles(std::shared_ptr useItem, if (useItem->getUseAnimation() == UseAnim_eat) { for (int i = 0; i < count; i++) { Vec3 d{(random->nextFloat() - 0.5) * 0.1, - Math::random() * 0.1 + 0.1, 0}; + Math::random() * 0.1 + 0.1, 0}; d.xRot(-xRot * PI / 180); d.yRot(-yRot * PI / 180); Vec3 p{(random->nextFloat() - 0.5) * 0.3, - -random->nextFloat() * 0.6 - 0.3, 0.6}; + -random->nextFloat() * 0.6 - 0.3, 0.6}; p.xRot(-xRot * PI / 180); p.yRot(-yRot * PI / 180); p = p.add(x, y + getHeadHeight(), z); diff --git a/Minecraft.World/WorldGen/Structures/Villages.h b/Minecraft.World/WorldGen/Structures/Villages.h index 9ab55837f..9c8cd5590 100644 --- a/Minecraft.World/WorldGen/Structures/Villages.h +++ b/Minecraft.World/WorldGen/Structures/Villages.h @@ -44,4 +44,4 @@ private: public: void load(CompoundTag* tag); void save(CompoundTag* tag); -}; \ No newline at end of file +};