Skip to content

Commit

Permalink
fix: corrected Cryogenic Chamber cooldown to display the number of se…
Browse files Browse the repository at this point in the history
…conds rather than ticks
  • Loading branch information
Roelymole committed Dec 31, 2024
1 parent 08cb26c commit 90f25b3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import net.minecraft.network.chat.Component;
import net.minecraft.util.RandomSource;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.TickRateManager;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
Expand Down Expand Up @@ -64,6 +65,7 @@ public class CryogenicChamberBlock extends BaseEntityBlock implements MultiBlock
public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING;
public static final BooleanProperty OCCUPIED = BlockStateProperties.OCCUPIED;
private static final VoxelShape SHAPE = Shapes.box(0, 0, 0, 1, 3, 1);
public static final TickRateManager TICKS = new TickRateManager();

public CryogenicChamberBlock(Properties properties) {
super(properties);
Expand Down Expand Up @@ -214,7 +216,7 @@ public InteractionResult multiBlockUseWithoutItem(BlockState baseState, Level le
level.setBlockAndUpdate(basePos, baseState.setValue(OCCUPIED, false));
});
} else {
player.displayClientMessage(Component.translatable(Translations.Chat.CHAMBER_HOT, player.getCryogenicChamberCooldown()), false);
player.displayClientMessage(Component.translatable(Translations.Chat.CHAMBER_HOT, (int)(player.getCryogenicChamberCooldown() / TICKS.tickrate())), false);
}

return InteractionResult.SUCCESS;
Expand Down

0 comments on commit 90f25b3

Please sign in to comment.