Class ServerExplosion
java.lang.Object
net.minecraft.world.level.ServerExplosion
- All Implemented Interfaces:
Explosion
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface Explosion
Explosion.BlockInteraction -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Explosion.BlockInteractionprivate final Vec3private final ExplosionDamageCalculatorprivate final DamageSourceprivate static final ExplosionDamageCalculatorprivate final booleanprivate static final floatprivate final ServerLevelprivate static final intprivate final floatprivate final @Nullable Entity -
Constructor Summary
ConstructorsConstructorDescriptionServerExplosion(ServerLevel level, @Nullable Entity source, @Nullable DamageSource damageSource, @Nullable ExplosionDamageCalculator damageCalculator, Vec3 center, float radius, boolean fire, Explosion.BlockInteraction blockInteraction) -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddOrAppendStack(List<ServerExplosion.StackCollector> stacks, ItemStack stack, BlockPos pos) booleancenter()private voidcreateFire(List<BlockPos> targetBlocks) intexplode()@Nullable Entity@Nullable LivingEntitystatic floatgetSeenPercent(Vec3 center, Entity entity) private voidDeprecated.private voidhurtEntities(List<BlockPos> blocks) private booleanprivate voidinteractWithBlocks(List<BlockPos> targetBlocks) booleanisSmall()level()private ExplosionDamageCalculatormakeDamageCalculator(@Nullable Entity source) floatradius()boolean
-
Field Details
-
EXPLOSION_DAMAGE_CALCULATOR
-
MAX_DROPS_PER_COMBINED_STACK
private static final int MAX_DROPS_PER_COMBINED_STACK- See Also:
-
LARGE_EXPLOSION_RADIUS
private static final float LARGE_EXPLOSION_RADIUS- See Also:
-
fire
private final boolean fire -
blockInteraction
-
level
-
center
-
source
-
radius
private final float radius -
damageSource
-
damageCalculator
-
hitPlayers
-
-
Constructor Details
-
ServerExplosion
public ServerExplosion(ServerLevel level, @Nullable Entity source, @Nullable DamageSource damageSource, @Nullable ExplosionDamageCalculator damageCalculator, Vec3 center, float radius, boolean fire, Explosion.BlockInteraction blockInteraction)
-
-
Method Details
-
makeDamageCalculator
-
getSeenPercent
-
radius
-
center
-
calculateExplodedPositions
-
hurtEntities
Deprecated. -
hurtEntities
-
interactWithBlocks
-
createFire
-
explode
public int explode() -
addOrAppendStack
private static void addOrAppendStack(List<ServerExplosion.StackCollector> stacks, ItemStack stack, BlockPos pos) -
interactsWithBlocks
private boolean interactsWithBlocks() -
getHitPlayers
-
level
-
getIndirectSourceEntity
- Specified by:
getIndirectSourceEntityin interfaceExplosion
-
getDirectSourceEntity
- Specified by:
getDirectSourceEntityin interfaceExplosion
-
getDamageSource
-
getBlockInteraction
- Specified by:
getBlockInteractionin interfaceExplosion
-
canTriggerBlocks
public boolean canTriggerBlocks()- Specified by:
canTriggerBlocksin interfaceExplosion
-
shouldAffectBlocklikeEntities
public boolean shouldAffectBlocklikeEntities()- Specified by:
shouldAffectBlocklikeEntitiesin interfaceExplosion
-
isSmall
public boolean isSmall()
-