沙盒
Sandboxes 会为你提供一个世界的创意模式副本,让你在其中尝试各种玩法。你可以直接在目标位置测试建筑、红石机器或山坡的新造型,然后回到你的生存世界,一切保持原样。你在沙盒中做的任何操作都不会影响到真实的世界。
我制作这个模组是为了让你能在真实的周围环境里测试想法,而不是在一个平坦的测试世界中。做出更改后,一个覆盖层(overlay)会显示沙盒与你的世界之间的差异。
该模组仅作用于客户端,并且适用于单人游戏世界。
功能
你世界的沙盒
- 在暂停菜单中创建沙盒。它是你所处世界的完整副本,每个世界都有自己独立的沙盒列表。
- 加入沙盒后,你将处于开启指令的创造模式中。屏幕顶部的红色文字会标明该沙盒源自哪个世界,让你始终清楚自己身处何地。
- 返回你的世界后,你将恢复生存模式并保留自己的物品栏,从离开的地方继续。除非进行同步,否则两个世界之间不会有任何数据互通。
管理沙盒
- 每个沙盒都会生成一张卡片,上面显示世界缩略图、名称、上次加入日期以及其在磁盘上的大小。
- 你可以重命名沙盒以记录其用途。你设置的名称会在同步后保留。
- 同步沙盒可以用你世界当前的最新状态替换它。
- 复制沙盒可以在你对它进行其他尝试之前,将其当前状态(包括玩家位置和物品栏)保存下来。
- 当你不再需要某个沙盒时,可以将其删除。
覆盖层 (Overlay)
- 显示沙盒与你所在世界之间的差异。沙盒中有而你的世界没有的方块会以绿色轮廓的半透明幽灵形式显示;只有你的世界有的方块以红色轮廓显示;存在差异的方块以黄色轮廓显示。
- 查看差异时,屏幕顶部会出现一行文字,说明该方块在两个世界中分别是什么。
- 在沙盒内部时,覆盖层会将沙盒与你的真实世界进行比较。
- 安装了 Keybindery 后,每个沙盒都可以拥有自己的按键来切换其覆盖层的开/关状态。
快速切换
- 一旦世界有了沙盒,暂停菜单角落会出现一个小按钮,点击即可进入你上次使用的沙盒,并从沙盒内直接返回。
- 同样的按钮也可以显示在你的物品栏中,并在“控制”设置中分配按键。
依赖项
搭配推荐
兼容性
Minecraft 26.3,Fabric 加载器,仅限客户端。Sandboxes 会复制你世界的存档文件夹,因此它仅适用于本地单人游戏世界,不适用于服务器或局域网游戏。
使用方法
暂停菜单
- 在单人游戏中,暂停菜单底部的一排小方形按钮最右侧有一个 Sandboxes 按钮。悬停它以查看其名称。
- 点击它可打开当前世界的 Sandboxes 界面。
Sandboxes 界面
- 界面包含两个选项卡:Sandboxes 和 Settings。底部的 Done 按钮可返回暂停菜单。
- 如果尚未创建任何沙盒,Sandboxes 选项卡会显示一行解释沙盒功能的说明。
- 点击 + New sandbox 创建新沙盒。系统会先保存世界,然后将其复制到一个以当前日期和时间命名的新沙盒中(格式为年-月-日,然后是小时和分钟)。在复制过程中,“Creating sandbox...” 会显示在新卡片将出现的位置,直到复制完成前该按钮会变灰。
- 每个沙盒都有一张卡片。它显示世界图片、沙盒名称、显示上次加入日期(或“never joined”)的灰色分隔线、磁盘大小,以及一排按钮。
- 卡片按最后加入时间排序,最新的排在前面。
卡片按钮
从左到右:
| 按钮 |
功能 |
| Eye |
开启或关闭此沙盒的覆盖层。详见下方的“覆盖层”。 |
| Key button |
为此沙盒设置覆盖层快捷键。仅在安装 Keybindery 1.3.0 或更高版本时显示。 |
| Join |
保存并关闭你的世界,然后打开沙盒。 |
| Sync |
确认后,用你世界的最新副本替换沙盒。 |
| ✎ |
重命名沙盒。 |
| ❐ |
复制沙盒。 |
| ✕ |
确认后删除沙盒。 |
- Join 会以开启指令的创造模式打开沙盒。首次使用时,你会站在创建沙盒时所在的位置。之后,你会回到上次在该沙盒内的位置。硬核世界的沙盒并非硬核模式,且难度设置为困难 (Hard)。
- Sync 会先询问“Sync this sandbox?”,因为在沙盒中的任何建造都会被清除。你的世界会被保存,沙盒将被替换为其最新副本。你设置的名称会保留。如果名称仍是生成的日期和时间,则会更新为当前的日期和时间。沙盒的覆盖层快捷键会保留。
- ✎ 将名称变为文本框,准备输入。按 Enter 或点击 ✓ 保存,或按 Escape 保留旧名称。名称最长可为 64 个字符,若留空则保留旧名称。
- ❐ 将沙盒当前状态(包括玩家和物品栏)复制到新卡片中。你设置的名称会添加 “ (copy)” 后缀,生成的名称会更新为当前日期和时间。覆盖层快捷键保留在原沙盒上。
- ✕ 会先询问“Delete this sandbox?”。已删除的沙盒无法恢复。
- 当沙盒正在同步或删除时,其卡片上的按钮会被替换为 “Syncing sandbox...” 或 “Deleting sandbox...”。界面的其余部分仍可使用。
在沙盒内部
- 屏幕顶部的红色文字显示为“Sandbox of world”,后跟世界名称。
- “Sandboxes”按钮的工具提示显示为 Return to,后跟世界名称。点击它可保存沙盒并打开你的世界。你将回到生存模式,带着自己的物品栏,从你离开的地方继续游戏。
- Save and Quit to Title(保存并退出到标题画面)功能照常工作。沙盒不会出现在 Minecraft 的世界列表中,因此要重新进入某个沙盒,请打开其所在的世界并从 Sandboxes 界面加入它。
- 通过 Mod Menu 可在沙盒内部打开 Sandboxes 界面。你所处的沙盒对应的卡片上会显示“You're in this one”,并且没有 Join、Sync 或 ✕ 按钮。
副本运行时
- 创建、同步、复制或删除沙盒的操作均在后台进行。
- 在操作完成之前,无法离开当前世界。Save and Quit to Title、Sandboxes、Return to、Join 以及快速沙盒按钮均呈灰色不可用状态,跳跃键也无任何作用。
- 游戏本身不会被阻止关闭,但请先让复制操作完成。
叠加层
- 点击卡片上的眼睛图标可开启该沙盒的叠加层。关闭界面时叠加层会出现。再次点击眼睛图标可关闭叠加层。
- 同一时间只能显示一个叠加层。开启另一个沙盒的叠加层会自动关闭当前显示的叠加层。
- 在你的世界中,叠加层会将你的世界与该沙盒进行比较。在沙盒内部,其自身卡片上的眼睛图标会将该沙盒与你的世界进行比较。
- 每个差异都根据你所在世界的视角绘制:
| 轮廓颜色 |
含义 |
绘制方式 |
| 绿色 |
另一个世界在此处有方块,而你的世界此处是空气。 |
另一个世界方块的半透明幽灵体,使用其真实颜色。 |
| 红色 |
你的世界在此处有方块,而另一个世界此处是空气。 |
显示你当前的方块,带有轮廓线。 |
| 黄色 |
两个世界在此处都有方块,但它们不同。 |
显示你当前的方块,带有轮廓线。破坏它后,另一个世界方块的幽灵体会出现。 |
- 水、熔岩、箱子及其他没有常规模型的方块会显示完整方块轮廓,且不显示幽灵体。
- 叠加层比较的是方块类型而非其状态,因此已放置的楼梯或已成熟的作物不算作差异。
- 叠加层覆盖你周围加载的区块,并在你放置和破坏方块时实时更新。
- 屏幕顶部有一条线显示“Overlay:”,后跟与其进行比较的世界名称。
- 观察最多 48 格远的差异处,第二行会显示此处的方块是什么,然后是另一个世界中的对应方块,例如“Stone → Oak Planks”。如果某个方块在两个世界中相同且为实心块,则该行不会再显示其后的内容。
- 当你离开世界时,叠加层会关闭;当所显示的沙盒被同步或删除时,叠加层也会关闭。切换维度会使叠加层保持开启,并比较新维度的情况。
叠加层按键
- 安装了 Keybindery 1.3.0 或更高版本时,每张卡片都有一个按键按钮。点击它并按下一个键即可设置该沙盒的叠加层快捷键。右键点击可清除该按键。
- 在你的世界中,按某个沙盒的按键可开启或关闭该沙盒的叠加层。在沙盒内部,按自身沙盒的按键可将其与你的世界进行比较。
- 叠加层按键属于其所在的世界,因此不会出现在 Controls(控制)菜单中,仅在该世界及其沙盒中生效。
- 如果其他绑定使用了相同的按键,卡片会添加一行文字“Overlay key also used by:”,后跟该绑定的名称。两者仍可正常使用。
- 未安装 Keybindery 时,不显示按键按钮,眼睛图标的功能照常工作。
快速沙盒按钮与跳跃键
- 当一个世界至少有一个沙盒时,暂停菜单右上角会出现一个小按钮。
- 在你的世界中,它会加入你最近一次访问的沙盒。在沙盒内部,它会带你返回你的世界。其工具提示会说明它将前往的位置,格式为“Jump to”后跟沙盒名称,或“Back to”后跟世界名称。
- 同一个按钮也可以显示在你物品栏界面的右上角,适用于生存模式和创造模式。默认情况下它是关闭的,需要在 Settings(设置)中开启。
- Controls(控制)菜单下 Sandboxes 类别中的 Hop to sandbox and back(跳转至沙盒并返回)按键功能与快速按钮相同。默认未绑定按键。在没有沙盒的世界中,此按键无效。
设置
Sandboxes 界面的 Settings(设置)选项卡包含两个开关。Mod Menu 的配置按钮也可打开此选项卡的同一界面。从标题画面打开时,仅显示 Settings(设置)选项卡。
| 设置项 |
默认值 |
功能 |
| Quick sandbox button(快速沙盒按钮) |
On(开启) |
在暂停菜单的右上角显示快速沙盒按钮。 |
| Quick sandbox button in inventory(物品栏中的快速沙盒按钮) |
Off(关闭) |
在物品栏界面的右上角显示相同的按钮。 |
从 Sandboxes 1.0 升级
- 使用第一个版本创建的沙盒会在你首次以该版本启动 Minecraft 时自动迁移至新的布局中,名称保持不变。
- 无法移动的沙盒文件夹将保留在原位,并在下次启动时重试迁移。不会删除任何内容。
许可证
MIT。
Sandboxes
Sandboxes gives you a creative copy of your world to try things in. You can test a build, a redstone machine, or a new shape for a hillside right where it's meant to go, then go back to your survival world exactly as you left it. Nothing you do in a sandbox reaches your real world.
I built it so you can test an idea in its real surroundings instead of in a flat test world. Once you've made changes, an overlay shows you where the sandbox and your world differ.
It's client-side, and it works with your singleplayer worlds.
Features
Sandboxes of your world
- Make a sandbox from the pause menu. It's a full copy of the world you're in, and each world keeps its own list of sandboxes.
- Join a sandbox and you're in creative mode with commands on. Red text at the top of the screen names the world it came from, so you always know which one you're in.
- Return to your world and you're back in survival with your own inventory, where you left off. Nothing crosses between the two worlds unless you sync.
Managing sandboxes
- Every sandbox gets a card with its world picture, name, the date you last joined it, and its size on disk.
- Rename a sandbox to keep track of what it's for. A name you've set stays through a sync.
- Sync a sandbox to replace it with a fresh copy of your world when your world has moved on.
- Duplicate a sandbox to keep it as it is now, player and inventory included, before you try something else in it.
- Delete a sandbox when you're done with it.
Overlay
- Shows where a sandbox differs from the world you're in. A block the sandbox has and your world doesn't shows as a see-through ghost outlined green. Blocks only your world has are outlined red, and blocks that are different are outlined yellow.
- Look at a difference and a line at the top of the screen says what the block is in each world.
- From inside a sandbox, the overlay compares it with your real world.
- With Keybindery installed, each sandbox can have its own key to turn its overlay on and off.
Quick hop
- Once a world has a sandbox, a small button in the corner of the pause menu takes you to the sandbox you used last, and back again from inside it.
- The same button can also show in your inventory, and there's a key for it in Controls.
Requirements
- MenuKit 7.3.0 or newer, below 8.0.0. Sandboxes uses it for its screen, its buttons, and the text at the top of the screen.
- Fabric API.
Pairs well with
- Keybindery 1.3.0 or newer, for a key per sandbox that turns its overlay on and off.
- Mod Menu, which opens the Sandboxes settings from the mods list.
Compatibility
Minecraft 26.3 on Fabric, client only. Sandboxes copies your world's save folder, so it only works with local singleplayer worlds, not servers or LAN games.
How to use
The pause menu
- In a singleplayer world, the pause menu's row of small square buttons has a Sandboxes button at its end. Hover it to see its name.
- Click it to open the Sandboxes screen for the world you're in.
The Sandboxes screen
- The screen has two tabs, Sandboxes and Settings. Done at the bottom goes back to the pause menu.
- With no sandboxes yet, the Sandboxes tab shows one line explaining what a sandbox is.
- Click + New sandbox to make one. The world is saved first, then copied into a new sandbox named with the current date and time (year-month-day, then hours and minutes). "Creating sandbox..." shows where the new card will appear, and the button is grayed out until the copy is done.
- Each sandbox has a card. It shows the world picture, the sandbox's name, a gray line with the date you last joined it (or "never joined") and its size on disk, and a row of buttons.
- Cards are ordered by when you last joined them, most recent first.
Card buttons
From left to right:
| Button |
What it does |
| Eye |
Turns this sandbox's overlay on or off. See The overlay below. |
| Key button |
Sets this sandbox's overlay key. It only shows when Keybindery 1.3.0 or newer is installed. |
| Join |
Saves and closes your world, then opens the sandbox. |
| Sync |
Replaces the sandbox with a fresh copy of your world, after a confirmation. |
| ✎ |
Renames the sandbox. |
| ❐ |
Duplicates the sandbox. |
| ✕ |
Deletes the sandbox, after a confirmation. |
- Join opens the sandbox in creative mode with commands on. The first time, you stand where you were when the sandbox was made. After that, you return to where you last were inside that sandbox. A sandbox of a hardcore world isn't hardcore, and its difficulty is set to Hard.
- Sync asks "Sync this sandbox?" first, since anything built in the sandbox is lost. Your world is saved, and the sandbox is replaced with a fresh copy of it. A name you've set stays. A name that is still the generated date and time is updated to the current date and time. The sandbox keeps its overlay key.
- ✎ turns the name into a text box, ready to type in. Press Enter or click ✓ to save it, or Escape to keep the old name. Names can be up to 64 characters, and an empty name keeps the old one.
- ❐ copies the sandbox as it is now, including its player and inventory, into a new card. A name you've set gets " (copy)" added to it, and a generated name gets the current date and time. The overlay key stays with the original.
- ✕ asks "Delete this sandbox?" first. A deleted sandbox can't be brought back.
- While a sandbox is being synced or deleted, its card shows "Syncing sandbox..." or "Deleting sandbox..." in place of its buttons. The rest of the screen stays usable.
Inside a sandbox
- Red text at the top of the screen reads "Sandbox of world" followed by the world's name.
- The Sandboxes button's tooltip reads Return to followed by the world's name. Click it to save the sandbox and open your world. You're back in survival with your own inventory, where you left off.
- Save and Quit to Title works as usual. Sandboxes don't appear in Minecraft's world list, so to get back into one, open its world and join it from the Sandboxes screen.
- The Sandboxes screen opens from inside a sandbox through Mod Menu. The card for the sandbox you're in says "You're in this one" and has no Join, Sync, or ✕ button.
While a copy is running
- Making, syncing, duplicating, or deleting a sandbox runs in the background.
- Until it finishes, nothing leaves the world. Save and Quit to Title, Sandboxes, Return to, Join, and the quick sandbox button are grayed out, and the hop key does nothing.
- Closing the game itself isn't blocked, so let the copy finish first.
The overlay
- Click the eye on a card to turn on that sandbox's overlay. It appears when you close the screen. Click the eye again to turn it off.
- Only one overlay shows at a time. Turning on another sandbox's overlay turns off the one that was showing.
- In your world, the overlay compares your world with that sandbox. Inside a sandbox, the eye on its own card compares the sandbox with your world.
- Each difference is drawn from the point of view of the world you're standing in:
| Outline |
Meaning |
How it's drawn |
| Green |
The other world has a block where yours has air. |
A see-through ghost of the other world's block, in its real colors. |
| Red |
Your world has a block where the other world has air. |
Your block as it is, outlined. |
| Yellow |
Both worlds have a block there, but different ones. |
Your block as it is, outlined. Break it and the ghost of the other world's block appears. |
- Water, lava, chests, and other blocks without a regular model get a full-block outline and no ghost.
- The overlay compares blocks, not their state, so a turned stair or a grown crop doesn't count as a difference.
- It covers the chunks loaded around you and updates as you place and break blocks.
- A line at the top of the screen reads "Overlay:" followed by the world it compares with.
- Look at a difference up to 48 blocks away and a second line says what the block is here, then in the other world, such as "Stone → Oak Planks". A solid block that's the same in both worlds stops the line from reading anything behind it.
- The overlay turns off when you leave the world, and when the sandbox it shows is synced or deleted. Changing dimension keeps it on and compares the new dimension.
Overlay keys
- With Keybindery 1.3.0 or newer installed, each card has a key button. Click it and press a key to set that sandbox's overlay key. Right-click it to clear the key.
- In your world, a sandbox's key turns that sandbox's overlay on or off. Inside a sandbox, its own key compares it with your world.
- Overlay keys belong to their world, so they don't appear in Controls and only work in that world and its sandboxes.
- If another binding uses the same key, the card adds a line reading "Overlay key also used by:" followed by that binding. Both still work.
- Without Keybindery, the key button doesn't show and the eye works as usual.
Quick sandbox button and hop key
- Once a world has at least one sandbox, a small button appears in the top-right corner of the pause menu.
- In your world, it joins the sandbox you joined most recently. Inside a sandbox, it takes you back to your world. Its tooltip says where it will go, as "Jump to" followed by the sandbox's name or "Back to" followed by the world's name.
- The same button can show in the top-right corner of your inventory, in survival and creative. It's off until you turn it on in Settings.
- The Hop to sandbox and back key, under Sandboxes in Controls, does the same thing as the quick button. It starts unbound. In a world with no sandboxes it does nothing.
Settings
The Settings tab of the Sandboxes screen holds two switches. Mod Menu's config button opens the same screen on this tab. Opened from the title screen, only the Settings tab shows.
| Setting |
Default |
What it does |
| Quick sandbox button |
On |
Shows the quick sandbox button in the pause menu's top-right corner. |
| Quick sandbox button in inventory |
Off |
Shows the same button in the top-right corner of your inventory screen. |
Upgrading from Sandboxes 1.0
- Sandboxes made with the first version move into the new layout automatically, with their names intact, the first time you launch Minecraft with this version.
- A sandbox folder that can't be moved is left where it is and tried again at the next launch. Nothing is deleted.
License
MIT.
评论 0
登录后参与评分
还没有评论,来抢沙发吧