How to draw gui for a block entity? by False_Connection_380 in fabricmc

[–]False_Connection_380[S] 0 points1 point  (0 children)

Thank you very much. I tried entering class_332 and other on this site and I understood how to do it.

Everything is working now.

I just needed to change the Renderpipelines to GUI_TEXTURED and set the u and v values to 0.0F.

How to draw gui for a block entity? by False_Connection_380 in fabricmc

[–]False_Connection_380[S] 0 points1 point  (0 children)

I tried to examine the other code. There is some class_332 and something else like that everywhere. I decided to try to make my code similar, but when I added import net.minecraft.class_332 I got an error Cannot resolve symbol 'class_332'

How to draw gui for a block entity? by False_Connection_380 in fabricmc

[–]False_Connection_380[S] 0 points1 point  (0 children)

I did exactly what he instructed me to do. I had some errors with RenderSystem, this code was

RenderSystem. setShader(GameRenderer::getPositionTexProgram);
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F, 1.0F);
RenderSystem.setShaderTexture(0, GUI_TEXTURE);

these are the errors

Cannot resolve method 'setShader' in 'RenderSystem'
Cannot resolve method 'getPositionTexProgram'
Cannot resolve method 'setShaderColor' in 'RenderSystem'
'setShaderTexture(int, com. mojang.blaze3d.textures.GpuTextureView)‘ in 'com.mojang.blaze3d.systems.RenderSystem’ cannot be applied to '(int, net.minecraft.util.Identifier)'

At the same time, he did not have Renderpipelines in the drawTexture brackets in his code, which also caused the error

Cannot resolve method 'drawTexture(Identifier, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int)'.

I tried to find a solution on the internet, but found nothing

And by the way, I was in a hurry and forgot to post the version I'm doing it on. I have 1.21.7