Is there a way to set primed tnt

Discussion in 'Plugin Development' started by darknesschaos, Jan 18, 2011.

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

    darknesschaos

    as the title says.

    in hMod it was:

    Code:
    cx localcx = new cx(player.getEntity().l, (float)player.getX(), (float)player.getY() + 0.5F, (float)player.getZ());
    localcx.a = 60;
    player.getEntity().l.a(localcx);
    Will this work for bukkit? probably not.

    edit-----
    In the docs, this is what I see:

    Code:
    00033     public void a_(World world, int i, int j, int k) {
    00034         EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (float) i + 0.5F, (float) j + 0.5F, (float) k + 0.5F);
    00035
    00036         entitytntprimed.a = world.l.nextInt(entitytntprimed.a / 4) + entitytntprimed.a / 8;
    00037         world.a(((Entity) (entitytntprimed)));
    00038     }
    
    But now I want to figure how to set the fuse, unless I missed that.


    edit------again....
    Then I saw this.
    Code:
    00040     public void a(World world, int i, int j, int k, int l) {
    00041         if (world.z) {
    00042             return;
    00043         } else {
    00044             EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (float) i + 0.5F, (float) j + 0.5F, (float) k + 0.5F);
    00045
    00046             world.a(((Entity) (entitytntprimed)));
    00047             world.a(((Entity) (entitytntprimed)), "random.fuse", 1.0F, 1.0F);
    00048             return;
    00049         }
    00050     }
    00051 }
    
    hmm, now to test this later.
     
  2. Offline

    Raphfrk

    One way to "hack" it would be to spawn a fire block above the TNT.
     
  3. Offline

    darknesschaos

  4. Offline

    Archelaus

  5. Offline

    darknesschaos

    so the only way to do it is to "hack" it like how raphfrk said?
     
  6. Offline

    Archelaus

    It appears so. I'll look into it and see if there is any other way.
     
Thread Status:
Not open for further replies.

Share This Page