No Fall damage on EntropyBlock
This commit is contained in:
@@ -59,6 +59,7 @@ Weapons
|
||||
- Thot Begon
|
||||
- Ahab's Harpoon
|
||||
- Soul Crusher (Removes Eternal Armor)
|
||||
- Combustable Lemon
|
||||
|
||||
Blocks
|
||||
X Deep Slate Entropy Ore
|
||||
|
||||
@@ -74,6 +74,16 @@ public class EntropyBlock extends Block {
|
||||
return stack.isIn(ModTags.Items.ENTROPY_CONVERTABLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLandedUpon(World world, BlockState state, BlockPos pos, Entity entity, float fallDistance) {
|
||||
// Never take fall damage
|
||||
if (entity.bypassesLandingEffects()) {
|
||||
super.onLandedUpon(world, state, pos, entity, 0);
|
||||
} else {
|
||||
entity.handleFallDamage(fallDistance, 0.0F, world.getDamageSources().fall());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appendTooltip(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType options) {
|
||||
tooltip.add(Text.translatable("tooltip.acesbs.entropy_block.tooltip"));
|
||||
|
||||
Reference in New Issue
Block a user