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

Update for forge! [ItemStack(Block) rendering bassed on NBT of the ItemStack]


Zyldra
 Share

Recommended Posts

I have a problem with the way minecraft renders blocks!

 

I need a way to give a block an texture from another block bassed on NBT.

I find one, but that only works if forge does implement the codes below here.

 

These add things.

package net.minecraft.client.renderer; RenderBlocks.java

public void renderBlockAsItem(Block p_147800_1_, int p_147800_2_, float p_147800_3_, ItemStack p_147800_4_)

    {

    renderBlockAsItem(Block.getBlockFromItem(p_147800_1_.getBlockRenderingInInventory(p_147800_4_).getItem()), p_147800_1_.getBlockRenderingInInventory(p_147800_4_).getItemDamage(), p_147800_3_);

    }

 

package net.minecraft.block; Block.java

public ItemStack getBlockRenderingInInventory(ItemStack itemstack)

    {

    return itemstack;

    }

 

These change things, Look at >//Changed< for changes.

package net.minecraft.client.renderer; ItemRenderer.java

public void renderItem(EntityLivingBase par1EntityLivingBase, ItemStack par2ItemStack, int par3, ItemRenderType type)

    {

        GL11.glPushMatrix();

        TextureManager texturemanager = this.mc.getTextureManager();

        Item item = par2ItemStack.getItem();

        Block block = Block.getBlockFromItem(item);

 

        IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(par2ItemStack, type);

        if (customRenderer != null)

        {

            texturemanager.bindTexture(texturemanager.getResourceLocation(par2ItemStack.getItemSpriteNumber()));

            ForgeHooksClient.renderEquippedItem(type, customRenderer, renderBlocksIr, par1EntityLivingBase, par2ItemStack);

        }

        else if (par2ItemStack.getItemSpriteNumber() == 0 && item instanceof ItemBlock && RenderBlocks.renderItemIn3d(block.getRenderType()))

        {

            texturemanager.bindTexture(texturemanager.getResourceLocation(0));

 

            if (par2ItemStack != null && par2ItemStack.getItem() instanceof ItemCloth)

            {

                GL11.glEnable(GL11.GL_BLEND);

                GL11.glDepthMask(false);

                OpenGlHelper.glBlendFunc(770, 771, 1, 0);

                this.renderBlocksIr.renderBlockAsItem(block, par2ItemStack.getItemDamage(), 1.0F, par2ItemStack);//Changed

                GL11.glDepthMask(true);

                GL11.glDisable(GL11.GL_BLEND);

            }

            else

            {

                this.renderBlocksIr.renderBlockAsItem(block, par2ItemStack.getItemDamage(), 1.0F, par2ItemStack);//Changed

            }

        }

        else

        {

            IIcon iicon = par1EntityLivingBase.getItemIcon(par2ItemStack, par3);

 

            if (iicon == null)

            {

                GL11.glPopMatrix();

                return;

            }

 

            texturemanager.bindTexture(texturemanager.getResourceLocation(par2ItemStack.getItemSpriteNumber()));

            TextureUtil.func_147950_a(false, false);

            Tessellator tessellator = Tessellator.instance;

            float f = iicon.getMinU();

            float f1 = iicon.getMaxU();

            float f2 = iicon.getMinV();

            float f3 = iicon.getMaxV();

            float f4 = 0.0F;

            float f5 = 0.3F;

            GL11.glEnable(GL12.GL_RESCALE_NORMAL);

            GL11.glTranslatef(-f4, -f5, 0.0F);

            float f6 = 1.5F;

            GL11.glScalef(f6, f6, f6);

            GL11.glRotatef(50.0F, 0.0F, 1.0F, 0.0F);

            GL11.glRotatef(335.0F, 0.0F, 0.0F, 1.0F);

            GL11.glTranslatef(-0.9375F, -0.0625F, 0.0F);

            renderItemIn2D(tessellator, f1, f2, f, f3, iicon.getIconWidth(), iicon.getIconHeight(), 0.0625F);

 

            if (par2ItemStack.hasEffect(par3))

            {

                GL11.glDepthFunc(GL11.GL_EQUAL);

                GL11.glDisable(GL11.GL_LIGHTING);

                texturemanager.bindTexture(RES_ITEM_GLINT);

                GL11.glEnable(GL11.GL_BLEND);

                OpenGlHelper.glBlendFunc(768, 1, 1, 0);

                float f7 = 0.76F;

                GL11.glColor4f(0.5F * f7, 0.25F * f7, 0.8F * f7, 1.0F);

                GL11.glMatrixMode(GL11.GL_TEXTURE);

                GL11.glPushMatrix();

                float f8 = 0.125F;

                GL11.glScalef(f8, f8, f8);

                float f9 = (float)(Minecraft.getSystemTime() % 3000L) / 3000.0F * 8.0F;

                GL11.glTranslatef(f9, 0.0F, 0.0F);

                GL11.glRotatef(-50.0F, 0.0F, 0.0F, 1.0F);

                renderItemIn2D(tessellator, 0.0F, 0.0F, 1.0F, 1.0F, 256, 256, 0.0625F);

                GL11.glPopMatrix();

                GL11.glPushMatrix();

                GL11.glScalef(f8, f8, f8);

                f9 = (float)(Minecraft.getSystemTime() % 4873L) / 4873.0F * 8.0F;

                GL11.glTranslatef(-f9, 0.0F, 0.0F);

                GL11.glRotatef(10.0F, 0.0F, 0.0F, 1.0F);

                renderItemIn2D(tessellator, 0.0F, 0.0F, 1.0F, 1.0F, 256, 256, 0.0625F);

                GL11.glPopMatrix();

                GL11.glMatrixMode(GL11.GL_MODELVIEW);

                GL11.glDisable(GL11.GL_BLEND);

                GL11.glEnable(GL11.GL_LIGHTING);

                GL11.glDepthFunc(GL11.GL_LEQUAL);

            }

 

            GL11.glDisable(GL12.GL_RESCALE_NORMAL);

            texturemanager.bindTexture(texturemanager.getResourceLocation(par2ItemStack.getItemSpriteNumber()));

            TextureUtil.func_147945_b();

        }

 

        GL11.glPopMatrix();

    }

