Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions build-data/paper.at
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public net.minecraft.util.datafix.fixes.BlockStateData register(ILcom/mojang/ser
public net.minecraft.util.datafix.fixes.ItemIdFix ITEM_NAMES
public net.minecraft.util.datafix.fixes.ItemSpawnEggFix ID_TO_ENTITY
public net.minecraft.util.filefix.FileFixerUpper FILE_FIXER_INTRODUCTION_VERSION
public net.minecraft.util.valueproviders.WeightedListInt distribution
public net.minecraft.world.BossEvent color
public net.minecraft.world.BossEvent name
public net.minecraft.world.BossEvent overlay
Expand Down Expand Up @@ -630,6 +631,7 @@ public net.minecraft.world.level.levelgen.SurfaceRules$Context context
public net.minecraft.world.level.levelgen.SurfaceRules$Context randomState
public net.minecraft.world.level.levelgen.SurfaceRules$LazyCondition
public net.minecraft.world.level.levelgen.SurfaceRules$LazyYCondition
public net.minecraft.world.level.levelgen.presets.WorldPreset dimensions
public net.minecraft.world.level.levelgen.structure.StructurePiece SHAPE_CHECK_BLOCKS
public net.minecraft.world.level.levelgen.structure.placement.StructurePlacement exclusionZone
public net.minecraft.world.level.levelgen.structure.placement.StructurePlacement frequency
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
package io.papermc.paper.registry.keys;

import static net.kyori.adventure.key.Key.key;

import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import io.papermc.paper.world.worldgen.DimensionType;
import net.kyori.adventure.key.Key;
import org.jspecify.annotations.NullMarked;

/**
* Vanilla keys for {@link RegistryKey#DIMENSION_TYPE}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@NullMarked
@GeneratedClass
public final class DimensionTypeKeys {
/**
* {@code minecraft:overworld}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DimensionType> OVERWORLD = create(key("overworld"));

/**
* {@code minecraft:overworld_caves}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DimensionType> OVERWORLD_CAVES = create(key("overworld_caves"));

/**
* {@code minecraft:the_end}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DimensionType> THE_END = create(key("the_end"));

/**
* {@code minecraft:the_nether}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DimensionType> THE_NETHER = create(key("the_nether"));

private DimensionTypeKeys() {
}

/**
* Creates a typed key for {@link DimensionType} in the registry {@code minecraft:dimension_type}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<DimensionType> create(final Key key) {
return TypedKey.create(RegistryKey.DIMENSION_TYPE, key);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package io.papermc.paper.registry.keys;

import static net.kyori.adventure.key.Key.key;

import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import io.papermc.paper.world.worldgen.LevelStem;
import net.kyori.adventure.key.Key;
import org.jspecify.annotations.NullMarked;

/**
* Vanilla keys for {@link RegistryKey#LEVEL_STEM}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@NullMarked
@GeneratedClass
public final class LevelStemKeys {
private LevelStemKeys() {
}

/**
* Creates a typed key for {@link LevelStem} in the registry {@code minecraft:dimension}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<LevelStem> create(final Key key) {
return TypedKey.create(RegistryKey.LEVEL_STEM, key);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
package io.papermc.paper.registry.keys;

import static net.kyori.adventure.key.Key.key;

import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import io.papermc.paper.world.WorldPreset;
import net.kyori.adventure.key.Key;
import org.jspecify.annotations.NullMarked;

/**
* Vanilla keys for {@link RegistryKey#WORLD_PRESET}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@NullMarked
@GeneratedClass
public final class WorldPresetKeys {
/**
* {@code minecraft:amplified}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<WorldPreset> AMPLIFIED = create(key("amplified"));

/**
* {@code minecraft:debug_all_block_states}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<WorldPreset> DEBUG_ALL_BLOCK_STATES = create(key("debug_all_block_states"));

/**
* {@code minecraft:flat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<WorldPreset> FLAT = create(key("flat"));

/**
* {@code minecraft:large_biomes}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<WorldPreset> LARGE_BIOMES = create(key("large_biomes"));

/**
* {@code minecraft:normal}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<WorldPreset> NORMAL = create(key("normal"));

/**
* {@code minecraft:single_biome_surface}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<WorldPreset> SINGLE_BIOME_SURFACE = create(key("single_biome_surface"));

private WorldPresetKeys() {
}

/**
* Creates a typed key for {@link WorldPreset} in the registry {@code minecraft:worldgen/world_preset}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<WorldPreset> create(final Key key) {
return TypedKey.create(RegistryKey.WORLD_PRESET, key);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package io.papermc.paper.registry.keys.tags;

import static net.kyori.adventure.key.Key.key;

import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import io.papermc.paper.world.WorldPreset;
import net.kyori.adventure.key.Key;
import org.jspecify.annotations.NullMarked;

/**
* Vanilla tag keys for {@link RegistryKey#WORLD_PRESET}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@NullMarked
@GeneratedClass
public final class WorldPresetTagKeys {
/**
* {@code #minecraft:extended}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<WorldPreset> EXTENDED = create(key("extended"));

/**
* {@code #minecraft:normal}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<WorldPreset> NORMAL = create(key("normal"));

private WorldPresetTagKeys() {
}

/**
* Creates a tag key for {@link WorldPreset} in the registry {@code minecraft:worldgen/world_preset}.
*
* @param key the tag key's key
* @return a new tag key
*/
public static TagKey<WorldPreset> create(final Key key) {
return TagKey.create(RegistryKey.WORLD_PRESET, key);
}
}
Loading
Loading