Components - NyaaCat/RPGItems-reloaded GitHub Wiki
In the item configuration file, there is a section called components, which represents the vanilla item components. Its format is too complex to be edited via commands, so you need to edit it directly in the file.
Note: To edit files when server is running, you should first set fs_lock to false in config.yml
To know more about item components, see here
components:
axolotl/variant: blue
banner_patterns:
- color: black
pattern: base
- color: yellow
pattern: creeper
base_color: "white"
blocks_attacks:
block_delay_seconds: 0
block_sound: "entity.player.death"
bypassed_by: "#is_explosion"
damage_reductions:
- base: 1
factor: 1
horizontal_blocking_angle: 30
type: "#is_fall"
- base: 0.5
factor: 1
horizontal_blocking_angle: 90
type:
- "on_fire"
- "in_fire"
disable_cooldown_scale: 10
disable_sound: "entity.player.death"
item_damage:
base: 10
factor: 10
threshold: 10
break_sound: "entity.player.death"
bundle_contents:
- "rpgitem-id-1"
consumable:
animation: eat
consume_seconds: 1.6
has_consume_particles: true
on_consume_effects:
- type: "apply_effects"
probability: 0.8
effects:
- id: "speed"
amplifier: 1
duration: 100
- type: "apply_effects"
probability: 1
effects:
- id: "strength"
amplifier: 10
duration: 100
- type: "clear_all_effects"
can_place_on:
- grass_block
- stone
can_break:
- stone
cat/collar: red
cat/sound_variant: classic
cat/variant: tabby
charged_projectiles:
- "rpgitem-id-1"
- "rpgitem-id-2"
chicken/sound_variant: classic
chicken/variant: temperate
container:
- "rpgitem-id-1"
container_loot:
loot_table: "minecraft:chests/simple_dungeon"
seed: 0
cow/sound_variant: classic
cow/variant: temperate
damage_resistance: "in_fire"
damage_type: "in_fire"
death_protection:
death_effects:
- type: "apply_effects"
probability: 0.7
effects:
- id: "speed"
amplifier: 1
duration: 300
- type: "apply_effects"
probability: 0.5
effects:
- id: "regeneration"
amplifier: 2
duration: 400
- type: "clear_all_effects"
- type: "play_sound"
sound: "entity.player.burp"
- type: "remove_effects"
effects:
- "speed"
- "strength"
- type: "teleport_randomly"
diameter: 20.0
dye: white
dyed_color: "255,255,255"
enchantable: 5
enchantment_glint_override: true
equippable:
slot: chest
allowed_entities:
- player
asset_id: "grass_block"
camera_overlay: "example:example"
damage_on_hurt: true
equip_sound: "entity.player.death"
swappable: true
can_be_sheared: true
shearing_sound: minecraft:item.shears.snip
firework_explosion:
type: star
colors:
- "255,0,0"
fade_colors:
- "0,0,255"
trail: true
flicker: false
fireworks:
flight_duration: 2
explosions:
- type: star
colors:
- "255,0,0"
food:
can_always_eat: true
nutrition: 10
saturation: 10
fox/variant: red
frog/variant: temperate
glider: true
horse/variant: white
instrument:
description: "<red>test"
sound_event:
sound_id: "entity.player.death"
range: 5
range: 4
use_duration: 0.01
jukebox_playable: minecraft:pigstep
kinetic_weapon:
delay_ticks: 0
forward_movement: 0.0
damage_multiplier: 1.0
sound: minecraft:item.spear.use
hit_sound: minecraft:item.spear.hit
contact_cooldown_ticks: 10
llama/variant: creamy
lodestone_tracker:
tracked: false
target:
dimension: world
pos:
- 0.0
- 0.0
- 0.0
intangible_projectile: true
map_color: "255,0,0"
map_decorations:
home:
type: target_point
x: 12.5
z: -4.0
rotation: 45
map_id: 0
max_damage: 500
max_stack_size: 1
minimum_attack_charge: 1.0
mooshroom/variant: red
note_block_sound: "minecraft:block.note_block.harp"
ominous_bottle_amplifier: 1
painting/variant: kebab
parrot/variant: red
piercing_weapon:
sound: minecraft:item.spear.use
hit_sound: minecraft:item.spear.hit
deals_knockback: true
dismounts: false
pig/sound_variant: classic
pig/variant: temperate
pot_decorations:
back: brick
left: skeleton_skull
right: creeper_head
front: brick
potion_contents:
custom_color: "255,255,255"
custom_name: harming
potion: awkward
custom_effects:
- id: instant_damage
amplifier: 1
duration: 100
ambient: false
show_particles: false
show_icon: false
- id: poison
amplifier: 1
duration: 100
ambient: false
show_particles: false
show_icon: false
potion_duration_scale: 10.5
profile: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYTRkODE2YTQ3NWIzZjMxM2I2MjBkNjViZjkzNTg5MzFiNDZhZjljOGY0ZTdjOWFlNjQ3MDg4ODBiZWE2YmUifX19"
provides_banner_patterns: "globe"
provides_trim_material: "gold"
rabbit/variant: brown
rarity: epic
recipes:
- "minecraft:diamond_sword"
repairable:
items:
- "short_grass"
- "stone"
repair_cost: 1
salmon/size: medium
sheep/color: white
shulker/color: purple
stored_enchantments:
sharpness: 5
smite: 5
sulfur_cube_content: "rpgitem-id"
suspicious_stew_effects:
- id: speed
duration: 200
swing_animation:
type: none
duration: 6
tool:
damage_per_block: 5
default_mining_speed: 5
rules:
- blocks: "minecraft:stone"
speed: 2.0
correct_for_drops: true
- blocks:
- "minecraft:dirt"
- "minecraft:gravel"
speed: 120
correct_for_drops: false
- blocks: "minecraft:diamond_ore"
speed: 3.0
correct_for_drops: true
tooltip_display:
hide_tooltip: true
hidden_components:
- trim
- rarity
tooltip_style: "example:example"
trim:
material: diamond
pattern: bolt
tropical_fish/base_color: white
tropical_fish/pattern: kob
tropical_fish/pattern_color: white
use_cooldown:
seconds: 5
cooldown_group: "example:example"
use_effects:
can_sprint: false
interact_vibrations: true
speed_multiplier: 0.2
use_remainder: "rpgitem-id"
villager/variant: plains
weapon:
disable_blocking_for_seconds: 10
item_damage_per_attack: 10
wolf/collar: red
wolf/sound_variant: classic
wolf/variant: pale
writable_book_content:
- "page 1"
- "page 2"
written_book_content:
title: "<gold>My Book"
author: "Steve"
generation: 0
pages:
- "<red>Page one"
zombie_nautilus/variant: temperateThere are only a few sections in the above configuration file that need explanation:
-
profile: You can use both player name and Base64 code. Likeprofile: "Steve",profile: "ey....." -
dyed_color: Use rgb format string as color -
damage_type: Fill in the damage type ID (theminecraft:prefix can be omitted), e.g.in_fire,explosion,lava, etc. -
max_damageandmax_stack_size: Item can't both havemax_damageandmax_stack_size(>1) components, if you setmax_damage, you can't addmax_stack_sizeor it must be1, if you setmax_stack_size, you can't addmax_damage, regardless of its value. -
banner_patterns,blocks_attacks.damage_reductions,consumable.on_consume_effects,death_protection.death_effects: these four are all lists, and take effect in the order they are written. -
apply_effectsinsideon_consume_effects/death_effects: theprobabilityon a singleapply_effectsentry is one shared probability for that whole group ofeffects, not a per-effect probability. If you want different effects to trigger at different probabilities, split them into multipleapply_effectsentries (see howspeedandstrengthare written separately in the example above). -
Fields in
blocks_attacksanddamage_resistancethat hold a set of damage types (bypassed_by,damage_reductions[].type,damage_resistance): you can put a single ID, a#tag(e.g.#is_fall), or a plain list of IDs; but tags and plain IDs cannot be mixed, same as vanilla.damage_typeis not in this group — it's a single specific damage type, so it only accepts one plain ID, not a#tag. -
Various
*/variant,*/sound_variant,*/color,*/collar, plusdyeandpainting/variant: fill in the ID of the corresponding type, case-insensitive. Some of them are plain fixed enums (dye,fox/variant,salmon/size,parrot/variant,tropical_fish/pattern,tropical_fish/base_color,tropical_fish/pattern_color,mooshroom/variant,rabbit/variant,horse/variant,llama/variant,axolotl/variant,wolf/collar,cat/collar,sheep/color,shulker/color) — just use the Bukkit enum name; the rest (villager/variant,wolf/variant,wolf/sound_variant,pig/variant,pig/sound_variant,cow/variant,cow/sound_variant,chicken/variant,chicken/sound_variant,frog/variant,painting/variant,zombie_nautilus/variant,cat/variant,cat/sound_variant) are data-pack-extensible registry IDs (theminecraft:prefix can be omitted). -
charged_projectiles(ammo loaded into a Crossbow),bundle_contents(contents of a Bundle),container(contents of a container-type item, e.g. Shulker Box/Chest),sulfur_cube_content: same asuse_remainder, these take an rpgitem id, not raw item data; the server will look up the corresponding RPGItem and build the actual item. The first three are lists,sulfur_cube_contentonly holds a single item. -
pagesinwritten_book_contentsupport MiniMessage rich text; pages inwritable_book_content(Book and Quill) only support plain text (same as vanilla — an unsigned book doesn't support rich text). -
The sub-key under
map_decorations(homein the example) is a custom id for that decoration point, you can name it whatever you want. -
Unset components:
Some components are on item by default, like equippable on chestplate, if you want to unset it(make it not equippable), set the section like this:
equippable: unset: true hide_tooltip: unset: true
This method is applicable to all components.
Creative Commons Attribution-ShareAlike license (CC BY-SA) version 4.0