Item Registry
Link to item-registry
Package
Link to package
ZenScript Copy// Imports ItemRegistry methods into your script
import mods.terrafirmacraft.ItemRegistry;
Register Item Size
Link to register-item-size
- Register item size and weight. This changes how much a stack can hold.
- Sizes [TINY, VERY_SMALL, SMALL, NORMAL, LARGE, VERY_LARGE , HUGE]
- Weights [VERY_LIGHT, LIGHT, MEDIUM, HEAVY, VERY_HEAVY]
ZenScript CopyItemRegistry.registerItemSize(IIngredient input, String size, String weight);
Register Item Heat
Link to register-item-heat
- Register item heat capability and if this item is forgeable (eg: can be used in anvil).
- Heat capacity determines how fast an item cools down/heat up. Wrought Iron is 0.35.
- Melt temperature is at which temperature the item is melt. Wrought Iron is 1535 Brilliant White while Bronze is 950 Orange. For a complete reference, check Heating Temperatures
ZenScript CopyItemRegistry.registerItemHeat(IIngredient input, float heatCapacity, float meltTemp, bool forgeable);
Register Item Metal
Link to register-item-metal
- Register item as a metal item. Note that this automatically adds heating and forging capability. If canMelt is false this item won't bear the output directly (like iron ore needs bloomery/blast furnace)
- Registered metal ingot items aren't automatically registered as a valid input for tools (eg: Steel ingot from other mods registered by registerMetalItem method won't be automatically workable to TFC steel pickaxe head)
ZenScript CopyItemRegistry.registerItemMetal(IIngredient input, String metal, int units, bool canMelt);
Register Food
Link to register-food
- Register item food stats (Does not work on TFC Foods), This takes priority over existing values. Setting Decay to 0 stops decay from happening.
ZenScript CopyItemRegistry.registerFood(IIngredient input, int hunger, float water, float saturation, float decay, float grain, float veg, float fruit, float meat, float dairy);
Register Armor
Link to register-armor
- Register armor stats
ZenScript CopyItemRegistry.registerArmor(IIngredient input, float crushingModifier, float piercingModifier, float slashingModifier);
Register Fuel
Link to register-fuel
- Register item as a fuel for fire pit, forge or bloomery
ZenScript CopyItemRegistry.registerFuel(IItemStack itemStack, int burnTicks, float temperature, bool forgeFuel, bool bloomeryFuel);