Package net.minecraft.server

Examples of net.minecraft.server.Explosion


  }

  @Override
  public void ignite(org.bukkit.World world, int x, int y, int z) {
    World worldhandle = CommonNMS.getNative(world);
    Explosion ex = new Explosion(worldhandle, null, x, y, z, (float) 4.0);
    BlockRef.ignite.invoke(handle, worldhandle, x, y, z, ex);
  }
View Full Code Here


  public static void damage(org.bukkit.entity.Entity entity, DamageCause cause, double damage) {
    DamageSource source;
    if (cause == DamageCause.BLOCK_EXPLOSION) {
      Location loc = entity.getLocation();
      World worldhandle = CommonNMS.getNative(loc.getWorld());
      Explosion ex = new Explosion(worldhandle, null, loc.getX(), loc.getY(), loc.getZ(), (float) 4.0);
      source = DamageSource.explosion(ex);
    } else if (cause == DamageCause.CONTACT) {
      source = DamageSource.CACTUS;
    } else if (cause == DamageCause.DROWNING) {
      source = DamageSource.DROWN;
View Full Code Here

  public static Object forThornsDamage(Entity damagedEntity) {
    return DamageSource.a(CommonNMS.getNative(damagedEntity));
  }

  public static Object forExplosion(Entity explodableEntity) {
    Explosion expl = null;
    if (explodableEntity != null) {
      expl = new Explosion(null, CommonNMS.getNative(explodableEntity), 0.0, 0.0, 0.0, 0.0f);
    }
    return DamageSource.explosion(expl);
  }
View Full Code Here

TOP

Related Classes of net.minecraft.server.Explosion

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.