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.BlockInteractionprivate final ExplosionDamageCalculatorprivate final DamageSourceprivate static final ExplosionDamageCalculatorprivate final Holder<SoundEvent> private final booleanprivate final ParticleOptionsprivate final Levelprivate static final intprivate final floatprivate final RandomSourceprivate final ParticleOptionsprivate final Entityprivate final it.unimi.dsi.fastutil.objects.ObjectArrayList<BlockPos> private final doubleprivate final doubleprivate 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 voidaddOrAppendStack(List<com.mojang.datafixers.util.Pair<ItemStack, BlockPos>> pDrops, ItemStack pStack, BlockPos pPos) booleancenter()voidvoidexplode()voidfinalizeExplosion(boolean pSpawnParticles) Does the second part of the explosion (sound, particles, drop spawn)static DamageSourcegetDefaultDamageSource(Level pLevel, Entity pSource) private static LivingEntitygetIndirectSourceEntityInternal(Entity pSource) static floatgetSeenPercent(Vec3 pExplosionVector, Entity pEntity) booleanprivate ExplosionDamageCalculatormakeDamageCalculator(Entity pEntity) floatradius()
-
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()
-