Home Getting Started With Scripts Using this wiki Commands CTGUI Global functions Bracket Handlers
This page relates to Immersive Intelligence, which has built-in support!

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

script.zs
import mods.immersiveintelligence.BlockPenetration;

Adding Materials

Parameters

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.

Syntax

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

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

Example

script.zs
mods.immersiveintelligence.BlockPenetration.addMaterial(crafttweaker.blocks.IMaterial.cake(), 1, 1, "light", "immersiveintelligence:siren");

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

TypeNameRequired
Type
String
Name
Sound
Required
Yes
Type
int
Name
Integrity
Required
Yes
Type
int
Name
Density
Required
Yes

Syntax

script.zs
mods.immersiveintelligence.BlockPenetration.addMaterial(String name, float integrity, float density);

Example

script.zs
mods.immersiveintelligence.BlockPenetration.addMaterial("unobtainium", 1, 1);

Adding Blocks

Parameters

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

Syntax

script.zs
mods.immersiveintelligence.BlockPenetration.addMaterial(IBlockState state, float integrity, float density, String penetrationType, String sound);

Example

script.zs
mods.immersiveintelligence.BlockPenetration.addMaterial(<blockstate:minecraft:log:variant=spruce>, 1, 1, "light", "immersiveintelligence:siren");