public class BiggerChestScreen extends HandledScreen { // a path to gui texture, you may replace it with new Identifier(YourMod.MOD_ID, "textures/gui/container/your_container.png"); private static final Identifier TEXTURE = new Identifier("textures/gui/container/generic_54.png"); public BiggerChestScreen(BiggerChestScreenHandler handler, PlayerInventory playerInventory, Text title) { super(handler, playerInventory, title); this.backgroundHeight = 114 + 6 * 18; } @Override protected void drawForeground(MatrixStack matrices, int mouseX, int mouseY) { this.textRenderer.draw(matrices, this.title.asString(), 8.0F, 6.0F, 4210752); this.textRenderer.draw(matrices, this.playerInventory.getDisplayName().asString(), 8.0F, (float)(this.backgroundHeight - 96 + 2), 4210752); } @Override protected void drawBackground(float delta, int mouseX, int mouseY) { RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); this.client.getTextureManager().bindTexture(TEXTURE); int i = (this.width - this.backgroundWidth) / 2; int j = (this.height - this.backgroundHeight) / 2; this.blit(i, j, 0, 0, this.backgroundWidth, 6 * 18 + 17); this.blit(i, j + 6 * 18 + 17, 0, 126, this.backgroundWidth, 96); } }