Class EntityFallenOnBlockCallback
java.lang.Object
dev.latvian.mods.kubejs.block.callback.EntityBlockCallback
dev.latvian.mods.kubejs.block.callback.EntityFallenOnBlockCallback
-
Field Summary
Fields inherited from class dev.latvian.mods.kubejs.block.callback.EntityBlockCallback
block, entity, level, state -
Constructor Summary
ConstructorsConstructorDescriptionEntityFallenOnBlockCallback(net.minecraft.world.level.Level level, net.minecraft.world.entity.Entity entity, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, float fallHeight) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanapplyFallDamage(float multiplier) booleanapplyFallDamage(float fallHeight, float multiplier) booleanapplyFallDamage(float fallHeight, float multiplier, net.minecraft.world.damagesource.DamageSource damageSource) floatMethods inherited from class dev.latvian.mods.kubejs.block.callback.EntityBlockCallback
getBlock, getEntity, getLevel, getPos, getState, isSuppressingBounce
-
Constructor Details
-
EntityFallenOnBlockCallback
public EntityFallenOnBlockCallback(net.minecraft.world.level.Level level, net.minecraft.world.entity.Entity entity, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, float fallHeight)
-
-
Method Details
-
getFallHeight
-
applyFallDamage
@Info("Applies default fall damage to the entity.\nNote this does not force it, so entities that do not take fall damage are not affected.\n") public boolean applyFallDamage() -
applyFallDamage
@Info("Applies fall damage to the entity, multiplier by the multiplier.\nNote this does not force it, so entities that do not take fall damage are not affected.\n") public boolean applyFallDamage(float multiplier) -
applyFallDamage
@Info("Applies fall damage to the entity as if they had fallen from the provided height, and multiplies it by the provided multiplier.\nNote this does not force it, so entities that do not take fall damage are not affected.\n") public boolean applyFallDamage(float fallHeight, float multiplier) -
applyFallDamage
@Info("Damages the entity using the provided damage source, using the fall height and multiplier to calculate the damage amount.\nNote this does not force the damage, so entities that do not take fall damage are not affected.\n") public boolean applyFallDamage(float fallHeight, float multiplier, net.minecraft.world.damagesource.DamageSource damageSource)
-