I am rendering an GUI with Fabric using the screen class but I only get the text and the item to render nothing else. I don't know what the problem. Here is my code:
@Override
public void render(DrawContext contents, int mouseX, int mouseY, float delta){
super.render(contents,mouseX,mouseY,delta);
contents.fill(width / 2,height / 2,width / 2 + 100,height / 2 + 100,0x00FFFFFF);
contents.drawBorder(10,10,100,100,0xFF0000);
for(int i = 0; i < 10; i++){
for(int o = 0; o < width / 10; o++){
contents.drawItem(MinecartItem.byRawId((i*10)+o).getDefaultStack(),10*o,10*i);
}}
contents.drawVerticalLine(10,10,height,0xffffff);
contents.drawCenteredTextWithShadow(textRenderer, Text.literal("You must see me"), width / 2, height / 2, 0xffffff);
contents.fill(10,10,20,20,0xffffff);
}
Thanks for helping!
I am rendering with Fabric Screen and put in the lines:
contents.fill(10,10,20,20,0xffffff);
But it does nothing and border also doesn't work.
Thanks for helping!