| 1 | package net.minecraft.core.registries;
|
| 2 |
|
| 3 | import com.mojang.serialization.Codec;
|
| 4 | import com.mojang.serialization.MapCodec;
|
| 5 | import java.util.function.Consumer;
|
| 6 | import net.minecraft.advancements.Advancement;
|
| 7 | import net.minecraft.advancements.predicates.entity.EntitySubPredicate;
|
| 8 | import net.minecraft.advancements.triggers.CriterionTrigger;
|
| 9 | import net.minecraft.commands.synchronization.ArgumentTypeInfo;
|
| 10 | import net.minecraft.core.Registry;
|
| 11 | import net.minecraft.core.component.BlockTransformer;
|
| 12 | import net.minecraft.core.component.DataComponentType;
|
| 13 | import net.minecraft.core.component.predicates.DataComponentPredicate;
|
| 14 | import net.minecraft.core.particles.ParticleType;
|
| 15 | import net.minecraft.gametest.framework.GameTestHelper;
|
| 16 | import net.minecraft.gametest.framework.GameTestInstance;
|
| 17 | import net.minecraft.gametest.framework.TestEnvironmentDefinition;
|
| 18 | import net.minecraft.network.chat.ChatType;
|
| 19 | import net.minecraft.network.chat.numbers.NumberFormatType;
|
| 20 | import net.minecraft.resources.Identifier;
|
| 21 | import net.minecraft.resources.ResourceKey;
|
| 22 | import net.minecraft.server.dialog.Dialog;
|
| 23 | import net.minecraft.server.dialog.action.Action;
|
| 24 | import net.minecraft.server.dialog.body.DialogBody;
|
| 25 | import net.minecraft.server.dialog.input.InputControl;
|
| 26 | import net.minecraft.server.jsonrpc.IncomingRpcMethod;
|
| 27 | import net.minecraft.server.jsonrpc.OutgoingRpcMethod;
|
| 28 | import net.minecraft.server.level.TicketType;
|
| 29 | import net.minecraft.server.permissions.Permission;
|
| 30 | import net.minecraft.server.permissions.PermissionCheck;
|
| 31 | import net.minecraft.sounds.SoundEvent;
|
| 32 | import net.minecraft.stats.StatType;
|
| 33 | import net.minecraft.util.context.ContextKeySet;
|
| 34 | import net.minecraft.util.debug.DebugSubscription;
|
| 35 | import net.minecraft.util.valueproviders.FloatProvider;
|
| 36 | import net.minecraft.util.valueproviders.IntProvider;
|
| 37 | import net.minecraft.world.attribute.AttributeType;
|
| 38 | import net.minecraft.world.attribute.EnvironmentAttribute;
|
| 39 | import net.minecraft.world.clock.WorldClock;
|
| 40 | import net.minecraft.world.damagesource.DamageType;
|
| 41 | import net.minecraft.world.effect.MobEffect;
|
| 42 | import net.minecraft.world.entity.EntityType;
|
| 43 | import net.minecraft.world.entity.SulfurCubeArchetype;
|
| 44 | import net.minecraft.world.entity.ai.attributes.Attribute;
|
| 45 | import net.minecraft.world.entity.ai.memory.MemoryModuleType;
|
| 46 | import net.minecraft.world.entity.ai.sensing.SensorType;
|
| 47 | import net.minecraft.world.entity.ai.village.poi.PoiType;
|
| 48 | import net.minecraft.world.entity.animal.chicken.ChickenSoundVariant;
|
| 49 | import net.minecraft.world.entity.animal.chicken.ChickenVariant;
|
| 50 | import net.minecraft.world.entity.animal.cow.CowSoundVariant;
|
| 51 | import net.minecraft.world.entity.animal.cow.CowVariant;
|
| 52 | import net.minecraft.world.entity.animal.feline.CatSoundVariant;
|
| 53 | import net.minecraft.world.entity.animal.feline.CatVariant;
|
| 54 | import net.minecraft.world.entity.animal.frog.FrogVariant;
|
| 55 | import net.minecraft.world.entity.animal.nautilus.ZombieNautilusVariant;
|
| 56 | import net.minecraft.world.entity.animal.pig.PigSoundVariant;
|
| 57 | import net.minecraft.world.entity.animal.pig.PigVariant;
|
| 58 | import net.minecraft.world.entity.animal.wolf.WolfSoundVariant;
|
| 59 | import net.minecraft.world.entity.animal.wolf.WolfVariant;
|
| 60 | import net.minecraft.world.entity.decoration.painting.PaintingVariant;
|
| 61 | import net.minecraft.world.entity.npc.villager.VillagerProfession;
|
| 62 | import net.minecraft.world.entity.npc.villager.VillagerType;
|
| 63 | import net.minecraft.world.entity.schedule.Activity;
|
| 64 | import net.minecraft.world.entity.variant.SpawnCondition;
|
| 65 | import net.minecraft.world.inventory.MenuType;
|
| 66 | import net.minecraft.world.item.CreativeModeTab;
|
| 67 | import net.minecraft.world.item.Instrument;
|
| 68 | import net.minecraft.world.item.Item;
|
| 69 | import net.minecraft.world.item.JukeboxSong;
|
| 70 | import net.minecraft.world.item.alchemy.Potion;
|
| 71 | import net.minecraft.world.item.consume_effects.ConsumeEffect;
|
| 72 | import net.minecraft.world.item.crafting.Recipe;
|
| 73 | import net.minecraft.world.item.crafting.RecipeBookCategory;
|
| 74 | import net.minecraft.world.item.crafting.RecipeSerializer;
|
| 75 | import net.minecraft.world.item.crafting.RecipeType;
|
| 76 | import net.minecraft.world.item.crafting.display.RecipeDisplay;
|
| 77 | import net.minecraft.world.item.crafting.display.SlotDisplay;
|
| 78 | import net.minecraft.world.item.enchantment.Enchantment;
|
| 79 | import net.minecraft.world.item.enchantment.LevelBasedValue;
|
| 80 | import net.minecraft.world.item.enchantment.effects.EnchantmentEntityEffect;
|
| 81 | import net.minecraft.world.item.enchantment.effects.EnchantmentLocationBasedEffect;
|
| 82 | import net.minecraft.world.item.enchantment.effects.EnchantmentValueEffect;
|
| 83 | import net.minecraft.world.item.enchantment.providers.EnchantmentProvider;
|
| 84 | import net.minecraft.world.item.equipment.trim.TrimMaterial;
|
| 85 | import net.minecraft.world.item.equipment.trim.TrimPattern;
|
| 86 | import net.minecraft.world.item.slot.SlotSource;
|
| 87 | import net.minecraft.world.item.trading.TradeSet;
|
| 88 | import net.minecraft.world.item.trading.VillagerTrade;
|
| 89 | import net.minecraft.world.level.Level;
|
| 90 | import net.minecraft.world.level.biome.Biome;
|
| 91 | import net.minecraft.world.level.biome.BiomeSource;
|
| 92 | import net.minecraft.world.level.biome.MultiNoiseBiomeSourceParameterList;
|
| 93 | import net.minecraft.world.level.block.Block;
|
| 94 | import net.minecraft.world.level.block.entity.BannerPattern;
|
| 95 | import net.minecraft.world.level.block.entity.BlockEntityType;
|
| 96 | import net.minecraft.world.level.block.entity.DecoratedPotPattern;
|
| 97 | import net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerConfig;
|
| 98 | import net.minecraft.world.level.chunk.ChunkGenerator;
|
| 99 | import net.minecraft.world.level.chunk.status.ChunkStatus;
|
| 100 | import net.minecraft.world.level.dimension.DimensionType;
|
| 101 | import net.minecraft.world.level.dimension.LevelStem;
|
| 102 | import net.minecraft.world.level.gameevent.GameEvent;
|
| 103 | import net.minecraft.world.level.gameevent.PositionSourceType;
|
| 104 | import net.minecraft.world.level.gamerules.GameRule;
|
| 105 | import net.minecraft.world.level.levelgen.NoiseGeneratorSettings;
|
| 106 | import net.minecraft.world.level.levelgen.blockpredicates.BlockPredicateType;
|
| 107 | import net.minecraft.world.level.levelgen.carver.WorldCarver;
|
| 108 | import net.minecraft.world.level.levelgen.densityfunction.DensityFunction;
|
| 109 | import net.minecraft.world.level.levelgen.feature.Feature;
|
| 110 | import net.minecraft.world.level.levelgen.feature.featuresize.FeatureSizeType;
|
| 111 | import net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacerType;
|
| 112 | import net.minecraft.world.level.levelgen.feature.rootplacers.RootPlacerType;
|
| 113 | import net.minecraft.world.level.levelgen.feature.stateproviders.BlockStateProvider;
|
| 114 | import net.minecraft.world.level.levelgen.feature.treedecorators.TreeDecoratorType;
|
| 115 | import net.minecraft.world.level.levelgen.feature.trunkplacers.TrunkPlacerType;
|
| 116 | import net.minecraft.world.level.levelgen.flat.FlatLevelGeneratorPreset;
|
| 117 | import net.minecraft.world.level.levelgen.heightproviders.HeightProviderType;
|
| 118 | import net.minecraft.world.level.levelgen.material.condition.MaterialCondition;
|
| 119 | import net.minecraft.world.level.levelgen.material.rule.MaterialRule;
|
| 120 | import net.minecraft.world.level.levelgen.placement.PlacedFeature;
|
| 121 | import net.minecraft.world.level.levelgen.placement.PlacementModifier;
|
| 122 | import net.minecraft.world.level.levelgen.presets.WorldPreset;
|
| 123 | import net.minecraft.world.level.levelgen.structure.Structure;
|
| 124 | import net.minecraft.world.level.levelgen.structure.StructureSet;
|
| 125 | import net.minecraft.world.level.levelgen.structure.StructureType;
|
| 126 | import net.minecraft.world.level.levelgen.structure.pieces.StructurePieceType;
|
| 127 | import net.minecraft.world.level.levelgen.structure.placement.StructurePlacement;
|
| 128 | import net.minecraft.world.level.levelgen.structure.pools.StructurePoolElementType;
|
| 129 | import net.minecraft.world.level.levelgen.structure.pools.StructureTemplatePool;
|
| 130 | import net.minecraft.world.level.levelgen.structure.pools.alias.PoolAliasBinding;
|
| 131 | import net.minecraft.world.level.levelgen.structure.templatesystem.PosRuleTestType;
|
| 132 | import net.minecraft.world.level.levelgen.structure.templatesystem.RuleTestType;
|
| 133 | import net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessor;
|
| 134 | import net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessorList;
|
| 135 | import net.minecraft.world.level.levelgen.structure.templatesystem.rule.blockentity.RuleBlockEntityModifierType;
|
| 136 | import net.minecraft.world.level.levelgen.synth.NormalNoise;
|
| 137 | import net.minecraft.world.level.material.Fluid;
|
| 138 | import net.minecraft.world.level.saveddata.maps.MapDecorationType;
|
| 139 | import net.minecraft.world.level.storage.loot.LootTable;
|
| 140 | import net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer;
|
| 141 | import net.minecraft.world.level.storage.loot.functions.LootItemFunction;
|
| 142 | import net.minecraft.world.level.storage.loot.predicates.LootItemCondition;
|
| 143 | import net.minecraft.world.level.storage.loot.providers.nbt.NbtProvider;
|
| 144 | import net.minecraft.world.level.storage.loot.providers.number.floats.ContextFloatProvider;
|
| 145 | import net.minecraft.world.level.storage.loot.providers.number.ints.ContextIntProvider;
|
| 146 | import net.minecraft.world.level.storage.loot.providers.score.ScoreboardNameProvider;
|
| 147 | import net.minecraft.world.timeline.Timeline;
|
| 148 |
|
| 149 | public class Registries {
|
| 150 | public static final Identifier ROOT_REGISTRY_NAME = Identifier.withDefaultNamespace("root");
|
| 151 | public static final ResourceKey<Registry<Activity>> ACTIVITY = createRegistryKey("activity");
|
| 152 | public static final ResourceKey<Registry<Attribute>> ATTRIBUTE = createRegistryKey("attribute");
|
| 153 | public static final ResourceKey<Registry<MapCodec<? extends BiomeSource>>> BIOME_SOURCE = createRegistryKey("worldgen/biome_source");
|
| 154 | public static final ResourceKey<Registry<BlockEntityType<?>>> BLOCK_ENTITY_TYPE = createRegistryKey("block_entity_type");
|
| 155 | public static final ResourceKey<Registry<BlockPredicateType<?>>> BLOCK_PREDICATE_TYPE = createRegistryKey("block_predicate_type");
|
| 156 | public static final ResourceKey<Registry<MapCodec<? extends BlockStateProvider>>> BLOCK_STATE_PROVIDER_TYPE = createRegistryKey(
|
| 157 | "worldgen/block_state_provider_type"
|
| 158 | );
|
| 159 | public static final ResourceKey<Registry<Block>> BLOCK = createRegistryKey("block");
|
| 160 | public static final ResourceKey<Registry<MapCodec<? extends WorldCarver>>> CARVER_TYPE = createRegistryKey("worldgen/carver_type");
|
| 161 | public static final ResourceKey<Registry<MapCodec<? extends ChunkGenerator>>> CHUNK_GENERATOR = createRegistryKey("worldgen/chunk_generator");
|
| 162 | public static final ResourceKey<Registry<ChunkStatus>> CHUNK_STATUS = createRegistryKey("chunk_status");
|
| 163 | public static final ResourceKey<Registry<ArgumentTypeInfo<?, ?>>> COMMAND_ARGUMENT_TYPE = createRegistryKey("command_argument_type");
|
| 164 | public static final ResourceKey<Registry<ConsumeEffect.Type<?>>> CONSUME_EFFECT_TYPE = createRegistryKey("consume_effect_type");
|
| 165 | public static final ResourceKey<Registry<CreativeModeTab>> CREATIVE_MODE_TAB = createRegistryKey("creative_mode_tab");
|
| 166 | public static final ResourceKey<Registry<Identifier>> CUSTOM_STAT = createRegistryKey("custom_stat");
|
| 167 | public static final ResourceKey<Registry<DataComponentPredicate.Type<?>>> DATA_COMPONENT_PREDICATE_TYPE = createRegistryKey("data_component_predicate_type");
|
| 168 | public static final ResourceKey<Registry<DataComponentType<?>>> DATA_COMPONENT_TYPE = createRegistryKey("data_component_type");
|
| 169 | public static final ResourceKey<Registry<GameRule<?>>> GAME_RULE = createRegistryKey("game_rule");
|
| 170 | public static final ResourceKey<Registry<DebugSubscription<?>>> DEBUG_SUBSCRIPTION = createRegistryKey("debug_subscription");
|
| 171 | public static final ResourceKey<Registry<MapCodec<? extends DensityFunction>>> DENSITY_FUNCTION_TYPE = createRegistryKey("worldgen/density_function_type");
|
| 172 | public static final ResourceKey<Registry<MapCodec<? extends DialogBody>>> DIALOG_BODY_TYPE = createRegistryKey("dialog_body_type");
|
| 173 | public static final ResourceKey<Registry<MapCodec<? extends Dialog>>> DIALOG_TYPE = createRegistryKey("dialog_type");
|
| 174 | public static final ResourceKey<Registry<DataComponentType<?>>> ENCHANTMENT_EFFECT_COMPONENT_TYPE = createRegistryKey("enchantment_effect_component_type");
|
| 175 | public static final ResourceKey<Registry<MapCodec<? extends EnchantmentEntityEffect>>> ENCHANTMENT_ENTITY_EFFECT_TYPE = createRegistryKey(
|
| 176 | "enchantment_entity_effect_type"
|
| 177 | );
|
| 178 | public static final ResourceKey<Registry<MapCodec<? extends LevelBasedValue>>> ENCHANTMENT_LEVEL_BASED_VALUE_TYPE = createRegistryKey(
|
| 179 | "enchantment_level_based_value_type"
|
| 180 | );
|
| 181 | public static final ResourceKey<Registry<MapCodec<? extends EnchantmentLocationBasedEffect>>> ENCHANTMENT_LOCATION_BASED_EFFECT_TYPE = createRegistryKey(
|
| 182 | "enchantment_location_based_effect_type"
|
| 183 | );
|
| 184 | public static final ResourceKey<Registry<MapCodec<? extends EnchantmentProvider>>> ENCHANTMENT_PROVIDER_TYPE = createRegistryKey("enchantment_provider_type");
|
| 185 | public static final ResourceKey<Registry<MapCodec<? extends EnchantmentValueEffect>>> ENCHANTMENT_VALUE_EFFECT_TYPE = createRegistryKey(
|
| 186 | "enchantment_value_effect_type"
|
| 187 | );
|
| 188 | public static final ResourceKey<Registry<Codec<? extends EntitySubPredicate>>> ENTITY_SUB_PREDICATE_TYPE = createRegistryKey("entity_sub_predicate_type");
|
| 189 | public static final ResourceKey<Registry<EntityType<?>>> ENTITY_TYPE = createRegistryKey("entity_type");
|
| 190 | public static final ResourceKey<Registry<EnvironmentAttribute<?>>> ENVIRONMENT_ATTRIBUTE = createRegistryKey("environment_attribute");
|
| 191 | public static final ResourceKey<Registry<AttributeType<?>>> ATTRIBUTE_TYPE = createRegistryKey("attribute_type");
|
| 192 | public static final ResourceKey<Registry<FeatureSizeType<?>>> FEATURE_SIZE_TYPE = createRegistryKey("worldgen/feature_size_type");
|
| 193 | public static final ResourceKey<Registry<MapCodec<? extends Feature>>> FEATURE_TYPE = createRegistryKey("worldgen/feature_type");
|
| 194 | public static final ResourceKey<Registry<MapCodec<? extends FloatProvider>>> FLOAT_PROVIDER_TYPE = createRegistryKey("float_provider_type");
|
| 195 | public static final ResourceKey<Registry<Fluid>> FLUID = createRegistryKey("fluid");
|
| 196 | public static final ResourceKey<Registry<FoliagePlacerType<?>>> FOLIAGE_PLACER_TYPE = createRegistryKey("worldgen/foliage_placer_type");
|
| 197 | public static final ResourceKey<Registry<GameEvent>> GAME_EVENT = createRegistryKey("game_event");
|
| 198 | public static final ResourceKey<Registry<HeightProviderType<?>>> HEIGHT_PROVIDER_TYPE = createRegistryKey("height_provider_type");
|
| 199 | public static final ResourceKey<Registry<MapCodec<? extends InputControl>>> INPUT_CONTROL_TYPE = createRegistryKey("input_control_type");
|
| 200 | public static final ResourceKey<Registry<MapCodec<? extends IntProvider>>> INT_PROVIDER_TYPE = createRegistryKey("int_provider_type");
|
| 201 | public static final ResourceKey<Registry<Item>> ITEM = createRegistryKey("item");
|
| 202 | public static final ResourceKey<Registry<MapCodec<? extends SlotSource>>> SLOT_SOURCE_TYPE = createRegistryKey("slot_source_type");
|
| 203 | public static final ResourceKey<Registry<MapCodec<? extends LootItemCondition>>> LOOT_CONDITION_TYPE = createRegistryKey("loot_condition_type");
|
| 204 | public static final ResourceKey<Registry<MapCodec<? extends LootItemFunction>>> LOOT_FUNCTION_TYPE = createRegistryKey("loot_function_type");
|
| 205 | public static final ResourceKey<Registry<MapCodec<? extends NbtProvider>>> LOOT_NBT_PROVIDER_TYPE = createRegistryKey("loot_nbt_provider_type");
|
| 206 | public static final ResourceKey<Registry<MapCodec<? extends ContextFloatProvider>>> CONTEXT_FLOAT_PROVIDER_TYPE = createRegistryKey(
|
| 207 | "context_float_provider_type"
|
| 208 | );
|
| 209 | public static final ResourceKey<Registry<MapCodec<? extends ContextIntProvider>>> CONTEXT_INT_PROVIDER_TYPE = createRegistryKey("context_int_provider_type");
|
| 210 | public static final ResourceKey<Registry<MapCodec<? extends LootPoolEntryContainer>>> LOOT_POOL_ENTRY_TYPE = createRegistryKey("loot_pool_entry_type");
|
| 211 | public static final ResourceKey<Registry<MapCodec<? extends ScoreboardNameProvider>>> LOOT_SCORE_PROVIDER_TYPE = createRegistryKey("loot_score_provider_type");
|
| 212 | public static final ResourceKey<Registry<MapDecorationType>> MAP_DECORATION_TYPE = createRegistryKey("map_decoration_type");
|
| 213 | public static final ResourceKey<Registry<MapCodec<? extends MaterialCondition>>> MATERIAL_CONDITION_TYPE = createRegistryKey(
|
| 214 | "worldgen/material_condition_type"
|
| 215 | );
|
| 216 | public static final ResourceKey<Registry<MapCodec<? extends MaterialRule>>> MATERIAL_RULE_TYPE = createRegistryKey("worldgen/material_rule_type");
|
| 217 | public static final ResourceKey<Registry<MemoryModuleType<?>>> MEMORY_MODULE_TYPE = createRegistryKey("memory_module_type");
|
| 218 | public static final ResourceKey<Registry<MenuType<?>>> MENU = createRegistryKey("menu");
|
| 219 | public static final ResourceKey<Registry<MobEffect>> MOB_EFFECT = createRegistryKey("mob_effect");
|
| 220 | public static final ResourceKey<Registry<NumberFormatType<?>>> NUMBER_FORMAT_TYPE = createRegistryKey("number_format_type");
|
| 221 | public static final ResourceKey<Registry<ParticleType<?>>> PARTICLE_TYPE = createRegistryKey("particle_type");
|
| 222 | public static final ResourceKey<Registry<MapCodec<? extends PlacementModifier>>> PLACEMENT_MODIFIER_TYPE = createRegistryKey(
|
| 223 | "worldgen/placement_modifier_type"
|
| 224 | );
|
| 225 | public static final ResourceKey<Registry<PoiType>> POINT_OF_INTEREST_TYPE = createRegistryKey("point_of_interest_type");
|
| 226 | public static final ResourceKey<Registry<MapCodec<? extends PoolAliasBinding>>> POOL_ALIAS_BINDING = createRegistryKey("worldgen/pool_alias_binding");
|
| 227 | public static final ResourceKey<Registry<PositionSourceType<?>>> POSITION_SOURCE_TYPE = createRegistryKey("position_source_type");
|
| 228 | public static final ResourceKey<Registry<PosRuleTestType<?>>> POS_RULE_TEST = createRegistryKey("pos_rule_test");
|
| 229 | public static final ResourceKey<Registry<Potion>> POTION = createRegistryKey("potion");
|
| 230 | public static final ResourceKey<Registry<RecipeBookCategory>> RECIPE_BOOK_CATEGORY = createRegistryKey("recipe_book_category");
|
| 231 | public static final ResourceKey<Registry<RecipeDisplay.Type<?>>> RECIPE_DISPLAY = createRegistryKey("recipe_display");
|
| 232 | public static final ResourceKey<Registry<RecipeSerializer<?>>> RECIPE_SERIALIZER = createRegistryKey("recipe_serializer");
|
| 233 | public static final ResourceKey<Registry<RecipeType<?>>> RECIPE_TYPE = createRegistryKey("recipe_type");
|
| 234 | public static final ResourceKey<Registry<RootPlacerType<?>>> ROOT_PLACER_TYPE = createRegistryKey("worldgen/root_placer_type");
|
| 235 | public static final ResourceKey<Registry<RuleBlockEntityModifierType<?>>> RULE_BLOCK_ENTITY_MODIFIER = createRegistryKey("rule_block_entity_modifier");
|
| 236 | public static final ResourceKey<Registry<RuleTestType<?>>> RULE_TEST = createRegistryKey("rule_test");
|
| 237 | public static final ResourceKey<Registry<SensorType<?>>> SENSOR_TYPE = createRegistryKey("sensor_type");
|
| 238 | public static final ResourceKey<Registry<SlotDisplay.Type<?>>> SLOT_DISPLAY = createRegistryKey("slot_display");
|
| 239 | public static final ResourceKey<Registry<SoundEvent>> SOUND_EVENT = createRegistryKey("sound_event");
|
| 240 | public static final ResourceKey<Registry<MapCodec<? extends SpawnCondition>>> SPAWN_CONDITION_TYPE = createRegistryKey("spawn_condition_type");
|
| 241 | public static final ResourceKey<Registry<StatType<?>>> STAT_TYPE = createRegistryKey("stat_type");
|
| 242 | public static final ResourceKey<Registry<StructurePieceType>> STRUCTURE_PIECE = createRegistryKey("worldgen/structure_piece");
|
| 243 | public static final ResourceKey<Registry<MapCodec<? extends StructurePlacement>>> STRUCTURE_PLACEMENT = createRegistryKey("worldgen/structure_placement");
|
| 244 | public static final ResourceKey<Registry<StructurePoolElementType<?>>> STRUCTURE_POOL_ELEMENT = createRegistryKey("worldgen/structure_pool_element");
|
| 245 | public static final ResourceKey<Registry<MapCodec<? extends StructureProcessor>>> STRUCTURE_PROCESSOR = createRegistryKey("worldgen/structure_processor");
|
| 246 | public static final ResourceKey<Registry<StructureType<?>>> STRUCTURE_TYPE = createRegistryKey("worldgen/structure_type");
|
| 247 | public static final ResourceKey<Registry<MapCodec<? extends Action>>> DIALOG_ACTION_TYPE = createRegistryKey("dialog_action_type");
|
| 248 | public static final ResourceKey<Registry<MapCodec<? extends TestEnvironmentDefinition<?>>>> TEST_ENVIRONMENT_DEFINITION_TYPE = createRegistryKey(
|
| 249 | "test_environment_definition_type"
|
| 250 | );
|
| 251 | public static final ResourceKey<Registry<Consumer<GameTestHelper>>> TEST_FUNCTION = createRegistryKey("test_function");
|
| 252 | public static final ResourceKey<Registry<MapCodec<? extends GameTestInstance>>> TEST_INSTANCE_TYPE = createRegistryKey("test_instance_type");
|
| 253 | public static final ResourceKey<Registry<TicketType>> TICKET_TYPE = createRegistryKey("ticket_type");
|
| 254 | public static final ResourceKey<Registry<TreeDecoratorType<?>>> TREE_DECORATOR_TYPE = createRegistryKey("worldgen/tree_decorator_type");
|
| 255 | public static final ResourceKey<Registry<TrunkPlacerType<?>>> TRUNK_PLACER_TYPE = createRegistryKey("worldgen/trunk_placer_type");
|
| 256 | public static final ResourceKey<Registry<VillagerProfession>> VILLAGER_PROFESSION = createRegistryKey("villager_profession");
|
| 257 | public static final ResourceKey<Registry<VillagerType>> VILLAGER_TYPE = createRegistryKey("villager_type");
|
| 258 | public static final ResourceKey<Registry<IncomingRpcMethod<?, ?>>> INCOMING_RPC_METHOD = createRegistryKey("incoming_rpc_methods");
|
| 259 | public static final ResourceKey<Registry<OutgoingRpcMethod<?, ?>>> OUTGOING_RPC_METHOD = createRegistryKey("outgoing_rpc_methods");
|
| 260 | public static final ResourceKey<Registry<MapCodec<? extends Permission>>> PERMISSION_TYPE = createRegistryKey("permission_type");
|
| 261 | public static final ResourceKey<Registry<MapCodec<? extends PermissionCheck>>> PERMISSION_CHECK_TYPE = createRegistryKey("permission_check_type");
|
| 262 | public static final ResourceKey<Registry<ContextKeySet>> CONTEXT_KEY_SET = createRegistryKey("context_key_set");
|
| 263 | public static final ResourceKey<Registry<BannerPattern>> BANNER_PATTERN = createRegistryKey("banner_pattern");
|
| 264 | public static final ResourceKey<Registry<Biome>> BIOME = createRegistryKey("worldgen/biome");
|
| 265 | public static final ResourceKey<Registry<BlockStateProvider>> BLOCK_STATE_PROVIDER = createRegistryKey("worldgen/block_state_provider");
|
| 266 | public static final ResourceKey<Registry<CatSoundVariant>> CAT_SOUND_VARIANT = createRegistryKey("cat_sound_variant");
|
| 267 | public static final ResourceKey<Registry<CatVariant>> CAT_VARIANT = createRegistryKey("cat_variant");
|
| 268 | public static final ResourceKey<Registry<WorldCarver>> CARVER = createRegistryKey("worldgen/carver");
|
| 269 | public static final ResourceKey<Registry<ChatType>> CHAT_TYPE = createRegistryKey("chat_type");
|
| 270 | public static final ResourceKey<Registry<ChickenSoundVariant>> CHICKEN_SOUND_VARIANT = createRegistryKey("chicken_sound_variant");
|
| 271 | public static final ResourceKey<Registry<ChickenVariant>> CHICKEN_VARIANT = createRegistryKey("chicken_variant");
|
| 272 | public static final ResourceKey<Registry<ZombieNautilusVariant>> ZOMBIE_NAUTILUS_VARIANT = createRegistryKey("zombie_nautilus_variant");
|
| 273 | public static final ResourceKey<Registry<Feature>> FEATURE = createRegistryKey("worldgen/feature");
|
| 274 | public static final ResourceKey<Registry<CowSoundVariant>> COW_SOUND_VARIANT = createRegistryKey("cow_sound_variant");
|
| 275 | public static final ResourceKey<Registry<CowVariant>> COW_VARIANT = createRegistryKey("cow_variant");
|
| 276 | public static final ResourceKey<Registry<DamageType>> DAMAGE_TYPE = createRegistryKey("damage_type");
|
| 277 | public static final ResourceKey<Registry<DensityFunction>> DENSITY_FUNCTION = createRegistryKey("worldgen/density_function");
|
| 278 | public static final ResourceKey<Registry<Dialog>> DIALOG = createRegistryKey("dialog");
|
| 279 | public static final ResourceKey<Registry<DimensionType>> DIMENSION_TYPE = createRegistryKey("dimension_type");
|
| 280 | public static final ResourceKey<Registry<EnchantmentProvider>> ENCHANTMENT_PROVIDER = createRegistryKey("enchantment_provider");
|
| 281 | public static final ResourceKey<Registry<Enchantment>> ENCHANTMENT = createRegistryKey("enchantment");
|
| 282 | public static final ResourceKey<Registry<FlatLevelGeneratorPreset>> FLAT_LEVEL_GENERATOR_PRESET = createRegistryKey("worldgen/flat_level_generator_preset");
|
| 283 | public static final ResourceKey<Registry<FrogVariant>> FROG_VARIANT = createRegistryKey("frog_variant");
|
| 284 | public static final ResourceKey<Registry<Instrument>> INSTRUMENT = createRegistryKey("instrument");
|
| 285 | public static final ResourceKey<Registry<JukeboxSong>> JUKEBOX_SONG = createRegistryKey("jukebox_song");
|
| 286 | public static final ResourceKey<Registry<MaterialCondition>> MATERIAL_CONDITION = createRegistryKey("worldgen/material_condition");
|
| 287 | public static final ResourceKey<Registry<MaterialRule>> MATERIAL_RULE = createRegistryKey("worldgen/material_rule");
|
| 288 | public static final ResourceKey<Registry<MultiNoiseBiomeSourceParameterList>> MULTI_NOISE_BIOME_SOURCE_PARAMETER_LIST = createRegistryKey(
|
| 289 | "worldgen/multi_noise_biome_source_parameter_list"
|
| 290 | );
|
| 291 | public static final ResourceKey<Registry<NoiseGeneratorSettings>> NOISE_SETTINGS = createRegistryKey("worldgen/noise_settings");
|
| 292 | public static final ResourceKey<Registry<NormalNoise>> NOISE = createRegistryKey("worldgen/noise");
|
| 293 | public static final ResourceKey<Registry<PaintingVariant>> PAINTING_VARIANT = createRegistryKey("painting_variant");
|
| 294 | public static final ResourceKey<Registry<PigSoundVariant>> PIG_SOUND_VARIANT = createRegistryKey("pig_sound_variant");
|
| 295 | public static final ResourceKey<Registry<PigVariant>> PIG_VARIANT = createRegistryKey("pig_variant");
|
| 296 | public static final ResourceKey<Registry<PlacedFeature>> PLACED_FEATURE = createRegistryKey("worldgen/placed_feature");
|
| 297 | public static final ResourceKey<Registry<StructureProcessorList>> PROCESSOR_LIST = createRegistryKey("worldgen/processor_list");
|
| 298 | public static final ResourceKey<Registry<StructureSet>> STRUCTURE_SET = createRegistryKey("worldgen/structure_set");
|
| 299 | public static final ResourceKey<Registry<Structure>> STRUCTURE = createRegistryKey("worldgen/structure");
|
| 300 | public static final ResourceKey<Registry<SulfurCubeArchetype>> SULFUR_CUBE_ARCHETYPE = createRegistryKey("sulfur_cube_archetype");
|
| 301 | public static final ResourceKey<Registry<StructureTemplatePool>> TEMPLATE_POOL = createRegistryKey("worldgen/template_pool");
|
| 302 | public static final ResourceKey<Registry<TestEnvironmentDefinition<?>>> TEST_ENVIRONMENT = createRegistryKey("test_environment");
|
| 303 | public static final ResourceKey<Registry<GameTestInstance>> TEST_INSTANCE = createRegistryKey("test_instance");
|
| 304 | public static final ResourceKey<Registry<Timeline>> TIMELINE = createRegistryKey("timeline");
|
| 305 | public static final ResourceKey<Registry<TradeSet>> TRADE_SET = createRegistryKey("trade_set");
|
| 306 | public static final ResourceKey<Registry<TrialSpawnerConfig>> TRIAL_SPAWNER_CONFIG = createRegistryKey("trial_spawner");
|
| 307 | public static final ResourceKey<Registry<CriterionTrigger<?>>> TRIGGER_TYPE = createRegistryKey("trigger_type");
|
| 308 | public static final ResourceKey<Registry<TrimMaterial>> TRIM_MATERIAL = createRegistryKey("trim_material");
|
| 309 | public static final ResourceKey<Registry<TrimPattern>> TRIM_PATTERN = createRegistryKey("trim_pattern");
|
| 310 | public static final ResourceKey<Registry<VillagerTrade>> VILLAGER_TRADE = createRegistryKey("villager_trade");
|
| 311 | public static final ResourceKey<Registry<WolfVariant>> WOLF_VARIANT = createRegistryKey("wolf_variant");
|
| 312 | public static final ResourceKey<Registry<WolfSoundVariant>> WOLF_SOUND_VARIANT = createRegistryKey("wolf_sound_variant");
|
| 313 | public static final ResourceKey<Registry<WorldClock>> WORLD_CLOCK = createRegistryKey("world_clock");
|
| 314 | public static final ResourceKey<Registry<WorldPreset>> WORLD_PRESET = createRegistryKey("worldgen/world_preset");
|
| 315 | public static final ResourceKey<Registry<DecoratedPotPattern>> DECORATED_POT_PATTERN = createRegistryKey("decorated_pot_pattern");
|
| 316 | public static final ResourceKey<Registry<BlockTransformer>> BLOCK_TRANSFORMER = createRegistryKey("block_transformer");
|
| 317 | public static final ResourceKey<Registry<Level>> DIMENSION = createRegistryKey("dimension");
|
| 318 | public static final ResourceKey<Registry<LevelStem>> LEVEL_STEM = createRegistryKey("dimension");
|
| 319 | public static final ResourceKey<Registry<LootTable>> LOOT_TABLE = createRegistryKey("loot_table");
|
| 320 | public static final ResourceKey<Registry<LootItemFunction>> ITEM_MODIFIER = createRegistryKey("item_modifier");
|
| 321 | public static final ResourceKey<Registry<LootItemCondition>> PREDICATE = createRegistryKey("predicate");
|
| 322 | public static final ResourceKey<Registry<SlotSource>> SLOT_SOURCE = createRegistryKey("slot_source");
|
| 323 | public static final ResourceKey<Registry<ContextFloatProvider>> CONTEXT_FLOAT_PROVIDER = createRegistryKey("context_float_provider");
|
| 324 | public static final ResourceKey<Registry<ContextIntProvider>> CONTEXT_INT_PROVIDER = createRegistryKey("context_int_provider");
|
| 325 | public static final ResourceKey<Registry<Advancement>> ADVANCEMENT = createRegistryKey("advancement");
|
| 326 | public static final ResourceKey<Registry<Recipe<?>>> RECIPE = createRegistryKey("recipe");
|
| 327 |
|
| 328 | public static ResourceKey<Level> levelStemToLevel(final ResourceKey<LevelStem> levelStem) {
|
| 329 | return ResourceKey.create(DIMENSION, levelStem.identifier());
|
| 330 | }
|
| 331 |
|
| 332 | public static ResourceKey<LevelStem> levelToLevelStem(final ResourceKey<Level> level) {
|
| 333 | return ResourceKey.create(LEVEL_STEM, level.identifier());
|
| 334 | }
|
| 335 |
|
| 336 | private static <T> ResourceKey<Registry<T>> createRegistryKey(final String name) {
|
| 337 | return ResourceKey.createRegistryKey(Identifier.withDefaultNamespace(name));
|
| 338 | }
|
| 339 |
|
| 340 | private static String registryDirPath(final ResourceKey<? extends Registry<?>> registryKey) {
|
| 341 | return registryKey.identifier().getPath();
|
| 342 | }
|
| 343 |
|
| 344 | public static String elementsDirPath(final ResourceKey<? extends Registry<?>> registryKey) {
|
| 345 | return registryDirPath(registryKey);
|
| 346 | }
|
| 347 |
|
| 348 | public static String tagsDirPath(final ResourceKey<? extends Registry<?>> registryKey) {
|
| 349 | return "tags/" + registryDirPath(registryKey);
|
| 350 | }
|
| 351 |
|
| 352 | public static String componentsDirPath(final ResourceKey<? extends Registry<?>> registryKey) {
|
| 353 | return "components/" + registryDirPath(registryKey);
|
| 354 | }
|
| 355 | }
|
| 356 |
|