English
English
Appearance
English
English
Appearance
In MT Inventory Weight, you can configure default item weights to suit your gameplay needs. This guide explains how default item weights work, how to modify them, and how they interact with custom item weights.
MT Inventory Weight uses a set of default values to determine the weight of various items. These values are applied when no specific custom weight is defined for an item. The mod categorizes items into several groups, each with its own default weight:
The default weights are set as follows:
You can define default item weights in your configuration files. For more information, see the Configuration Guide.
These values will override the defaults provided by the mod when the world or server loads. To apply these configurations:
.json
file.config/inventory_weight
).For block-type items, the weight is influenced by several factors:
InventoryWeightUtil.BLOCKS
.In creative mode, blocks have a special weight defined by InventoryWeightUtil.CREATIVE
.
weight += (hardness * 10);
weight += Math.min((blastResistance * 50), 10000);
// Subtract a value if the block is transparent
if (isTransparent) {
weight -= 1000;
}
weight *= (getRarityWeight(stack) * 1.3f);
return (int) Math.floor(Math.max(weight, InventoryWeightUtil.ITEMS));
For regular items, the weight is influenced by:
// Modify weight based on stack size
if (maxStackSize > 1) {
float stackMultiplier = 1 + (10f / maxStackSize); // Example multiplier
weight *= stackMultiplier;
}
else if (maxStackSize == 1 && maxDurability > 0) {
if (isHasArmor(item)) {
weight += (float) (getArmorValue(item) * 10);
weight += (InventoryWeightUtil.ITEMS + (((float) maxDurability / 300) * 300));
}
if (isHasDamage(item)) {
weight += (float) (InventoryWeightUtil.ITEMS + ((maxDurability / 1500.0) * 300));
}
}
weight *= (getRarityWeight(stack) * 1.3f);
return (int) Math.floor(Math.max(weight, 1.0f));