• Recently Browsing

    No registered users viewing this page.

  • Posts

    • I know that i have to somehow open gui on server but i dont know what exactly i need to do Container public class MyModContainer extends Container implements INamedContainerProvider { private IItemHandler playerInventory; protected MyModContainer(int id, PlayerInventory playerInventory) { super(RegObj.MOD_CONTAINER.get(), id); this.playerInventory = new InvWrapper(playerInventory); playerInventory.player.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY).ifPresent(h -> { addSlot(new SlotItemHandler(h,0,79,18)); }); layoutPlayerInventory(7,54); } private int addSlotRange(IItemHandler handler, int index, int x, int y, int amount, int dx) { for(int i = 0; i < amount;i++) { addSlot(new SlotItemHandler(handler,index,x,y)); x+=dx; index++; } return index; } private int addSlotBox(IItemHandler handler,int index,int x,int y,int horAmount,int dx,int verAmount,int dy) { for (int j = 0;j<verAmount;j++) { index = addSlotRange(handler,index,x,y,horAmount,dx); y+=dy; } return index; } private void layoutPlayerInventory(int leftCol, int topRow) { addSlotBox(playerInventory,9,leftCol,topRow,9,18,3,18); topRow += 58; addSlotRange(playerInventory,0,leftCol,topRow,9,18); } @Override public boolean canInteractWith(PlayerEntity playerIn) { return true; } @Override public ITextComponent getDisplayName() { return new StringTextComponent("MY_INV"); } @Nullable @Override public Container createMenu(int p_createMenu_1_, PlayerInventory p_createMenu_2_, PlayerEntity p_createMenu_3_) { return null; } }   Screen public class MyModInv extends ContainerScreen<MyModContainer> { private static final int WIDTH =179; private static final int HEIGHT =151; private ResourceLocation GUI = new ResourceLocation(Main.MODID,"textures/gui/my_inv.png"); public MyModInv(MyModContainer screenContainer, PlayerInventory inv, ITextComponent titleIn) { super(screenContainer, inv, titleIn); } @Override public void render(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) { super.render(matrixStack, mouseX, mouseY, partialTicks); this.renderBackground(matrixStack); this.renderHoveredTooltip(matrixStack, mouseX, mouseY); } @Override protected void drawGuiContainerBackgroundLayer(MatrixStack matrixStack, float partialTicks, int x, int y) { RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); this.minecraft.getTextureManager().bindTexture(GUI); int i = (this.width - WIDTH) / 2; int j = (this.height - HEIGHT) / 2; this.blit(matrixStack, i, j, 0, 0, WIDTH, HEIGHT); } @Override public boolean isPauseScreen() { return false; } }
    • Hi. I am  new to programming mods. I have a mod for the minecraft version 1.15.2. But I do not know how to update it to the newest minecraft version (1.16.5).
    • 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    • Hey, i have alot of mods installed, and one of them requires redstone flux. I read that i should add "-Dcofh.rf.crashOnOldAPI=false" but it doesn't work, i tried deleting the whole JVM arguments and just adding onto the "original" ones but it just won't work. Can someone help me with this?
    • Hello There! In today's Survival Island episode we FINALLY make beds, yeah I know it's been like 5 episodes and that was the first challenge haha but we got it! We also explore the mineshaft we found last episode and we also discuss our next big project! There are so many hilarious moments in this episode that I know you guys are gonna love! I hope you all enjoy this video and if you did don't forget to like and sub for more survival island in the future!   
  • Topics

  • Who's Online (See full list)