Skip to content

Releases: 1Thillo/ImageMaps

Version 2.1.0

Choose a tag to compare

@1Thillo 1Thillo released this 16 Sep 18:40
22103fa

Adds Folia support. Everything else is unchanged from 2.0.1. Requires Paper 26.2 or newer, or Folia, and Java 25.

Folia

The plugin declares folia-supported: true and runs on a regionised server. Image conversion happens on an async thread, frame changes run on the scheduler of the frame they belong to, and the shared state is safe to reach from several regions at once.

Folia splits a world into regions that tick independently, and a thread may only touch the blocks and entities of its own region. Two operations look at a whole image at once and are limited by that:

  • placing an image
  • /imagemap frame, which changes every frame of the image you are looking at

If the image reaches past a region border, both refuse with a message and change nothing. Moving a few blocks and trying again is usually enough, since regions cover a large area and merge while they are next to each other.

An image that already spans a border is not a problem in itself. Each of its frames is ticked by its own region and renders normally.

Paper is unaffected

The region checks are no-ops on a single region server, where the whole world belongs to one region, and the entity scheduler is the same thread as before. Verified against an existing 152 map installation on Paper 26.2 build 116.

Verified on Folia

Folia 26.2 build 7, with a 135 map image, a 16 map image and a single map image: commands ran on a region thread rather than the main thread, so map creation and lookup are confirmed working from there. All three frame properties in both directions, rotation refused while protected and allowed once released, and maps.yml written from the region shutdown thread on stop. No thread check violations anywhere in the log.

Version 2.0.1

Choose a tag to compare

@1Thillo 1Thillo released this 03 Sep 21:28
0e402e7

Adds a version command. Everything else is unchanged from 2.0.0, which is the release to read if you are upgrading from 1.0.x.

/imagemap version
ImageMaps 2.0.1
Server: 26.2-116-37dc545 (MC: 26.2)

After a jar has been swapped out, which build is actually running is the question people need answered, and the only way to find out used to be the startup line in the server log. debuginfo prints the version too, but it is operator only and buries it in a dump of the ImageIO configuration.

Available to everyone via imagemaps.version, so it can be answered from in game without console access.

Also corrects the permission table in the README, which still listed imagemaps.help as operator only after it was changed to default to everyone.

Requires Paper 26.2 or newer and Java 25.

Version 2.0.0

Choose a tag to compare

@1Thillo 1Thillo released this 03 Sep 20:50
0cb35b6

First release of the fork. Requires Paper 26.2 or newer and Java 25.

The plugin no longer holds images in memory, no longer loads every map during startup, and the item frame properties are now changed with a command instead of a wooden hoe.

Memory

Previous versions kept every source image decoded in a cache that was never emptied, and each renderer additionally held a getSubimage() view of its source, which pins the parent image even when the cache is cleared. Memory scaled with the total resolution of everything placed and could not be reclaimed.

Images are now converted to map colours once and stored on disk as one 16 KiB file per map under plugins/ImageMaps/cache. A renderer holds no image data: it requests its tile asynchronously on the first render, draws it on the next one and drops the reference again.

before after
plugin memory when idle every source image, decoded none
server memory per map 48 KiB from server start 16 KiB, once someone looks at it
startup one map load and image decode per entry, main thread reads maps.yml
per tick render() work per map nothing after the first draw

Maps get their renderer from MapInitializeEvent now, so a map costs nothing until a player comes close enough to see it.

Paper 26.2

  • builds against io.papermc.paper:paper-api, Java 25, api-version: 26.2
  • messaging moved from the BungeeCord chat API, which the Paper API no longer ships, to Adventure
  • dropped the CLCore dependency. It lived in an authenticated GitHub Packages repository, which is why the project could not be built by anyone but its author. The jar now has no shaded dependencies at all
  • removed the server version checks. They compared the minor version against 14, 16 and 17, so on 26.2 they reported invisible frames, glowing frames, floor placement and tracking control as unsupported

Item frames

The wooden hoe is gone. A plain right click on a frame is answered by the client with an interaction on the block behind it, so the server was never told about it, and a frame set to fixed refused every further interaction, which made that change impossible to undo with the same item.

/imagemap frame invisible true     hides the frames, leaving only the image
/imagemap frame fixed true         locks the frames against breaking and modification
/imagemap frame rotatable true     allows players to rotate the individual maps again

Each applies to every frame of the image you are looking at.

Placed images no longer rotate by default. Rotating one tile of a multi map image tears a hole into it that can only be repaired by placing the image again, and vanilla let anyone do that with an empty hand. rotatable gives it back per image and survives restarts.

Permissions

One node per sub command. imagemaps.help and imagemaps.frame (with .invisible, .fixed and .rotatable) default to everyone, everything else to op. imagemaps.admin, imagemaps.toggleFixed and imagemaps.toggleVisible are gone.

Upgrading

Existing images keep working, there is nothing to convert by hand. maps.yml is read as before and the item frames already in your world stay as they are. The first look at an image after the upgrade converts it and fills the cache; /imagemap bake does that up front. Deleting the cache folder is always safe.

Two things to check: reload now uses imagemaps.reload rather than imagemap.reload, which never matched the permission the plugin registered, and any LuckPerms setup referencing the three removed nodes needs updating. config.yml is obsolete and ignored.

Also fixed

  • images no longer stay blank until a player rejoins, drawing happens inside render() rather than from a delayed task
  • image resolutions are read from the file header instead of decoding the whole image
  • image file names resolve ignoring case, and names with spaces work when quoted
  • /imagemap list defaulted to page 0
  • /imagemap bake added

Based on SydMontague/ImageMaps 1.0.11, MIT licensed.