Infinite fire ticks

Discussion in 'Plugin Development' started by NemesisMate, Aug 28, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    NemesisMate

    I would like to set a mob on infinite fire, is there a way to do that?

    Thanks for any help.
     
  2. Offline

    chasechocolate

    entity.setFireTicks(Integer.MAX_VALUE).
     
  3. Offline

    NemesisMate

    That is not too laggy?,

    On view you are the same author about this, could you take a look to that question too?, thanks.
     
  4. Offline

    Qwertyness_

    If you don't want to rely on that huge tick setting, you could set up a scheduler task to just reapply the fire very so often...
    Code:
    public class ExampleClass extends BukkitRunnable {
        Player player;
        public ExampleClass(Player person) {
            player = person;
        }
        public void run () {
            player.setFireTicks(1200);//1 minute or fire
        }
    }
    And then just put this where you want to start the event in your code:
    Code:
    BukkitTask task = new ExampleTask(player).runTaskTimer(Your_Plugin, delay, interval)
    In the code I gave, you would want to set the interval for 1200 (that's when the fire ticks would run out)
     
Thread Status:
Not open for further replies.

Share This Page