[MC-190] Misaligned textures on south and east faces for non-full blocks Created: 24/Oct/12  Updated: 11/Aug/20  Resolved: 25/Nov/13

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.2, Snapshot 13w02b, Snapshot 13w10a, Minecraft 1.5, Snapshot 13w18c, Snapshot 13w19a, Snapshot 13w21a, Snapshot 13w21b, Snapshot 13w22a, Snapshot 13w25a, Snapshot 13w25b, Snapshot 13w25c, Snapshot 13w26a, Minecraft 1.6, Minecraft 13w36a, Minecraft 13w38a, Minecraft 13w38c, Minecraft 13w39a, Minecraft 13w39b, Minecraft 13w41a, Minecraft 13w42b, Minecraft 13w43a, Minecraft 1.7.1, Minecraft 13w47c
Fix Version/s: Minecraft 13w48a

Type: Bug
Reporter: Yoann Petremann Assignee: Mog (Ryan Holtz)
Resolution: Fixed Votes: 29
Labels: rendering, texture

Attachments: PNG File A1.png     PNG File A2.png     PNG File B1.png     PNG File B2.png     Zip Archive Test.zip     File bkw.class     PNG File glitch.png     PNG File misaligned.png    
Issue Links:
Duplicate
is duplicated by MC-9654 Fence ends render crossbeams incorrectly Resolved
Relates
relates to MC-37106 All the textures are flipped/mirrored... Resolved
CHK:
Confirmation Status: Confirmed

 Description   

Description:

Texture on all non-full width non-symmetrical blocks on south and east sides are misaligned, like :

  • Door
  • trapdoor
  • Fences
  • Fencegates
  • Wall
  • Buttons
  • Levers
  • Stairs
  • hopper
  • Tripwire hook

This does not affect some blocks like cocoa, because they don't use the standard block method.

With that bug, it's very difficult to make HD texture pack since these details are near invisible with 16x packs but not on 64x packs for example.


Expected:

Having textures correctly aligned, like on Ax.png screenshots.


Actual:

Textures are misaligned, like on Bx.png screenshots.


Solution:
RenderBlocks.java
public class RenderBlocks {
    public void renderEastFace(Block par1Block, double par2, double par4, double par6, Icon texture) {
        Tessellator tessellator = Tessellator.instance;
        if (this.hasOverrideBlockTexture()) {
            texture = this.overrideBlockTexture;
        }
        /* START OF OLD CODE *
        double var10 = (double)texture.getInterpolatedU(this.renderMinX * 16.0D);
        double var12 = (double)texture.getInterpolatedU(this.renderMaxX * 16.0D);
        * END OF OLD CODE */
        /* START OF NEW CODE */
        double var10 = (double)texture.getInterpolatedU(16.0D - this.renderMaxX * 16.0D);
        double var12 = (double)texture.getInterpolatedU(16.0D - this.renderMinX * 16.0D);
        /* END OF NEW CODE */
        double var14 = (double)texture.getInterpolatedV(16.0D - this.renderMaxY * 16.0D);
        double var16 = (double)texture.getInterpolatedV(16.0D - this.renderMinY * 16.0D);
        /* ... */
    }
    public void renderSouthFace(Block par1Block, double par2, double par4, double par6, Icon texture) {
        Tessellator tessellator = Tessellator.instance;
        if (this.hasOverrideBlockTexture()) {
            texture = this.overrideBlockTexture;
        }
        /* START OF OLD CODE *
        double var10 = (double)texture.getInterpolatedU(this.renderMinZ * 16.0D);
        double var12 = (double)texture.getInterpolatedU(this.renderMaxZ * 16.0D);
        * END OF OLD CODE */
        /* START OF NEW CODE */
        double var10 = (double)texture.getInterpolatedU(16.0D - this.renderMaxZ * 16.0D);
        double var12 = (double)texture.getInterpolatedU(16.0D - this.renderMinZ * 16.0D);
        /* END OF NEW CODE */
        double var14 = (double)texture.getInterpolatedV(16.0D - this.renderMaxY * 16.0D);
        double var16 = (double)texture.getInterpolatedV(16.0D - this.renderMinY * 16.0D);
        /* ... */
    }
}



 Comments   
