MasuHolograms 1.3.0
Curse Maven Snippet
What's new
MasuHolograms 1.3.0
Changes since 1.0.0, the last release on CurseForge. 1.3.0 is a large stability and safety update: crash fixes, crash-safe storage, thread-safe clicks and a cleaned-up lectern system. Existing hologram files load unchanged, and mods using the developer API keep working. Full documentation, including an upgrade guide: https://masuary.github.io/MasuHolograms/
Read before upgrading
- Lectern holograms move into the world folder. Player-made lectern holograms and
lectern-tracker.jsonnow live in<world>/masuholograms/. On the first start each world imports the old files fromconfig/masuholograms/holograms/players/once; the old files are renamed.migrated, never deleted. Admin holograms stay inconfig/masuholograms/holograms/and are shared by every world. - Resetting a world? Remove
config/masuholograms/holograms/players/andconfig/masuholograms/lectern-tracker.json(and their.bak/.migratedcopies) before the first 1.3.0 start on the new world, or the new world imports the old lectern holograms once. - Going back to 1.2.x after running 1.3.0: lectern holograms are then in the world folder and 1.2.x shows none. Rename the
.migratedfiles back, and delete<world>/masuholograms/legacy-import.jsonbefore upgrading again. - Line layout: lines now stack top-down in the order they are written. Icons, heads and entities stand at the bottom of their own band, so a 1.2.x hologram with such lines can appear higher than before: lower the hologram or its line heights.
#PLAYERlines default to height 2.3 and the NPC stands in its own band, so its name tag no longer overlaps the text above it. A saved line from before 1.3.0 keeps height 2.0: raise it with/mh line height <holo> <page> <line> 2.3.- Permissions without a permissions mod: operators (op level 2) now pass hologram and line permissions,
PERMISSIONactions and the lectern limit and bypass nodes. Before, these denied everyone. lang.jsonnow holds only player-facing messages. The old admin keys never worked and are dropped when the file is rewritten;/mhadmin output stays English.- Action indices in
/mh page actionsand/mh page removeactionstart at 1, like lines and pages. - Dependencies: Taterzens must be 1.9.6 to 1.9.x for
#PLAYERlines. Vault Hunters works at any version; a Vault Hunters placeholder that does not match your Vault Hunters version turns itself off with one log line.
New
/mh near [radius]: holograms near you, nearest first, with a clickable teleport./mh stats: hologram, viewer and line counts plus the mod's own tick cost./mh editbook: turns a signed Hologram Book back into an editable one.- Lectern holograms accept unsigned (writable) books too, and Hologram Books have an enchantment glint.
- Every save keeps the previous version of the file as
<name>.json.bak. - Hologram files may sit in subfolders of
holograms/and under any file name; they are saved back where they were loaded. #ICONlines apply{NBT}(like/give); an unknown item shows a barrier and the line commands warn about it.- Developer API:
HologramPage.setLines(List<String>)replaces a page in one update,MasuHologramsAPI.save(hologram)writes at once, andHologramRegisterEvent/HologramUnregisterEventare now posted. - Config: every key in
config.jsonnow works, including thedefault*keys for new holograms and lines,clickCooldownTicks,clickRange,updateVisibilityOnTeleport,allowPlaceholdersInsideAnimationsand the damage display'scriticalFormat.
Fixed: crashes and data loss
- A malformed colour code in a lectern book or hologram file could crash the server, also on every later start.
- Players could write line types (
#PLAYER:,#ENTITY:) into lectern books. Books are now an allow-list: plain text and colour codes only. #PLAYERlines crashed servers without Taterzens; Vault Hunters placeholders could stop a server with a different Vault Hunters version.- A typo in
config.jsonorlang.jsonstopped the server from starting. The file is now left untouched and the defaults are used. - Saves were not atomic and not awaited, so a stop or crash during a write could lose a hologram. Every write now goes to a temporary file that is moved into place, the server waits for pending writes at stop, and an interrupted save is finished or rolled back at the next start.
- Holograms created or changed by other mods through the API were only saved at a clean stop.
- A bad animation file (speed 0, empty colour list) or
update-interval0 crashed the tick loop. - A corrupt
lectern-tracker.jsonwas replaced by an empty one; it is now kept and its.bakused. - One broken line no longer stops other holograms: it is turned off and logged once.
Fixed: behaviour
- Click actions ran on the network thread; they now run on the server thread.
- One click fired up to four times, from any distance and with no cooldown. Clicks now count once, within
clickRange(6 blocks) and with a per-player cooldown. - Ghost entities after removing or swapping pages and changing a line's type.
- API changes to a visible hologram now reach players who already see it.
/mh reloadregistered the lectern, damage and healing features twice (double popups).- Damage and healing popups vanished at once; they now last
durationTicksand float above tall mobs. - Healing popups showed heals other mods cancelled, more than the missing health, and every natural regeneration tick.
TELEPORTandSOUNDactions with namespaced ids (minecraft:overworld,minecraft:entity.x) did nothing.MESSAGEactions now replace{player};NEXT_PAGEandPREV_PAGEwrap around./mh hologram clonecopies actions, scale and forced look;addactionrefuses an unknown action type andremoveactionan invalid index.- Deleting or renaming with different capitals left the old file behind.
- Taterzens NPCs of
#PLAYERlines no longer duplicate or stay behind after a restart, chunk unload, move or delete. - Hologram stands read the entity data layout at runtime, so holograms render in modpacks that change it.
- Placeholder numbers use a dot as decimal separator on every server locale.
{vh_*:Name}placeholders no longer block the server with a profile lookup.- In singleplayer, a second world no longer loads or deletes the first world's lectern holograms.
Performance
- Animation frames are computed once per line per step, placeholders resolve on the update interval only, and range is checked before permission lookups: in a test with 36 holograms and two players the mod's tick time dropped by about half.
- Clicks find their hologram in constant time instead of searching every hologram.
This mod has no additional files