Pondus Inventory FI
Sable 的扩展模组,让每一个方块、物品和流体都名副其实地承担重量。
⚠️ 警告: 此模组仍在积极开发中。若要使其与其他模组兼容,你需要手动调整设置。请务必小心!
ℹ️ 如果你愿意帮忙 为各种模组的物品、方块和液体的重量填补空白,请在频道 ⌬・synthesis-of-ideas 中留言。所有被采纳的配置将列出在此模组页面及模组描述中。
这一切是什么意思?
Pondus Inventory FI 是 Sable 物理引擎的配套模组。它提供了一套极其详细的系统,用于确定方块、物品,以及流体的实际重量。
你可以通过设置或游戏内命令实时更改方块、物品或流体的质量。该模组还会检查箱子、桶、流体罐以及其他任何容器内部,并为承载它们的物体增加重量——因此当货舱装满油时,你的飞艇会突然变得沉重得多;或者当你装满水时,便携式水箱也会让秤砣下沉。
非常适合使用 TerraFirmaCraft、Create、Sable 或其他任何需要真实质量、平衡性和流体动力学的建筑项目。
它能做什么?
⚖️ 随心所欲地调整方块与流体质量
使用配置文件或 /pondus mass 命令,为几乎所有方块或流体设置自定义基础重量。你甚至可以使用 #minecraft:planks、#tfc:ores 或 #forge:water 等标签来针对整个组群。配置文件支持数学表达式——直接在 JSON 文件中写入如 "2.5 * stack_size" 这样的内容。
? 计算容器中所有物品的重量
任何容器(箱子、桶、Create 的移动装置、流体罐等)都会自动添加其中存储的所有物品和流体的总重量。你可以调整 inventory_multiplier 来平衡数值(例如只计入 80% 的内容),并决定是否包含容器方块自身的质量。
? 流体质量计算
Pondus 现在通过 NeoForge Fluid Handler 能力支持流体。定义每种流体的每桶质量,模组会根据实际毫升数(mB)自动计算重量。这对于 realistic 的水塔、燃料箱、熔岩池或化学加工设施来说非常完美。
? 全局质量修正系数
想让整个世界变重 20%,而不必编辑数百个单独条目?使用 global.json!此文件包含三个乘数——block_mass_modifier、item_mass_modifier 和 fluid_mass_modifier——它们应用于游戏中的每个方块、物品和流体。只需更改一个数字即可微调整合包的整体物理平衡。
?️ 基于命名空间的配置存储
配置文件现在按模组组织在 config/pondus_inventory_fi/ 内部。每个模组(例如 minecraft、create、tfc)都有自己独立的子文件夹,在该文件夹内放置标准的 blocks.json、items.json 和 fluids.json。
优点:
- 不再出现模组间的 ID 冲突。
- 更容易管理、共享或为每个模组单独进行版本控制。
- 模组会自动将旧的扁平化配置文件(如果存在)迁移到新结构,并在
_migrated_backup 中备份它们。
示例文件夹结构:
config/pondus_inventory_fi/
├── global.json # 所有方块/物品/流体的全局乘数
├── minecraft/
│ ├── blocks.json
│ ├── items.json
│ └── fluids.json
├── tfc/
│ ├── blocks.json
│ ├── items.json
│ └── fluids.json
├── create/
│ ├── blocks.json
│ └── items.json
└── _migrated_backup/ # 如果存在旧配置则自动创建
├── blocks.json
├── items.json
└── fluids.json
⚙️ 真正合理的配置
每个 JSON 文件都使用干净、简单的格式。像 "base_mass": "2.5 * stack_size" 或 "mass_per_bucket": "0.8 + density_factor" 这样的表达式都是允许的。你可以使用 /pondus reload 实时重新加载所有内容——无需重启服务器。
? 首次启动导入助手
在安装 Pondus 后首次启动游戏时,会出现一个屏幕询问你是否要从外部物理引擎数据导入质量。这可以节省你手动输入数百个方块和物品质量的时间。如果跳过,你以后总是可以运行 /pondus import_external(需要 OP 权限)。
? 自动填充缺失条目
运行 /pondus populate 将扫描所有注册的方块、物品和流体,并将任何缺失的项添加到配置文件中,赋予默认质量(方块为 0.5,物品为 0.01,每桶流体为 1.0)。现有条目保持不变,因此随时运行都是安全的。非常适合为新整合包快速引导质量数据库,或在添加许多新模组后使用。
设置指南
需求
你需要 Sable。仅此而已。
(流体支持需要实现 NeoForge IFluidHandler 能力的模组/方块)
配置文件
所有配置文件位于 config/pondus_inventory_fi/<mod_namespace>/。
global.json – 全局质量乘数。示例:
{
"block_mass_modifier": 1.0,
"item_mass_modifier": 1.0,
"fluid_mass_modifier": 1.0
}
这些值分别乘以所有方块、物品和流体的最终计算质量。更改一个数字即可按比例放大或缩小整个物理系统。
blocks.json – 设置方块的规则。示例:
{
"minecraft:chest": {
"block_id": "minecraft:chest",
"base_mass": "2.5",
"inventory_multiplier": 0.8,
"include_container_mass": true
},
"tfc:sand/red": {
"block_id": "tfc:sand/red",
"base_mass": "0.1",
"inventory_multiplier": 1.0,
"include_container_mass": false
},
"#minecraft:planks": {
"block_id": "#minecraft:planks",
"base_mass": "0.5",
"inventory_multiplier": 1.0,
"include_container_mass": false
}
}
items.json – 物品重量。示例:
{
"minecraft:iron_ingot": {
"item_id": "minecraft:iron_ingot",
"mass": "0.5",
"per_stack": true
},
"tfc:metal/ingot/cast_iron": {
"item_id": "tfc:metal/ingot/cast_iron",
"mass": "1.2",
"per_stack": true
}
}
fluids.json – 流体重量。示例:
{
"minecraft:water": {
"fluid_id": "minecraft:water",
"mass_per_bucket": "1.0"
},
"minecraft:lava": {
"fluid_id": "minecraft:lava",
"mass_per_bucket": "3.5"
},
"tfc:olive_oil": {
"fluid_id": "tfc:olive_oil",
"mass_per_bucket": "0.92"
},
"#forge:crude_oil": {
"fluid_id": "#forge:crude_oil",
"mass_per_bucket": "0.85"
}
}
参数简要说明:
| 参数 |
描述 |
base_mass / mass |
一个数值或表达式(如 "2.5"、"0.5 * stack_size"、"1.0 + nbt_power")。 |
mass_per_bucket |
每桶(1000 mB)的质量,单位为千克 (kg)。支持表达式。 |
per_stack |
如果为 true,则质量将乘以堆叠中的物品数量。 |
inventory_multiplier |
容器内物品总重量的乘数(例如 0.8 = 80%)。 |
include_container_mass |
是否将容器方块自身的质量叠加在其内容物之上。 |
block_mass_modifier |
应用于所有方块最终质量的全球乘数。 |
item_mass_modifier |
应用于所有物品最终质量的全球乘数。 |
fluid_mass_modifier |
应用于所有流体最终质量的全球乘数。 |
? 流体计算说明: 质量计算公式为 mass_per_bucket × (millibuckets / 1000.0)。因此,500 mB 的水(mass_per_bucket: 1.0)恰好重 0.5 千克。
游戏内命令
所有命令都需要操作员权限(等级 2)。以下是您可以执行的操作:
| 命令 |
功能 |
示例 |
/pondus mass <value> block [storage_modifier] |
设置您正看向的方块的质量。可选的 storage_modifier 用于设置库存乘数(即内容物的重量比例)。 |
/pondus mass 5.0 block 或 /pondus mass 10.0 block 0.8 |
/pondus mass <value> item |
设置您手持物品的质量。 |
/pondus mass 0.3 item |
/pondus mass <value> fluid <fluid_id> |
设置流体的每桶质量。 |
/pondus mass 1.0 fluid minecraft:water |
/pondus mass <value> tag <id> |
为该标签下的所有方块/物品/流体应用质量。 |
/pondus mass 1.0 tag #tfc:ores |
/pondus populate [block_mass] [item_mass] [fluid_mass] |
自动扫描所有已注册的方块、物品和流体,并使用给定的默认质量将缺失的条目添加到配置文件中。 • 如果省略了质量值,将使用合理的默认值:0.5 对应方块,0.01 对应物品,以及 1.0 对应流体(千克/桶)。 • 现有条目将被跳过 – 仅添加缺失的条目。 • 扫描完成后会自动保存配置文件。 • 使用场景:非常适合为新整合包或添加大量模组后快速建立质量数据库的基础 – 无需手动编辑即可获取所有项目的基础数据。 |
/pondus populate (使用默认值)
/pondus populate 2.5 0.1 1.5 (自定义质量) |
/pondus import_external |
从外部物理引擎的数据(如 Sable)导入质量到 Pondus 配置文件中。如果您跳过了首次启动确认屏幕,这将非常有用。 |
/pondus import_external |
/pondus reload |
热重载所有配置文件(包括 global.json)并清除缓存。 |
/pondus reload |
/pondus sync |
重建所有 SubLevels 的物理数据(在更改质量后使用)。 |
/pondus sync |
/pondus config showmass <true/false> |
切换是否在工具提示中显示物品质量。 |
/pondus config showmass true |
/pondus config showblockmass <true/false> |
切换是否在工具提示中显示方块质量(针对方块物品 BlockItems)。 |
/pondus config showblockmass true |
面向模组与整合包开发者
直接从代码注册质量:
// Register a block
MassRegistry.registerBlock("minecraft:stone",
new BlockMassEntry("minecraft:stone", "3.0", 1.0, true));
// 注册物品
MassRegistry.registerItem("minecraft:diamond",
new ItemMassEntry("minecraft:diamond", "0.3", true));
// 注册流体
MassRegistry.registerFluid("minecraft:water",
new FluidMassEntry("minecraft:water", "1.0"));
// 通过标签注册
MassRegistry.registerBlock("#minecraft:logs",
new BlockMassEntry("#minecraft:logs", "0.8", 1.0, false));
处理自定义 NBT 数据:
// 读取
double power = InventoryMassCalculator.getCustomDataValue(stack, "power", 1.0);
// 写入
InventoryMassCalculator.setCustomDataValue(stack, "power", 2.5);
流体质量计算内部逻辑:
// FluidMassEntry 会自动处理毫桶 → 千克的转换
FluidMassEntry water = new FluidMassEntry("minecraft:water", "1.0");
double massFor500mb = water.getMass(500); // 返回 0.5 kg
// 也支持表达式
FluidMassEntry oil = new FluidMassEntry("tfc:olive_oil", "0.92 * density_mod");
运行时配置更改:
如果在运行时更改了配置,请记得使缓存失效:
ModConfig.CONFIG.reload();
InventoryMassCache.clear();
// 然后在服务端运行 /pondus sync 命令
? 关于全局修饰符的说明: global.json 中的 block_mass_modifier、item_mass_modifier 和 fluid_mass_modifier 会在质量计算过程中自动应用。你无需在代码中处理它们——只需注册基础数值,全局乘数将按比例调整这些值。
发现了 Bug?
太好了!(好吧,其实不太好,但你知道我的意思。)以下信息对我帮助最大:
- 从
logs/latest.log 获取日志,并搜索 pondus_inventory_fi。
- 告诉我模组版本、Minecraft 版本、NeoForge 版本以及 Sable 版本。
- 准确描述你做了什么、预期结果是什么,以及实际发生了什么。如果有报错,请粘贴相关的日志部分。
- 对于与流体相关的问题: 包括你测试使用的流体储罐/方块,以及它是否实现了
IFluidHandler 接口。
许可证: MIT。使用、修改、分享——只需保留署名即可。
开发者: CatCosYT & Fractal Interactive Discord:
Pondus Inventory FI
An addon for Sable that makes every block, item, and fluid pull its weight—literally.
⚠️ I warn you: this mod is still under active development. To make it work with other mods, you will need to manually adjust the settings. You have been warned!
ℹ️ If you want to help with the blanks for the weights of items, blocks, and liquids from various mods, write about it in the channel ⌬・synthesis-of-ideas. All whose configs will be listed on this mod page and in the mod description.
What does it all mean?
Pondus Inventory FI is a companion mod for the Sable physics engine. It provides an incredibly detailed system for determining how much blocks, items, and fluids actually weigh.
You can change the mass of a block, item, or fluid on the fly using settings or in-game commands. The mod also looks inside chests, barrels, fluid tanks, and any other containers and adds weight to whatever is holding them up — so your airship suddenly becomes much heavier when the cargo hold is full of oil, or your portable water tank tips the scales when filled.
Ideal for builds using TerraFirmaCraft, Create, Sable, or anything else where realistic mass, balance, and fluid dynamics are important.
What can it do?
⚖️ Mess with block & fluid mass any way you like
Set a custom base weight for almost any block or fluid using the config or the /pondus mass command. You can even target entire groups with tags like #minecraft:planks, #tfc:ores, or #forge:water. The config supports math expressions — write things like "2.5 * stack_size" directly in the JSON file.
? Count the weight of everything inside containers
Any container (chest, barrel, Create's moving contraption, fluid tank, etc.) automatically adds the total weight of all items and fluids stored inside. You can tweak an inventory_multiplier to balance things out (maybe only 80% of the contents count), and decide whether the container block's own mass is included.
? Fluid mass calculations
Pondus now supports fluids via the NeoForge Fluid Handler capability. Define mass per bucket for any fluid, and the mod automatically calculates the weight based on the actual amount in millibuckets (mB). Perfect for realistic water towers, fuel tanks, lava reservoirs, or chemical processing setups.
? Global mass modifiers
Need to make the entire world 20% heavier without editing hundreds of individual entries? Use global.json! This file contains three multipliers — block_mass_modifier, item_mass_modifier, and fluid_mass_modifier — that are applied to every block, item, and fluid in the game. Perfect for fine-tuning the overall physics balance of a modpack with a single number change.
?️ Namespace‑based configuration storage
Config files are now organised per mod inside config/pondus_inventory_fi/. Each mod (e.g. minecraft, create, tfc) gets its own subfolder, and inside that folder you place the standard blocks.json, items.json, and fluids.json.
Benefits:
- No more ID collisions between mods.
- Easier to manage, share, or version-control configs for each mod separately.
- The mod automatically migrates old flat config files (if present) into the new structure and backs them up in
_migrated_backup.
Example folder structure:
config/pondus_inventory_fi/
├── global.json # global multipliers for all blocks/items/fluids
├── minecraft/
│ ├── blocks.json
│ ├── items.json
│ └── fluids.json
├── tfc/
│ ├── blocks.json
│ ├── items.json
│ └── fluids.json
├── create/
│ ├── blocks.json
│ └── items.json
└── _migrated_backup/ # created automatically if old configs existed
├── blocks.json
├── items.json
└── fluids.json
⚙️ Configs that actually make sense
Each JSON file uses a clean, simple format. Expressions like "base_mass": "2.5 * stack_size" or "mass_per_bucket": "0.8 + density_factor" are fair game. And you can reload everything on the fly with /pondus reload — no server restart needed.
? First‑launch import helper
When you start the game for the first time after installing Pondus, a screen will appear asking whether you want to import masses from the external physics engine data. This saves you from manually entering masses for hundreds of blocks and items. If you skip it, you can always run /pondus import_external later (requires OP).
? Auto‑populate missing entries
Running /pondus populate will scan all registered blocks, items, and fluids and add any missing ones to the config files with default masses (0.5 for blocks, 0.01 for items, 1.0 for fluids per bucket). Existing entries are left untouched, so it's safe to run at any time. Perfect for quickly bootstrapping a mass database for a new modpack or after adding many new mods.
Getting it set up
Requirements
You need Sable. That's it.
(Fluid support requires mods/blocks that implement NeoForge's IFluidHandler capability)
Config files
All configs live in config/pondus_inventory_fi/<mod_namespace>/.
global.json – global mass multipliers. Example:
{
"block_mass_modifier": 1.0,
"item_mass_modifier": 1.0,
"fluid_mass_modifier": 1.0
}
These values multiply the final calculated mass of all blocks, items, and fluids respectively. Change one number to scale the entire physics system up or down.
blocks.json – sets the rules for blocks. Example:
{
"minecraft:chest": {
"block_id": "minecraft:chest",
"base_mass": "2.5",
"inventory_multiplier": 0.8,
"include_container_mass": true
},
"tfc:sand/red": {
"block_id": "tfc:sand/red",
"base_mass": "0.1",
"inventory_multiplier": 1.0,
"include_container_mass": false
},
"#minecraft:planks": {
"block_id": "#minecraft:planks",
"base_mass": "0.5",
"inventory_multiplier": 1.0,
"include_container_mass": false
}
}
items.json – item weights. Example:
{
"minecraft:iron_ingot": {
"item_id": "minecraft:iron_ingot",
"mass": "0.5",
"per_stack": true
},
"tfc:metal/ingot/cast_iron": {
"item_id": "tfc:metal/ingot/cast_iron",
"mass": "1.2",
"per_stack": true
}
}
fluids.json – fluid weights. Example:
{
"minecraft:water": {
"fluid_id": "minecraft:water",
"mass_per_bucket": "1.0"
},
"minecraft:lava": {
"fluid_id": "minecraft:lava",
"mass_per_bucket": "3.5"
},
"tfc:olive_oil": {
"fluid_id": "tfc:olive_oil",
"mass_per_bucket": "0.92"
},
"#forge:crude_oil": {
"fluid_id": "#forge:crude_oil",
"mass_per_bucket": "0.85"
}
}
Quick rundown of the parameters:
| Parameter |
Description |
base_mass / mass |
A number or an expression ("2.5", "0.5 * stack_size", "1.0 + nbt_power"). |
mass_per_bucket |
Mass in kg for 1000 mB (1 bucket). Supports expressions. |
per_stack |
If true, the mass is multiplied by the number of items in the stack. |
inventory_multiplier |
Multiplier for the total weight of contents inside a container (e.g. 0.8 = 80%). |
include_container_mass |
Whether the container block's own mass counts on top of its contents. |
block_mass_modifier |
Global multiplier applied to all blocks' final mass. |
item_mass_modifier |
Global multiplier applied to all items' final mass. |
fluid_mass_modifier |
Global multiplier applied to all fluids' final mass. |
? Fluid math note: Mass is calculated as mass_per_bucket × (millibuckets / 1000.0). So 500 mB of water (mass_per_bucket: 1.0) weighs exactly 0.5 kg.
In-game commands
All commands need operator-level permissions (level 2). Here's what you can do:
| Command |
What it does |
Example |
/pondus mass <value> block [storage_modifier] |
Set the mass of the block you're looking at. Optional storage_modifier sets the inventory multiplier (how much the contents weigh). |
/pondus mass 5.0 block or /pondus mass 10.0 block 0.8 |
/pondus mass <value> item |
Set the mass of the item you're holding. |
/pondus mass 0.3 item |
/pondus mass <value> fluid <fluid_id> |
Set the mass per bucket for a fluid. |
/pondus mass 1.0 fluid minecraft:water |
/pondus mass <value> tag <id> |
Apply a mass to every block/item/fluid with that tag. |
/pondus mass 1.0 tag #tfc:ores |
/pondus populate [block_mass] [item_mass] [fluid_mass] |
Automatically scans all registered blocks, items, and fluids and adds any missing entries to the config files with the given default masses. • If a mass is omitted, sensible defaults are used: 0.5 for blocks, 0.01 for items, and 1.0 for fluids (kg per bucket). • Existing entries are skipped – only missing ones are added. • The config is saved automatically after the scan. • Use case: Perfect for quickly bootstrapping a mass database for a new modpack or after adding many mods – you get a baseline for everything without manual editing. |
/pondus populate (uses defaults)
/pondus populate 2.5 0.1 1.5 (custom masses) |
/pondus import_external |
Import masses from the external physics engine's data (such as Sable) into Pondus config files. Useful if you skipped the first‑launch confirmation screen. |
/pondus import_external |
/pondus reload |
Hot-reload all configs (including global.json) and clear caches. |
/pondus reload |
/pondus sync |
Rebuilds physics for all SubLevels (use after mass changes). |
/pondus sync |
/pondus config showmass <true/false> |
Toggle whether the mass of items is shown in tooltips. |
/pondus config showmass true |
/pondus config showblockmass <true/false> |
Toggle whether the mass of blocks is shown in tooltips (for BlockItems). |
/pondus config showblockmass true |
For mod & pack developers
Register masses straight from code:
// Register a block
MassRegistry.registerBlock("minecraft:stone",
new BlockMassEntry("minecraft:stone", "3.0", 1.0, true));
// Register an item
MassRegistry.registerItem("minecraft:diamond",
new ItemMassEntry("minecraft:diamond", "0.3", true));
// Register a fluid
MassRegistry.registerFluid("minecraft:water",
new FluidMassEntry("minecraft:water", "1.0"));
// Register by tag
MassRegistry.registerBlock("#minecraft:logs",
new BlockMassEntry("#minecraft:logs", "0.8", 1.0, false));
Work with custom NBT data:
// Reading
double power = InventoryMassCalculator.getCustomDataValue(stack, "power", 1.0);
// Writing
InventoryMassCalculator.setCustomDataValue(stack, "power", 2.5);
Fluid mass calculation internals:
// FluidMassEntry handles millibucket → kg conversion automatically
FluidMassEntry water = new FluidMassEntry("minecraft:water", "1.0");
double massFor500mb = water.getMass(500); // Returns 0.5 kg
// Expressions are supported too
FluidMassEntry oil = new FluidMassEntry("tfc:olive_oil", "0.92 * density_mod");
Runtime config changes:
If you change configs at runtime, don't forget to invalidate caches:
ModConfig.CONFIG.reload();
InventoryMassCache.clear();
// Then run /pondus sync on the server
? Note on global modifiers: The block_mass_modifier, item_mass_modifier, and fluid_mass_modifier from global.json are applied automatically during mass calculation. You don't need to handle them in your code — just register the base values, and the global multipliers will scale them appropriately.
Found a bug?
Great! (Well, not great, but you know what I mean.) Here's what helps me the most:
- Grab the log from
logs/latest.log and search for pondus_inventory_fi.
- Tell me the mod version, Minecraft version, NeoForge version, and Sable version.
- Describe exactly what you did, what you expected, and what happened instead. If there's an error, paste the relevant part of the log.
- For fluid-related issues: Include which fluid tank/block you tested with and whether it implements
IFluidHandler.
License: MIT. Use it, remix it, share it — just keep the credit.
Developer: CatCosYT & Fractal Interactive Discord:
评论 0
登录后参与评分
还没有评论,来抢沙发吧