Class ExpandExplosion

java.lang.Object
com.blamejared.crafttweaker.natives.world.ExpandExplosion

@ZenRegister public class ExpandExplosion extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    clearToBlow(net.minecraft.world.level.Explosion internal)
    Clears the affected block positions of this Explosion.
    static net.minecraft.world.level.Explosion
    create(net.minecraft.world.level.Level world, double x, double y, double z, float size, boolean causesFire, net.minecraft.world.level.Explosion.BlockInteraction mode, net.minecraft.world.entity.Entity exploder, net.minecraft.world.damagesource.DamageSource source)
     
    static void
    explode(net.minecraft.world.level.Explosion internal)
    Performs the first part of the explosion which is destroying the blocks.
    static void
    finalizeExplosion(net.minecraft.world.level.Explosion internal, boolean spawnParticles)
    Performs the second part of the explosion which is the sound, drops and if enabled the particles.
    static net.minecraft.world.damagesource.DamageSource
    getDamageSource(net.minecraft.world.level.Explosion internal)
    Gets the damage source of this Explosion.
    static Map<net.minecraft.world.entity.player.Player,net.minecraft.world.phys.Vec3>
    getHitPlayers(net.minecraft.world.level.Explosion internal)
    Gets the player knockback map for this Explosion.
    static net.minecraft.world.entity.LivingEntity
    getSourceMob(net.minecraft.world.level.Explosion internal)
    Gets the LivingEntity that caused this Explosion.
    static List<net.minecraft.core.BlockPos>
    getToBlow(net.minecraft.world.level.Explosion internal)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExpandExplosion

      public ExpandExplosion()
  • Method Details

    • create

      public static net.minecraft.world.level.Explosion create(net.minecraft.world.level.Level world, double x, double y, double z, float size, boolean causesFire, net.minecraft.world.level.Explosion.BlockInteraction mode, net.minecraft.world.entity.Entity exploder, net.minecraft.world.damagesource.DamageSource source)
    • explode

      public static void explode(net.minecraft.world.level.Explosion internal)
      Performs the first part of the explosion which is destroying the blocks.
    • finalizeExplosion

      public static void finalizeExplosion(net.minecraft.world.level.Explosion internal, boolean spawnParticles)
      Performs the second part of the explosion which is the sound, drops and if enabled the particles.
      Parameters:
      spawnParticles - Should particles be spawned.
      DocParam:
      spawnParticles true
    • getDamageSource

      public static net.minecraft.world.damagesource.DamageSource getDamageSource(net.minecraft.world.level.Explosion internal)
      Gets the damage source of this Explosion.
      Returns:
      The damage source of this Explosion.
    • getHitPlayers

      public static Map<net.minecraft.world.entity.player.Player,net.minecraft.world.phys.Vec3> getHitPlayers(net.minecraft.world.level.Explosion internal)
      Gets the player knockback map for this Explosion. This map is only populated in Explosion.explode() so calling it before will return nothing. This map is used to calculate the vectors that players around the explosion will be pushed back by.
      Returns:
      A Map of PlayerEntity to Vector3d depicting knockback vectors.
    • getSourceMob

      public static net.minecraft.world.entity.LivingEntity getSourceMob(net.minecraft.world.level.Explosion internal)
      Gets the LivingEntity that caused this Explosion. For example: If the Explosion was caused by TNT, it will return the PlayerEntity that placed it. If the Explosion was caused by a Creeper or another Entity directly, it will return that Entity. If the Explosion was caused by a Ghast fireball, it will return the Ghast. If no Entity caused this Explosion (for example, if the Explosion was caused by TNT in a Desert Temple that generated in the world), then `null` is returned. You may need to cast the returned LivingEntity to not be nullable.
      Returns:
      The LivingEntity that caused this Explosion. `null` if no LivingEntity caused it.
    • clearToBlow

      public static void clearToBlow(net.minecraft.world.level.Explosion internal)
      Clears the affected block positions of this Explosion.
    • getToBlow

      public static List<net.minecraft.core.BlockPos> getToBlow(net.minecraft.world.level.Explosion internal)