MaterialPartData
Material Part Data is data that can be added to a MaterialPart to give it some more properties.
Importing the package
It might be required for you to import the package if you encounter any issues, so better be safe than sorry and add the import.
import mods.contenttweaker.MaterialPartData;
Retrieving such an object
You can get a MaterialPartData object by using the getData()
Method on a MaterialPart object.
Methods
All you can do with MaterialPartData is add more Data and retrieve stored data! You do that like so:
Now, what to put in as name or value?
Well, that depends on the parttype of the tool you are using.
Below you will find a list for CoT’s basic Part Types:
Items
Name | Value | Required? |
---|---|---|
burn | An "Integer" (e.g. "100") | No |
Armor
Name | Value | Required? |
---|---|---|
durability | An "Integer" (e.g. "10") | No |
enchantability | An "Integer" (e.g. "10") | No |
reduction | Four "Integers" (e.g. "2, 5, 6, 2") Representing Footwear, Leggins, Chestplate, Headslot | No |
toughness | A "float" (e.g. "2.4") | No |
Block
Name | Value | Required? |
---|---|---|
hardness | An "Integer" (e.g. "3") | No |
resistance | An "Integer" (e.g. "15") | No |
harvestLevel | An "Integer" (e.g. "1") | No |
harvestTool | A "tool" (e.g. "pickaxe") | No |
Fluid
Name | Value | Required? |
---|---|---|
temperature | An "Integer" (e.g. "300") | No |
density | An "Integer" (e.g. "1000") | No |
luminosity | An "Integer" (e.g. "0") | No |
viscosity | An "Integer" (e.g. "100") | No |
vaporize | A "boolean" (e.g. "true") | No |
Ore
Name | Value | Required? |
---|---|---|
drops | An "itemList" (e.g. "minecraft:redstone,minecraft:gold_ingot") | No |
variants | A "Block List" (e.g. "minecraft:stone,minecraft:end_stone") | No |
hardness | An "Integer list" (e.g. "3,3") | No |
resistance | An "Integer list" (e.g. "15,15") | No |
harvestLevel | An "Integer list" (e.g. "1,1") | No |
harvestTool | A "toolList" (e.g. "pickaxe,pickaxe") | No |
Minecart
Name | Value | Required? |
---|---|---|
maxSpeed | A "float" (e.g. "1.0") | No |
drag | A "float" (e.g. "1.0") | No |
riddenDrag | A "float" (e.g. "1.0") | No |