Real Inventory / Petite Inventory
PetiteInventory 提供了受《生化危机 4》、《暗黑破坏神》和《三角洲部队》等游戏启发的容器布局。单个物品可以占据多个槽位,并支持匹配替换、堆叠和转移规则。该模组还提供足迹旋转、物品背景颜色以及可视化编辑器。
主要功能
建议使用编辑器模式,但也可以通过规则文件直接配置布局。
首次启动时,默认规则文件将生成于:
- 物品足迹:
config/PetiteInventory/border_items.json
- 物品颜色:
config/PetiteInventory/border_colors.json
规则格式故意保持简单,支持物品 ID、物品标签和精确 NBT 匹配。可以使用 /reload 命令重新加载规则。
当布局启用时,物品会占据其配置的矩形足迹。玩家背包为了平衡性而单独控制。若要为其他容器启用布局,请对准其任意一个槽位并按下复制键(默认:U)以复制屏幕标识符,然后将其添加到配置中。
使用此布局的容器获得以下操作改进:
- 将一个物品移动到另一个物品上方时,如果目标区域没有冲突物品,则允许替换。
- 使用 Shift 快速转移时,如果无法堆叠,模组会搜索可容纳该物品的空地区域。
- 快捷栏默认被排除在外,以保持其原版的常规行为。
- 拾取非方形物品后,可使用鼠标滚轮或按
R 键翻转当前物品实例。这不会更改已配置的规则。
编辑模式
使用 /petiteinventory edit 切换编辑模式。当光标到达可调整大小的边缘或角落时,会出现高亮边框,并且可以像 Windows 窗口一样调整物品大小。更改立即生效。
右键点击物品可打开预设调色板并更改其背景颜色。调色板目前仅包含预设颜色。您也可以直接编辑 border_colors.json,通过物品 ID、标签或 TACZ GunId 分配颜色。
按住 Ctrl 可选择多个物品并拖动以选择区域。Ctrl+Shift 扩展选择范围。选中多个物品后,右键点击会将颜色应用于所有目标;长按右键 0.5 秒进入批量足迹编辑模式,此时选中的矩形将成为每个选中物品的足迹。
在编辑模式下,每个容器屏幕顶部都会显示一个布局切换按钮。它控制该屏幕是否使用 Petite 布局,并立即生效。玩家背包和快捷栏保持独立配置。
两个命令用于控制默认屏幕行为:
/petiteinventory blacklist:强制黑名单模式,为所有容器启用布局,直到单独禁用各个屏幕。
/petiteinventory whitelist:强制白名单模式,禁用所有容器的布局,直到单独启用各个屏幕。
兼容性说明
- Sophisticated Backpacks 已专门适配,包括物品足迹、高亮显示以及足迹感知的快速转移。TACZ 枪械通过其 NBT
GunId 支持尺寸和背景颜色匹配。
- Item Borders 可与 PetiteInventory 配合使用,JEI 配方和搜索行为保持不变。
- 由于模组的设计原因,排序、槽位扩展及其他影响库存结构的模组可能会导致兼容性问题。
- 自动排序与 PetiteInventory 的手动整理设计理念相冲突,因此无法保证完美兼容。
- 在使用 Petite 布局的容器中,禁用了拖拽物品功能。如果后续解决了交互问题,可能会恢复此功能。
- 如果来自其他模组的重要容器停止工作,请报告其屏幕标识符和复现步骤。
路线图
- 移植到更多 Minecraft 版本和加载器。
- 支持更多的库存扩展机制。
- 为更多第三方容器屏幕添加专用适配器。
- 探索不规则的俄罗斯方块式物品足迹。
Real Inventory / Petite Inventory
PetiteInventory provides container layouts inspired by games such as Resident Evil 4, Diablo, and Delta Force. A single item can occupy multiple slots, with matching replacement, stacking, and transfer rules. The mod also provides footprint rotation, item background colors, and a visual editor.
Main Features
The editor mode is recommended, but the layout can also be configured directly through the rule files.
On first launch, the default rule files are generated at:
- Item footprints:
config/PetiteInventory/border_items.json
- Item colors:
config/PetiteInventory/border_colors.json
The rule format is intentionally simple and supports item IDs, item tags, and exact NBT matches. Rules can be reloaded with /reload.
When the layout is enabled, items occupy their configured rectangular footprints. The player inventory is controlled separately for balance. To enable the layout for another container, point at one of its slots and press the copy key (default: U) to copy the screen identifier, then add that identifier to the configuration.
Containers using the layout receive the following operation improvements:
- Moving one item over another allows replacement when the target area has no conflicting item.
- When using a Shift quick transfer, the mod searches for an empty area that can hold the item if stacking is not possible.
- The hotbar is excluded by default so it keeps its conventional vanilla behavior.
- After picking up a non-square item, use the mouse wheel or press
R to flip the current item instance. This does not change the configured rule.
Edit Mode
Use /petiteinventory edit to toggle edit mode. When the cursor reaches a resizable edge or corner, a highlight border appears and the item can be resized like a Windows window. Changes take effect immediately.
Right-click an item to open the preset color palette and change its background color. The palette currently contains preset colors only. You can also edit border_colors.json directly to assign colors by item ID, tag, or a TACZ GunId.
Hold Ctrl to select multiple items and drag to select an area. Ctrl+Shift extends the selection. With multiple items selected, right-click applies a color to all targets; holding right-click for 0.5 seconds enters batch footprint editing, where the selected rectangle becomes the footprint for every selected item.
In edit mode, each container screen displays a layout toggle at the top. It controls whether that screen uses the Petite layout and takes effect immediately. The player inventory and hotbar remain independently configurable.
Two commands control the default screen behavior:
/petiteinventory blacklist: force blacklist mode, enabling the layout for every container until individual screens are disabled.
/petiteinventory whitelist: force whitelist mode, disabling the layout for every container until individual screens are enabled.
Compatibility Notes
- Sophisticated Backpacks is specifically adapted, including item footprints, highlights, and footprint-aware quick transfer. TACZ firearms support size and background-color matching through their NBT
GunId.
- Item Borders can be used alongside PetiteInventory, and JEI recipe and search behavior is left unchanged.
- Because of the mod's design, sorting, slot-expansion, and other inventory-structure mods may cause compatibility issues.
- Automatic sorting conflicts with PetiteInventory's manual-organization design, so perfect compatibility cannot be guaranteed.
- Click-dragging items is disabled in containers that use the Petite layout. It may return if the interaction problems are solved later.
- If an important container from another mod stops working, report its screen identifier and reproduction steps.
Roadmap
- Port to more Minecraft versions and loaders.
- Support more inventory expansion mechanisms.
- Add dedicated adapters for more third-party container screens.
- Explore irregular, Tetris-like item footprints.
评论 0
登录后参与评分
还没有评论,来抢沙发吧