Jump to content

tokuhausu

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by tokuhausu

  1.  

    4 hours ago, Ommina said:

    Looking at TextureManager, bind() will load the texture if the texture is not already in the manager's internal map.  getTexture() will not - it is just a reach into the map and return whatever is (or is not) there.  So if getTexture() is still returning null after the bind() ( or loadTexture() ), that'll give you a hint of where things could be going wrong.

    As you say, getTexture () after bind () did not return null.

    4 hours ago, Ommina said:

    That said, loadTexture() does log a warning if there in an IOException, and crashes outright if there is some other exception, so I'd expect there to be a note in the log if something were going wrong here.

    No exception is raised at runtime.

     

     

    I considered another drawing method.
    So, refer to

    net.minecraft.client.gui.screen.EditSignScreen

    TileEntityRendererDispatcher.instance.render (TileEntity, Double, Double, Double, Float);


    By using, the texture was successfully drawn.
    However, when text is written on the signboard, the texture is not drawn correctly and the text texture is displayed (see image).

    cc82082c869f93260605155754e7a4b7.png8f527cc7fc2aaee16b382d22aa7a363b.png
    Is there a solution for this?

  2. I am trying to draw the texture of the signboard on the screen using TextureManager.bindTexture () when hovering over the signboard.
    In 1.12.2
     

    [1.12.2]
    public class SignReader extends HudBase {
        private static final ResourceLocation SIGN_TEXTURE = new ResourceLocation ("textures / entity / sign.png");
    
        @Override
        public Rect render (Event event) {
    
            Minecraft.getInstance (). GetTextureManager (). BindTexture (SIGN_TEXTURE);
    
                    / * ....... my code ....... * /
        }
    }



    And it was drawing normally.
    In 1.14.4, the texture of the signboard was divided for each wood
    SIGN_TEXTURE in the above code

    [1.14.4]
    new ResourceLocation ("textures / entity / signs / oak.png");


    Changed to
    However, these codes do not work properly, and a black rectangle is drawn on the screen.
    Is the ResourceLocation of oak.png wrong?
    Or has bindTexture () changed its usage?

     

    988f823cc4aaee24e55e397ff4ad1a15.png3201b939f600493b0e78679c6ad072e7.png

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.