tokuhausu
-
Posts
7 -
Joined
-
Last visited
Posts posted by tokuhausu
-
-
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 tonet.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).
Is there a solution for this? -
Umm
MODID, in this case the default texture, so I tried both "minecraft" but couldn't draw correctly.
TextureManager.getTexture () seems to return null. -
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? -
Ok, I understand.
Thank you for teaching. -
This is because MOD designed for 1.12 uses the path to the config file and if we can acquire the path, we thought that we could minimize the work to support 1.13.
-
1.13.2 By upgrading
FMLPreInitializationEvent. GetSuggestedConfigurationFile ()
I can not use it.
Is there any other way to get the path of the config file?
[Solved] [1.14.4] TextureManager.bindTexture (ResourceLocation) does not work well
in Modder Support
Posted
While working with the code, I noticed that when I upgraded, the color settings were incorrect.
This was not because the texture was not drawn, but because the texture was painted black.
After modifying the code, it was successfully drawn.
Sorry for the trouble.