minecraft-data
Version:
Provide easy access to minecraft data in node.js
1,185 lines (1,174 loc) • 118 kB
YAML
!version: 1.21.1
!StartDocs: true
^types:
varint: native
varlong: native
optvarint: varint
pstring: native
buffer: native
u8: native
u16: native
u32: native
u64: native
i8: native
i16: native
i32: native
i64: native
bool: native
f32: native
f64: native
UUID: native
option: native
entityMetadataLoop: native
topBitSetTerminatedArray: native
bitfield: native
container: native
switch: native
void: native
array: native
restBuffer: native
anonymousNbt: native
anonOptionalNbt: native
registryEntryHolder: native
registryEntryHolderSet: native
arrayWithLengthOffset: native
ByteArray: ["buffer", { "countType": "varint" }]
string: [
"pstring",
{
"countType": "varint"
}
]
vec2f:
x: f32
y: f32
vec3f:
x: f32
y: f32
z: f32
vec4f:
x: f32
y: f32
z: f32
w: f32
vec3f64:
x: f64
y: f64
z: f64
IDSet: ["registryEntryHolderSet", {
"base": { name: "name", type: "string" },
"otherwise": { name: "ids", type: "varint" }
}]
SlotComponentType: varint =>
- custom_data
- max_stack_size
- max_damage
- damage
- unbreakable
- custom_name
- item_name
- lore
- rarity
- enchantments
- can_place_on
- can_break
- attribute_modifiers
- custom_model_data
- hide_additional_tooltip
- hide_tooltip
- repair_cost
- creative_slot_lock
- enchantment_glint_override
- intangible_projectile
- food
- fire_resistant
- tool
- stored_enchantments
- dyed_color
- map_color
- map_id
- map_decorations
- map_post_processing
- charged_projectiles
- bundle_contents
- potion_contents
- suspicious_stew_effects
- writable_book_content
- written_book_content
- trim
- debug_stick_state
- entity_data
- bucket_entity_data
- block_entity_data
- instrument
- ominous_bottle_amplifier
- jukebox_playable
- recipes
- lodestone_tracker
- firework_explosion
- fireworks
- profile
- note_block_sound
- banner_patterns
- base_color
- pot_decorations
- container
- block_state
- bees
- lock
- container_loot
SlotComponent:
type: SlotComponentType
data: type ?
# TODO: look into how nbt works here
if custom_data: anonymousNbt
if max_stack_size: varint
if max_damage: varint
if damage: varint
if unbreakable: bool
if custom_name: anonymousNbt
if item_name: anonymousNbt
if lore: anonOptionalNbt[]varint
if rarity: varint =>
- common
- uncommon
- rare
- epic
if enchantments:
enchantments: []varint
id: varint
level: varint
showTooltip: bool
if can_place_on or can_break:
predicates: BlockPredicate[]varint
showTooltip: bool
if attribute_modifiers:
attributes: []varint
typeId: varint
uniqueId: UUID
name: string
value: f64
operation: varint =>
- add
- multiply_base
- multiply_total
slot: varint =>
- any
- main_hand
- off_hand
- hand
- feet
- legs
- chest
- head
- armor
- body
showTooltip: bool
if custom_model_data: varint
if hide_additional_tooltip: void
if hide_tooltip: void
if repair_cost: varint
if creative_slot_lock: void
if enchantment_glint_override: bool
if intangible_projectile: void
# Name Type Description
# Nutrition VarInt Non-negative
# Saturation Modifier Float How much saturation will be given after consuming the item.
# Can Always Eat Boolean Whether the item can always be eaten, even at full hunger.
# Seconds To Eat Float How long it takes to consume the item.
# Using converts to Slot Data This specifies the item produced after consuming the current item. In the Notchian server, this is used for stews, which turn into bowls. Set this to Air if the item should be consumed normally without leaving any other item after.
# Number of effects VarInt Number of elements in the following array.
# Effect Type ID Array Potion Effect The potion effect. See Potion Effect.
# Probability Float The probability for this effect to be chosen.
if food:
nutrition: varint
saturationModifier: f32
canAlwaysEat: bool
secondsToEat: f32
usingConvertsTo: Slot
effects: []varint
effect: varint
probability: f32
if fire_resistant: void
# Name Type Description
# Number of Rules VarInt The number of elements in the following array.
# Rule
# Blocks Array Block Set The block this rule applies to. See Block Set.
# Has Speed Boolean
# Speed Optional Float The speed at which the tool breaks this rules' blocks. Only present if Has Speed is true.
# Has Correct Drop For Blocks Boolean
# Correct Drop For Blocks Optional Boolean Whether items should drop only if this is the correct tool. Only present if Has Correct Drop For Blocks is true.
# Default Mining Speed Float The mining speed in case none of the previous rule were matched.
# Damage Per Block VarInt The amount of damage the item takes per block break.
if tool:
rules: []varint
blocks: BlockSet[]varint
hasSpeed: bool
speed: f32
hasCorrectDropForBlocks: bool
correctDropForBlocks: bool
defaultMiningSpeed: f32
damagePerBlock: varint
# Name Type Description
# Number of enchantments VarInt Number of elements in the following array.
# Enchantment Type ID Array VarInt Enum The ID of the enchantment in the enchantment registry.
# Level VarInt The level of the enchantment.
# Show In Tooltip Boolean Whether the list of enchantments should be shown on the item's tooltip.
if stored_enchantments:
enchantments: []varint
id: varint
level: varint
showInTooltip: bool
if dyed_color:
color: varint
showTooltip: bool
if map_color: varint
if map_id: varint
if map_decorations: anonOptionalNbt
if map_post_processing: varint
if charged_projectiles:
projectiles: Slot[]varint
if bundle_contents:
contents: Slot[]varint
# Name Type Description
# Has Potion ID Boolean Whether this potion has an ID in the potion registry. If true, it has the default effects associated with the potion type.
# Potion ID Optional VarInt The ID of the potion type in the potion registry. Only present if Has Potion ID is true.
# Has Custom Color Boolean Whether this potion has a custom color. If false, it uses the default color associated with the potion type.
# Custom Color Optional Int The RGB components of the color, encoded as an integer. Only present if Has Custom Color is true.
# Number Of Custom Effects VarInt The number of elements in the following array.
# Custom Effects Array of Potion Effect Any custom effects the potion might have. See Potion Effect.
if potion_contents:
hasPotionId: bool
potionId: optvarint
hasCustomColor: bool
customColor: optvarint
customEffects: []varint
effect: varint
details: EffectDetail
# Name Type Description
# Number Of Effects VarInt Number of elements in the following array.
# Effect Type ID Array VarInt Enum The ID of the effect in the potion effect type registry.
# Duration VarInt The duration of the effect.
if suspicious_stew_effects:
effects: []varint
effect: varint
duration: varint
# Name Type Description
# Number Of Pages VarInt Number of elements in the following array.
# Page Raw Content Array (100) String (1024) The raw text of the page.
# Has Filtered Content Boolean
# Filtered Content Optional String (1024) The content after passing through chat filters. Only present if Has Filtered Content is true.
if writable_book_content:
pages: BookPage[]varint
# Name Type Description
# Raw Title String (32) The raw title of the book.
# Has Filtered Title Boolean
# Filtered Title Optional String (32) The title after going through chat filters. Only present if Has Filtered Title is true.
# Author String
# Generation VarInt
# Number Of Pages VarInt Number of elements in the following array.
# Page Raw Content Array (100) TextComponent (1024) The raw text of the page.
# Has Filtered Content Boolean
# Filtered Content Optional Text Component (1024) The content after passing through chat filters. Only present if Has Filtered Content is true.
# Resolved Boolean Whether entity selectors have already been resolved.
if written_book_content:
rawTitle: string
filteredTitle?: string
author: string
generation: varint
pages: BookPage[]varint
# Whether entity selectors have already been resolved.
resolved: bool
# Name Type Description
# Trim Material Type VarInt Identifier used to determine the data that follows. It can be either:
# 0 - Directly represents a trim material, with the necessary data following.
# Anything else - References a trim material in its registry, by the ID of Trim Material Type - 1.
# Asset Name Optional String See Armor Trim Material Registry. Only present if Trim Material Type is 0.
# Ingredient Optional VarInt See Armor Trim Material Registry. Only present if Trim Material Type is 0.
# Item Model Index Optional Float See Armor Trim Material Registry. Only present if Trim Material Type is 0.
# Number of Overrides Optional VarInt See Armor Trim Material Registry. Only present if Trim Material Type is 0.
# Override Armor Material Type Optional Array VarInt Enum See Armor Trim Material Registry. Only present if Trim Material Type is 0.
# Overriden Asset Name String See Armor Trim Material Registry. Only present if Trim Material Type is 0.
# Description Optional Text Component See Armor Trim Material Registry. Only present if Trim Material Type is 0.
# Trim Pattern Type VarInt Identifier used to determine the data that follows. It can be either:
# 0 - Directly represents a trim pattern, with the necessary data following.
# Anything else - References a trim pattern in its registry, by the ID of Trim Pattern Type - 1.
# Asset Name Optional String See Armor Trim Pattern Registry. Only present if Trim Pattern Type is 0.
# Template Item Optional VarInt See Armor Trim Pattern Registry. Only present if Trim Pattern Type is 0.
# Description Optional Text Component See Armor Trim Pattern Registry. Only present if Trim Pattern Type is 0.
# Decal Optional Boolean See Armor Trim Pattern Registry. Only present if Trim Pattern Type is 0.
# Show In Tooltip Boolean Whether the trim information should be shown on the item's tooltip.
if trim:
# Identifier used to determine the data that follows. It can be either:
# 0 - Directly represents a trim material, with the necessary data following.
# Anything else - References a trim material in its registry, by the ID of Trim Material Type - 1.
materialType: varint
_: materialType ?
if 0:
assetName: string
ingredientId: varint
itemModelIndex: f32
numberOfOverrides: optvarint
override: []varint
armorMaterialType: varint
overridenAssetName: string
description: string
trimPatternType: varint
_: trimPatternType ?
if 0:
assetName: string
templateItem: varint
description: string
decal: bool
showInTooltip: bool
if debug_stick_state: anonymousNbt
if entity_data: anonymousNbt
if bucket_entity_data: anonymousNbt
if block_entity_data: anonymousNbt
# Name Type Description
# Instrument Type VarInt Identifier used to determine the data that follows. It can be either:
# 0 - Directly represents an instrument, with the necessary data following.
# Anything else - References an instrument in its registry, by the ID of Instrument Type - 1.
# Sound Event Optional Sound Event The sound to be played. Only present if Instrument Type is 0.
# Use duration Optional Float The maximum range of the sound. Only present if Instrument Type is 0.
# Range Optional Float The range of the instrument. Only present if Instrument Type is 0.
if instrument:
instrumentType: varint
_: instrumentType ?
if 0:
soundEvent: string
useDuration: f32
range: f32
if ominous_bottle_amplifier: varint
# Name Type Description
# Direct Mode Boolean Whether the jukebox song is specified directly, or just referenced by name.
# Jukebox Song Name Optional Identifier The name of the jukebox song in its respective registry. Only present if Direct Mode is false.
# Jukebox Song Type Optional VarInt Identifier used to determine the data that follows. It can be either:
# 0 - Directly represents a jukebox song, with the necessary data following.
# Anything else - References a jukebox song in its registry, by the ID of Jukebox Song Type - 1.
# Only present if Direct Mode is true.
# Sound Event Optional Sound Event The sound to be played. Only present if Direct Mode is true and Jukebox Song Type is 0.
# Description Optional Text Component The description shown in the item lore. Only present if Direct Mode is true and Jukebox Song Type is 0.
# Duration Optional Float The duration the songs should play for, in seconds. Only present if Direct Mode is true and Jukebox Song Type is 0.
# Output Optional VarInt The output strength given by a comparator. Between 0 and 15. Only present if Direct Mode is true and Jukebox Song Type is 0.
# Show In Tooltip Boolean Whether the song should be shown on the item's tooltip.
if jukebox_playable:
directMode: bool
_: directMode ?
if true:
jukeboxSongName: string
jukeboxSongType: varint
_: jukeboxSongType ?
if 0:
soundEvent:
soundEventType: varint
_: soundEventType ?
if 0:
soundName: string
fixedRange?: f32
description: anonymousNbt
duration: f32
output: varint
if false:
songLocation: string
showInTooltip: bool
if recipes: anonymousNbt
# Name Type Description
# Has Global Position Boolean Whether this lodestone points to a position, otherwise it spins randomly.
# Dimension Identifier The dimension the compass points to. Only present if Has Global Position is true.
# Position Position The position the compass points to. Only present if Has Global Position is true.
# Tracked Boolean Whether the component is removed when the associated lodestone is broken.
if lodestone_tracker:
globalPosition?:
dimension: string
position: vec3f
tracked: bool
# Name Type Description
# Shape VarInt Enum Can be one of the following:
# 0 - Small ball
# 1 - Large ball
# 2 - Star
# 3 - Creeper
# 4 - Burst
# Number Of Colors VarInt The number of elements in the following array.
# Colors Array of Int The RGB components of the color, encoded as an integer.
# Number Of Fade Colors VarInt The number of elements in the following array.
# Fade Colors Array of Int The RGB components of the color, encoded as an integer.
# Has Trail Boolean
# Has Twinkle Boolean
if firework_explosion: FireworkExplosion
if fireworks:
flightDuration: varint
explosions: FireworkExplosion[]varint
# Name Type Description
# Has Name Boolean
# Name Optional String (16) Only present if Has Name is true.
# Has Unique ID Boolean
# Unique ID Optional UUID Only present if Has Unique ID is true.
# Number of Properties VarInt Number of elements in the following array.
# Property Name Array String (64)
# Value String
# Has Signature Boolean
# Signature String (1024) Only present if Has Signature is true.
if profile:
hasName: bool
name: string
hasUniqueId: bool
uniqueId: UUID
properties: []varint
property: string
value: string
hasSignature: bool
signature: string
if note_block_sound: string
# Name Type Description
# Number of Layers VarInt Number of elements in the following array.
# Layer Pattern Type Array VarInt Identifier used to determine the data that follows. It can be either:
# 0 - Directly represents a pattern, with the necessary data following.
# Anything else - References a pattern in its registry, by the ID of Pattern Type - 1.
# Asset ID Optional Identifier Identifier of the asset. Only present if Pattern Type is 0.
# Translation Key Optional String Only present if Pattern Type is 0.
# Color Dye Color See Dye Color.
if banner_patterns:
layers: []varint
patternType: varint
_: patternType ?
if 0:
assetId: string
translationKey: string
color: varint
if base_color: varint
if pot_decorations:
# The ID of the items in the item registry.
decorations: varint[]varint
if container:
contents: Slot[]varint
# Name Type Description
# Number of Properties VarInt Number of elements in the following array.
# Property Name Array String
# Value String
if block_state:
properties: []varint
property: string
value: string
# Name Type Description
# Number of Bees VarInt Number of elements in the following array.
# Bee Entity Data Array NBT
# Ticks In Hive VarInt
# Min Ticks In Hive VarInt
if bees:
bees: []varint
# Custom data for the entity, always a Compound Tag. Same structure as the minecraft:custom_data component.
nbtData: anonymousNbt
ticksInHive: varint
minTicksInHive: varint
if lock: anonymousNbt
if container_loot: anonymousNbt
Slot:
itemCount: i8
_: itemCount ?
if 0: void
default:
itemId: varint
# https://wiki.vg/Slot_Data#Structured_components
# + public static final DataComponentType<CompoundTag> CUSTOM_DATA = new DataComponentType<>(ItemCodecHelper::readAnyTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new);
# + public static final IntComponentType MAX_STACK_SIZE = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new);
# + public static final IntComponentType MAX_DAMAGE = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new);
# + public static final IntComponentType DAMAGE = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new);
# + public static final BooleanComponentType UNBREAKABLE = new BooleanComponentType(ByteBuf::readBoolean, ByteBuf::writeBoolean, BooleanDataComponent::new);
# + public static final DataComponentType<Component> CUSTOM_NAME = new DataComponentType<>(ItemCodecHelper::readComponent, ItemCodecHelper::writeComponent, ObjectDataComponent::new);
# + public static final DataComponentType<Component> ITEM_NAME = new DataComponentType<>(ItemCodecHelper::readComponent, ItemCodecHelper::writeComponent, ObjectDataComponent::new);
# + public static final DataComponentType<List<Component>> LORE = new DataComponentType<>(listReader(ItemCodecHelper::readComponent), listWriter(ItemCodecHelper::writeComponent), ObjectDataComponent::new);
# + public static final IntComponentType RARITY = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new);
# + public static final DataComponentType<ItemEnchantments> ENCHANTMENTS = new DataComponentType<>(ItemCodecHelper::readItemEnchantments, ItemCodecHelper::writeItemEnchantments, ObjectDataComponent::new);
# + public static final DataComponentType<AdventureModePredicate> CAN_PLACE_ON = new DataComponentType<>(ItemCodecHelper::readAdventureModePredicate, ItemCodecHelper::writeAdventureModePredicate, ObjectDataComponent::new);
# + public static final DataComponentType<AdventureModePredicate> CAN_BREAK = new DataComponentType<>(ItemCodecHelper::readAdventureModePredicate, ItemCodecHelper::writeAdventureModePredicate, ObjectDataComponent::new);
# + public static final DataComponentType<ItemAttributeModifiers> ATTRIBUTE_MODIFIERS = new DataComponentType<>(ItemCodecHelper::readItemAttributeModifiers, ItemCodecHelper::writeItemAttributeModifiers, ObjectDataComponent::new);
# + public static final IntComponentType CUSTOM_MODEL_DATA = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new);
# + public static final DataComponentType<Unit> HIDE_ADDITIONAL_TOOLTIP = new DataComponentType<>(unitReader(), unitWriter(), ObjectDataComponent::new);
# + public static final DataComponentType<Unit> HIDE_TOOLTIP = new DataComponentType<>(unitReader(), unitWriter(), ObjectDataComponent::new);
# + public static final IntComponentType REPAIR_COST = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new);
# + public static final DataComponentType<Unit> CREATIVE_SLOT_LOCK = new DataComponentType<>(unitReader(), unitWriter(), ObjectDataComponent::new);
# + public static final BooleanComponentType ENCHANTMENT_GLINT_OVERRIDE = new BooleanComponentType(ByteBuf::readBoolean, ByteBuf::writeBoolean, BooleanDataComponent::new);
# + public static final DataComponentType<CompoundTag> INTANGIBLE_PROJECTILE = new DataComponentType<>(ItemCodecHelper::readAnyTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new);
# + public static final DataComponentType<FoodProperties> FOOD = new DataComponentType<>(ItemCodecHelper::readFoodProperties, ItemCodecHelper::writeFoodProperties, ObjectDataComponent::new);
# + public static final DataComponentType<Unit> FIRE_RESISTANT = new DataComponentType<>(unitReader(), unitWriter(), ObjectDataComponent::new);
# + public static final DataComponentType<ToolData> TOOL = new DataComponentType<>(ItemCodecHelper::readToolData, ItemCodecHelper::writeToolData, ObjectDataComponent::new);
# + public static final DataComponentType<ItemEnchantments> STORED_ENCHANTMENTS = new DataComponentType<>(ItemCodecHelper::readItemEnchantments, ItemCodecHelper::writeItemEnchantments, ObjectDataComponent::new);
# + public static final DataComponentType<DyedItemColor> DYED_COLOR = new DataComponentType<>(ItemCodecHelper::readDyedItemColor, ItemCodecHelper::writeDyedItemColor, ObjectDataComponent::new);
# + public static final IntComponentType MAP_COLOR = new IntComponentType((helper, input) -> input.readInt(), (helper, output, value) -> output.writeInt(value), IntDataComponent::new);
# + public static final IntComponentType MAP_ID = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new);
# + public static final DataComponentType<CompoundTag> MAP_DECORATIONS = new DataComponentType<>(ItemCodecHelper::readAnyTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new);
# + public static final IntComponentType MAP_POST_PROCESSING = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new);
# + public static final DataComponentType<List<ItemStack>> CHARGED_PROJECTILES = new DataComponentType<>(listReader(ItemCodecHelper::readItemStack), listWriter(ItemCodecHelper::writeItemStack), ObjectDataComponent::new);
# + public static final DataComponentType<List<ItemStack>> BUNDLE_CONTENTS = new DataComponentType<>(listReader(ItemCodecHelper::readItemStack), listWriter(ItemCodecHelper::writeItemStack), ObjectDataComponent::new);
# + public static final DataComponentType<PotionContents> POTION_CONTENTS = new DataComponentType<>(ItemCodecHelper::readPotionContents, ItemCodecHelper::writePotionContents, ObjectDataComponent::new);
# + public static final DataComponentType<List<SuspiciousStewEffect>> SUSPICIOUS_STEW_EFFECTS = new DataComponentType<>(listReader(ItemCodecHelper::readStewEffect), listWriter(ItemCodecHelper::writeStewEffect), ObjectDataComponent::new);
# + public static final DataComponentType<WritableBookContent> WRITABLE_BOOK_CONTENT = new DataComponentType<>(ItemCodecHelper::readWritableBookContent, ItemCodecHelper::writeWritableBookContent, ObjectDataComponent::new);
# + public static final DataComponentType<WrittenBookContent> WRITTEN_BOOK_CONTENT = new DataComponentType<>(ItemCodecHelper::readWrittenBookContent, ItemCodecHelper::writeWrittenBookContent, ObjectDataComponent::new);
# + public static final DataComponentType<ArmorTrim> TRIM = new DataComponentType<>(ItemCodecHelper::readArmorTrim, ItemCodecHelper::writeArmorTrim, ObjectDataComponent::new);
# + public static final DataComponentType<CompoundTag> DEBUG_STICK_STATE = new DataComponentType<>(ItemCodecHelper::readAnyTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new);
# + public static final DataComponentType<CompoundTag> ENTITY_DATA = new DataComponentType<>(ItemCodecHelper::readAnyTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new);
# + public static final DataComponentType<CompoundTag> BUCKET_ENTITY_DATA = new DataComponentType<>(ItemCodecHelper::readAnyTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new);
# + public static final DataComponentType<CompoundTag> BLOCK_ENTITY_DATA = new DataComponentType<>(ItemCodecHelper::readAnyTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new);
# + public static final DataComponentType<Holder<Instrument>> INSTRUMENT = new DataComponentType<>(ItemCodecHelper::readInstrument, ItemCodecHelper::writeInstrument, ObjectDataComponent::new);
# + public static final IntComponentType OMINOUS_BOTTLE_AMPLIFIER = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new);
# + public static final DataComponentType<ListTag> RECIPES = new DataComponentType<>(ItemCodecHelper::readRecipes, ItemCodecHelper::writeRecipes, ObjectDataComponent::new);
# + public static final DataComponentType<LodestoneTracker> LODESTONE_TRACKER = new DataComponentType<>(ItemCodecHelper::readLodestoneTarget, ItemCodecHelper::writeLodestoneTarget, ObjectDataComponent::new);
# + public static final DataComponentType<Fireworks.FireworkExplosion> FIREWORK_EXPLOSION = new DataComponentType<>(ItemCodecHelper::readFireworkExplosion, ItemCodecHelper::writeFireworkExplosion, ObjectDataComponent::new);
# + public static final DataComponentType<Fireworks> FIREWORKS = new DataComponentType<>(ItemCodecHelper::readFireworks, ItemCodecHelper::writeFireworks, ObjectDataComponent::new);
# + public static final DataComponentType<GameProfile> PROFILE = new DataComponentType<>(ItemCodecHelper::readResolvableProfile, ItemCodecHelper::writeResolvableProfile, ObjectDataComponent::new);
# + public static final DataComponentType<String> NOTE_BLOCK_SOUND = new DataComponentType<>(ItemCodecHelper::readResourceLocation, ItemCodecHelper::writeResourceLocation, ObjectDataComponent::new);
# + public static final DataComponentType<List<BannerPatternLayer>> BANNER_PATTERNS = new DataComponentType<>(listReader(ItemCodecHelper::readBannerPatternLayer), listWriter(ItemCodecHelper::writeBannerPatternLayer), ObjectDataComponent::new);
# + public static final IntComponentType BASE_COLOR = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new);
# + public static final DataComponentType<List<Integer>> POT_DECORATIONS = new DataComponentType<>(listReader(ItemCodecHelper::readVarInt), listWriter(ItemCodecHelper::writeVarInt), ObjectDataComponent::new);
# + public static final DataComponentType<List<ItemStack>> CONTAINER = new DataComponentType<>(listReader(ItemCodecHelper::readOptionalItemStack), listWriter(MinecraftCodecHelper::writeOptionalItemStack), ObjectDataComponent::new);
# + public static final DataComponentType<BlockStateProperties> BLOCK_STATE = new DataComponentType<>(ItemCodecHelper::readBlockStateProperties, ItemCodecHelper::writeBlockStateProperties, ObjectDataComponent::new);
# + public static final DataComponentType<List<BeehiveOccupant>> BEES = new DataComponentType<>(listReader(ItemCodecHelper::readBeehiveOccupant), listWriter(ItemCodecHelper::writeBeehiveOccupant), ObjectDataComponent::new);
# + public static final DataComponentType<StringTag> LOCK = new DataComponentType<>(ItemCodecHelper::readLock, ItemCodecHelper::writeLock, ObjectDataComponent::new);
# + public static final DataComponentType<CompoundTag> CONTAINER_LOOT = new DataComponentType<>(ItemCodecHelper::readAnyTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new);
addedComponentCount: varint
removedComponentCount: varint
components: SlotComponent[]$addedComponentCount
removeComponents: []$removedComponentCount
type: SlotComponentType
FireworkExplosion:
shape: varint =>
- small_ball
- large_ball
- star
- creeper
- burst
colors: i32[]varint
fadeColors: i32[]varint
hasTrail: bool
hasTwinkle: bool
BookPage:
content: string
filteredContent?: string
EffectDetail:
amplifier: varint
duration: varint
ambient: bool
showParticles: bool
showIcon: bool
hiddenEffect?: EffectDetail
BlockSet:
type: varint
name: type ?
if 0: string
default: void
# TODO: This will require a custom type ; we need type - 1 length of blockIds
blockIds: type ?
if 0: void
default: ["arrayWithLengthOffset", {"count": "type", "type": "varint", "lengthOffset": -1}]
BlockProperty:
# Name of the block state property.
name: string
# Whether this is an exact value match, as opposed to ranged.
isExactMatch: bool
# Value of the block state property. Only present in exact match mode.
exactValue?: string
# Minimum value of the block state property range. Only present in ranged match mode.
minValue?: string
# Maximum value of the block state property range. Only present in ranged match mode.
maxValue?: string
BlockPredicate:
blockSet?: BlockSet[]varint
properties?: BlockProperty[]varint
nbt: anonOptionalNbt
Particle:
# See client/net/minecraft/core/particles/ParticleTypes.java
type: varint =>
- angry_villager
- block
- block_marker
- bubble
- cloud
- crit
- damage_indicator
- dragon_breath
- dripping_lava
- falling_lava
- landing_lava
- dripping_water
- falling_water
- dust
- dust_color_transition
- effect
- elder_guardian
- enchanted_hit
- enchant
- end_rod
- entity_effect
- explosion_emitter
- explosion
- gust
- small_gust
- gust_emitter_large
- gust_emitter_small
- sonic_boom
- falling_dust
- firework
- fishing
- flame
- infested
- cherry_leaves
- sculk_soul
- sculk_charge
- sculk_charge_pop
- soul_fire_flame
- soul
- flash
- happy_villager
- composter
- heart
- instant_effect
- item
- vibration
- item_slime
- item_cobweb
- item_snowball
- large_smoke
- lava
- mycelium
- note
- poof
- portal
- rain
- smoke
- white_smoke
- sneeze
- spit
- squid_ink
- sweep_attack
- totem_of_undying
- underwater
- splash
- witch
- bubble_pop
- current_down
- bubble_column_up
- nautilus
- dolphin
- campfire_cosy_smoke
- campfire_signal_smoke
- dripping_honey
- falling_honey
- landing_honey
- falling_nectar
- falling_spore_blossom
- ash
- crimson_spore
- warped_spore
- spore_blossom_air
- dripping_obsidian_tear
- falling_obsidian_tear
- landing_obsidian_tear
- reverse_portal
- white_ash
- small_flame
- snowflake
- dripping_dripstone_lava
- falling_dripstone_lava
- dripping_dripstone_water
- falling_dripstone_water
- glow_squid_ink
- glow
- wax_on
- wax_off
- electric_spark
- scrape
- shriek
- egg_crack
- dust_plume
- trial_spawner_detected_player
- trial_spawner_detected_player_ominous
- vault_connection
- dust_pillar
- ominous_spawning
- raid_omen
- trial_omen
## ## Tips for reviewing particle data (as of 1.20.5)
## Inside the registry code, each particle can have an associated "options" type and
## each options type can add additional data to be encoded.
## For example, this line
## public static final ParticleType<BlockParticleOption> BLOCK = register("block", false, BlockParticleOption::codec, BlockParticleOption::streamCodec);
## will read the stream codec from BlockParticleOption.java's streamCodec member; then we see
## return ByteBufCodecs.idMapper(Block.BLOCK_STATE_REGISTRY).map(var1 -> new BlockParticleOption(var0, var1), var0x -> var0x.state);
## this encodes with the ByteBufCodecs.idMapper function. Inside this function we find
## public void encode(ByteBuf var1x, T var2) {
## int var3 = var1.applyAsInt(var2);
## VarInt.write(var1x, var3);
## }
## which as we can see writes the varint to the buffer.
## If you want to see all the serializers try regexp searching "StreamCodec.*Particle"
data: type ?
if block or block_marker or falling_dust or dust_pillar: varint
if dust:
red: f32
green: f32
blue: f32
scale: f32
if dust_color_transition:
fromRed: f32
fromGreen: f32
fromBlue: f32
scale: f32
toRed: f32
toGreen: f32
toBlue: f32
if entity_effect: i32
if item: Slot
if sculk_charge: f32
if shriek: varint
if vibration:
position_type: varint =>
- block
- entity
position: position_type ?
if block: position
if entity:
entityId: varint
entity_eye_height: f32
ticks: varint
ingredient: Slot[]varint
position: [
"bitfield",
[
{
"name": "x",
"size": 26,
"signed": true
},
{
"name": "z",
"size": 26,
"signed": true
},
{
"name": "y",
"size": 12,
"signed": true
}
]
]
soundSource: varint =>
0: master
1: music
2: record
3: weather
4: block
5: hostile
6: neutral
7: player
8: ambient
9: voice
packedChunkPos:
z: i32
x: i32
previousMessages: []varint
id: varint
signature: id ?
if 0: [
"buffer",
{
"count": 256
}
]
default: void
entityMetadataEntry:
key: u8
type: varint =>
- byte
- int
- long
- float
- string
- component
- optional_component
- item_stack
- boolean
- rotations
- block_pos
- optional_block_pos
- direction
- optional_uuid
- block_state
- optional_block_state
- compound_tag
- particle
- particles
- villager_data
- optional_unsigned_int
- pose
- cat_variant
- wolf_variant
- frog_variant
- optional_global_pos
- painting_variant
- sniffer_state
- armadillo_state
- vector3
- quaternion
value: type ?
if byte: i8
if int: varint
if long: varlong
if float: f32
if string: string
if component: anonymousNbt
if optional_component: ["option", "anonymousNbt"]
if item_stack: Slot
if boolean: bool
if rotations:
pitch: f32
yaw: f32
roll: f32
if block_pos: position
if optional_block_pos: ["option", "position"]
if direction: varint
if optional_uuid: ["option", "UUID"]
if block_state: varint
if optional_block_state: optvarint
if compound_tag: anonymousNbt
if particle: Particle
if particles: Particle[]varint
if villager_data:
villagerType: varint
villagerProfession: varint
level: varint
if optional_unsigned_int: optvarint
if pose: varint
if cat_variant: varint
if wolf_variant: ["registryEntryHolder", {
"baseName": "variantId",
"otherwise": { name: "variantData", type: "EntityMetadataWolfVariant" }
}]
if frog_variant: varint
if optional_global_pos: ["option", "string"]
if painting_variant:
width: varint
height: varint
assetId: string
if sniffer_state: varint
if armadillo_state: varint
if vector3: vec3f
if quaternion: vec4f
EntityMetadataWolfVariant:
wildTexture: string
tameTexture: string
angryTexture: string
biome: IDSet
entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }]
minecraft_simple_recipe_format:
category: varint
minecraft_smelting_format:
group: string
category: varint
ingredient: ingredient
result: Slot
experience: f32
cookTime: varint
tags: []varint
tagName: string
entries: varint[]varint
chunkBlockEntity:
_: [
"bitfield",
[
{
"name": "x",
"size": 4,
"signed": false
},
{
"name": "z",
"size": 4,
"signed": false
}
]
]
y: i16
type: varint
nbtData: anonOptionalNbt
chat_session?:
uuid: UUID
publicKey:
expireTime: i64
keyBytes: [
"buffer",
{
"countType": "varint"
}
]
keySignature: [
"buffer",
{
"countType": "varint"
}
]
game_profile:
name: string
properties: []varint
key: string
value: string
signature?: string
command_node:
flags: [
"bitfield",
[
{
"name": "unused",
"size": 3,
"signed": false
},
{
"name": "has_custom_suggestions",
"size": 1,
"signed": false
},
{
"name": "has_redirect_node",
"size": 1,
"signed": false
},
{
"name": "has_command",
"size": 1,
"signed": false
},
{
"name": "command_node_type",
"size": 2,
"signed": false
}
]
]
children: varint[]varint
redirectNode: flags/has_redirect_node ?
if 1: varint
default: void
extraNodeData: flags/command_node_type ?
if 0: void
if 1:
name: string
if 2:
name: string
parser: varint =>
- brigadier:bool
- brigadier:float
- brigadier:double
- brigadier:integer
- brigadier:long
- brigadier:string
- minecraft:entity
- minecraft:game_profile
- minecraft:block_pos
- minecraft:column_pos
- minecraft:vec3
- minecraft:vec2
- minecraft:block_state
- minecraft:block_predicate
- minecraft:item_stack
- minecraft:item_predicate
- minecraft:color
- minecraft:component
- minecraft:style
- minecraft:message
- minecraft:nbt
- minecraft:nbt_tag
- minecraft:nbt_path
- minecraft:objective
- minecraft:objective_criteria
- minecraft:operation
- minecraft:particle
- minecraft:angle
- minecraft:rotation
- minecraft:scoreboard_slot
- minecraft:score_holder
- minecraft:swizzle
- minecraft:team
- minecraft:item_slot
- minecraft:item_slots # 1.20.5
- minecraft:resource_location
- minecraft:function
- minecraft:entity_anchor
- minecraft:int_range
- minecraft:float_range
- minecraft:dimension
- minecraft:gamemode
- minecraft:time
- minecraft:resource_or_tag
- minecraft:resource_or_tag_key
- minecraft:resource
- minecraft:resource_key
- minecraft:template_mirror
- minecraft:template_rotation
- minecraft:heightmap
- minecraft:loot_table # 1.20.5
- minecraft:loot_predicate # 1.20.5
- minecraft:loot_modifier # 1.20.5
- minecraft:uuid
properties: parser ?
if brigadier:bool: void
if brigadier:float:
flags: [
"bitfield",
[
{
"name": "unused",
"size": 6,
"signed": false
},
{
"name": "max_present",
"size": 1,
"signed": false
},
{
"name": "min_present",
"size": 1,
"signed": false
}
]
]
min: flags/min_present ?
if 1: f32
default: void
max: flags/max_present ?
if 1: f32
default: void
if brigadier:double:
flags: [
"bitfield",
[
{
"name": "unused",
"size": 6,
"signed": false
},
{
"name": "max_present",
"size": 1,
"signed": false
},
{
"name": "min_present",
"size": 1,
"signed": false
}
]
]
min: flags/min_present ?
if 1: f64
default: void
max: flags/max_present ?
if 1: f64
default: void
if brigadier:integer:
flags: [
"bitfield",
[
{
"name": "unused",
"size": 6,
"signed": false
},
{
"name": "max_present",
"size": 1,
"signed": false
},
{
"name": "min_present",
"size": 1,
"signed": false
}
]
]
min: flags/min_present ?
if 1: i32
default: void
max: flags/max_present ?
if 1: i32
default: void
if brigadier:long:
flags: [
"bitfield",
[
{
"name": "unused",
"size": 6,
"signed": false
},
{
"name": "max_present",
"size": 1,
"signed": false
},
{
"name": "min_present",
"size": 1,
"signed": false
}
]
]
min: flags/min_present ?
if 1: i64
default: void
max: flags/max_present ?
if 1: i64
default: void
if brigadier:string: varint =>
0: SINGLE_WORD
1: QUOTABLE_PHRASE
2: GREEDY_PHRASE
if minecraft:entity: [
"bitfield",
[
{
"name": "unused",
"size": 6,
"signed": false
},
{
"name": "onlyAllowPlayers",
"size": 1,
"signed": false
},
{
"name": "onlyAllowEntities",
"size": 1,
"signed": false
}
]
]
if minecraft:game_profile: void
if minecraft:block_pos: void
if minecraft:column_pos: void
if minecraft:vec3: void
if minecraft:vec2: void
if minecraft:block_state: void
if minecraft:block_predicate: void
if minecraft:item_stack: void
if minecraft:item_predicate: void
if minecraft:color: void
if minecraft:component: void
if minecraft:message: void
if minecraft:nbt: void
if minecraft:nbt_path: void
if minecraft:objective: void
if minecraft:objective_criteria: void
if minecraft:operation: void
if minecraft:particle: void
if minecraft:angle: void
if minecraft:rotation: void
if minecraft:scoreboard_slot: void
if minecraft:score_holder: [
"bitfield",
[
{
"name": "unused",
"size": 7,
"signed": false