Method local inner record decompiled into wrong location
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
Research direction
Start by reproducing the decompilation of net.minecraft.world.level.levelgen.WorldDimensions.bake from the vanilla Minecraft 1.19.3 example. Trace how ForgeFlower handles the method-local record Entry and compare the generated location with the source structure; done means the record is emitted in the correct scope and the example decompiles consistently.
Written by the indexing model from the issue text.
Description
In the vanilla minecraft server source (1.19.3), in net.minecraft.world.level.levelgen.WorldDimensions (mojang mappings) the following happens when decompiling

public WorldDimensions.Complete bake(Registry<LevelStem> existingRegistry) {
Stream<ResourceKey<LevelStem>> stream = Stream.concat(existingRegistry.registryKeySet().stream(), this.dimensions.registryKeySet().stream()).distinct();
List<Entry> list = new ArrayList<>();
keysInOrder(stream).forEach((key) -> {
existingRegistry.getOptional(key).or(() -> {
return this.dimensions.getOptional(key);
}).ifPresent((dimensionOptions) -> {
record Entry(ResourceKey<LevelStem> key, LevelStem value) {
Lifecycle lifecycle() {
return WorldDimensions.checkStability(this.key, this.value);
}
}
list.add(new Entry(key, dimensionOptions));
});
});
Lifecycle lifecycle = list.size() == VANILLA_DIMENSION_COUNT ? Lifecycle.stable() : Lifecycle.experimental();
WritableRegistry<LevelStem> writableRegistry = new MappedRegistry<>(Registries.LEVEL_STEM, lifecycle);
list.forEach((entry) -> {
writableRegistry.register(entry.key, entry.value, entry.lifecycle());
});
Registry<LevelStem> registry = writableRegistry.freeze();
PrimaryLevelData.SpecialWorldProperty specialWorldProperty = specialWorldProperty(registry);
return new WorldDimensions.Complete(registry.freeze(), specialWorldProperty);
}
- Dominant language
- No language data
- Stars
- 110
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MinecraftForge/ForgeFlower
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
MinecraftForge/ForgeFlower#86 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
MinecraftForge/ForgeFlower#85 · 3 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
MinecraftForge/ForgeFlower#76 · 1 comment · 3 reactions ·
All issues in MinecraftForge/ForgeFlower
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
hemilabs/ui-monorepo#2332 ·
-
Help-Wanted Needs-Triage Package-Update
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/winget-pkgs#438662 ·
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
olcf/olcf-test-harness#278 · 1 comment ·