MapCanvas
直接从 URL 在物品展示框中的地图上显示图片和动画 GIF。
MapCanvas 让你能够将互联网上的任何图片或 GIF 转换为 Minecraft 地图显示。无论是想要单张地图还是巨大的多帧壁画,MapCanvas 都能通过一条简单的命令搞定一切。
功能特性
- 图片支持 — 在物品展示框网格上显示来自 URL 的任何图片
- 动画 GIF 支持 — 完整的动画效果,支持逐帧计时,针对性能进行了优化
- 海报地图系统 — 使用单个物品放置并收集整个网格
- 抖动处理(Dithering) — 可选的抖动模式,平滑颜色和渐变,以适应 Minecraft 有限的调色板
- 命名图像库 — 按名称保存、重新加载和给予图像
- 经济系统 — 创建画布需要消耗空地图(创造模式下免费)
- 转换 — 将单独的地图合成为一个海报地图物品
工作原理
海报模式
运行 /canvas add poster 3 3 <url>,你将获得 1 个海报地图物品。右键点击 3x3 物品展示框网格的任意角落,它会自动填充所有格子。破坏网格中的任意一张地图,即可将它们全部回收为 1 个物品 —— 展示框保持完好。
单张模式
运行 /canvas add single 3 3 <url>,你将获得单独的地图物品,每个网格单元一个。手动放置它们,或者稍后使用 /canvas convert <name> 将它们组合成一张海报地图。
HD 模式
在任何子命令中添加 -hd(例如 /canvas add poster-hd)以启用抖动处理。这最适合照片、插图以及具有平滑渐变的图像。对于文本、徽标或像素艺术,建议使用普通模式。
GIF 支持
只需粘贴 .gif 的 URL —— MapCanvas 会自动检测它并将其作为动画海报进行处理。动画播放速度最高可达 10fps,并且仅更新距离玩家 32 格以内的区域,以保持流畅的性能。
命令
| 命令 |
描述 |
/canvas add single <w> <h> <url> |
提供 WxH 网格的单独地图 |
/canvas add single-hd <w> <h> <url> |
提供启用了抖动处理的 WxH 网格的单独地图 |
/canvas add poster <w> <h> <url> |
提供 1 个自动填充 WxH 网格的海报地图 |
/canvas add poster-hd <w> <h> <url> |
提供 1 个带抖动处理且自动填充 WxH 网格的海报地图 |
/canvas name <n> |
保存最后创建的图像 |
/canvas list |
列出你保存的图像 |
/canvas reload <n> |
重新下载图像数据 |
/canvas convert <n> |
将单独的地图转换为 1 个海报地图 |
/canvas delete <n> |
删除已保存的图像 |
/canvas help |
在游戏中显示所有命令 |
/canvas cost enable |
启用地图消耗(需要 OP 权限) |
/canvas cost disable |
禁用地图消耗(需要 OP 权限) |
消耗
创建画布的成本等于网格大小的 空地图 数量(W × H)。创造模式下的玩家不收费。如果下载失败,地图将被退还。
要求
- Minecraft 1.21.1
- Fabric Loader
- Fabric API
客户端和服务端均需安装。
性能: 在服务器上同时运行大量动画 GIF 可能会导致卡顿,尤其是大网格时。建议保持活跃的动画海报数量合理。
注意: 本项目是在 AI 的帮助下制作的。我在制作此模组时并不知道 Image2Map,感谢他们提供了原始概念。MapCanvas 在此基础上扩展了对动画 GIF 的支持。
MapCanvas
Display images and animated GIFs on maps in item frames directly from a URL.
MapCanvas lets you turn any image or GIF from the internet into a Minecraft map display. Whether you want a single map or a massive multi-frame mural, MapCanvas handles it all with one simple command.
Features
- Image support — display any image from a URL on a grid of item frames
- Animated GIF support — full animation with per-frame timing, optimized for performance
- Poster map system — place and collect entire grids with a single item
- Dithering - optional dithering mode that smooths out colors and gradients to work within Minecraft's limited color palette
- Named image library — save, reload, and give images by name
- Economy system — costs empty maps to create canvases (free in creative mode)
- Convert — turn individual maps into a single poster map item
How It Works
Poster Mode
Run /canvas add poster 3 3 <url> and you'll get 1 poster map item. Right click any corner of a 3x3 item frame grid and it auto-fills every frame instantly. Punch any map in the grid to collect them all back into 1 item — frames stay intact.
Single Mode
Run /canvas add single 3 3 <url> and you'll get individual map items, one per grid cell. Place them manually or use /canvas convert <name> to combine them into a poster map later.
HD Mode
Add -hd to any subcommand (e.g. /canvas add poster-hd) to enable dithering. This works best for photos, illustrations, and images with smooth gradients. For text, logos, or pixel art the regular mode is recommended.
GIF Support
Just paste a .gif URL — MapCanvas automatically detects it and processes it as an animated poster. Animations play at up to 10fps and only update for players within 32 blocks, keeping performance smooth.
Commands
| Command |
Description |
/canvas add single <w> <h> <url> |
Gives individual maps for a WxH grid |
/canvas add single-hd <w> <h> <url> |
Gives individual maps for a WxH grid with dithering enabled |
/canvas add poster <w> <h> <url> |
Gives 1 poster map that auto-fills a WxH grid |
/canvas add poster-hd <w> <h> <url> |
Gives 1 poster map that auto-fills a WxH grid with dithering enabled |
/canvas name <n> |
Saves the last created image |
/canvas list |
Lists your saved images |
/canvas reload <n> |
Re-downloads image data |
/canvas convert <n> |
Converts individual maps into 1 poster map |
/canvas delete <n> |
Deletes a saved image |
/canvas help |
Shows all commands in-game |
/canvas cost enable |
Enables cost of maps (requires op) |
/canvas cost disable |
Disables cost of maps (requires op) |
Cost
Creating a canvas costs empty maps equal to the grid size (W × H). Players in creative mode are not charged. Maps are refunded if the download fails.
Requirements
- Minecraft 1.21.1
- Fabric Loader
- Fabric API
Required on both client and server.
Performance: Running many animated GIFs simultaneously on a server can cause lag, especially with large grids. It is recommended to keep the number of active animated posters reasonable.
Note: This project was made with the help of AI. I wasn't aware of Image2Map when making this mod credit to them for the original concept. MapCanvas expands on the idea with animated GIF support.
评论 0
登录后参与评分
还没有评论,来抢沙发吧