TU53 + Bug Fixes (Many)

Patch Notes:
Blocks
+ Colored shulker boxes
+ Concrete powder
+ Concrete
+ Glazed terracotta
Items
+ Shulker shell
+ Iron nugget
UI Changes
+ Added Custom Controls to Keyboard & Mouse, as well as Controller
+ Added Custom SuperFlat
+ Added Edit Server Menu
+ Added Firework Crafting
Feature Changes
+ Host Options
+ Added Pick Block
+ Added off-hand slot for maps and arrows.
Bug Fixes & changes
+ TU47: Banner hitbox wrong (and inventory model fixed)
+ TU47/48: Ice not melting properly
+ TU48: Dead bushes not dropping sticks
+ TU48: Guardians and polar bears not dropping cooked fish when on fire
+ TU48: Bonus chest missing saplings and seeds
+ TU48: Frosted ice obtainable
+ TU48: Hoppers not collecting items
+ TU48: Wither skeletons spawning in 2-high gaps
+ TU48: End crystals exploding with “TNT Explodes” off
+ TU48: Tamed ocelots staying hostile
+ TU48: Signs not placing on tall grass
+ TU51: Skeleton hitbox wrong
+ TU53: Fall damage in shallow water
+ TU53: Squids not spawning in man-made pools
+ Elytra has been improved to be more accurate to the source material
+ Removed Spectral Arrow from crafting
+ Fixed several broken item descriptions
+ You can no longer cook Pufferfish or Clownfish
+ Fixed scaling issue with paperdoll and chat
+ Iron and gold armor can now be smelted into nuggets.
+ More items can now be used as fuel in a furnace.
+ Using a firework rocket while gliding with elytra will now give the player a boost.
+ Changed the color of dyes, wool, carpets, and banners.
+ Reordered all colored blocks and items in the Creative inventory. Banners now have the same order of colors as all other colored blocks and items.
+ Fishing rods can now hook on entities without causing knockback or pseudo-damage.
+ Fixed banner crafting
+ Fixed Map colors for certain blocks
+ Fixed Path block height
+ Fixed String block issues
+ Fixed Item frame culling.
+ Fixed Tutorial world NBT/Block State issues
+ Fixed World Slider
+ Fixed Enderman AI
+ Fixed Player animation bug
+ HUD Flash text changes
+ Generation accuracy changes
+ Many other small accuracy changes and fixes
This commit is contained in:
Tranqlmao committed 2026-11-24 13:44:06 -05:00
1 parent 8de3b79e65
commit 9abd52985e
483 files changed
+15228 -4114

No files matched your search

