Jump to content

[1.7.2] Ghost item in container


iLexiconn

Recommended Posts

I try to make (like the furnace) a changing front texture when used, But when I use this code is the block class:

http://pastebin.com/NbEG3kwD

 

And call it like so (in the tileentity):

http://pastebin.com/ysC45QXK

 

The item flops out of the container and leaves a ghost item, you can't drop it, place it, nothing. Can someone help me with this problem, please?

Link to comment
Share on other sites

Ghost Items normally exist because their ItemStack is existing but has an ItemCount of 0 or the Item is existing on the client but not on the Server. Make sure to set the ItemStack = null when you delete the item and not just remove a number from the count and make sure to sync the TileEntity with the client my using methods such as onDataPacket() and getDescriptionPacket() in your TileEntity. These will be called when the block gets updated (world.markBlockForUpdate) and are used to send a Packet of NBT Data to the Client for rendering purposes. The commonly used packet class is S35PacketUpdateTileEntity.class.

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

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.

Announcements



×
×
  • Create New...

Important Information

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