Class NonEntityDamagingExplosion

java.lang.Object
net.minecraft.world.explosion.Explosion
io.github.xrickastley.sevenelements.util.NonEntityDamagingExplosion

public class NonEntityDamagingExplosion extends Explosion
A class for explosions that don't damage entities.
  • Field Details

    • world

      private World world
    • x

      private double x
    • y

      private double y
    • z

      private double z
    • entity

      @Nullable private @Nullable Entity entity
    • power

      private float power
    • behavior

      private ExplosionBehavior behavior
    • affectedBlocks

      private it.unimi.dsi.fastutil.objects.ObjectArrayList<BlockPos> affectedBlocks
    • affectedPlayers

      private Map<PlayerEntity,Vec3d> affectedPlayers
    • affectedEntities

      private List<Entity> affectedEntities
  • Constructor Details

    • NonEntityDamagingExplosion

      public NonEntityDamagingExplosion(World world, @Nullable @Nullable Entity entity, double x, double y, double z, float power, List<BlockPos> affectedBlocks)
    • NonEntityDamagingExplosion

      public NonEntityDamagingExplosion(World world, @Nullable @Nullable Entity entity, double x, double y, double z, float power, boolean createFire, Explosion.DestructionType destructionType, List<BlockPos> affectedBlocks)
    • NonEntityDamagingExplosion

      public NonEntityDamagingExplosion(World world, @Nullable @Nullable Entity entity, double x, double y, double z, float power, boolean createFire, Explosion.DestructionType destructionType)
    • NonEntityDamagingExplosion

      public NonEntityDamagingExplosion(World world, @Nullable @Nullable Entity entity, @Nullable @Nullable ExplosionBehavior behavior, double x, double y, double z, float power, boolean createFire, Explosion.DestructionType destructionType)
  • Method Details

    • collectBlocksAndPushEntities

      public void collectBlocksAndPushEntities()
      Another version of Explosion.collectBlocksAndDamageEntities(), but pushes entities (applies velocity) instead of damaging them.
    • getAffectedEntities

      public List<Entity> getAffectedEntities()
    • supplyFromAccessor

      private void supplyFromAccessor()