Jump to content

Block with specific items for placing them show up twice in NEI


Recommended Posts

Posted

Is there any way to fix this without using the NEI API?

 

I have a set of custom door blocks and items for placing them, and NEI wants to list both blocks AND their items (which it interestingly enough does not do with vanilla doors).

Posted

What do you mean?

 

Each door has an Item and an associated Block. This is how vanilla does doors.

 

When you use the item, the associated block is placed.

Posted

Blocks are the in-world representation. ItemBlocks are the thing in your inventory. They are the item form of the blocks. Blocks cannot be placed in an inventory, only their item form. NEI also only shows a block's item form.

Posted

If you have an item to place your block, it should extend ItemBlock and its class should be registered with your block.

GameRegistry.registerBlock(Block, Class<?extends ItemBlock>, String);

You also don't need to initialize and register this item yourself.

Posted

Edit: The bug is fixed. Now I have another problem.

 

Previously my doors had an Item an a Block. The Block had a texture consisting of two pieces and the item had another texture that was flat projected like vanilla doors.

 

However, now that I changed the Item to an ItemBlock, it now uses the lower Block texture. This is not right at all! I even pass the ItemBlock the texture it SHOULD use, but it seems to override it.

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.