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 pLevel, Entity pSource, double pX, double pY, double pZ, float pRadius, boolean pFire, Explosion.BlockInteraction pBlockInteraction) Explosion
(Level pLevel, Entity pSource, double pX, double pY, double pZ, float pRadius, boolean pFire, Explosion.BlockInteraction pBlockInteraction, List<BlockPos> pPositions) Explosion
(Level pLevel, Entity pSource, double pX, double pY, double pZ, float pRadius, List<BlockPos> pToBlow, Explosion.BlockInteraction pBlockInteraction, ParticleOptions pSmallExplosionParticles, ParticleOptions pLargeExplosionParticles, Holder<SoundEvent> pExplosionSound) Explosion
(Level pLevel, Entity pSource, DamageSource pDamageSource, ExplosionDamageCalculator pDamageCalculator, double pX, double pY, double pZ, float pRadius, boolean pFire, Explosion.BlockInteraction pBlockInteraction, ParticleOptions pSmallExplosionParticles, ParticleOptions pLargeExplosionParticles, Holder<SoundEvent> pExplosionSound) -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
addOrAppendStack
(List<com.mojang.datafixers.util.Pair<ItemStack, BlockPos>> pDrops, ItemStack pStack, BlockPos pPos) boolean
center()
void
void
explode()
void
finalizeExplosion
(boolean pSpawnParticles) Does the second part of the explosion (sound, particles, drop spawn)static DamageSource
getDefaultDamageSource
(Level pLevel, Entity pSource) private static LivingEntity
getIndirectSourceEntityInternal
(Entity pSource) static float
getSeenPercent
(Vec3 pExplosionVector, Entity pEntity) boolean
private ExplosionDamageCalculator
makeDamageCalculator
(Entity pEntity) 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 pLevel, @Nullable Entity pSource, double pX, double pY, double pZ, float pRadius, List<BlockPos> pToBlow, Explosion.BlockInteraction pBlockInteraction, ParticleOptions pSmallExplosionParticles, ParticleOptions pLargeExplosionParticles, Holder<SoundEvent> pExplosionSound) -
Explosion
public Explosion(Level pLevel, @Nullable Entity pSource, double pX, double pY, double pZ, float pRadius, boolean pFire, Explosion.BlockInteraction pBlockInteraction, List<BlockPos> pPositions) -
Explosion
public Explosion(Level pLevel, @Nullable Entity pSource, double pX, double pY, double pZ, float pRadius, boolean pFire, Explosion.BlockInteraction pBlockInteraction) -
Explosion
public Explosion(Level pLevel, @Nullable Entity pSource, @Nullable DamageSource pDamageSource, @Nullable ExplosionDamageCalculator pDamageCalculator, double pX, double pY, double pZ, float pRadius, boolean pFire, Explosion.BlockInteraction pBlockInteraction, ParticleOptions pSmallExplosionParticles, ParticleOptions pLargeExplosionParticles, Holder<SoundEvent> pExplosionSound)
-
-
Method Details
-
getDefaultDamageSource
-
makeDamageCalculator
-
getSeenPercent
-
radius
public float radius() -
center
-
explode
public void explode() -
finalizeExplosion
public void finalizeExplosion(boolean pSpawnParticles) 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()
-