package net.minecraft.client.renderer.entity; RenderItem.java

public void doRender(EntityItem par1EntityItem, double par2, double par4, double par6, float par8, float par9)

    {

        ItemStack itemstack = par1EntityItem.getEntityItem();

 

        if (itemstack.getItem() != null)

        {

            this.bindEntityTexture(par1EntityItem);

            this.random.setSeed(187L);

            GL11.glPushMatrix();

            float f2 = shouldBob() ? MathHelper.sin(((float)par1EntityItem.age + par9) / 10.0F + par1EntityItem.hoverStart) * 0.1F + 0.1F : 0F;

            float f3 = (((float)par1EntityItem.age + par9) / 20.0F + par1EntityItem.hoverStart) * (180F / (float)Math.PI);

            byte b0 = 1;

 

            if (par1EntityItem.getEntityItem().stackSize > 1)

            {

                b0 = 2;

            }

 

            if (par1EntityItem.getEntityItem().stackSize > 5)

            {

                b0 = 3;

            }

 

            if (par1EntityItem.getEntityItem().stackSize > 20)

            {

                b0 = 4;

            }

 

            if (par1EntityItem.getEntityItem().stackSize > 40)

            {

                b0 = 5;

            }

 

            b0 = getMiniBlockCount(itemstack, b0);

 

            GL11.glTranslatef((float)par2, (float)par4 + f2, (float)par6);

            GL11.glEnable(GL12.GL_RESCALE_NORMAL);

            float f6;

            float f7;

            int k;

 

            if (ForgeHooksClient.renderEntityItem(par1EntityItem, itemstack, f2, f3, random, renderManager.renderEngine, field_147909_c, b0))

            {

                ;

            }

            else // Code Style break here to prevent the patch from editing this line

            if (itemstack.getItemSpriteNumber() == 0 && itemstack.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemstack.getItem()).getRenderType()))

            {

                Block block = Block.getBlockFromItem(itemstack.getItem());

                GL11.glRotatef(f3, 0.0F, 1.0F, 0.0F);

 

                if (renderInFrame)

                {

                    GL11.glScalef(1.25F, 1.25F, 1.25F);

                    GL11.glTranslatef(0.0F, 0.05F, 0.0F);

                    GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);

                }

 

                float f9 = 0.25F;

                k = block.getRenderType();

 

                if (k == 1 || k == 19 || k == 12 || k == 2)

                {

                    f9 = 0.5F;

                }

 

                if (block.getRenderBlockPass() > 0)

                {

                    GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);

                    GL11.glEnable(GL11.GL_BLEND);

                    OpenGlHelper.glBlendFunc(770, 771, 1, 0);

                }

 

                GL11.glScalef(f9, f9, f9);

 

                for (int l = 0; l < b0; ++l)

                {

                    GL11.glPushMatrix();

 

                    if (l > 0)

                    {

                        f6 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.2F / f9;

                        f7 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.2F / f9;

                        float f8 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.2F / f9;

                        GL11.glTranslatef(f6, f7, f8);

                    }

 

                    this.renderBlocksRi.renderBlockAsItem(block, itemstack.getItemDamage(), 1.0F, itemstack);//Changed

                    GL11.glPopMatrix();

                }

 

                if (block.getRenderBlockPass() > 0)

                {

                    GL11.glDisable(GL11.GL_BLEND);

                }

            }

            else

            {

                float f5;

 

                if (/*itemstack.getItemSpriteNumber() == 1 &&*/ itemstack.getItem().requiresMultipleRenderPasses())

                {

                    if (renderInFrame)

                    {

                        GL11.glScalef(0.5128205F, 0.5128205F, 0.5128205F);

                        GL11.glTranslatef(0.0F, -0.05F, 0.0F);

                    }

                    else

                    {

                        GL11.glScalef(0.5F, 0.5F, 0.5F);

                    }

 

                    for (int j = 0; j < itemstack.getItem().getRenderPasses(itemstack.getItemDamage()); ++j)

                    {

                        this.random.setSeed(187L);

                        IIcon iicon1 = itemstack.getItem().getIcon(itemstack, j);

 

                        if (this.renderWithColor)

                        {

                            k = itemstack.getItem().getColorFromItemStack(itemstack, j);

                            f5 = (float)(k >> 16 & 255) / 255.0F;

                            f6 = (float)(k >> 8 & 255) / 255.0F;

                            f7 = (float)(k & 255) / 255.0F;

                            GL11.glColor4f(f5, f6, f7, 1.0F);

                            this.renderDroppedItem(par1EntityItem, iicon1, b0, par9, f5, f6, f7, j);

                        }

                        else

                        {

                            this.renderDroppedItem(par1EntityItem, iicon1, b0, par9, 1.0F, 1.0F, 1.0F, j);

                        }

                    }

                }

                else

                {

                    if (itemstack != null && itemstack.getItem() instanceof ItemCloth)

                    {

                        GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);

                        GL11.glEnable(GL11.GL_BLEND);

                        OpenGlHelper.glBlendFunc(770, 771, 1, 0);

                    }

 

                    if (renderInFrame)

                    {

                        GL11.glScalef(0.5128205F, 0.5128205F, 0.5128205F);

                        GL11.glTranslatef(0.0F, -0.05F, 0.0F);

                    }

                    else

                    {

                        GL11.glScalef(0.5F, 0.5F, 0.5F);

                    }

 

                    IIcon iicon = itemstack.getIconIndex();

 

                    if (this.renderWithColor)

                    {

                        int i = itemstack.getItem().getColorFromItemStack(itemstack, 0);

                        float f4 = (float)(i >> 16 & 255) / 255.0F;

                        f5 = (float)(i >> 8 & 255) / 255.0F;

                        f6 = (float)(i & 255) / 255.0F;

                        this.renderDroppedItem(par1EntityItem, iicon, b0, par9, f4, f5, f6);

                    }

                    else

                    {

                        this.renderDroppedItem(par1EntityItem, iicon, b0, par9, 1.0F, 1.0F, 1.0F);

                    }

 

                    if (itemstack != null && itemstack.getItem() instanceof ItemCloth)

                    {

                        GL11.glDisable(GL11.GL_BLEND);

                    }

                }

            }

 

            GL11.glDisable(GL12.GL_RESCALE_NORMAL);

            GL11.glPopMatrix();

        }

    }

