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

+159 -9
View File
@@ -39,6 +39,9 @@ ItemInHandRenderer::ItemInHandRenderer(Minecraft *minecraft, bool optimisedMinim
// 4J - added
height = 0;
oHeight = 0;
offhandItem = nullptr;
offHeight = 0;
oOffHeight = 0;
selectedItem = nullptr;
tileRenderer = new TileRenderer();
lastSlot = -1;
@@ -61,9 +64,9 @@ ItemInHandRenderer::ItemInHandRenderer(Minecraft *minecraft, bool optimisedMinim
for( int xp = 0; xp < 16; xp++ )
{
float u = (15-xp) / 256.0f;
float v = (15-yp) / 256.0f;
float v = (15-yp) / 272.0f;
u += 0.5f / 256.0f;
v += 0.5f / 256.0f;
v += 0.5f / 272.0f;
float x0 = xp / 16.0f;
float x1 = x0 + 1.0f/16.0f;
float y0 = yp / 16.0f;
@@ -119,9 +122,9 @@ ItemInHandRenderer::ItemInHandRenderer(Minecraft *minecraft, bool optimisedMinim
for( int xp = 0; xp < 16; xp++ )
{
float u = (15-xp) / 256.0f;
float v = (15-yp) / 512.0f;
float v = (15-yp) / 544.0f;
u += 0.5f / 256.0f;
v += 0.5f / 512.0f;
v += 0.5f / 544.0f;
float x0 = xp / 16.0f;
float x1 = x0 + 1.0f/16.0f;
float y0 = yp / 16.0f;
@@ -495,7 +498,19 @@ void ItemInHandRenderer::render(float a)
glColor4f(br, br, br, 1);
}
if (item != nullptr && item->id == Item::map->id)
bool bowDrawing = item != nullptr && player->getUseItemDuration() > 0 && item->getUseAnimation() == UseAnim_bow;
if (item != nullptr && item->id == Item::map->id && offhandItem != nullptr)
{
glPushMatrix();
if( splitHoriz )
{
glTranslatef(0.0f, 0.0f, -0.3f );
}
renderOneHandedMap(player, item, 1.0f, h, br, player->getAttackAnim(a));
glPopMatrix();
}
else if (item != nullptr && item->id == Item::map->id)
{
glPushMatrix();
float d = 0.8f;
@@ -723,8 +738,6 @@ void ItemInHandRenderer::render(float a)
glRotatef(5.0f, 0.0f, 0.0f, 1.0f);
glRotatef(5.0f, 1.0f, 0.0f, 0.0f);
SkullTileRenderer::instance->renderSkull(-1.0f, 0.26f, 0.35f, Facing::UP, 0.0f, item->getAuxValue(), extra);
glPopMatrix();
return;
}
else if (dynamic_cast<BannerItem*>(item->getItem()) != nullptr && BannerRenderer::instance != nullptr)
{
@@ -734,8 +747,6 @@ void ItemInHandRenderer::render(float a)
const float bs = 0.6f;
glScalef(bs, -bs, -bs);
BannerRenderer::instance->renderBannerForHand(1.0f, baseColor, item);
glPopMatrix();
return;
}
else
{
@@ -800,6 +811,11 @@ void ItemInHandRenderer::render(float a)
glPopMatrix();
}
if (!bowDrawing && (item == nullptr || item->id != Item::map->id || offhandItem != nullptr))
{
renderOffhand(player, a, br, xr);
}
glDisable(GL_RESCALE_NORMAL);
Lighting::turnOff();
@@ -1007,6 +1023,22 @@ void ItemInHandRenderer::tick()
lastSlot = player->inventory->selected;
}
oOffHeight = offHeight;
shared_ptr<ItemInstance> nextOffhand = player->inventory->getOffhand();
bool offMatches = nextOffhand == offhandItem;
if (nextOffhand != nullptr && offhandItem != nullptr && nextOffhand->id == offhandItem->id && nextOffhand->getAuxValue() == offhandItem->getAuxValue())
{
offhandItem = nextOffhand;
offMatches = true;
}
float offDd = (offMatches ? 1.0f : 0.0f) - offHeight;
if (offDd < -max) offDd = -max;
if (offDd > max) offDd = max;
offHeight += offDd;
if (offHeight < 0.1f)
{
offhandItem = nextOffhand;
}
}
void ItemInHandRenderer::reset()
@@ -1015,6 +1047,9 @@ void ItemInHandRenderer::reset()
lastSlot = -1;
height = 0.0f;
oHeight = 0.0f;
offhandItem = nullptr;
offHeight = 0.0f;
oOffHeight = 0.0f;
}
void ItemInHandRenderer::itemPlaced()
@@ -1027,3 +1062,118 @@ void ItemInHandRenderer::itemUsed()
height = 0;
}
void ItemInHandRenderer::renderOffhand(shared_ptr<Player> player, float a, float br, float xr)
{
shared_ptr<ItemInstance> item = offhandItem;
if (item == nullptr) return;
float h = oOffHeight + (offHeight - oOffHeight) * a;
int col = Item::items[item->id]->getColor(item, 0);
glColor4f(br * ((col >> 16) & 0xff) / 255.0f, br * ((col >> 8) & 0xff) / 255.0f, br * (col & 0xff) / 255.0f, 1);
glPushMatrix();
if (item->id == Item::map->id)
{
renderOneHandedMap(player, item, -1.0f, h, br, 0.0f);
}
else
{
float d = 0.8f;
glScalef(-1.0f, 1.0f, 1.0f);
glTranslatef(0.7f * d, -0.65f * d - (1 - h) * 0.6f, -0.9f * d);
glRotatef(45, 0, 1, 0);
glEnable(GL_RESCALE_NORMAL);
float ss = 0.4f;
glScalef(ss, ss, ss);
if (item->getItem()->isMirroredArt())
{
glRotatef(180, 0, 1, 0);
}
glDisable(GL_CULL_FACE);
renderItem(player, item, 0, false);
if (item->getItem()->hasMultipleSpriteLayers())
{
int col1 = Item::items[item->id]->getColor(item, 1);
glColor4f(br * ((col1 >> 16) & 0xff) / 255.0f, br * ((col1 >> 8) & 0xff) / 255.0f, br * (col1 & 0xff) / 255.0f, 1);
renderItem(player, item, 1, false);
}
glEnable(GL_CULL_FACE);
}
glPopMatrix();
}
void ItemInHandRenderer::renderOneHandedMap(shared_ptr<Player> player, shared_ptr<ItemInstance> item, float side, float h, float br, float swing)
{
float equip = 1.0f - h;
glTranslatef(side * 0.125f, -0.125f, 0.0f);
if (!player->isInvisible())
{
glPushMatrix();
if (side < 0) glScalef(-1.0f, 1.0f, 1.0f);
glRotatef(10, 0, 0, 1);
float d = 0.8f;
float swing1 = Mth::sin(swing * PI);
float swing2 = Mth::sin(sqrt(swing) * PI);
glTranslatef(-swing2 * 0.3f, Mth::sin(sqrt(swing) * PI * 2) * 0.4f, -swing1 * 0.4f);
glTranslatef(0.8f * d, -0.75f * d - equip * 0.6f, -0.9f * d);
glRotatef(45, 0, 1, 0);
glEnable(GL_RESCALE_NORMAL);
float swing3 = Mth::sin(swing * swing * PI);
glRotatef(swing2 * 70, 0, 1, 0);
glRotatef(-swing3 * 20, 0, 0, 1);
glBindTexture(GL_TEXTURE_2D, minecraft->textures->loadMemTexture(minecraft->player->customTextureUrl, minecraft->player->getTexture()));
minecraft->textures->clearLastBoundId();
glTranslatef(-1.0f, +3.6f, +3.5f);
glRotatef(120, 0, 0, 1);
glRotatef(180 + 20, 1, 0, 0);
glRotatef(-90 - 45, 0, 1, 0);
glScalef(1.5f / 24.0f * 16, 1.5f / 24.0f * 16, 1.5f / 24.0f * 16);
glTranslatef(5.6f, 0, 0);
EntityRenderer *er = EntityRenderDispatcher::instance->getRenderer(minecraft->player);
if (side < 0)
{
glScalef(-1.0f, 1.0f, 1.0f);
static_cast<PlayerRenderer *>(er)->renderLeftHand();
}
else
{
static_cast<PlayerRenderer *>(er)->renderHand();
}
glPopMatrix();
glColor4f(br, br, br, 1);
}
{
glTranslatef(side * 0.51f, -0.08f - equip * 1.2f, -0.75f);
float swingRoot = sqrt(swing);
float swingSin = Mth::sin(swingRoot * PI);
glTranslatef(side * -0.5f * swingSin, 0.4f * Mth::sin(swingRoot * PI * 2) - 0.3f * swingSin, -0.3f * Mth::sin(swing * PI));
glRotatef(swingSin * -45.0f, 1, 0, 0);
glRotatef(side * swingSin * -30.0f, 0, 1, 0);
glRotatef(180, 0, 1, 0);
glRotatef(180, 0, 0, 1);
float ss = 0.38f;
glScalef(ss, ss, ss);
glTranslatef(-0.5f, -0.5f, 0.0f);
float s = 1 / 128.0f;
glScalef(s, s, s);
glEnable(GL_RESCALE_NORMAL);
minecraft->textures->bindTexture(&MAP_BACKGROUND_LOCATION);
Tesselator *t = Tesselator::getInstance();
t->begin();
int vo = 7;
t->normal(0, 0, -1);
t->vertexUV(static_cast<float>(0 - vo), static_cast<float>(128 + vo), 0.0f, 0.0f, 1.0f);
t->vertexUV(static_cast<float>(128 + vo), static_cast<float>(128 + vo), 0.0f, 1.0f, 1.0f);
t->vertexUV(static_cast<float>(128 + vo), static_cast<float>(0 - vo), 0.0f, 1.0f, 0.0f);
t->vertexUV(static_cast<float>(0 - vo), static_cast<float>(0 - vo), 0.0f, 0.0f, 0.0f);
t->end();
shared_ptr<MapItemSavedData> data = Item::map->getSavedData(item, minecraft->level);
if (data != nullptr) minimap->render(minecraft->player, minecraft->textures, data, minecraft->player->entityId);
}
}