+68 -66
View File
@@ -99,11 +99,14 @@ GameRenderer::GameRenderer(Minecraft *mc)
fovOffset = 0;
fovOffsetO = 0;
cameraRoll = 0;
cameraRollO = 0;
m_yBob = 0.0f;
m_yBobO = 0.0f;
m_elytaCamShift = 0.0f;
for (int i = 0; i < 4; i++)
{
cameraRoll[i] = 0.0f;
cameraRollO[i] = 0.0f;
m_yBob[i] = 0.0f;
m_yBobO[i] = 0.0f;
m_elytaCamShift[i] = 0.0f;
}
for( int i = 0; i < 4; i++ )
{
@@ -210,9 +213,9 @@ void GameRenderer::tick(bool first) // 4J - add bFirst
thirdRotationO = thirdRotation;
thirdTiltO = thirdTilt;
fovOffsetO = fovOffset;
cameraRollO = cameraRoll;
cameraRollO[camIdx()] = cameraRoll[camIdx()];
m_yBobO = m_yBob;
m_yBobO[camIdx()] = m_yBob[camIdx()];
{
shared_ptr<Player> yBobPlayer = dynamic_pointer_cast<Player>(mc->cameraTargetPlayer);
@@ -221,7 +224,36 @@ void GameRenderer::tick(bool first) // 4J - add bFirst
{
target = (float)(atan(-yBobPlayer->yd * 0.2) * 15.0);
}
m_yBob += (target - m_yBob) * 0.8f;
m_yBob[camIdx()] += (target - m_yBob[camIdx()]) * 0.8f;
}
{
shared_ptr<Player> rollPlayer = dynamic_pointer_cast<Player>(mc->cameraTargetPlayer);
if (rollPlayer != nullptr && rollPlayer->isElytraFlying() && !rollPlayer->isSleeping())
{
double velX = rollPlayer->xd;
double velZ = rollPlayer->zd;
double horizVelSq = velX * velX + velZ * velZ;
Vec3 *look = rollPlayer->getLookAngle();
double horizLookSq = look->x * look->x + look->z * look->z;
float targetRoll = 0.0f;
if (horizVelSq > 1.0e-6 && horizLookSq > 1.0e-6)
{
double cosAngle = (velX * look->x + velZ * look->z) / sqrt(horizVelSq * horizLookSq);
if (cosAngle > 1.0) cosAngle = 1.0;
if (cosAngle < -1.0) cosAngle = -1.0;
double angle = acos(cosAngle) / 2.5;
if (angle > PI / 8.0) angle = PI / 8.0;
double cross = velX * look->z - velZ * look->x;
targetRoll = ((cross < 0.0) ? -1.0f : 1.0f) * (float)(angle * (180.0 / PI));
}
cameraRoll[camIdx()] += (targetRoll - cameraRoll[camIdx()]) * 0.3f;
}
else
{
cameraRoll[camIdx()] += (0.0f - cameraRoll[camIdx()]) * 0.4f;
if (fabsf(cameraRoll[camIdx()]) < 0.01f) cameraRoll[camIdx()] = 0.0f;
}
}
if (mc->options->smoothCamera)
@@ -314,6 +346,10 @@ void GameRenderer::pick(float a)
double dist = range;
Vec3 *from = mc->cameraTargetPlayer->getPos(a);
{
shared_ptr<Player> pickPlayer = dynamic_pointer_cast<Player>(mc->cameraTargetPlayer);
if (pickPlayer != nullptr) from->y -= pickPlayer->getLowProfileEyeDrop();
}
if (mc->gameMode->hasFarPickRange())
{
@@ -400,6 +436,13 @@ float GameRenderer::GetFovVal()
return 70 + mc->options->fov * 40;//m_fov;
}
int GameRenderer::camIdx()
{
shared_ptr<LocalPlayer> player = dynamic_pointer_cast<LocalPlayer>(mc->cameraTargetPlayer);
int idx = player ? player->GetXboxPad() : 0;
return (idx >= 0 && idx < 4) ? idx : 0;
}
void GameRenderer::tickFov()
{
shared_ptr<LocalPlayer>player = dynamic_pointer_cast<LocalPlayer>(mc->cameraTargetPlayer);
@@ -483,7 +526,7 @@ void GameRenderer::bobView(float a)
glRotatef((float) abs(Mth::cos(b * PI - 0.2f) * bob) * 5, 1, 0, 0);
glRotatef((float) tilt, 1, 0, 0);
float yBobAngle = m_yBobO + (m_yBob - m_yBobO) * a;
float yBobAngle = m_yBobO[camIdx()] + (m_yBob[camIdx()] - m_yBobO[camIdx()]) * a;
shared_ptr<LocalPlayer> yBobLocalPlayer = dynamic_pointer_cast<LocalPlayer>(mc->cameraTargetPlayer);
if (fabsf(yBobAngle) > 0.001f && yBobLocalPlayer != nullptr && yBobLocalPlayer->isElytraFlying() && !yBobLocalPlayer->ThirdPersonView())
glRotatef(yBobAngle, 1, 0, 0);
@@ -503,67 +546,20 @@ void GameRenderer::moveCameraToPlayer(float a)
{
shared_ptr<Player> elytraPlayer = dynamic_pointer_cast<Player>(player);
bool elytraFlying = (elytraPlayer != nullptr && elytraPlayer->isElytraFlying());
float targetShift = elytraFlying ? -1.22f : 0.0f;
m_elytaCamShift += (targetShift - m_elytaCamShift) * 0.15f;
if (fabsf(m_elytaCamShift) < 0.001f) m_elytaCamShift = 0.0f;
float targetShift = (elytraPlayer != nullptr) ? -elytraPlayer->getLowProfileEyeDrop() : 0.0f;
m_elytaCamShift[camIdx()] += (targetShift - m_elytaCamShift[camIdx()]) * 0.15f;
if (fabsf(m_elytaCamShift[camIdx()]) < 0.001f) m_elytaCamShift[camIdx()] = 0.0f;
y += m_elytaCamShift;
y += m_elytaCamShift[camIdx()];
}
if (localplayer != nullptr && !player->isSleeping())
{
shared_ptr<Player> rollPlayer = dynamic_pointer_cast<Player>(player);
if (rollPlayer != nullptr && rollPlayer->isElytraFlying())
{
double velX = rollPlayer->xd;
double velZ = rollPlayer->zd;
double horizVelSq = velX * velX + velZ * velZ;
Vec3* look = rollPlayer->getLookAngle();
double horizLookSq = look->x * look->x + look->z * look->z;
float targetRoll = 0.0f;
if (horizVelSq > 1.0e-6 && horizLookSq > 1.0e-6)
{
double dot = velX * look->x + velZ * look->z;
double cosAngle = dot / sqrt(horizVelSq * horizLookSq);
if (cosAngle > 1.0) cosAngle = 1.0;
if (cosAngle < -1.0) cosAngle = -1.0;
double angle = acos(cosAngle) / 2.5;
if (angle > PI / 8.0) angle = PI / 8.0;
double cross = velX * look->z - velZ * look->x;
float sign = (cross < 0.0) ? -1.0f : 1.0f;
targetRoll = sign * (float)(angle * (180.0 / PI));
}
cameraRoll += (targetRoll - cameraRoll) * 0.1f;
}
else
{
if (fabsf(cameraRoll) > 0.01f)
{
cameraRoll += (0.0f - cameraRoll) * 0.15f;
if (fabsf(cameraRoll) < 0.01f) cameraRoll = 0.0f;
}
}
if (fabsf(cameraRoll) > 0.01f)
glRotatef(cameraRoll, 0, 0, 1);
float roll = cameraRollO[camIdx()] + (cameraRoll[camIdx()] - cameraRollO[camIdx()]) * a;
if (fabsf(roll) > 0.01f)
glRotatef(roll, 0, 0, 1);
}
@@ -672,11 +668,11 @@ void GameRenderer::moveCameraToPlayer(float a)
}
glTranslatef(0, heightOffset - m_elytaCamShift, 0);
glTranslatef(0, heightOffset - m_elytaCamShift[camIdx()], 0);
x = player->xo + (player->x - player->xo) * a;
y = player->yo + (player->y - player->yo) * a - heightOffset + m_elytaCamShift;
y = player->yo + (player->y - player->yo) * a - heightOffset + m_elytaCamShift[camIdx()];
z = player->zo + (player->z - player->zo) * a;
isInClouds = mc->levelRenderer->isInCloud(x, y, z, a);
@@ -2125,6 +2121,11 @@ void GameRenderer::setupClearColor(float a)
fr = static_cast<float>(fogColor->x);
fg = static_cast<float>(fogColor->y);
fb = static_cast<float>(fogColor->z);
if (level->dimension->id == 0 && player != nullptr)
{
Biome *fogBiome = level->getBiome(Mth::floor(player->x), Mth::floor(player->z));
if (fogBiome != nullptr) fogBiome->getBiomeFogColor(level->getTimeOfDay(a), fr, fg, fb);
}
if (mc->options->viewDistance < 2)
{
@@ -2398,7 +2399,8 @@ void GameRenderer::setupFog(int i, float alpha)
}
*/
if (mc->level->dimension->isFoggyAt(static_cast<int>(player->x), static_cast<int>(player->z)))
Biome *fogBiome = mc->level->getBiome(Mth::floor(player->x), Mth::floor(player->z));
if (mc->level->dimension->isFoggyAt(static_cast<int>(player->x), static_cast<int>(player->z)) || (fogBiome != nullptr && fogBiome->isFoggy()))
{
glFogf(GL_FOG_START, distance * 0.05f);
glFogf(GL_FOG_END, min(distance, 16 * 16 * .75f) * .5f);