Posted September 26, 20214 yr This my GUI for reference, the players inventory is on the right, if there's no hot bar on display that's intentional, the container inventory window is on the left, on the bottom left there's a large black screen wich is supposed to be a typewriter. How do I make it function like intended ?
September 26, 20214 yr Author 54 minutes ago, diesieben07 said: Show your code. package com.undeadmonkey.residentevilmod.client.screen; import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; import com.undeadmonkey.residentevilmod.ResidentevilMod; import com.undeadmonkey.residentevilmod.common.container.ItemBoxContainer; import net.minecraft.client.gui.screen.inventory.ContainerScreen; import net.minecraft.entity.player.PlayerInventory; import net.minecraft.util.ResourceLocation; import net.minecraft.util.text.ITextComponent; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @OnlyIn(Dist.CLIENT) public class ItemBoxScreen extends ContainerScreen<ItemBoxContainer> { private static final ResourceLocation ITEM_BOX_GUI = new ResourceLocation(ResidentevilMod.MOD_ID, "textures/gui/item_box.png"); public ItemBoxScreen(ItemBoxContainer screenContainer, PlayerInventory inv, ITextComponent titleIn) { super(screenContainer, inv, titleIn); this.guiLeft = 0; this.guiTop = 0; this.xSize = 176; this.ySize = 176; } @Override public void render(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) { this.renderBackground(matrixStack); super.render(matrixStack, mouseX, mouseY, partialTicks); this.renderHoveredTooltip(matrixStack, mouseX, mouseY); } @Override protected void drawGuiContainerForegroundLayer(MatrixStack matrixStack, int x, int y) { this.font.func_243248_b(matrixStack, this.playerInventory.getDisplayName(), (float) this.playerInventoryTitleX, (float) this.playerInventoryTitleX, 4210752); } @SuppressWarnings("deprecation") @Override protected void drawGuiContainerBackgroundLayer(MatrixStack matrixStack, float partialTicks, int mouseX, int mouseY) { RenderSystem.color4f(1f, 1f, 1f, 1f); this.minecraft.textureManager.bindTexture(ITEM_BOX_GUI); int x = (this.width - this.xSize) / 2; int y = (this.height - this.ySize) / 2; this.blit(matrixStack, x, y, 0, 0, this.xSize, this.ySize); } } Edited September 26, 20214 yr by diesieben07
September 26, 20214 yr Author 7 minutes ago, Luis_ST said: please use the code feature and do not use @OnlyIn Wich code feature ?
September 26, 20214 yr Author 3 minutes ago, diesieben07 said: Okay... so... what is your issue with this? It shows the texture just like it is... My issue is that it doesn't function like what the textures display.
September 26, 20214 yr Author 22 minutes ago, Luis_ST said: what exactly should the function be? There are many functions I want to implement like a scroll bar and custom player inventory linked to my container gui.
September 26, 20214 yr what did you expect? you need to add this things manually look for an example at the StonecutterScreen
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.