Jump to content

Server and Client creating two different TileEntities in one block


Magalter

Recommended Posts

Hi, i've created a new furnace in my forge mod and its simply a copy of the normal furnace, except it is a multiblock. so the problem is: when my new furnace block is placed in the world both client and server create a tileEntity for that block and place them at the specific location. now when opening the gui the  progress bars refer to one tileEntity which isn't updating while the burning process itself is done by an correctly working tileEntity. why are there 2 of them in one block?

Link to comment
Share on other sites

you can force it to send an update of the TE.

worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);

 

(and no, normally it synchronizes TEs more frequently, not only on a chunk load.)

mnn.getNativeLang() != English

If I helped you please click on the "thank you" button.

Link to comment
Share on other sites

diesieben07 is of course right, you should only force this if you have something important to update like furnace changes texture (~starts/stops wokring). definitely do not sync progress of cooking every tick. vanilla furnace is a great example of the GUI (it's not too hard to implement synchronization of integer variables of TE using same technique). it will only differ from your solution in furnace changin texture - you'll do it with TE's sync packet or by changing metadata, not by replacing a block like the vanilla funace does.

mnn.getNativeLang() != English

If I helped you please click on the "thank you" button.

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.