lingyunmo / Lanthanum

"Lanthanum" is a Minecraft mod created with Fabric.It is a project driven by personal interest and is available for Minecraft version 1.19.4.
MIT License
1 stars 2 forks source link

[Bug Fix] Fix issue #32 #33

Closed DavidPisces closed 7 months ago

DavidPisces commented 7 months ago
  1. Fix issue #32.The thirsty hud can draw correctly.
  2. Fix method of full thirsty texture drawing.
  3. Add game mode judgement.Creative mode will not draw thirsty texture.

Summary by CodeRabbit

coderabbitai[bot] commented 7 months ago

Walkthrough

The update introduces a dynamic thirst feature to the ThirstHudOverlay class in the Lanthanum client. It checks the player's creative mode abilities and retrieves the thirst value from persistent data. The thirst texture is then drawn based on this value, using the IEntityDataSaver interface for data access.

Changes

File Path Change Summary
.../lanthanum/client/ThirstHudOverlay.java The onHudRender method now checks for the player's creative mode abilities, retrieves the thirst value from persistent data, and draws the thirst texture dynamically. It uses the IEntityDataSaver interface for data access.

Poem

🍂 As the leaves fall this November day, 🍁

A thirst feature in Lanthanum finds its way. 💧

Creative mode checks and dynamic draw, 🎨

In the world of code, we stand in awe. 🌍

With IEntityDataSaver in our hand, 📚

We traverse the data of the game land. 🎮

So here's to the coders, in light or in dark, 💻

Lighting up the virtual world with their spark. ✨


Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - If you reply to a *review comment* from CodeRabbit, the bot will automatically respond. - To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment - Note: Review comments are made on code diffs or files, not on the PR overview. - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai help` to get help. - `@coderabbitai resolve` to resolve all the CodeRabbit review comments. Note: For conversation with the bot, please use the review comments on code diffs or files. ### CodeRabbit Configration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - The JSON schema for the configuration file is available [here](https://coderabbit.ai/integrations/coderabbit-overrides.v2.json). - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json`