Skip to content

Commit

Permalink
🐛 Double the spawn_item list because I forgot stuff and we still don'…
Browse files Browse the repository at this point in the history
…t have `%spawnitem`. Fixes #36
  • Loading branch information
MulverineX committed Jul 30, 2024
1 parent 15a43b6 commit 63ad9da
Showing 1 changed file with 71 additions and 5 deletions.
76 changes: 71 additions & 5 deletions java/server/world/item/spawn_item.mcdoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dispatch minecraft:data_component[entity_data] to struct EntityData {
}

// Flattening funny
// TODO: While we wait for %spawnitem to be implemented we can use the below hack :husk:.
// TODO: While we wait for %spawnitem to be implemented we can use the below 250+ line hack :husk:.
// https://github.com/misode/mcmeta/raw/registries/item/data.min.json
// `document.body.textContent.split('\n')[0].filter(item => item.includes('_egg')).join(',\n')`
//
Expand Down Expand Up @@ -98,6 +98,43 @@ dispatch minecraft:item[
EntityTag?: EntityData,
}

dispatch minecraft:item[armor_stand, item_frame, glow_item_frame, painting] to SpawnItem

dispatch minecraft:item[
acacia_boat,
acacia_chest_boat,
birch_boat,
birch_chest_boat,
cherry_boat,
cherry_chest_boat,
dark_oak_boat,
dark_oak_chest_boat,
jungle_boat,
jungle_chest_boat,
mangrove_boat,
mangrove_chest_boat,
oak_boat,
oak_chest_boat,
spruce_boat,
spruce_chest_boat,
] to SpawnItem

dispatch minecraft:item[bamboo_chest_raft, bamboo_raft] to SpawnItem

dispatch minecraft:item[
chest_minecart,
command_block_minecart,
furnace_minecart,
hopper_minecart,
minecart,
tnt_minecart,
] to SpawnItem

type SpawnItemComponents = (
super::ItemBaseComponents |
"entity_data" |
)

dispatch minecraft:item_component[
allay_spawn_egg,
armadillo_spawn_egg,
Expand Down Expand Up @@ -179,7 +216,36 @@ dispatch minecraft:item_component[
zombie_spawn_egg,
zombie_villager_spawn_egg,
zombified_piglin_spawn_egg,
] to (
super::ItemBaseComponents |
"entity_data" |
)
] to SpawnItemComponents

dispatch minecraft:item_component[armor_stand, item_frame, glow_item_frame] to SpawnItemComponents

dispatch minecraft:item_component[
acacia_boat,
acacia_chest_boat,
birch_boat,
birch_chest_boat,
cherry_boat,
cherry_chest_boat,
dark_oak_boat,
dark_oak_chest_boat,
jungle_boat,
jungle_chest_boat,
mangrove_boat,
mangrove_chest_boat,
oak_boat,
oak_chest_boat,
spruce_boat,
spruce_chest_boat,
] to SpawnItemComponents

dispatch minecraft:item_component[bamboo_chest_raft, bamboo_raft] to SpawnItemComponents

dispatch minecraft:item_component[
chest_minecart,
command_block_minecart,
furnace_minecart,
hopper_minecart,
minecart,
tnt_minecart,
] to SpawnItemComponents

0 comments on commit 63ad9da

Please sign in to comment.