Jump to content

Recommended Posts

Posted

Lets get the setting.  I am in a class that extends TileEntity and implements both IInventory and ITickable.  CordeCache is a class that extends Item.  I use it to store ItemStack nbt data, BlockPos position.

 

http://pastebin.com/KvbucNNy

 

I have debugged, and stepped through each method. 

On client side, the te is found.

On Server side, the te is not found and equals null.

It uses the same blockpos postions.

 

Is there a reason the the server side cannot find it?

 

Thank you for the great amount of help from this forum.  I would have never gotten this far without it.

 

Posted

Could you please show your full block, and TileEntity class.

I am not a cat. I know my profile picture is sexy and amazing beyond anything you could imagine but my cat like features only persist in my fierce eyes. I might be a cat.

Posted

The reason is very likely what Lex was hinting at: I'm betting you are using your GUI to 'set' the NBT data in your ItemStack, which is not the correct way to do it.

 

Send a packet to the server saying 'player pressed this GUI button' or whatever and let the server determine which coordinates to set in the ItemStack; ItemStack NBT is automatically synchronized from server to client (most other NBT is not, however), so whatever you set on the server will be visible on the client as well.

Posted

Have you made absolutely sure that the positions on both client and server are identical? I recommend checking again with either a debugger or by printing out individual cords with a logger.

I still haven't published a mod because I can never get that in-dev version just right to warrant a public release. And yes, after two years of mod development I am still learning to speak Java.

 

Follow me on GitHub: https://github.com/yooksi

Contact me on Twitter: https://twitter.com/yooksi

Read my Minecraft blog: https://yooksidoesminecraft.blogspot.de/

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.

×
×
  • Create New...

Important Information

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