nix build .#minecraft-decompiled decompiles only net/minecraft/network. That is deliberate and documented in nix/minecraft-data.nix:
# Only the networking tree is decompiled. Decompiling all 7445 classes
# costs minutes and adds nothing the extractor reads.
It is true for the extractor, but not for anyone hand-writing a codec. Implementing ItemStack and the data component system needed the StreamCodec for all 111 component types, and none of them live under network/. The classes actually required were:
net/minecraft/core/component/** (DataComponents, DataComponentPatch, DataComponentType, TypedDataComponent, the predicates)
net/minecraft/world/item/** (ItemStack, ItemStackTemplate, component/**, enchantment/**, equipment/**, alchemy/**, consume_effects/**)
net/minecraft/world/food, world/effect, world/entity/ai/attributes, world/entity/animal/**, world/level/block/entity/**, world/level/saveddata/maps, advancements/predicates/**, core/{BlockPos,UUIDUtil,Holder,GlobalPos,ClientAsset}, resources/ResourceKey, sounds/**, util/Unit, server/network/Filterable, world/entity/{EquipmentSlot,EquipmentSlotGroup,EntityType,player/PlayerSkin}
That is 522 classes, about 3.5 seconds of cfr on top of the existing run. Doing it by hand outside the flake cost maybe twenty minutes of finding class files one error at a time, and the result is not reproducible for the next person.
Two smaller things found on the way, both worth a comment in the same file:
Bootstrap.bootStrap() is not enough to get an ItemStack. Item default components come from the datapack layer in 26.x, so constructing one throws NullPointerException: Components not bound yet. Applying BuiltInRegistries.DATA_COMPONENT_INITIALIZERS.build(access) then gets IllegalStateException: Missing tag minecraft:is_fire, because the initializers reference tags from the built-in pack. Anything wanting real item bytes out of the jar has to load that pack first.
- Entity and block-entity type constants moved:
EntityType.PIG is now EntityTypes.PIG, BlockEntityType.CHEST is now BlockEntityTypes.CHEST.
Suggested fix
Widen decompiledSources to take a list of package prefixes, defaulting to the current net/minecraft/network plus the item and component trees. Or split a second minecraft-decompiled-all output for people writing codecs by hand, since the cost is bounded and paid once per version bump.
nix build .#minecraft-decompileddecompiles onlynet/minecraft/network. That is deliberate and documented innix/minecraft-data.nix:It is true for the extractor, but not for anyone hand-writing a codec. Implementing
ItemStackand the data component system needed theStreamCodecfor all 111 component types, and none of them live undernetwork/. The classes actually required were:net/minecraft/core/component/**(DataComponents,DataComponentPatch,DataComponentType,TypedDataComponent, the predicates)net/minecraft/world/item/**(ItemStack,ItemStackTemplate,component/**,enchantment/**,equipment/**,alchemy/**,consume_effects/**)net/minecraft/world/food,world/effect,world/entity/ai/attributes,world/entity/animal/**,world/level/block/entity/**,world/level/saveddata/maps,advancements/predicates/**,core/{BlockPos,UUIDUtil,Holder,GlobalPos,ClientAsset},resources/ResourceKey,sounds/**,util/Unit,server/network/Filterable,world/entity/{EquipmentSlot,EquipmentSlotGroup,EntityType,player/PlayerSkin}That is 522 classes, about 3.5 seconds of cfr on top of the existing run. Doing it by hand outside the flake cost maybe twenty minutes of finding class files one error at a time, and the result is not reproducible for the next person.
Two smaller things found on the way, both worth a comment in the same file:
Bootstrap.bootStrap()is not enough to get anItemStack. Item default components come from the datapack layer in 26.x, so constructing one throwsNullPointerException: Components not bound yet. ApplyingBuiltInRegistries.DATA_COMPONENT_INITIALIZERS.build(access)then getsIllegalStateException: Missing tag minecraft:is_fire, because the initializers reference tags from the built-in pack. Anything wanting real item bytes out of the jar has to load that pack first.EntityType.PIGis nowEntityTypes.PIG,BlockEntityType.CHESTis nowBlockEntityTypes.CHEST.Suggested fix
Widen
decompiledSourcesto take a list of package prefixes, defaulting to the currentnet/minecraft/networkplus the item and component trees. Or split a secondminecraft-decompiled-alloutput for people writing codecs by hand, since the cost is bounded and paid once per version bump.