Jump to content

Render Error


hotrods20

Recommended Posts

I found a render error with blocks over the ID of 255.  I will attach a picture showing what happened.

What happens is that the default block renderer stops rendering blocks as blocks after it hits 255.

The code that proves this:

if (par2ItemStack.itemID < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[par2ItemStack.itemID].getRenderType()))

The problem can be solved by changing the 256 in this and several other places to 4096.  I will also attach a zip containing a modified source that fixes these errors and makes the renderer actually display blocks as blocks.

This will not produce a error report but will cause a GUI error that makes mod developers not want to use higher IDs because they will not render in your GUI properly.

 

In the picture you can see a flat object in my characters hand.  This is supposed to render as a block but will not unless you have the renderer properly set up.

2012-06-24_18_52_02.png.597f2f1d06f2ceea98015d78b306b7c1.png

width=320 height=64http://www.slothygaming.com/img/ota.png[/img]

If your grammar is shit and you blatantly don't know what you're doing, I will not help you.

Link to comment
Share on other sites

Update your forge, the version you're using doesn't support 4096.

If you updated properly this wouldn't happen.

Also note, that changin that 256 to 4096 is NOT a proper solution as it fucks up vanilla items.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

That code is part of the default Minecraft.  Have you tried using s mod_ file along with custom textures?

mod_airSpread

package net.minecraft.src;

import net.minecraft.src.forge.*;

public class mod_airSpread extends BaseMod {

    public static final Block airSpreader = (BlockAirSpreader)(new BlockAirSpreader(3000)).setHardness(0.6F).setStepSound(Block.soundGlassFootstep).setLightOpacity(3).setBlockName("airSpreader");
    
    @Override
    public String getVersion() {
        return "1.0.0";
    }

    @Override
    public void load() {
        
        ModLoader.registerBlock(airSpreader);
        ModLoader.addName(airSpreader, "Air Spreader");
        MinecraftForgeClient.preloadTexture("/hotrods20/terrain1.png");
        ModLoader.addRecipe(new ItemStack(airSpreader, 4), new Object[] {"CBC", " S ", "CBC", 'C', Block.cactus, 'B', Block.mushroomBrown, 'S', Item.sugar});
        
    }
    
}

 

BlockAirSpreader:

package net.minecraft.src;

import java.util.Random;
import net.minecraft.src.forge.*;

public class BlockAirSpreader extends Block implements ITextureProvider
{
    protected BlockAirSpreader(int par1)
    {
        super(par1, Material.grass);
        this.blockIndexInTexture = 0;
        this.setTickRandomly(true);
    }

    public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
    {
        if (!par1World.isRemote)
        {
                for (int var6 = 0; var6 < 4; ++var6)
                {
                    int var7 = par2 + par5Random.nextInt(3) - 1;
                    int var8 = par3 + par5Random.nextInt(5) - 3;
                    int var9 = par4 + par5Random.nextInt(3) - 1;
                    int var10 = par1World.getBlockId(var7, var8 + 1, var9);

                    if (par1World.getBlockId(var7, var8, var9) == 0)
                    {
                        par1World.setBlockWithNotify(var7, var8, var9, mod_airSpread.airSpreader.blockID);
                    }
                }
        }
    }
    
    public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
    {
        return super.shouldSideBeRendered(par1IBlockAccess, par2, par3, par4, 1 - par5);
    }
    
    public int getRenderBlockPass()
    {
        return 1;
    }
    
    public boolean isOpaqueCube()
    {
        return false;
    }
    
    public String getTextureFile()
    {
        return "/hotrods20/terrain1.png";
    }
}

 

I assume you got your own textures.

width=320 height=64http://www.slothygaming.com/img/ota.png[/img]

If your grammar is shit and you blatantly don't know what you're doing, I will not help you.

Link to comment
Share on other sites

Yes I have tried it, along with custom textures and a plethora of custom items/block.

They all work fine.

Also, thats some horrible design in that mod...

And the fact that you even think that it would make a difference where the block is from shows you don't understand what you're talking about.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

I am not going to fight over this.  You have control here and eventually you'll just lock the topic.  My mod won't work along with others and I will let you deal with it.  Maybe you installed a part of my build.  Did you check to see if the render code was different in other parts?  Maybe you are using one different from the recommended build.

