From 087b7e7abfe81dd7f0fdcdea36ac9f245950df1a Mon Sep 17 00:00:00 2001 From: Loki Rautio Date: Sat, 7 Mar 2026 21:12:22 -0600 Subject: Revert "Project modernization (#630)" This code was not tested and breaks in Release builds, reverting to restore functionality of the nightly. All in-game menus do not work and generating a world crashes. This reverts commit a9be52c41a02d207233199e98898fe7483d7e817. --- Minecraft.World/Blaze.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Minecraft.World/Blaze.cpp') diff --git a/Minecraft.World/Blaze.cpp b/Minecraft.World/Blaze.cpp index ec72dfcb..d87a83b2 100644 --- a/Minecraft.World/Blaze.cpp +++ b/Minecraft.World/Blaze.cpp @@ -42,7 +42,7 @@ void Blaze::defineSynchedData() { Monster::defineSynchedData(); - entityData->define(DATA_FLAGS_ID, static_cast(0)); + entityData->define(DATA_FLAGS_ID, (byte) 0); } int Blaze::getAmbientSound() @@ -84,10 +84,10 @@ void Blaze::aiStep() if (nextHeightOffsetChangeTick <= 0) { nextHeightOffsetChangeTick = SharedConstants::TICKS_PER_SECOND * 5; - allowedHeightOffset = .5f + static_cast(random->nextGaussian()) * 3; + allowedHeightOffset = .5f + (float) random->nextGaussian() * 3; } - if (getAttackTarget() != nullptr && (getAttackTarget()->y + getAttackTarget()->getHeadHeight()) > (y + getHeadHeight() + allowedHeightOffset)) + if (getAttackTarget() != NULL && (getAttackTarget()->y + getAttackTarget()->getHeadHeight()) > (y + getHeadHeight() + allowedHeightOffset)) { yd = yd + (.3f - yd) * .3f; } @@ -149,10 +149,10 @@ void Blaze::checkHurtTarget(shared_ptr target, float d) { float sqd = sqrt(d) * .5f; - level->levelEvent(nullptr, LevelEvent::SOUND_BLAZE_FIREBALL, static_cast(x), static_cast(y), static_cast(z), 0); + level->levelEvent(nullptr, LevelEvent::SOUND_BLAZE_FIREBALL, (int) x, (int) y, (int) z, 0); // level.playSound(this, "mob.ghast.fireball", getSoundVolume(), (random.nextFloat() - random.nextFloat()) * 0.2f + 1.0f); for (int i = 0; i < 1; i++) { - shared_ptr ie = std::make_shared(level, dynamic_pointer_cast(shared_from_this()), xd + random->nextGaussian() * sqd, yd, zd + random->nextGaussian() * sqd); + shared_ptr ie = shared_ptr( new SmallFireball(level, dynamic_pointer_cast( shared_from_this() ), xd + random->nextGaussian() * sqd, yd, zd + random->nextGaussian() * sqd) ); // Vec3 v = getViewVector(1); // ie.x = x + v.x * 1.5; ie->y = y + bbHeight / 2 + 0.5f; @@ -162,7 +162,7 @@ void Blaze::checkHurtTarget(shared_ptr target, float d) } } - yRot = static_cast(atan2(zd, xd) * 180 / PI) - 90; + yRot = (float) (atan2(zd, xd) * 180 / PI) - 90; holdGround = true; } -- cgit v1.2.3