Comment by Yoann Petremann [ 25/Nov/13 ]

Can't wait for the snapshot to see, thanks in advance ...

Comment by Mog (Ryan Holtz) [ 25/Nov/13 ]

Fixed properly for 1.7.3

Comment by Yoann Petremann [ 22/Nov/13 ]

Please reopen since it has returned with the fix for MC-37106 (which was an effect to the fix of this).

Comment by Yoann Petremann [ 01/Nov/13 ]

On obfuscated class, my patch apply on the methods c(Lxxx;DDDLyyy;)V and f(Lxxx;DDDLyyy;)V, so respectively the third and last renderFace methods.

Comment by Yoann Petremann [ 31/Oct/13 ]

And finally Grum, Since for 6 month I used to play with my fixed version of minecraft, I've not seen any bugs depending to this problem after fixing.

Comment by Yoann Petremann [ 31/Oct/13 ]

I don't see why my solution is wrong, please show me by screenshots .

My patcher said that the bug has not been fixed.

I fact we don't see it anymore because you has inverted all textures for these faces, but your solution cause all textures to be inverted like beds sides ...

In all cases, for me the bug is not fixed because your fix cause another bug.

Comment by _zombiehunter [ 25/Oct/13 ]

Thanks for fixing this, Grum

Comment by [Mojang] Grum (Erik Broes) [ 25/Oct/13 ]

The solution is actually wrong, but I've fixed the issue nevertheless

Comment by Yoann Petremann [ 21/Oct/13 ]

bkw.class is a bugfix modification for Minecraft 13w42b for MC-15189 and MC-190

Please make a custom 13w42b version and install that file in the jar file

Comment by Yoann Petremann [ 20/Oct/13 ]

Ezekiel : This still concern the latest Minecraft version 13w42b, and supect that it would concern Minecraft version 1.7 because neither dinnerbone or jeb or anyone at Mojang is able to apply the proposed functionning solution. They know about the bug because dinnerbone have answer me on twitter but they thing they are not able to fix the problem, but I've already fixed the problem.

Comment by [Mod] Ezekiel (ezfe) [ 19/Oct/13 ]

Is this still a concern in the latest Minecraft version 13w42b? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Comment by Yoann Petremann [ 20/Sep/13 ]

With that bug, we know where are stairs.

Comment by Yoann Petremann [ 24/Jun/13 ]

Confirmed for 13w26a !

Comment by Yoann Petremann [ 20/Jun/13 ]

Still not resolved since the solution is explained ...

Comment by kbk [ 30/May/13 ]

@Yoann
Good job, thank you very much.

Comment by Yoann Petremann [ 30/May/13 ]

Added screenshot for stairs

Comment by Yoann Petremann [ 30/May/13 ]

Remplaced old screenshot with new ones

Comment by Yoann Petremann [ 30/May/13 ]

Texture pack to fully test texture alignement.

Comment by _zombiehunter [ 25/May/13 ]

Would be nice to have this fixed. As you already mentioned, it's not very conspicuous in most 16x16 packs, but HD packs really would profit of better aligned textures on fences, etc. ...

Comment by Yoann Petremann [ 05/May/13 ]

I've posted a valid and tested solution for that problem, it does not seem to cause new glitches and it seems to fixes a common problem with all blocks that contain part that not 1 block width :

  • stairs
  • fences
  • wall
  • fence gate
  • button
  • levers
  • trapdoors
    ...
Comment by Yoann Petremann [ 05/May/13 ]

Still concern latest 13w18c and 1.5.2 versions ...

Comment by Yoann Petremann [ 05/Mar/13 ]

Concern 13w10a ...

Comment by Yoann Petremann [ 14/Jan/13 ]

Texture Pack for version > 13w02a

Comment by Yoann Petremann [ 14/Jan/13 ]

The problem is still present in 13w02b, I have created a version of the texture pack for version 13w02a and above

Comment by Tails [ 14/Jan/13 ]

Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Comment by [Mod] Ezekiel (ezfe) [ 25/Oct/12 ]

Whats wrong

Generated at Sun Jan 12 11:50:10 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.