width=320 height=64http://www.slothygaming.com/img/ota.png[/img]

If your grammar is shit and you blatantly don't know what you're doing, I will not help you.

Link to comment
Share on other sites

I am not going to fight over this.  You have control here and eventually you'll just lock the topic.  My mod won't work along with others and I will let you deal with it.  Maybe you installed a part of my build.  Did you check to see if the render code was different in other parts?  Maybe you are using one different from the recommended build.

 

YOu updated to the latest ForgE?

Link to comment
Share on other sites

Mind if I ask why not use the recommended build.  I base my error on what normal players will see.  They will see a render problem because most people will just download the latest stable build and pay no mind to the 'latest' build.  May I recommend something that says not using the 'latest' build may cause render problems or something else.  I like most users will just get the recommended cause EVERYONE uses that.

width=320 height=64http://www.slothygaming.com/img/ota.png[/img]

If your grammar is shit and you blatantly don't know what you're doing, I will not help you.

Link to comment
Share on other sites

Please understand the fucking basic release structure.

You introduce a new feature

You test it

After being tested you release it

 

EXA in forge:

You introduce a new feature: 4096, marked as latest/build

You test it: People download the latest, if bugs are found, you make new builds

After being tested you release it: People test and find that it works, promote to recommended.

 

If you build against something that isn't marked as the recommended build, you just tell your users, 'Get build ###+'

That's why we use build numbers, instead of arbitrary numbers.

 

And your excuse of 'Maybe you installed a part of my build.', that's just asinine, do you REALLY think i'm that stupid. do you REALLY think that I would install something of yours and then decompile it and run it in my dev env? And on top of that, mistake it for my own code? Really.. really.. you think i'm THAT stupid?

 

You should be smart enough to understand that if you're suggesting something you should check the latest version to see if we are already doing it.

 

It's like going to blizzard after seeing the cata announcements.

And saying, 'Hey you know what you should do, add a dragon!' 'Oh you day you did, are you SRUE you did, cuz in my version you didn't'

 

 

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

I don't think you are "stupid" but anything is possible.  I have worked with plenty of other.  Shit can happen and people's code and get mixed.  You just don't always know.  I barely know you and you barely know me.  So, I don't know if you could mix it up or not.  It happens sometimes.  I am just saying that.  You insist on flipping out about a little guess.  I guess I am done bothering with this cause I said I wouldn't argue anymore.  Have fun being big man McGee.  I got better things to do.  Just don't assume everyone is going to use the latest build like you do.  Some of us try to stick as close to recommended as possible.

width=320 height=64http://www.slothygaming.com/img/ota.png[/img]

If your grammar is shit and you blatantly don't know what you're doing, I will not help you.

Link to comment
Share on other sites

Its fairly straight forward:

If you're a average user, use the recommended build unless a mod you use specifically tells you to use something higher.

If you're a modder: Use the recommended build if you don't care about anything new, but if you do, to you're wanting to suggest something/report a bug. Verify that what you're suggesting/reporting hasn't already been fixed in the latest.

 

How is that difficult to understand?

As for flipping out, I'm just really getting tired explaining basic logic to you.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

Well, I didn't know that it was already planned.  May I recommend something that may say something along the lines of:

Major Features Planned:

Stuff1

Stuff2

Increase block limit and fix render.

Stuff 4

Stuff 5

 

It would simplify it a little bit.  Maybe even put a thing on the home page for all modders to read that tells them to see "enter topic here" about all the features that are planned.

width=320 height=64http://www.slothygaming.com/img/ota.png[/img]

If your grammar is shit and you blatantly don't know what you're doing, I will not help you.

Link to comment
Share on other sites

Yes, exactly that but make it so it points it out on the main page.  You would have less stress if you put a link to those in the News part on the main page or something along those lines.  That would save you time explaining what is planned and what is implemented.

width=320 height=64http://www.slothygaming.com/img/ota.png[/img]

If your grammar is shit and you blatantly don't know what you're doing, I will not help you.

Link to comment
Share on other sites

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.



×
×
  • Create New...

Important Information

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