minecraft-src/net/minecraft/world/level/block/Fallable.java
2025-07-04 01:41:11 +03:00

20 lines
709 B
Java

package net.minecraft.world.level.block;
import net.minecraft.core.BlockPos;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.item.FallingBlockEntity;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.state.BlockState;
public interface Fallable {
default void onLand(Level level, BlockPos pos, BlockState state, BlockState replaceableState, FallingBlockEntity fallingBlock) {
}
default void onBrokenAfterFall(Level level, BlockPos pos, FallingBlockEntity fallingBlock) {
}
default DamageSource getFallDamageSource(Entity entity) {
return entity.damageSources().fallingBlock(entity);
}
}