Jump to content

Recommended Posts

Posted

Hi I seem to be having problems with Tile Entity's I feel I'm missing something or I may not be just doing it correctly? what seems to be happening is I have a block that extends BlockContainer I have a GUI that sets data to the tileEntity and when I go to read the data from the block itself it returns the default values I think its not being updated on client side? I have little knowledge of tileEntitys but I have looked up as much as I can to try and solve this problem and how they work and still unable to get it working :( if anyone can shed some light on it and why it may not be working would be greatly appreciated thanks

 

WirelessRedstoneMod.class

 

  Reveal hidden contents

 

 

WilessRedstoneBlock.class

 

  Reveal hidden contents

 

 

BlockWirelessRedstoneSender.class

 

  Reveal hidden contents

 

 

GuiWirelessRedstoneSender.class

 

  Reveal hidden contents

 

 

TileEntityWirelessRedstoneSender.class

 

  Reveal hidden contents

 

 

the sender and receiver classes are almost identical and is why I only posted just the sender classes I must state that both the sender and reciever classes are not saving data in the tile entity I'm thinking its just not updating client side but I'm not 100% sure either :(

Posted
  On 3/2/2016 at 3:51 AM, dotdot said:

Hi I seem to be having problems with Tile Entity. I have a block that extends BlockContainer...

Every thread that starts this way gets the same advice: Don't extend BlockContainer. Google these threads, then filter for the most recent month (because there are so many of them here). At least one is on page 1 of this very forum. Read D7's frequent advice on what Block methods to override instead of extending BlockContainer (or implementing ITileEntityProvider).

 

PS: Don't forget to register your TE. Whenever setting any data in your TE, mark it dirty so it is saved. Override (extend) the read and write NBT methods.

 

See how far you can get on that reading and advice. If you then face a crash, come back with a log (in spoiler frame). If it's just not doing what you expect, then step through at least once in a debugger before posting what's happening (versus what you expect).

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

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.