Posted January 9, 201411 yr 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).
January 9, 201411 yr Blocks are only shown as items in NEI. Technically they are ItemBlocks. There is no way it shows duplicates unless you have it programmed somewhere.
January 9, 201411 yr Author 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.
January 9, 201411 yr 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.
January 9, 201411 yr 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.
January 10, 201411 yr Author 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.