Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

UndeadMonkey

Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

UndeadMonkey's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. There are many functions I want to implement like a scroll bar and custom player inventory linked to my container gui.
  2. My issue is that it doesn't function like what the textures display.
  3. 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); } }
  4. 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 ?
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.