Jump to content

Recommended Posts

Posted

You can override onUpdate in your entity class. It's called once per tick while your entity exists so just count the ticks that way. When the counter reaches enough ticks spawn an item at his position.

 

Edit: I will demonstrate when I get home if someone else has not already helped. I'm on my phone atm though.

Posted
    
int timer;
    int delay = 10 * (20 * 60); //10 mins

    @Override
    public void onUpdate() {
        if(!worldObj.isRemote && timer++ >= delay){
            timer=0;
            this.entityDropItem(new ItemStack(Items.slime_ball), 0);
        }
        super.onUpdate();
    }

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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