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
Rto 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.
下载 Petite Inventory
下载 Petite Inventory
下载 Petite Inventory
下载 Petite Inventory
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Petite Inventory
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Petite Inventory
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Petite Inventory
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
更新日志
1.1.0
模块化重构
- 将项目拆分为独立的
common(公共)模块和 Forge 模块。 - 分离了 API、配置、库存服务、编辑服务、兼容性层、平台事件以及 Mixins。
- 统一了放置、替换、堆叠、快速转移和掉落物品处理规则。
- 将容器自动化与库存交互逻辑分离,以减少跨模块耦合。
编辑模式
- 添加了
/petiteinventory edit命令用于切换编辑模式。 - 支持从边缘和角落进行八方向调整物品大小;红色边框仅在可调整大小的区域上方显示。
- 添加了 Ctrl 多选、拖拽选择和 Shift 范围选择功能。
- 添加了通过右键点击打开的预设调色板,包括批量颜色编辑功能。
- 按住右键 0.5 秒进入批量足迹模式,允许将一个区域分配给多个物品。
- 在每个容器的屏幕顶部添加了 Petite 布局切换开关。
- 添加了
/petiteinventory blacklist和/petiteinventory whitelist命令以切换默认的屏幕布局行为。
库存与交互
- 为非正方形物品实例添加了鼠标滚轮和
R键旋转功能。 - 物品替换现在支持大换小和小换大两种交换方式。
- 右键放置现在会在原版点击处理之前验证完整的足迹,防止越界、被阻挡或空间不足的放置。
- Shift 快速转移优先搜索快捷栏,其次搜索主库存,同时检查物品的完整足迹。
- 保持快捷栏与 Petite 主库存布局分离;多槽位物品不能跨越这两个组。
- 修复了列数为偶数的存储设备的网格宽度计算,并修正了物品合并期间的占用检查。
- 修复了从商人、铁砧、锻造台等结果槽位快速移动输出时出现重复结果的问题。
- 改进了整物品悬停、高亮和足迹渲染,避免重复渲染多槽位物品。
- 为漏斗和其他自动化路径添加了基于足迹的插入功能。
模组兼容性
- 改进了对 Sophisticated Core 和 Sophisticated Backpacks 的支持,包括实际的足迹渲染、占用验证以及基于足迹的快速转移。
- 将 Sophisticated 存储槽位与玩家的主库存和快捷栏分离。
- 通过 TACZ 的
GunIdNBT 数据,实现了modern_kinetic_gun物品的大小和背景颜色匹配。 - 保留了 KubeJS 事件桥接。
配置与分发
- 添加了
border_items.json、border_colors.json、screen_layouts.json和screen_layout_mode.json。 - 物品背景槽位根据当前库存纹理动态裁剪,以兼容资源包。
- 移除了固定的
area.png资源文件。 - 移除了旧的
/size和颜色编辑命令;请使用编辑模式和配置文件代替。 - 将项目许可证更改为 GNU AGPL v3.0。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
新增 50+ 个独特生物群系,为你的世界增添新树木、花卉等更多元素!
模组
添加全屏世界地图,显示你在世界中已探索的区域。与 Xaero's Minimap 搭配使用效果极佳。
模组
让你能够在世界中的任何位置定位结构。
模组
添加睡袋和吊床,分别用于便携性和昼夜转换,同时不会设置新的出生点。共有16种颜色可选!
模组
TerraFirmaCraft (TFC) 是一个全面转换模组,对生存模式进行了彻底的改造与重新设计。
评论 0
登录后参与评分
还没有评论,来抢沙发吧