mojira.dev

lowercasebtw

Assigned

No issues.

Reported

MC-300330 Player Held Item Position Follows Other Players Duplicate MC-280394 String Length Overflow in SNBT Duplicate MC-279803 Continued Item Usage in GUI or Paused Works As Intended MC-279472 Void appears lower & more faded than before Fixed MC-278101 First Person Block Animation Doesn't Work With Shield Invalid MC-277320 Swing Animation Abruptly Stops On Item Use Duplicate MC-276308 Trial vault spawning infront of arrow filled dispensers Duplicate MC-276301 Item tooltip padding is gone Fixed MC-275917 Consumable blocking animation is broken in first person Fixed MC-274988 Text strike-through appears to be lower by one pixel compared to older versions Works As Intended MCPE-180442 Hotbar Selector Rendering Over Item Text/Durability Confirmed

Comments

What is your mesa drivers current version?

Are you able to reproduce still when updating to 25.0.3?

I have figured out what causes this, it seems like mentioned to be Mesa 25, and have found a fix for it.

This is due to a “use after free” issue, which takes place in VertexFormat#uploadImmediateVertexBuffer & VertexFormat#uploadImmediateIndexBuffer where when closing the buffer then re-assigning it, can cause a “use after free” issue. The fix is to store the current buffer in a temp variable, create the new buffer in another variable, then call close on the old buffer variable, then assign the buffer to the new buffer variable

Example From My Mixin I made (Mojmap):

[media]

Here is the updated code for 1.21.4+ (using Mojmap mappings)

Depth is:

int depth = this.minecraft.player.getEyePosition(tickDelta).y - this.level.getLevelData().getHorizonHeight(this.level)

Sky Color Integer is:

int skyColor = this.level.getSkyColor(this.minecraft.gameRenderer.getMainCamera().getPosition(), f);
Vector3f skyColorVec = ARGB.vector3fFromRGB24(skyColor);
if (this.level.effects().hasGround()) {
    RenderSystem.setShaderColor(skyColorVec.x * 0.2F + 0.04F, skyColorVec.y * 0.2F + 0.04F, skyColorVec.z * 0.6F + 0.1F, 1.0F);
} else {
    RenderSystem.setShaderColor(skyColorVec.x, skyColorVec.y, skyColorVec.z, 1.0F);
}

Matrix4fStack modelViewStack = RenderSystem.getModelViewStack(); 
modelViewStack.pushMatrix();
modelViewStack.translate(0.0F, -((float) (depth - 16.0)), 0.0F);
this.bottomSkyBuffer.drawWithRenderType(RenderType.sky());
modelViewStack.popMatrix();

RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);

NOTE: This should be called/happen at the end after SkyRenderer#renderDarkDisc in LevelRenderer#renderSky

The fix to this is to make (MOJMAP) PlayerRenderer#getRenderOffset return Vec3d.ZERO / just removing this method entirely because it is the cause of the issue.

where else do we chat?
and yea I saw your mod, it is not the same code that I have (extracted from a 1.14 snapshot before the pre-releases)

ok I boiled my code down and I think I know why its so weird now, I just gotta figure out how to implement this new thing I found

yo do you have a github? cause I have the code that was removed, but when I added it back, it works but feels off somewhat

Smajlo Slovakian

I have the code to fix this

[media]

This was in the the 1.10-pre 1 changelog ^

Also to note for affected versions, it would affect every version 1.14/1.15+

This is because in 1.13 and below, there was a toggle known as "VBOs" which you could disable/enable in Video Settings. This sky would only show if VBOs were turned off, because that was how it was coded unfortunately.

Ever since 1.14 though, that setting was removed and starting with 1.15 (the massive render update), the concept of VBOs being OFF was removed in all of the code, making VBOs be forced always ON and be the default.

The code I have put below would return this sky, it would function exactly how it did back then. This is just to note tho on how it worked and what happend.

I had to change it a bit because in 1.13/1.14 the code was still using old non-vbo code, so I figured out how to update it to use modern vbos 

NOTE: I updated this comment with my new updated code for 1.21.2

heres my code snipped (Using YARN, Fabric 1.20.5)

// Depth is the camera pos vec y minus the world horizon height
// skyColor is from world.getSkyColor

if (depth >= 0.0) {
    ShaderProgram shaderProgram = RenderSystem.setShader(ShaderProgramKeys.POSITION);

    Vector3f skyColorVec = ColorHelper.toVector(skyColor);
    if (this.world.getDimensionEffects().isAlternateSkyColor()) {
        RenderSystem.setShaderColor(skyColorVec.x * 0.2F + 0.04F, skyColorVec.y * 0.2F + 0.04F, skyColorVec.z * 0.6F + 0.1F, 1.0F);
    } else {
        RenderSystem.setShaderColor(skyColorVec.x, skyColorVec.y, skyColorVec.z, 1.0F);
    }

    matrixStack.push();
    matrixStack.multiplyPositionMatrix(RenderSystem.getModelViewMatrix());
    matrixStack.translate(0.0F, -((float) (depth - 16.0)), 0.0F);
    this.skyRendering.darkSkyBuffer.bind();
    this.skyRendering.darkSkyBuffer.draw(matrixStack.peek().getPositionMatrix(), RenderSystem.getProjectionMatrix(), shaderProgram);
    VertexBuffer.unbind();
    matrixStack.pop();
}

You can still get this sky in 1.13 by disabling VBOs, ever since 1.14, VBOs have been on by default & the toggle was removed, and in 1.15 the option/code to disable VBOs was removed making VBOs being on a permanent thing. But I have found the code that renders/shows the bottom portion of the sky and have gotten it to work in 1.20 with VBOs.

This is because on Java, there is now 2 textures for glint since 1.19.4, making armor more subtle

But also, bedrock never updated the glint format like Java did in 1.15 causing it to be outdated & also Bedrock uses pixelated glint, you can see especially on enchanted books

Even when changing player permission to operator, you still cant change gamemodes