public void renderItemIntoGUI(FontRenderer par1FontRenderer, TextureManager par2TextureManager, ItemStack par3ItemStack, int par4, int par5, boolean renderEffect)

    {

        int k = par3ItemStack.getItemDamage();

        Object object = par3ItemStack.getIconIndex();

        GL11.glEnable(GL11.GL_BLEND);

        OpenGlHelper.glBlendFunc(770, 771, 1, 0);

        int l;

        float f;

        float f3;

        float f4;

 

        if (par3ItemStack.getItemSpriteNumber() == 0 && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(par3ItemStack.getItem()).getRenderType()))

        {

            par2TextureManager.bindTexture(TextureMap.locationBlocksTexture);

            Block block = Block.getBlockFromItem(par3ItemStack.getItem());

            GL11.glPushMatrix();

            GL11.glTranslatef((float)(par4 - 2), (float)(par5 + 3), -3.0F + this.zLevel);

            GL11.glScalef(10.0F, 10.0F, 10.0F);

            GL11.glTranslatef(1.0F, 0.5F, 1.0F);

            GL11.glScalef(1.0F, 1.0F, -1.0F);

            GL11.glRotatef(210.0F, 1.0F, 0.0F, 0.0F);

            GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);

            l = par3ItemStack.getItem().getColorFromItemStack(par3ItemStack, 0);

            f3 = (float)(l >> 16 & 255) / 255.0F;

            f4 = (float)(l >> 8 & 255) / 255.0F;

            f = (float)(l & 255) / 255.0F;

 

            if (this.renderWithColor)

            {

                GL11.glColor4f(f3, f4, f, 1.0F);

            }

 

            GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);

            this.renderBlocksRi.useInventoryTint = this.renderWithColor;

            this.renderBlocksRi.renderBlockAsItem(block, k, 1.0F, par3ItemStack);//Changed

            this.renderBlocksRi.useInventoryTint = true;

            GL11.glPopMatrix();

        }

        else if (par3ItemStack.getItem().requiresMultipleRenderPasses())

        {

            GL11.glDisable(GL11.GL_LIGHTING);

            GL11.glEnable(GL11.GL_ALPHA_TEST);

            par2TextureManager.bindTexture(TextureMap.locationItemsTexture);

            GL11.glDisable(GL11.GL_ALPHA_TEST);

            GL11.glDisable(GL11.GL_TEXTURE_2D);

            GL11.glEnable(GL11.GL_BLEND);

            OpenGlHelper.glBlendFunc(0, 0, 0, 0);

            GL11.glColorMask(false, false, false, true);

            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);

            Tessellator tessellator = Tessellator.instance;

            tessellator.startDrawingQuads();

            tessellator.setColorOpaque_I(-1);

            tessellator.addVertex((double)(par4 - 2), (double)(par5 + 18), (double)this.zLevel);

            tessellator.addVertex((double)(par4 + 18), (double)(par5 + 18), (double)this.zLevel);

            tessellator.addVertex((double)(par4 + 18), (double)(par5 - 2), (double)this.zLevel);

            tessellator.addVertex((double)(par4 - 2), (double)(par5 - 2), (double)this.zLevel);

            tessellator.draw();

            GL11.glColorMask(true, true, true, true);

            GL11.glEnable(GL11.GL_TEXTURE_2D);

            GL11.glEnable(GL11.GL_ALPHA_TEST);

 

            Item item = par3ItemStack.getItem();

            for (l = 0; l < item.getRenderPasses(k); ++l)

            {

                OpenGlHelper.glBlendFunc(770, 771, 1, 0);

                par2TextureManager.bindTexture(item.getSpriteNumber() == 0 ? TextureMap.locationBlocksTexture : TextureMap.locationItemsTexture);

                IIcon iicon = item.getIcon(par3ItemStack, l);

                int i1 = par3ItemStack.getItem().getColorFromItemStack(par3ItemStack, l);

                f = (float)(i1 >> 16 & 255) / 255.0F;

                float f1 = (float)(i1 >> 8 & 255) / 255.0F;

                float f2 = (float)(i1 & 255) / 255.0F;

 

                if (this.renderWithColor)

                {

                    GL11.glColor4f(f, f1, f2, 1.0F);

                }

 

                GL11.glDisable(GL11.GL_LIGHTING); //Forge: Make sure that render states are reset, ad renderEffect can derp them up.

                GL11.glEnable(GL11.GL_ALPHA_TEST);

 

                this.renderIcon(par4, par5, iicon, 16, 16);

 

                GL11.glDisable(GL11.GL_ALPHA_TEST);

                GL11.glEnable(GL11.GL_LIGHTING);

 

                if (renderEffect && par3ItemStack.hasEffect(l))

                {

                    renderEffect(par2TextureManager, par4, par5);

                }

            }

 

            GL11.glDisable(GL11.GL_ALPHA_TEST);

            GL11.glEnable(GL11.GL_LIGHTING);

        }

        else

        {

            GL11.glDisable(GL11.GL_LIGHTING);

            ResourceLocation resourcelocation = par2TextureManager.getResourceLocation(par3ItemStack.getItemSpriteNumber());

            par2TextureManager.bindTexture(resourcelocation);

 

            if (object == null)

            {

                object = ((TextureMap)Minecraft.getMinecraft().getTextureManager().getTexture(resourcelocation)).getAtlasSprite("missingno");

            }

 

            l = par3ItemStack.getItem().getColorFromItemStack(par3ItemStack, 0);

            f3 = (float)(l >> 16 & 255) / 255.0F;

            f4 = (float)(l >> 8 & 255) / 255.0F;

            f = (float)(l & 255) / 255.0F;

 

            if (this.renderWithColor)

            {

                GL11.glColor4f(f3, f4, f, 1.0F);

            }

 

            GL11.glDisable(GL11.GL_LIGHTING); //Forge: Make sure that render states are reset, ad renderEffect can derp them up.

            GL11.glEnable(GL11.GL_ALPHA_TEST);

 

            this.renderIcon(par4, par5, (IIcon)object, 16, 16);

 

            GL11.glDisable(GL11.GL_ALPHA_TEST);

            GL11.glEnable(GL11.GL_LIGHTING);

 

            if (renderEffect && par3ItemStack.hasEffect(0))

            {

                renderEffect(par2TextureManager, par4, par5);

            }

            GL11.glEnable(GL11.GL_LIGHTING);

        }

 

        GL11.glEnable(GL11.GL_CULL_FACE);

    }

 

