Jump to content

Recommended Posts

Posted

Hmm, with the new 1.5.1 seems my Custom Blocks no longer render in the world....

 

Here is the Code I use:

 

Render Class

package mod_HarkenScythe.client;

import mod_HarkenScythe.common.BlockHSBloodCrucible;
import mod_HarkenScythe.common.BlockHSSoulCrucible;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.EntityRenderer;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.util.Icon;
import net.minecraft.world.IBlockAccess;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import cpw.mods.fml.relauncher.SideOnly;
import mod_HarkenScythe.common.mod_HarkenScythe;

public class RenderHSCrucible implements ISimpleBlockRenderingHandler
{

@Override
public boolean shouldRender3DInInventory() {
	// TODO Auto-generated method stub
	return false;
}

@Override
public int getRenderId() {
	// TODO Auto-generated method stub
	return mod_HarkenScythe.HSCrucibleRenderID;
}


@Override
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer)
{
	// TODO Auto-generated method stub
}

@Override
public boolean renderWorldBlock(IBlockAccess blockAccess, int par2, int par3, int par4, Block par1BlockHSCrucible, int modelId, RenderBlocks renderer)
{
	// TODO Auto-generated method stub

	////Added*********************
	renderer.renderStandardBlock(par1BlockHSCrucible, par2, par3, par4);
        Tessellator tessellator = Tessellator.instance;
        tessellator.setBrightness(par1BlockHSCrucible.getMixedBrightnessForBlock(blockAccess, par2, par3, par4));
        float f = 1.0F;
        int l = par1BlockHSCrucible.colorMultiplier(renderer.blockAccess, par2, par3, par4);
        float f1 = (float)(l >> 16 & 255) / 255.0F;
        float f2 = (float)(l >> 8 & 255) / 255.0F;
        float f3 = (float)(l & 255) / 255.0F;
        float f4;

        if (EntityRenderer.anaglyphEnable)
        {
            float f5 = (f1 * 30.0F + f2 * 59.0F + f3 * 11.0F) / 100.0F;
            f4 = (f1 * 30.0F + f2 * 70.0F) / 100.0F;
            float f6 = (f1 * 30.0F + f3 * 70.0F) / 100.0F;
            f1 = f5;
            f2 = f4;
            f3 = f6;
        }

        tessellator.setColorOpaque_F(f * f1, f * f2, f * f3);
        Icon icon = par1BlockHSCrucible.getBlockTextureFromSide(2);
        f4 = 0.125F;
        renderer.renderSouthFace(par1BlockHSCrucible, (double)((float)par2 - 1.0F + f4), (double)par3, (double)par4, icon);
        renderer.renderNorthFace(par1BlockHSCrucible, (double)((float)par2 + 1.0F - f4), (double)par3, (double)par4, icon);
        renderer.renderWestFace(par1BlockHSCrucible, (double)par2, (double)par3, (double)((float)par4 - 1.0F + f4), icon);
        renderer.renderEastFace(par1BlockHSCrucible, (double)par2, (double)par3, (double)((float)par4 + 1.0F - f4), icon);
        
        Icon icon1;
        if (par1BlockHSCrucible == mod_HarkenScythe.HSBloodCrucible){icon1 = BlockHSBloodCrucible.iconInner;}
        else{icon1 = BlockHSSoulCrucible.iconInner;}
        
        renderer.renderTopFace(par1BlockHSCrucible, (double)par2, (double)((float)par3 - 1.0F + 0.25F), (double)par4, icon1);
        renderer.renderBottomFace(par1BlockHSCrucible, (double)par2, (double)((float)par3 + 1.0F - 0.75F), (double)par4, icon1);
        int i1 = blockAccess.getBlockMetadata(par2, par3, par4);

        if (i1 > 0)
        {
            Icon icon2;
            if (par1BlockHSCrucible == mod_HarkenScythe.HSBloodCrucible){icon2 = BlockHSBloodCrucible.iconLiquid;}
            else{icon2 = BlockHSSoulCrucible.iconLiquid;}

            if (i1 > 10)
            {
                i1 = 10;
            }
            
            renderer.renderTopFace(par1BlockHSCrucible, (double)par2, (double)((float)par3 - 1.0F + (3.6875F + (float)i1 * 1.1F) / 16.0F), (double)par4, icon2);
        }

        return true;
}
}

 

In my Client Proxy

RenderingRegistry.registerBlockHandler(mod_HarkenScythe.HSCrucibleRenderID, new RenderHSCrucible());

 

