1.2.2-ALPHA.8
Compatibility
Changes
v1.2.2
This pull request introduces significant improvements to the nametag handling system, focusing on more efficient updates, better event responsiveness, and improved code maintainability. The main changes include separating nametag text updates from full reloads, introducing a periodic "hard reload," and adding event-driven reloads for better accuracy and performance.
Nametag update and reload improvements:
- Added a new
updateNametagTextsmethod to update only the text of nametags periodically, reducing the overhead of full reloads. This is now called on a timer instead ofreloadNametags, which is reserved for full entity reloads. [1] [2] - Introduced a separate
hardReloadTimerthat triggers a full reload of nametags every 60 seconds to ensure state consistency.
Event-driven reload enhancements:
- Implemented a
reloadTimeOutmethod and registered event handlers for player join, quit, death, respawn, world change, teleport, and game mode change, triggering a delayed full reload for accurate nametag updates after significant player events.
Code maintainability and flexibility:
- Made the
NametagEntityclass public and added asetTextmethod, allowing for dynamic updates to nametag text. [1] [2] - Cleaned up and simplified code by removing redundant comments and consolidating imports. [1] [2] [3] [4]
These changes should result in more responsive and efficient nametag updates, better handling of edge cases, and easier future maintenance.
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:Ksss1YfG:FmwDWkMc"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:Ksss1YfG:FmwDWkMc"
}

