Jump to content

Problem with updateEntity()


Jantomedes

Recommended Posts

As for

 

when I place a new block it is updating even after destroying the block

This snippet should resolve the issue

onUpdate()
{
if(worldObj.getBlockID(xCoord,yCoord,zCoord)!= YourBlock.blockID)
{
	invalidate();
}

 

To resolve issues with TileEntity not being save, first:

 

override hasTileEntity in BlockChainReactive (return true)

 

and put

 

GameRegistry.registerTileEntity(TileEntityChainReactiveRock.class, "TileEntityChainReactiveRock"); 

 

int Your mod load method.

 

Does this work?

Link to comment
Share on other sites

I added the snippet and it's working.

 

I also overrided the method (registration I already had :)) but blocks still don't update after loading a world. I have to place them again to start them counting.

 

Do you have any ideas?

 

Anyway, thanks a lot ;-)

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.



×
×
  • Create New...

Important Information

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