And in my mod_Class

//Setup Render IDs

    public static int HSCrucibleRenderID = RenderingRegistry.getNextAvailableRenderId();

 

 

The block is there, just invisible...

Posted

I can confirm this. The hook in RenderBlocks that allows for custom rendering of world blocks using new render types seems to have just disappeared in the new version... There's no way Forge would remove such an important feature as this, so I would suggest waiting until a new version comes out and resolves the problem.

Posted

I'm a first-time modder (though not a new programmer) and I was trying to do this the other day and am having the same issue, but I understand that a lot apparently just changed within Minecraft graphics-wise so I figured I'd wait it out. I've been stalking this forum and minecraftforum.net looking for info since then, glad it's not just me.

 

I based the part of my mod (the custom model rendering) I'm having trouble with on this post over at the minecraft forums, which for the most part was really helpful, unless it's just that outdated :P

 

I have the block/item coded properly, but it renders invisibly (or not at all, whichever).

 

I've gone through all sorts of code for existing blocks/items but I am kind of at a loss as to what parts of the vanilla minecraft code are appropriate to use in a forge mod because I've never done this before.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • You can also try to unpack your jar. Find .../forge/fml/mc-version.cfg and ../forge/fml/conf/mcp.cfg config files. If they exist then what server_md5 value are there?
    • Just shows this if this is what you mean:  Data  assets/minecraft/models/item/bamboo_mosaic_slab.json  Data  assets/minecraft/models/item/turtle_helmet_quartz_trim.json  Processor failed, invalid outputs:    /home/aron/.minecraft/libraries/net/minecraft/client/1.20.1-20230612.114412/client-1.20.1-20230612.114412- slim.jar      Expected: de86b035d2da0f78940796bb95c39a932ed84834      Actual:   aea60124ca903ecbb2e825805e318f9d89ac867c    /home/aron/.minecraft/libraries/net/minecraft/client/1.20.1-20230612.114412/client-1.20.1-20230612.114412- extra.jar      Expected: 8c5a95cbce940cfdb304376ae9fea47968d02587      Actual:   76e87dbc119daed8dc1861c17160e0c4b6f34d2e There was an error during installation Also I gave the .jar file full permissions too.
    • I checked the hash like you said and it came back as OK each time, also may I ask what you mean by debug mode during installation?  
    • My name is Clara Bennett, and I almost let cryptocurrency destroy me.  Two years ago, after selling my green e-commerce startup, I plunged headfirst into the crypto world. yield farming , I was all in. I believed I wasn’t just investing; I was participating in the next great technological revolution. Within months, my portfolio skyrocketed to $200,000. I even started sketching ideas for a blockchain-based microloan platform to empower small entrepreneurs around the world. Crypto felt like pure freedom and limitless potential. I thought I was untouchable. I thought wrong. It happened through a single email. It looked like a standard security update from my wallet provider polished, routine, and harmless. I interacted with it briefly, thinking it was legitimate. Hours later, I checked my account and realized my entire wallet had been drained. Every token, every coin, gone. I sat there in disbelief, replaying the moment over and over. I had built my career on being cautious with technology, yet somehow, I had still been compromised. The blockchain’s promise of "irreversible transactions" now felt like a cruel joke  .Devastated and desperate, I scoured forums for solutions. Most people told me there was no hope once crypto is gone, it’s gone. Still, I refused to give up. That’s when I stumbled across FUNDS RETRIEVER ENGINEER . I decided to reach out. From the beginning, they were empathetic, and honest about the challenges. They explained their process step-by-step, focusing on tracing transactions, tracking down phishing operators, and leveraging advanced blockchain analytics. It wasn't an overnight fix. It took weeks of meticulous investigation, technical recovery work, and legal coordination .But in the end, their persistence paid off. FUNDS RETRIEVER ENGINEER  was able to trace the stolen funds across multiple wallets and exchanges. Through a combination of technical expertise and strategic action, they managed to recover the full amount I had lost. Today, my crypto portfolio is intact once again. More importantly, I’ve regained my confidence though I am now much wiser and far more cautious. I learned the hard way that while crypto offers incredible opportunities, it also demands extreme vigilance. Thanks to FUNDS RETRIEVER ENGINEER , I recovered my lost funds and  also reclaimed my future in the digital economy. For help  W H A T S A P P:  +1  8  0 2 9 5 2 3 4 7 0 E   m  a I L       F U N D S R  E T R  I E V E R  [@]  E  N  G  I  N  E  E  R.  C  O  M
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.