Jump to content

How do i get a block update


Nomis

Recommended Posts

How do you get a block update from one of the blocks you have made.

 

What is the method called:

 

Example

 

public class blockStuff extends Block {
    public void BlockUpdateMethod() {
        //My Code
    }
}

 

Author of the unreleased mod Factory Craft

I'm usually known as MnomisC

IGN MnomisC

Link to comment
Share on other sites

You could use world.scheduleBlockUpdate(), use the onNeighborChanged if you want to update the block while the neighbor blocks are updated (added, removed). If you want a constant tick, I suggest using a tileentity and inside the TileEntity class, add the updateEntity() method. That updates once every tick and is used to make furnaces and other machine update their progress bars and cooking.

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.