Bullet System
The bullet.*
package can be used to add and remove bullet cores, components and shrapnel to Immersive Intelligence
Bullet System.
Importing the Package
Adding Shrapnel
Parameters
Type | Name | Required |
---|---|---|
Type String | Name Name | Required Yes |
Type int | Name Color | Required Yes |
Type String | Name Texture Path | Required Yes |
Type int | Name Damage | Required Yes |
Type int | Name Mass | Required Yes |
Type float | Name Brightness | Required Yes |
For the Name
parameter use a simple material name, such as dirt
, iron
or diamond
.
The Color
parameter is a color provided in RGB int format. To get it, pick a color (RGB) in hex and convert the number
to decimal.
The Texture
parameter is a texture path (resource location) string, f.e. "minecraft:textures/blocks/dirt"
.
The Damage
parameter is a damage value in half-hearts. The Mass
parameter determines gravity.
Default Values
Material Name | Color | Damage | Texture | Mass |
---|---|---|---|---|
Material Name aluminum | Color 14281962 | Damage | Texture immersiveengineering:textures/blocks/sheetmetal_aluminum | Mass 0.05 |
Material Name zinc | Color 14607324 | Damage | Texture immersiveintelligence:textures/blocks/metal/sheetmetal_zinc | Mass 0.15 |
Material Name copper | Color 14908454 | Damage | Texture immersiveengineering:textures/blocks/sheetmetal_copper | Mass 0.25 |
Material Name platinum | Color 14213601 | Damage | Texture immersiveintelligence:textures/blocks/metal/sheetmetal_platinum | Mass 0.05 |
Material Name gold | Color 13742137 | Damage | Texture minecraft:textures/blocks/gold_block | Mass 0.25 |
Material Name nickel | Color 8620151 | Damage | Texture immersiveengineering:textures/blocks/sheetmetal_nickel | Mass 0.25 |
Material Name silver | Color 10996424 | Damage | Texture immersiveengineering:textures/blocks/sheetmetal_silver | Mass 0.25 |
Material Name electrum | Color 16166233 | Damage | Texture immersiveengineering:textures/blocks/sheetmetal_electrum | Mass 0.25 |
Material Name constantan | Color 16348246 | Damage | Texture immersiveengineering:textures/blocks/sheetmetal_constantan | Mass 0.25 |
Material Name brass | Color 9795395 | Damage | Texture immersiveintelligence:textures/blocks/metal/sheetmetal_brass | Mass 0.35 |
Material Name iron | Color 13092807 | Damage | Texture minecraft:textures/blocks/iron_block | Mass 0.25 |
Material Name lead | Color 3817028 | Damage | Texture immersiveengineering:textures/blocks/sheetmetal_lead | Mass 0.75 |
Material Name steel | Color 5066061 | Damage | Texture immersiveengineering:textures/blocks/sheetmetal_steel | Mass 0.35 |
Material Name tungsten | Color 3882563 | Damage | Texture immersiveintelligence:textures/blocks/metal/sheetmetal_tungsten | Mass 0.45 |
Material Name HOPGraphite | Color 2631720 | Damage | Texture immersiveengineering:textures/blocks/stone_decoration_coke | Mass 0.45 |
Material Name uranium | Color 6656617 | Damage | Texture immersiveengineering:textures/blocks/sheetmetal_uranium | Mass 0.45 |
The Brightness
parameter is a value 0.0-1.0, determining the glow effect for Albedo (colored lighting mod) compat.
Syntax
Example
Removing Shrapnel
Parameters
Type | Name | Required |
---|---|---|
Type String | Name Name | Required Yes |
Syntax
Example
Adding Bullet Cores
Bullet cores can be creating using a builder class called CoreMaterialBuilder
. A new builder can be creating using
the CoreMaterialBuilder.create(String name);
method. After creation, it needs to be assigned values and finally -
registered.
Methods
Method | Parameter Type | Parameter Name | Description |
---|---|---|---|
Method setColor | Parameter Type int | Parameter Name Color | Description Color value in RGB Int format |
Method setDensity | Parameter Type float | Parameter Name Color | Description Value used for calculating mass and gravity of the projectile |
Method setDmgModifier | Parameter Type float | Parameter Name Color | Description Multiplier for the damage dealt by contact with the bullet, default 1.0 |
Method setEffectModifier | Parameter Type float | Parameter Name Color | Description Multiplier for the strength/radius of component effect, default 1.0 |
Method setPenHardness | Parameter Type float | Parameter Name Color | Description Block Penetration hardness value, see Block Penetration Values |
Method setStack | Parameter Type IIngredient | Parameter Name Stack | Description Ingredient that will be accepted in Projectile Workshop to create the core |
Default Values
Core Name | Color | Density | Damage Modifier | Effect Modifier | Penetration Hardness | Stack |
---|---|---|---|---|---|---|
Core Name core_brass | Color 14329930 | Density 0.75 | Damage Modifier 0.65 | Effect Modifier 1.25 | Penetration Hardness 4 | Stack <ore:nuggetBrass> |
Core Name core_lead | Color 3817028 | Density 1.5 | Damage Modifier 1.1 | Effect Modifier 1.0 | Penetration Hardness 8 | Stack <ore:nuggetLead> |
Core Name core_steel | Color 6580076 | Density 0.5 | Damage Modifier 1.25 | Effect Modifier 0.65 | Penetration Hardness 12 | Stack <ore:nuggetSteel> |
Core Name core_tungsten | Color 3026997 | Density 0.35 | Damage Modifier 1.45 | Effect Modifier 0.25 | Penetration Hardness 16 | Stack <ore:nuggetBrass> |
Core Name core_uranium | Color 6656617 | Density 0.45 | Damage Modifier 1.35 | Effect Modifier 0.75 | Penetration Hardness 36 | Stack <ore:nuggetUranium> |
Example
Removing Bullet Cores
Parameters
Type | Name | Required |
---|---|---|
Type String | Name Name | Required Yes |
Syntax
Example
Adding Bullet Components
Bullet components can be creating using a builder class called ComponentMaterialBuilder
. A new builder can be creating
using the ComponentMaterialBuilder.create(String name);
method. After creation, it needs to be assigned values and
finally - registered using the register()
method.
Methods
Method | Parameter Type | Parameter Name | Description |
---|---|---|---|
Method setColor | Parameter Type int | Parameter Name Color | Description Color value in RGB Int format |
Method setDensity | Parameter Type float | Parameter Name Color | Description Value used for calculating mass and gravity of the projectile |
Method setRole | Parameter Type string | Parameter Name Role | Description Value used for creating a generic projectile name, i.e. “armor-piercing - high-explosive”, see the list below for valid roles |
Method setStack | Parameter Type IIngredient | Parameter Name Stack | Description Ingredient that will be accepted in Projectile Workshop to create the core |
Method setComponentEffect | Parameter Type IComponentFunction | Parameter Name Stack | Description Function called during the explosion |
Component Roles
A list of valid values for the setRole
method.
general_purpose
shrapnel
piercing
explosive
incendiary
tracer
flare
chemical
special
IComponentFunction
IComponentFunction
is a function type, used for creating effects during a bullet’s explosion.
Type | Name | Description |
---|---|---|
Type IWorld | Name world | Description World the explosion happened in |
Type IVector3d | Name pos | Description Position vector of the bullet |
Type IVector3d | Name dir | Description Direction vector of the bullet |
Type String | Name coreType | Description Core type name |
Type float | Name amount | Description How much of the component is contained within the projectile (0.0-1.0) |
Type IData | Name nbt | Description NBT Data of the component (collected from item) |
Default Values
Automatically generated components (based on fluids, gasses and shrapnel) and are not listed.
Core Name | Color | Density | Role | Stack |
---|---|---|---|---|
Core Name tnt | Color 14329930 | Density 1.0 | Role explosive | Stack <ore:materialTNT> |
Core Name rdx | Color 13812372 | Density 1.25 | Role explosive | Stack <ore:materialHexogen> |
Core Name hmx | Color 16514043 | Density 1.75 | Role explosive | Stack <ore:materialHMX> |
Core Name nuke | Color 3727570 | Density 1.0 | Role special | Stack <ore:materialNuke> |
Core Name white_phosphorus | Color 13884332 | Density 2 | Role incendiary | Stack <ore:dustWhitePhosphorus> |
Core Name tracer_powder | Color 16777215 | Density 0.25 | Role tracer | Stack <immersiveintelligence:tracer_powder:0> |
Core Name tesla | Color 13283761 | Density 1.15 | Role special | Stack <immersiveengineering:metal_device0:0> |
Core Name propaganda | Color 12234660 | Density 0.65 | Role special | Stack <immersiveintelligence:printed_page:1> |
Core Name flare_powder | Color 16777215 | Density 0.25 | Role flare | Stack <immersiveintelligence:tracer_powder:1> |
Core Name firework | Color 13283761 | Density 1.0 | Role flare | Stack <minecraft:firework_charge> |
Example
Removing Bullet Components
Parameters
Type | Name | Required |
---|---|---|
Type String | Name Name | Required Yes |