Jump to content

Recommended Posts

Posted

Hey, can somebody pls tell me how to add GrassSeeds?

I tried it with MinecraftForge.addGrassSeed(itemID, metadata, quantity, probability)

but first i don't know what to add under metadata and when i add something like 1 ok 0 or an other int it gives me this error:

 

  Reveal hidden contents

 

The item I want to add is my potatoseed and I tried it with melonseed too and it gaves me the same error. The Error appears when im hitting grass and if i would become the seed

it crashs.

I don't know how to fix it and im new on Forge modding.

I hope somebody can help me,

Bye :D

 

Ps: Sry for my bad English, i hope you can excuse me. :S

Posted

Remember to +256 your item id, Or, more properly: item.itemID is the value you should use.

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

Posted

I cant use item.ItemID it says its not applicabel for Item int int int

and it gives me no error with MinecraftForge.addGrassSeed(1015, 0, 1, 20);

only if i hit grass Minecraft crashs I think I have to add a render for my seed or something like that but

no idea how to do this

Posted

Your item.itemID, that is a number, not a item, and it should work fine.

The problem is your item id is not a valid ID hence the null pointer.

Pass in a proper value {using one of the methods I described before}

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

Posted

Item Etc:

 

  Reveal hidden contents

 

 

ItemSeedsTextureHandler:

 

  Reveal hidden contents

 

Posted
  On 5/22/2012 at 1:21 PM, Rofltoast said:

Item Etc:

 

  Reveal hidden contents

 

 

ItemSeedsTextureHandler:

 

  Reveal hidden contents

 

 

For note, you completely ignored what Lex stated, look at this:

MinecraftForge.addGrassSeed(386,0,1,10);

So you use the shifted itemID of 386, however your item uses this:

public static final Item PotatoSeed = new ItemSeedsTextureHandler(386, mod_Food.Potato.blockID, Block.tilledField.blockID)./*snip*/;

Which is a *non*shifted itemID of 386.

 

As Lex said, you need to use the shifted itemID, either of these will work:

MinecraftForge.addGrassSeed(PotatoSeed.itemID,0,1,10);

MinecraftForge.addGrassSeed(386+256,0,1,10);

 

Remember, Minecraft is stupid with itemIDs, you need to take the stupidity in to account.

  • 2 weeks later...
Posted
  On 5/22/2012 at 1:21 PM, Rofltoast said:

Item Etc:

 

  Reveal hidden contents

 

 

ItemSeedsTextureHandler:

 

  Reveal hidden contents

 

 

 

  Reveal hidden contents

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.