-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Custom Potato Cannon Projectile Types
(For Create 0.3.2e)
Custom potato cannon projectile types can be added via a datapack. Before 0.3.2e, types could only be added through code, but now a datapack can also be used. At this time, adding a type through code allows more customizability and control, however.
Adding a custom type is quite simple - just set up a basic datapack (more information here) and add some files under the data/[namespace]/potato_cannon_projectile_types directory. Files must end in .json but can be located in any sub-directory, as long as the full path does not violate Minecraft's ResourceLocation path check. The full specification for these JSON files can be found in the table below.
Note: Custom types cannot define block or entity interactions or have a render mode other than billboard. However, this functionality will be added eventually.
| Key | Value Type | Default Value |
|---|---|---|
items |
non-empty array of strings, each one representing the namespaced identifier of an item | |
reload_ticks |
integer | 10 |
damage |
integer | 1 |
split |
integer | 1 |
knockback |
float | 1 |
drag |
float | 0.99 |
velocity_multiplier |
float | 1 |
gravity_multiplier |
float | 1 |
sound_pitch |
float | 1 |
sticky |
boolean | false |
data/example/potato_cannon_projectile_type/fish.json
{
"items": [
"minecraft:cod",
"minecraft:salmon"
],
"reload_ticks": 5,
"knockback": 2,
"velocity_multiplier": 1.2,
"sticky": true
}data/example/potato_cannon_projectile_type/material_blocks.json
{
"items": [
"minecraft:gold_block",
"minecraft:iron_block",
"minecraft:diamond_block",
"minecraft:emerald_block"
],
"reload_ticks": 30,
"damage": 20,
"knockback": 5,
"drag": 1.5
}