Block Penetration Values
Link to block-penetration-values
The BlockPenetration
package can be used to add block and material hardness values to Immersive Intelligence's block
damage system.
Importing the Package
Link to importing-the-package
ZenScript Copyimport mods.immersiveintelligence.BlockPenetration;
Adding Materials
Link to adding-materials
Parameters
Link to parameters
Type | Name | Required |
---|---|---|
Type IMaterial | Name Material | Required Yes |
Type int | Name Integrity | Required Yes |
Type int | Name Density | Required Yes |
Type String | Name Penetration Type | Required Yes |
Type String | Name Sound | Required Yes |
Integrity is the amount of hitpoints a block has. Damage is dealt in a similar way it is done to entities.
Density is the modifier of speed loss after contact with the block. The higher the density, the more a bullet will be
slowed down after penetration.
Syntax
Link to syntax
ZenScript Copymods.immersiveintelligence.BlockPenetration.addMaterial(IMaterial material, float integrity, float density, String penetrationType, String sound);
Penetration Types
Link to penetration-types
Name | Used for |
---|---|
Name metal | Used for all the metals |
Name ground | Used for dirt, sand, etc. |
Name solid | Used for stone, bricks |
Name flesh | Used for unarmored mobs |
Name light | Used for glass, wool, leaves, cloth |
Example
Link to example
ZenScript Copymods.immersiveintelligence.BlockPenetration.addMaterial(crafttweaker.blocks.IMaterial.cake(), 1, 1, "light", "immersiveintelligence:siren");
Adding Metals
Link to adding-metals
This function is an easy way to add a metal block and sheetmetal along with their slab variants using an Ore Dictionary name.
Parameters
Link to parameters-1
Type | Name | Required |
---|---|---|
Type String | Name Sound | Required Yes |
Type int | Name Integrity | Required Yes |
Type int | Name Density | Required Yes |
Syntax
Link to syntax-1
ZenScript Copymods.immersiveintelligence.BlockPenetration.addMaterial(String name, float integrity, float density);
Example
Link to example-1
ZenScript Copymods.immersiveintelligence.BlockPenetration.addMaterial("unobtainium", 1, 1);
Adding Blocks
Link to adding-blocks
Parameters
Link to parameters-2
Type | Name | Required |
---|---|---|
Type IBlockState | Name BlockState | Required Yes |
Type int | Name Integrity | Required Yes |
Type int | Name Density | Required Yes |
Type String | Name Penetration Type | Required Yes |
Type String | Name Sound | Required Yes |
Syntax
Link to syntax-2
ZenScript Copymods.immersiveintelligence.BlockPenetration.addMaterial(IBlockState state, float integrity, float density, String penetrationType, String sound);
Example
Link to example-2
ZenScript Copymods.immersiveintelligence.BlockPenetration.addMaterial(<blockstate:minecraft:log:variant=spruce>, 1, 1, "light", "immersiveintelligence:siren");