Closed lingyunmo closed 8 months ago
The changes introduced a thirst mechanic to the Lanthanum mod, including a HUD overlay, key bindings, and networking packets for thirst data synchronization. The mod version was updated, and the project dependencies were expanded to include an energy module. Some adjustments were made to the GemstoneToolMaterials
and LanthanumToolMaterials
enums.
File | Change |
---|---|
build.gradle |
Added teamreborn:energy:3.0.0 to project dependencies. |
src/main/java/cn/bzlom/lanthanum/.../Lanthanum.java |
Added import statements, registered PlayerTickHandler , and called ModMessage.registerS2CPackets() . |
src/main/java/cn/bzlom/lanthanum/.../LanthanumClient.java |
New class implementing ClientModInitializer , registering key input handler, C2S packets, and a HUD render callback. |
src/main/java/cn/bzlom/lanthanum/client/.../ThirstHudOverlay.java |
New class implementing HudRenderCallback , rendering a thirst HUD overlay. |
src/main/java/cn/bzlom/lanthanum/event/.../KeyInputHandler.java |
New class registering a key binding for "drink water" action and sending a network message when the key is pressed. |
src/main/java/cn/bzlom/lanthanum/event/.../PlayerTickHandler.java |
New class implementing ServerTickEvents.StartTick , removing thirst from players randomly. |
src/main/java/cn/bzlom/lanthanum/item/.../GemstoneToolMaterials.java |
Made constructor accessible outside the enum and updated getRepairIngredient method return type. |
src/main/java/cn/bzlom/lanthanum/item/.../LanthanumToolMaterials.java |
Made constructor accessible outside the enum and updated getRepairIngredient method return type. |
src/main/java/cn/bzlom/lanthanum/mixin/.../ModEntityDataSaverMixin.java |
New mixin class for Entity , introducing a private field persistentData and overriding getPersistentData method. |
src/main/java/cn/bzlom/lanthanum/networking/.../ModMessage.java |
New class registering packet receivers for DRINKING_ID and THIRST_SYNC_ID . |
src/main/java/cn/bzlom/lanthanum/networking/packet/.../DrinkingC2SPacket.java |
New class handling the reception of a packet, checking for nearby water, and updating player's thirst level. |
src/main/java/cn/bzlom/lanthanum/networking/packet/.../ThirstSyncDataS2CPacket.java |
New class handling the reception of a packet and updating player's thirst level in persistent data. |
src/main/java/cn/bzlom/lanthanum/utils/.../IEntityDataSaver.java |
New interface declaring getPersistentData() method. |
src/main/java/cn/bzlom/lanthanum/utils/.../ThirstData.java |
New class with methods to add, remove, and sync thirst. |
gradle.properties |
Updated mod version from 0.0.16 to 0.0.17. |
🍂 As autumn leaves fall, we code away, 🍁
Adding thirst to our game, a new mechanic to play. 💧
With a key to drink and a HUD to display, 🖥️
We've made our mod a tad more fey. 🎮
So here's to the coders, working night and day, 🌙
Making games better in every way. 🌟
On this day in history, a rabbit might say, 🐇
"Let's celebrate our progress, hip hip hooray!" 🎉
…t also update the version
Summary by CodeRabbit
GemstoneToolMaterials
andLanthanumToolMaterials
enums.Lanthanum.java
.