I hope you can understand what it does :)

Link to comment
Share on other sites

What the hell are you doing?

That is not a PullRequest...

Also your change is... pointless or I don't get what you want.

A Block does not have NBT. An ItemStack has NBT data and you can access that just fine in your ItemBlock to provide different Icons based on the NBT.

Link to comment
Share on other sites

What the hell are you doing?

That is not a PullRequest...

Also your change is... pointless or I don't get what you want.

A Block does not have NBT. An ItemStack has NBT data and you can access that just fine in your ItemBlock to provide different Icons based on the NBT.

 

This would do it so mutch easyer to make it work!

 

But if it doesn't work I will try other things :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • public class ManaOverlay extends Gui implements IIngameOverlay { private final Minecraft mc; private Font font = null; public int left_height = 39; public int right_height = 49; private RenderGameOverlayEvent eventParent; public static final ResourceLocation GUI_MANA_LOCATION = new ResourceLocation("textures/gui/icons.png"); private static final ManaOverlay INSTANCE = new ManaOverlay(Minecraft.getInstance()); public ManaOverlay(Minecraft p_93005_) { super(p_93005_); this.mc = Minecraft.getInstance(); this.font = mc.font; OverlayRegistry.registerOverlayTop("Mana ", (gui, mStack, partialTicks, screenWidth, screenHeight) -> { boolean isMounted = gui.minecraft.player.getVehicle() instanceof LivingEntity; if (!isMounted && !gui.minecraft.options.hideGui && gui.shouldDrawSurvivalElements()) { setupOverlayRenderState(true, false); renderMana(screenWidth, screenHeight, mStack); } }); } public void setupOverlayRenderState(boolean blend, boolean depthText) { setupOverlayRenderState(blend, depthText, GUI_MANA_LOCATION); } public void setupOverlayRenderState(boolean blend, boolean depthTest, @Nullable ResourceLocation texture) { if (blend) { RenderSystem.enableBlend(); RenderSystem.defaultBlendFunc(); } else { RenderSystem.disableBlend(); } if (depthTest) { RenderSystem.enableDepthTest(); } else { RenderSystem.disableDepthTest(); } if (texture != null) { RenderSystem.enableTexture(); bind(texture); } else { RenderSystem.disableTexture(); } RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); RenderSystem.setShader(GameRenderer::getPositionTexShader); } public static void init() { MinecraftForge.EVENT_BUS.register(INSTANCE); } public void renderMana(int width, int height, PoseStack mStack) { minecraft.getProfiler().push("mana"); Player player = (Player)this.minecraft.getCameraEntity(); RenderSystem.enableBlend(); int left = width / 2 + 91; int top = height - right_height ; boolean unused = false;// Unused flag in vanilla, seems to be part of a 'fade out' mechanic FoodData stats = minecraft.player.getFoodData(); int level = stats.getFoodLevel(); for (int i = 0; i < 10; ++i) { int idx = i * 2 + 1; int x = left - i * 8 - 9; int y = top; int icon = 16; byte background = 0; if (minecraft.player.hasEffect(MobEffects.HUNGER)) { icon += 36; background = 13; } if (unused) background = 1; //Probably should be a += 1 but vanilla never uses this if (player.getFoodData().getSaturationLevel() <= 0.0F && tickCount % (level * 3 + 1) == 0) { y = top + (random.nextInt(3) - 1); } blit(mStack, x, y, 16 + background * 9, 27, 9, 9); if (idx < level) blit(mStack, x, y, icon + 36, 27, 9, 9); else if (idx == level) blit(mStack, x, y, icon + 45, 27, 9, 9); } RenderSystem.disableBlend(); minecraft.getProfiler().pop(); } @Override public void render(ForgeIngameGui gui, PoseStack pStack, float partialTicks, int width, int height) { this.screenWidth = this.minecraft.getWindow().getGuiScaledWidth(); this.screenHeight = this.minecraft.getWindow().getGuiScaledHeight(); eventParent = new RenderGameOverlayEvent(pStack, partialTicks, this.minecraft.getWindow()); if (pre(ALL, pStack)) return; font = minecraft.font; this.random.setSeed(tickCount * 312871L); OverlayRegistry.orderedEntries().forEach(entry -> { try { if (!entry.isEnabled()) return; IIngameOverlay overlay = entry.getOverlay(); if (pre(overlay, pStack)) return; //overlay.render(this, pStack, partialTicks, screenWidth, screenHeight); post(overlay, pStack); } catch(Exception e) { } }); RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); post(ALL, pStack); } private boolean pre(RenderGameOverlayEvent.ElementType type, PoseStack mStack) { return MinecraftForge.EVENT_BUS.post(new RenderGameOverlayEvent.Pre(mStack, eventParent, type)); } private void post(RenderGameOverlayEvent.ElementType type, PoseStack mStack) { MinecraftForge.EVENT_BUS.post(new RenderGameOverlayEvent.Post(mStack, eventParent, type)); } private boolean pre(IIngameOverlay overlay, PoseStack mStack) { return MinecraftForge.EVENT_BUS.post(new RenderGameOverlayEvent.PreLayer(mStack, eventParent, overlay)); } private void post(IIngameOverlay overlay, PoseStack mStack) { MinecraftForge.EVENT_BUS.post(new RenderGameOverlayEvent.PostLayer(mStack, eventParent, overlay)); } private void bind(ResourceLocation res) { RenderSystem.setShaderTexture(0, res); } } Thanks to you, I was able to display it. However, the bar that uses the full stomach ground keeps shaking. I wonder why that is?  
    • It's the "Width on the screen" and "Height on the screen", so in this case the screen width and height.
    • I was able to post the 4 others, so they are on there now.
    • Could be "write", check vanilla for examples, or provide details of which version you're currently on.
    • I am trying to update a mod, and there does not seem to be any save() function in BlockEntity. What do I use instead?
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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