Jump to content

Recommended Posts

Posted

Hi guys,

 

I was coding some stuff, not very differetn from other times moddig, but I ran into something rather strange.

I create four items, three are working fine, but the last one won't work.

 

I am getting a nullpointerexpeton for the renderIcon methode.

(this is the methode that renders the icon with tessellators)

 

I have no clue of what to do, can anyone help me please?

 

what my console says:

  Reveal hidden contents

 

this is te code for the item that causes the problem

  Reveal hidden contents

 

Coding, Testing, Smiling, Publishing!

Posted

Hi

 

Looks like something is wrong with the icon.

 

        tessellator.addVertexWithUV((double)(par1 + 0), (double)(par2 + par5), (double)this.zLevel, (double)par3Icon.getMinU(), (double)par3Icon.getMaxV());

 

I can't see what from your code.  Are you sure this is the Item causing the problem?

 

You could try adding a test breakpoint to the vanilla code;

 

RenderItem::
    public void renderIcon(int par1, int par2, Icon par3Icon, int par4, int par5)
    {
        if (par3Icon == null) {
          System.out.println("null par3Icon");    // put breakpoint here
          return;
        }
        Tessellator tessellator = Tessellator.instance;
//.. etc..
    }

 

then go up the call stack a couple of calls to see which item it is, and why the icon is null.

 

-TGG

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



×
×
  • Create New...

Important Information

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