Package net.minecraft.world.level
Class Explosion
java.lang.Object
net.minecraft.world.level.Explosion
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Explosion.BlockInteraction
private final ExplosionDamageCalculator
private final DamageSource
private static final ExplosionDamageCalculator
private final Holder
<SoundEvent> private final boolean
private final ParticleOptions
private final Level
private static final int
private final float
private final RandomSource
private final ParticleOptions
private final Entity
private final it.unimi.dsi.fastutil.objects.ObjectArrayList
<BlockPos> private final double
private final double
private final double
-
Constructor Summary
ConstructorsConstructorDescriptionExplosion
(Level level, Entity source, double x, double y, double z, float radius, boolean fire, Explosion.BlockInteraction blockInteraction) Explosion
(Level level, Entity source, double x, double y, double z, float radius, boolean fire, Explosion.BlockInteraction blockInteraction, List<BlockPos> positions) Explosion
(Level level, Entity source, double x, double y, double z, float radius, List<BlockPos> toBlow, Explosion.BlockInteraction blockInteraction, ParticleOptions smallExplosionParticles, ParticleOptions largeExplosionParticles, Holder<SoundEvent> explosionSound) Explosion
(Level level, Entity source, DamageSource damageSource, ExplosionDamageCalculator damageCalculator, double x, double y, double z, float radius, boolean fire, Explosion.BlockInteraction blockInteraction, ParticleOptions smallExplosionParticles, ParticleOptions largeExplosionParticles, Holder<SoundEvent> explosionSound) -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
addOrAppendStack
(List<com.mojang.datafixers.util.Pair<ItemStack, BlockPos>> drops, ItemStack stack, BlockPos pos) boolean
center()
void
void
explode()
void
finalizeExplosion
(boolean spawnParticles) Does the second part of the explosion (sound, particles, drop spawn)static DamageSource
getDefaultDamageSource
(Level level, Entity source) private static LivingEntity
static float
getSeenPercent
(Vec3 explosionVector, Entity entity) boolean
private ExplosionDamageCalculator
makeDamageCalculator
(Entity entity) float
radius()
-
Field Details
-
EXPLOSION_DAMAGE_CALCULATOR
-
MAX_DROPS_PER_COMBINED_STACK
private static final int MAX_DROPS_PER_COMBINED_STACK- See Also:
-
fire
private final boolean fire -
blockInteraction
-
random
-
level
-
x
private final double x -
y
private final double y -
z
private final double z -
source
-
radius
private final float radius -
damageSource
-
damageCalculator
-
smallExplosionParticles
-
largeExplosionParticles
-
explosionSound
-
toBlow
-
hitPlayers
-
-
Constructor Details
-
Explosion
public Explosion(Level level, @Nullable Entity source, double x, double y, double z, float radius, List<BlockPos> toBlow, Explosion.BlockInteraction blockInteraction, ParticleOptions smallExplosionParticles, ParticleOptions largeExplosionParticles, Holder<SoundEvent> explosionSound) -
Explosion
public Explosion(Level level, @Nullable Entity source, double x, double y, double z, float radius, boolean fire, Explosion.BlockInteraction blockInteraction, List<BlockPos> positions) -
Explosion
public Explosion(Level level, @Nullable Entity source, double x, double y, double z, float radius, boolean fire, Explosion.BlockInteraction blockInteraction) -
Explosion
public Explosion(Level level, @Nullable Entity source, @Nullable DamageSource damageSource, @Nullable ExplosionDamageCalculator damageCalculator, double x, double y, double z, float radius, boolean fire, Explosion.BlockInteraction blockInteraction, ParticleOptions smallExplosionParticles, ParticleOptions largeExplosionParticles, Holder<SoundEvent> explosionSound)
-
-
Method Details
-
getDefaultDamageSource
-
makeDamageCalculator
-
getSeenPercent
-
radius
public float radius() -
center
-
explode
public void explode() -
finalizeExplosion
public void finalizeExplosion(boolean spawnParticles) Does the second part of the explosion (sound, particles, drop spawn) -
addOrAppendStack
-
interactsWithBlocks
public boolean interactsWithBlocks() -
getHitPlayers
-
getIndirectSourceEntityInternal
-
getIndirectSourceEntity
-
getDirectSourceEntity
-
clearToBlow
public void clearToBlow() -
getToBlow
-
getBlockInteraction
-
getSmallExplosionParticles
-
getLargeExplosionParticles
-
getExplosionSound
-
canTriggerBlocks
public boolean canTriggerBlocks()
-