This page relates to Immersive Intelligence, which has built-in support!

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
Copy
import mods.immersiveintelligence.BlockPenetration;

Adding Materials

Link to adding-materials

TypeNameRequired
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.

ZenScript
Copy
mods.immersiveintelligence.BlockPenetration.addMaterial(IMaterial material, float integrity, float density, String penetrationType, String sound);

Penetration Types

Link to penetration-types

NameUsed 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
ZenScript
Copy
mods.immersiveintelligence.BlockPenetration.addMaterial(crafttweaker.blocks.IMaterial.cake(), 1, 1, "light", "immersiveintelligence:siren");

This function is an easy way to add a metal block and sheetmetal along with their slab variants using an Ore Dictionary name.

TypeNameRequired
Type
String
Name
Sound
Required
Yes
Type
int
Name
Integrity
Required
Yes
Type
int
Name
Density
Required
Yes
ZenScript
Copy
mods.immersiveintelligence.BlockPenetration.addMaterial(String name, float integrity, float density);
ZenScript
Copy
mods.immersiveintelligence.BlockPenetration.addMaterial("unobtainium", 1, 1);
TypeNameRequired
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
ZenScript
Copy
mods.immersiveintelligence.BlockPenetration.addMaterial(IBlockState state, float integrity, float density, String penetrationType, String sound);
ZenScript
Copy
mods.immersiveintelligence.BlockPenetration.addMaterial(<blockstate:minecraft:log:variant=spruce>, 1, 1, "light", "immersiveintelligence:siren");