[Change] Helper for underwater survival hints
This commit is contained in:
parent
4f934cdaf0
commit
07f8bce1dc
4 changed files with 23 additions and 0 deletions
|
@ -59,6 +59,18 @@ public interface SurvivesOnSpecialGround extends SurvivesOn {
|
|||
}
|
||||
}
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public static void appendHoverTextUnderwater(List<Component> list) {
|
||||
list.add(Component.translatable("tooltip.bclib.place_underwater")
|
||||
.withStyle(ChatFormatting.GREEN));
|
||||
}
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public static void appendHoverTextUnderwaterInDepth(List<Component> list, int depth) {
|
||||
list.add(Component.translatable("tooltip.bclib.place_underwater_depth", depth)
|
||||
.withStyle(ChatFormatting.GREEN));
|
||||
}
|
||||
|
||||
default boolean canSurviveOnTop(LevelReader world, BlockPos pos) {
|
||||
return isSurvivable(world.getBlockState(pos.below()));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue