Great Registry Repackaging (#3396)

* 22w45a registry

* More registry

* Great Registry Repackaging

Registry packages have moved to `net.minecraft.registry`.
Tag packages have moved to `net.minecraft.registry.tag`.

* Revert defaulted registry rename

* Rename RegistryKeys fields to fix inconsistency

* Fix javadoc

* Move some classes again, per haykam suggestion

* Fix javadoc

* Update CommandRegistryAccess.mapping
This commit is contained in:
apple502j 2022-11-16 21:51:52 +09:00 committed by GitHub
parent de7b58d321
commit 3bd4327ebe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
62 changed files with 135 additions and 99 deletions

View File

@ -6,12 +6,12 @@ CLASS net/minecraft/class_2248 net/minecraft/block/Block
COMMENT
COMMENT <p>There is exactly one instance for every type of block. Every stone
COMMENT block for example in a world shares the same block instance. Each block
COMMENT instance is registered under {@link net.minecraft.util.registry.Registry#BLOCK}.
COMMENT instance is registered under {@link net.minecraft.registry.Registries#BLOCK}.
COMMENT See {@link Blocks} for examples of block instances.
COMMENT
COMMENT <p>An item corresponding to a block is not automatically created. You
COMMENT may create your own {@link net.minecraft.item.BlockItem} and register it
COMMENT under {@link net.minecraft.util.registry.Registry#ITEM}.
COMMENT under {@link net.minecraft.registry.Registries#ITEM}.
COMMENT
COMMENT <p>The translation key for the block name is determined by {@link
COMMENT #getTranslationKey}.

View File

@ -63,7 +63,7 @@ CLASS net/minecraft/class_2609 net/minecraft/block/entity/AbstractFurnaceBlockEn
ARG 2 count
METHOD method_26395 isNonFlammableWood (Lnet/minecraft/class_1792;)Z
COMMENT {@return whether the provided {@code item} is in the {@link
COMMENT net.minecraft.tag.ItemTags#NON_FLAMMABLE_WOOD non_flammable_wood} tag}
COMMENT net.minecraft.registry.tag.ItemTags#NON_FLAMMABLE_WOOD non_flammable_wood} tag}
ARG 0 item
METHOD method_27354 getRecipesUsedAndDropExperience (Lnet/minecraft/class_3218;Lnet/minecraft/class_243;)Ljava/util/List;
ARG 1 world

View File

@ -25,7 +25,7 @@ CLASS net/minecraft/class_3721 net/minecraft/block/entity/BellBlockEntity
METHOD method_20219 notifyMemoriesOfBell ()V
COMMENT Makes living entities within 48 blocks remember that they heard a bell at the current world time.
METHOD method_20518 isRaiderEntity (Lnet/minecraft/class_2338;Lnet/minecraft/class_1309;)Z
COMMENT Determines whether the given entity is in the {@link net.minecraft.tag.EntityTypeTags#RAIDERS} entity type tag and within 48 blocks of the given position.
COMMENT Determines whether the given entity is in the {@link net.minecraft.registry.tag.EntityTypeTags#RAIDERS} entity type tag and within 48 blocks of the given position.
ARG 0 pos
ARG 1 entity
METHOD method_20519 (Lnet/minecraft/class_2338;ILorg/apache/commons/lang3/mutable/MutableInt;Lnet/minecraft/class_1937;Lnet/minecraft/class_1309;)V

View File

@ -4,7 +4,7 @@ CLASS net/minecraft/class_2591 net/minecraft/block/entity/BlockEntityType
COMMENT represents the type of the placed block entities, like chests or furnaces.
COMMENT
COMMENT <p>Block entity types are pre-defined and registered in {@link
COMMENT net.minecraft.util.registry.Registry#BLOCK_ENTITY_TYPE}. To create a block
COMMENT net.minecraft.registry.Registries#BLOCK_ENTITY_TYPE}. To create a block
COMMENT entity type, the {@linkplain BlockEntityType.Builder#create builder} should be used.
COMMENT
COMMENT <p>Blocks that have corresponding block entities must implement {@link

View File

@ -18,11 +18,11 @@ CLASS net/minecraft/class_7157 net/minecraft/command/CommandRegistryAccess
CLASS 2
FIELD field_40912 entryListCreationPolicy Lnet/minecraft/class_7157$class_7158;
CLASS class_7158 EntryListCreationPolicy
COMMENT A policy on how to handle a {@link net.minecraft.tag.TagKey} that does not resolve
COMMENT A policy on how to handle a {@link net.minecraft.registry.tag.TagKey} that does not resolve
COMMENT to an existing tag (unrecognized tag) in {@link
COMMENT net.minecraft.util.registry.RegistryWrapper#getOptional(net.minecraft.tag.TagKey)}.
COMMENT net.minecraft.registry.RegistryWrapper#getOptional(net.minecraft.registry.tag.TagKey)}.
FIELD field_37824 Lnet/minecraft/class_7157$class_7158;
COMMENT Creates a new {@link net.minecraft.util.registry.RegistryEntryList}, stores it and returns it.
COMMENT Creates a new {@link net.minecraft.registry.entry.RegistryEntryList}, stores it and returns it.
FIELD field_37826 Lnet/minecraft/class_7157$class_7158;
COMMENT Throws an exception.
CLASS class_7870 EntryListCreationPolicySettable

View File

@ -669,9 +669,9 @@ CLASS net/minecraft/class_1297 net/minecraft/entity/Entity
COMMENT {@return whether the entity can freeze}
COMMENT
COMMENT @implNote Entities cannot be frozen if they are in the {@link
COMMENT net.minecraft.tag.EntityTypeTags#FREEZE_IMMUNE_ENTITY_TYPES} tag. In addition to this, {@link
COMMENT net.minecraft.registry.tag.EntityTypeTags#FREEZE_IMMUNE_ENTITY_TYPES} tag. In addition to this, {@link
COMMENT LivingEntity} cannot be frozen if they are spectator or if they wear an
COMMENT item inside {@link net.minecraft.tag.ItemTags#FREEZE_IMMUNE_WEARABLES} tag.
COMMENT item inside {@link net.minecraft.registry.tag.ItemTags#FREEZE_IMMUNE_WEARABLES} tag.
METHOD method_32317 setFrozenTicks (I)V
COMMENT Sets how long the entity is freezing in ticks.
COMMENT

View File

@ -10,7 +10,7 @@ CLASS net/minecraft/class_1792 net/minecraft/item/Item
COMMENT
COMMENT <p>Items with no custom behavior, like diamonds, can call the constructor of Item
COMMENT directly. If a custom behavior is needed, this should be subclassed. Items also have
COMMENT to be registered in the {@link net.minecraft.util.registry.Registry#ITEM} registry.
COMMENT to be registered in the {@link net.minecraft.registry.Registries#ITEM} registry.
COMMENT
COMMENT <p>Many methods of this class are called on both the logical client and logical server,
COMMENT so take caution when using those methods. The logical side can be checked using

View File

@ -12,7 +12,7 @@ CLASS net/minecraft/class_2540 net/minecraft/network/PacketByteBuf
COMMENT <td>Codec-based</td><td>{@link #decode(Codec)}</td><td>{@link #encode(Codec, Object)}</td>
COMMENT </tr>
COMMENT <tr>
COMMENT <td>{@link net.minecraft.util.registry.Registry} value</td><td>{@link #readRegistryValue(IndexedIterable)}</td><td>{@link #writeRegistryValue(IndexedIterable, Object)}</td>
COMMENT <td>{@link net.minecraft.registry.Registry} value</td><td>{@link #readRegistryValue(IndexedIterable)}</td><td>{@link #writeRegistryValue(IndexedIterable, Object)}</td>
COMMENT </tr>
COMMENT <tr>
COMMENT <td>{@link Collection}</td><td>{@link #readCollection(IntFunction, PacketByteBuf.PacketReader)}</td><td>{@link #writeCollection(Collection, PacketByteBuf.PacketWriter)}</td>

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_7887 net/minecraft/util/registry/BuiltinRegistries
CLASS net/minecraft/class_7887 net/minecraft/registry/BuiltinRegistries
FIELD field_40953 REGISTRY_BUILDER Lnet/minecraft/class_7877;
METHOD method_46817 createWrapperLookup ()Lnet/minecraft/class_7225$class_7874;
METHOD method_46818 hasBiomePlacementModifier (Lnet/minecraft/class_6796;)Z

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_7780 net/minecraft/util/registry/CombinedDynamicRegistries
CLASS net/minecraft/class_7780 net/minecraft/registry/CombinedDynamicRegistries
FIELD field_40581 types Ljava/util/List;
FIELD field_40582 registryManagers Ljava/util/List;
FIELD field_40583 combinedRegistryManager Lnet/minecraft/class_5455$class_6890;

View File

@ -0,0 +1,2 @@
CLASS net/minecraft/class_7922 net/minecraft/registry/DefaultedRegistry
METHOD method_10137 getDefaultId ()Lnet/minecraft/class_2960;

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_5455 net/minecraft/util/registry/DynamicRegistryManager
CLASS net/minecraft/class_5455 net/minecraft/registry/DynamicRegistryManager
COMMENT A manager of dynamic registries. It allows users to access non-hardcoded
COMMENT registries reliably.
COMMENT

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_2385 net/minecraft/util/registry/MutableRegistry
CLASS net/minecraft/class_2385 net/minecraft/registry/MutableRegistry
COMMENT A registry that allows adding or modifying values.
COMMENT Note that in vanilla, all registries are instances of this.
COMMENT

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_7891 net/minecraft/util/registry/Registerable
CLASS net/minecraft/class_7891 net/minecraft/registry/Registerable
METHOD method_46799 getRegistryLookup (Lnet/minecraft/class_5321;)Lnet/minecraft/class_7871;
ARG 1 registryRef
METHOD method_46800 register (Lnet/minecraft/class_5321;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lnet/minecraft/class_6880$class_6883;

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_7923 net/minecraft/util/registry/Registries
CLASS net/minecraft/class_7923 net/minecraft/registry/Registries
FIELD field_41128 POINT_OF_INTEREST_TYPE Lnet/minecraft/class_2378;
FIELD field_41129 MEMORY_MODULE_TYPE Lnet/minecraft/class_7922;
FIELD field_41130 SENSOR_TYPE Lnet/minecraft/class_7922;

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_2378 net/minecraft/util/registry/Registry
CLASS net/minecraft/class_2378 net/minecraft/registry/Registry
COMMENT A registry is used to register various in-game components. Almost all parts of the
COMMENT game - from blocks, items, and entity types, to cat types, goat horn instruments,
COMMENT and structure pools - are registered in registries. Registry system allows the game
@ -11,9 +11,9 @@ CLASS net/minecraft/class_2378 net/minecraft/util/registry/Registry
COMMENT <p>A <strong>registry</strong> is an object that holds the mapping between three things:
COMMENT the string ID, the numeric ID, and the registered value. There are many registries
COMMENT for different types of registerable objects, and a registry's type parameter indicates
COMMENT the accepted type. For example, you register your {@link Block} to {@code
COMMENT the accepted type. For example, you register your {@link net.minecraft.block.Block} to {@code
COMMENT Registry<Block>}. It's important to note that registries themselves are registered
COMMENT in a "registry of registries", {@link #ROOT}.
COMMENT in a "registry of registries", {@link Registries#ROOT}.
COMMENT
COMMENT <p>The <strong>string ID</strong>, usually just called "ID", is a human-readable
COMMENT {@link Identifier} that uniquely identifies the registered value in a registry.
@ -69,7 +69,7 @@ CLASS net/minecraft/class_2378 net/minecraft/util/registry/Registry
COMMENT <h2 id="using">Using Registry</h2>
COMMENT <h3 id="reading">Reading Registry</h3>
COMMENT <p>A registry is also an {@link IndexedIterable}. Therefore, registries can be
COMMENT iterated using, e.g. {@code for (Block block : Registry.BLOCK)}.
COMMENT iterated using, e.g. {@code for (Block block : Registries.BLOCK)}.
COMMENT
COMMENT <p>There are several other methods used for reading the contents of the registry:
COMMENT <ul>
@ -88,7 +88,7 @@ CLASS net/minecraft/class_2378 net/minecraft/util/registry/Registry
COMMENT or dynamic. For dynamic registries, data packs can usually be used to register a new
COMMENT value or replace one. For static registries, the game's code must be modified.
COMMENT
COMMENT <p>Static registries are defined in this class, and unlike the dynamic registries, it
COMMENT <p>Static registries are defined in {@link Registries}, and unlike the dynamic registries, it
COMMENT cannot be changed after the game initialization. The game enforces this by "freezing"
COMMENT the registry. Attempting to register a value after freezing causes a crash, such as
COMMENT "Registry is already frozen". Modding APIs usually provide a way to bypass this restriction.
@ -103,22 +103,22 @@ CLASS net/minecraft/class_2378 net/minecraft/util/registry/Registry
COMMENT <li><strong>Intrusive holders</strong> are registry entries tied to a specific
COMMENT registerable object at instantiation time. When instantiating those, it promises
COMMENT that the object is later registered - which, if broken, will result in a crash.
COMMENT This is used for {@link #BLOCK}, {@link #ITEM}, {@link #FLUID}, {@link #ENTITY_TYPE},
COMMENT and {@link #GAME_EVENT} registries.</li>
COMMENT This is used for {@link Registries#BLOCK}, {@link Registries#ITEM}, {@link Registries#FLUID},
COMMENT {@link Registries#ENTITY_TYPE}, and {@link Registries#GAME_EVENT} registries.</li>
COMMENT <li><strong>Standalone holders</strong> are registry entries that are not intrusive.
COMMENT There is no restriction on instantiation.</li>
COMMENT </ul>
COMMENT
COMMENT <p>When a class whose instances are registered as intrusive holders, such as
COMMENT {@link Block} or {@link Item}, are instantiated without registering, the game
COMMENT crashes with "Some intrusive holders were not added to registry" error message.
COMMENT <strong>This includes conditional registration</strong>. For example, the code
COMMENT below can cause a crash:
COMMENT {@link net.minecraft.block.Block} or {@link net.minecraft.item.Item}, are instantiated
COMMENT without registering, the game crashes with "Some intrusive holders were not added to
COMMENT registry" error message. <strong>This includes conditional registration</strong>.
COMMENT For example, the code below can cause a crash:
COMMENT
COMMENT <pre>{@code
COMMENT Item myItem = new Item(new Item.Settings());
COMMENT if (condition) {
COMMENT Registry.register(Registry.ITEM, new Identifier("example", "bad"), myItem);
COMMENT Registry.register(Registries.ITEM, new Identifier("example", "bad"), myItem);
COMMENT }
COMMENT }</pre>
COMMENT
@ -127,7 +127,7 @@ CLASS net/minecraft/class_2378 net/minecraft/util/registry/Registry
COMMENT <pre>{@code
COMMENT if (condition) {
COMMENT Item myItem = new Item(new Item.Settings());
COMMENT Registry.register(Registry.ITEM, new Identifier("example", "bad"), myItem);
COMMENT Registry.register(Registries.ITEM, new Identifier("example", "bad"), myItem);
COMMENT }
COMMENT }</pre>
METHOD keys (Lcom/mojang/serialization/DynamicOps;)Ljava/util/stream/Stream;
@ -276,7 +276,7 @@ CLASS net/minecraft/class_2378 net/minecraft/util/registry/Registry
METHOD method_47442 (Lnet/minecraft/class_6880;)Lcom/mojang/serialization/Lifecycle;
ARG 1 entry
METHOD method_47443 (Lnet/minecraft/class_2960;)Lcom/mojang/serialization/DataResult;
ARG 1 entry
ARG 1 id
CLASS 1
METHOD method_46773 (Lnet/minecraft/class_6880$class_6883;)Lnet/minecraft/class_6880;
ARG 0 entry

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_7877 net/minecraft/util/registry/RegistryBuilder
CLASS net/minecraft/class_7877 net/minecraft/registry/RegistryBuilder
FIELD field_40941 registries Ljava/util/List;
METHOD method_46776 addRegistry (Lnet/minecraft/class_5321;Lcom/mojang/serialization/Lifecycle;Lnet/minecraft/class_7877$class_7882;)Lnet/minecraft/class_7877;
ARG 1 registryRef

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_6895 net/minecraft/util/registry/RegistryCodecs
CLASS net/minecraft/class_6895 net/minecraft/registry/RegistryCodecs
COMMENT A utility class for serialization of registries using codecs.
METHOD method_40340 entryList (Lnet/minecraft/class_5321;)Lcom/mojang/serialization/Codec;
ARG 0 registryRef

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_7871 net/minecraft/util/registry/RegistryEntryLookup
CLASS net/minecraft/class_7871 net/minecraft/registry/RegistryEntryLookup
METHOD method_46733 getOptional (Lnet/minecraft/class_6862;)Ljava/util/Optional;
ARG 1 tag
METHOD method_46735 getOrThrow (Lnet/minecraft/class_6862;)Lnet/minecraft/class_6885$class_6888;

View File

@ -1,9 +1,9 @@
CLASS net/minecraft/class_5321 net/minecraft/util/registry/RegistryKey
CLASS net/minecraft/class_5321 net/minecraft/registry/RegistryKey
COMMENT Represents a key for a value in a registry in a context where a
COMMENT root registry is available.
COMMENT
COMMENT @param <T> the type of the value
COMMENT @see Registry#ROOT
COMMENT @see Registries#ROOT
FIELD field_25136 INSTANCES Ljava/util/concurrent/ConcurrentMap;
COMMENT A cache of all registry keys ever created.
FIELD field_25137 registry Lnet/minecraft/class_2960;
@ -40,6 +40,8 @@ CLASS net/minecraft/class_5321 net/minecraft/util/registry/RegistryKey
METHOD method_29181 of (Lnet/minecraft/class_2960;Lnet/minecraft/class_2960;)Lnet/minecraft/class_5321;
ARG 0 registry
ARG 1 value
METHOD method_29182 (Lnet/minecraft/class_5321$class_7892;)Lnet/minecraft/class_5321;
ARG 0 pair
METHOD method_31163 isOf (Lnet/minecraft/class_5321;)Z
COMMENT Returns whether this registry key belongs to the given registry (according to its type, not whether the registry actually contains this key).
ARG 1 registry
@ -56,3 +58,6 @@ CLASS net/minecraft/class_5321 net/minecraft/util/registry/RegistryKey
COMMENT by passing the registry {@code E}.
ARG 1 registryRef
METHOD method_41185 getRegistry ()Lnet/minecraft/class_2960;
CLASS class_7892 RegistryIdPair
FIELD comp_1150 id Lnet/minecraft/class_2960;
METHOD comp_1150 id ()Lnet/minecraft/class_2960;

View File

@ -0,0 +1,30 @@
CLASS net/minecraft/class_7924 net/minecraft/registry/RegistryKeys
FIELD field_41204 MATERIAL_CONDITION Lnet/minecraft/class_5321;
FIELD field_41205 MATERIAL_RULE Lnet/minecraft/class_5321;
FIELD field_41207 SCREEN_HANDLER Lnet/minecraft/class_5321;
FIELD field_41208 STATUS_EFFECT Lnet/minecraft/class_5321;
FIELD field_41211 PLACEMENT_MODIFIER_TYPE Lnet/minecraft/class_5321;
FIELD field_41218 ROOT_PLAYER_TYPE Lnet/minecraft/class_5321;
FIELD field_41223 WORLD Lnet/minecraft/class_5321;
FIELD field_41224 DIMENSION Lnet/minecraft/class_5321;
FIELD field_41227 STRUCTURE_PIECE Lnet/minecraft/class_5321;
FIELD field_41228 STRUCTURE_PLACEMENT Lnet/minecraft/class_5321;
FIELD field_41229 STRUCTURE_POOL_ELEMENT Lnet/minecraft/class_5321;
FIELD field_41230 STRUCTURE_PROCESSOR Lnet/minecraft/class_5321;
FIELD field_41231 STRUCTURE_TYPE Lnet/minecraft/class_5321;
FIELD field_41232 TREE_DECORATOR_TYPE Lnet/minecraft/class_5321;
FIELD field_41233 TRUNK_PLACER_TYPE Lnet/minecraft/class_5321;
FIELD field_41253 BIOME_SOURCE Lnet/minecraft/class_5321;
FIELD field_41257 BLOCK_STATE_PROVIDER_TYPE Lnet/minecraft/class_5321;
FIELD field_41258 CARVER Lnet/minecraft/class_5321;
FIELD field_41260 CHUNK_GENERATOR Lnet/minecraft/class_5321;
FIELD field_41264 DENSITY_FUNCTION_TYPE Lnet/minecraft/class_5321;
FIELD field_41267 FEATURE Lnet/minecraft/class_5321;
FIELD field_41268 FEATURE_SIZE_TYPE Lnet/minecraft/class_5321;
FIELD field_41271 FOLIAGE_PLACER_TYPE Lnet/minecraft/class_5321;
METHOD method_47516 toWorldKey (Lnet/minecraft/class_5321;)Lnet/minecraft/class_5321;
ARG 0 key
METHOD method_47517 of (Ljava/lang/String;)Lnet/minecraft/class_5321;
ARG 0 id
METHOD method_47518 toDimensionKey (Lnet/minecraft/class_5321;)Lnet/minecraft/class_5321;
ARG 0 key

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_7655 net/minecraft/util/registry/RegistryLoader
CLASS net/minecraft/class_7655 net/minecraft/registry/RegistryLoader
FIELD field_39968 DYNAMIC_REGISTRIES Ljava/util/List;
FIELD field_39969 DIMENSION_REGISTRIES Ljava/util/List;
FIELD field_39970 LOGGER Lorg/slf4j/Logger;

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_6903 net/minecraft/util/dynamic/RegistryOps
CLASS net/minecraft/class_6903 net/minecraft/registry/RegistryOps
FIELD field_40852 registryInfoGetter Lnet/minecraft/class_6903$class_7863;
METHOD <init> (Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/class_6903$class_7863;)V
ARG 1 delegate

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_7225 net/minecraft/util/registry/RegistryWrapper
CLASS net/minecraft/class_7225 net/minecraft/registry/RegistryWrapper
COMMENT A read-only wrapper of a registry.
METHOD method_42017 streamEntries ()Ljava/util/stream/Stream;
COMMENT {@return a stream of registry keys defined in the wrapped registry}

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_7782 net/minecraft/util/registry/SerializableRegistries
CLASS net/minecraft/class_7782 net/minecraft/registry/SerializableRegistries
FIELD field_40587 CODEC Lcom/mojang/serialization/Codec;
FIELD field_40588 REGISTRIES Ljava/util/Map;
METHOD method_45948 createCodec ()Lcom/mojang/serialization/Codec;
@ -30,4 +30,6 @@ CLASS net/minecraft/class_7782 net/minecraft/util/registry/SerializableRegistrie
ARG 0 registryManager
METHOD method_45963 (Lnet/minecraft/class_5455$class_6892;)Z
ARG 0 entry
METHOD method_47449 streamDynamicEntries (Lnet/minecraft/class_7780;)Ljava/util/stream/Stream;
ARG 0 combinedRegistries
CLASS class_7783 Info

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_7659 net/minecraft/util/registry/ServerDynamicRegistryType
CLASS net/minecraft/class_7659 net/minecraft/registry/ServerDynamicRegistryType
FIELD field_39975 VALUES Ljava/util/List;
FIELD field_39976 STATIC_REGISTRY_MANAGER Lnet/minecraft/class_5455$class_6890;
METHOD method_45139 createCombinedDynamicRegistries ()Lnet/minecraft/class_7780;

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_2348 net/minecraft/util/registry/SimpleDefaultedRegistry
CLASS net/minecraft/class_2348 net/minecraft/registry/SimpleDefaultedRegistry
COMMENT An implementation of {@link Registry} with a default ID and value for unknown lookups.
FIELD field_11014 defaultId Lnet/minecraft/class_2960;
FIELD field_11015 defaultEntry Lnet/minecraft/class_6880$class_6883;
@ -7,5 +7,3 @@ CLASS net/minecraft/class_2348 net/minecraft/util/registry/SimpleDefaultedRegist
ARG 2 key
ARG 3 lifecycle
ARG 4 intrusive
METHOD method_10137 ()Lnet/minecraft/class_2960;
COMMENT {@return the ID of the default value}

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_2370 net/minecraft/util/registry/SimpleRegistry
CLASS net/minecraft/class_2370 net/minecraft/registry/SimpleRegistry
COMMENT An implementation of a mutable registry. All vanilla registries use this (or its
COMMENT subclass, {@link DefaultedRegistry}).
COMMENT
@ -25,6 +25,8 @@ CLASS net/minecraft/class_2370 net/minecraft/util/registry/SimpleRegistry
ARG 1 key
ARG 2 lifecycle
ARG 3 intrusive
METHOD method_39665 (Lit/unimi/dsi/fastutil/objects/Object2IntOpenCustomHashMap;)V
ARG 0 map
METHOD method_40253 getValue (Lnet/minecraft/class_6880$class_6883;)Ljava/lang/Object;
ARG 0 entry
METHOD method_40255 (Lnet/minecraft/class_6885$class_6888;)V

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_5381 net/minecraft/util/dynamic/RegistryElementCodec
CLASS net/minecraft/class_5381 net/minecraft/registry/entry/RegistryElementCodec
COMMENT A codec for registry elements. Will prefer to encode/decode objects as
COMMENT identifiers if they exist in a registry and falls back to full encoding/
COMMENT decoding behavior if it cannot do so.
@ -7,7 +7,7 @@ CLASS net/minecraft/class_5381 net/minecraft/util/dynamic/RegistryElementCodec
COMMENT loading from registry before a registry is fully loaded from a codec.
COMMENT
COMMENT @param <E> the element type
COMMENT @see RegistryOps
COMMENT @see net.minecraft.registry.RegistryOps
FIELD field_25507 registryRef Lnet/minecraft/class_5321;
FIELD field_25508 elementCodec Lcom/mojang/serialization/Codec;
FIELD field_26758 allowInlineDefinitions Z

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_6880 net/minecraft/util/registry/RegistryEntry
CLASS net/minecraft/class_6880 net/minecraft/registry/entry/RegistryEntry
COMMENT An object holding a value that can be registered in a registry. In most cases, the
COMMENT value is already registered in a registry ("reference entry"), hence the name;
COMMENT however, it is possible to create a registry entry by direct reference
@ -16,8 +16,8 @@ CLASS net/minecraft/class_6880 net/minecraft/util/registry/RegistryEntry
COMMENT
COMMENT @see RegistryEntry.Direct
COMMENT @see RegistryEntry.Reference
COMMENT @see Registry#entryOf
COMMENT @see Registry#getEntry
COMMENT @see net.minecraft.registry.Registry#entryOf
COMMENT @see net.minecraft.registry.Registry#getEntry
METHOD method_40220 isIn (Lnet/minecraft/class_6862;)Z
COMMENT {@return whether this entry is in {@code tag}}
COMMENT
@ -82,15 +82,17 @@ CLASS net/minecraft/class_6880 net/minecraft/util/registry/RegistryEntry
COMMENT <li><strong>Intrusive</strong> registry entries are registry entries tied to a specific
COMMENT registerable object at instantiation time. When instantiating those, it promises
COMMENT that the object is later registered - which, if broken, will result in a crash.
COMMENT This is used for {@link Registry#BLOCK}, {@link Registry#ITEM}, {@link Registry#FLUID},
COMMENT {@link Registry#ENTITY_TYPE}, and {@link Registry#GAME_EVENT} registries. This type
COMMENT This is used for {@link net.minecraft.registry.Registries#BLOCK}, {@link
COMMENT net.minecraft.registry.Registries#ITEM}, {@link net.minecraft.registry.Registries#FLUID},
COMMENT {@link net.minecraft.registry.Registries#ENTITY_TYPE}, and {@link
COMMENT net.minecraft.registry.Registries#GAME_EVENT} registries. This type
COMMENT exists for historical reasons and is deprecated.</li>
COMMENT </ul>
COMMENT
COMMENT <p>Therefore, it is very important to construct any intrusive-entry type object
COMMENT and register at the same time. For example, a mod that conditionally registers an
COMMENT {@link net.minecraft.item.Item} has to create an instance only if the condition is met.
COMMENT (See {@link Registry} for a code example.)
COMMENT (See {@link net.minecraft.registry.Registry} for a code example.)
COMMENT
COMMENT <p>When a reference registry entry is first instantiated, it only has either the key
COMMENT or the value (depending on the type). They are later filled when registering the
@ -98,8 +100,8 @@ CLASS net/minecraft/class_6880 net/minecraft/util/registry/RegistryEntry
COMMENT can cause a crash. Note that if you are just getting the entry from a registry, this
COMMENT should not be a problem.
COMMENT
COMMENT @see Registry#entryOf
COMMENT @see Registry#getEntry
COMMENT @see net.minecraft.registry.Registry#entryOf
COMMENT @see net.minecraft.registry.Registry#getEntry
FIELD field_36450 tags Ljava/util/Set;
FIELD field_36451 referenceType Lnet/minecraft/class_6880$class_6883$class_6884;
FIELD field_36452 registryKey Lnet/minecraft/class_5321;
@ -113,8 +115,8 @@ CLASS net/minecraft/class_6880 net/minecraft/util/registry/RegistryEntry
METHOD method_40233 intrusive (Lnet/minecraft/class_7876;Ljava/lang/Object;)Lnet/minecraft/class_6880$class_6883;
COMMENT {@return a new intrusive registry entry}
COMMENT
COMMENT <p>This should not be called manually. Call {@link Registry#entryOf} or
COMMENT {@link Registry#getEntry} instead.
COMMENT <p>This should not be called manually. Call {@link net.minecraft.registry.Registry#entryOf} or
COMMENT {@link net.minecraft.registry.Registry#getEntry} instead.
COMMENT
COMMENT <p>Callers are responsible for filling the key later by calling {@link
COMMENT #setRegistryKey}.
@ -125,8 +127,8 @@ CLASS net/minecraft/class_6880 net/minecraft/util/registry/RegistryEntry
METHOD method_40234 standAlone (Lnet/minecraft/class_7876;Lnet/minecraft/class_5321;)Lnet/minecraft/class_6880$class_6883;
COMMENT {@return a new stand-alone registry entry}
COMMENT
COMMENT <p>This should not be called manually. Call {@link Registry#entryOf} or
COMMENT {@link Registry#getEntry} instead.
COMMENT <p>This should not be called manually. Call {@link net.minecraft.registry.Registry#entryOf} or
COMMENT {@link net.minecraft.registry.Registry#getEntry} instead.
COMMENT
COMMENT <p>Callers are responsible for filling the value later by calling {@link
COMMENT #setValue}.

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_6885 net/minecraft/util/registry/RegistryEntryList
CLASS net/minecraft/class_6885 net/minecraft/registry/entry/RegistryEntryList
COMMENT A registry entry list is an immutable list of registry entries. This, is either a direct
COMMENT reference to each item, or a reference to a tag. A <strong>tag</strong> is a way
COMMENT to dynamically define a list of registered values. Anything registered in a registry
@ -7,7 +7,7 @@ CLASS net/minecraft/class_6885 net/minecraft/util/registry/RegistryEntryList
COMMENT <p>This can be iterated directly (i.e. {@code for (RegistryEntry<T> entry : entries)}.
COMMENT Note that this does not implement {@link java.util.Collection}.
COMMENT
COMMENT @see Registry
COMMENT @see net.minecraft.registry.Registry
COMMENT @see RegistryEntry
METHOD method_40239 stream ()Ljava/util/stream/Stream;
COMMENT {@return a stream of registry entries in this list}

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_6898 net/minecraft/util/registry/RegistryEntryListCodec
CLASS net/minecraft/class_6898 net/minecraft/registry/entry/RegistryEntryListCodec
FIELD field_36480 registry Lnet/minecraft/class_5321;
FIELD field_36481 entryCodec Lcom/mojang/serialization/Codec;
FIELD field_36482 directEntryListCodec Lcom/mojang/serialization/Codec;

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_7876 net/minecraft/util/registry/RegistryEntryOwner
CLASS net/minecraft/class_7876 net/minecraft/registry/entry/RegistryEntryOwner
COMMENT An owner of a {@link RegistryEntry} or {@link RegistryEntryList}. This is usually
COMMENT a registry, but it is possible that an object owns multiple entries from
COMMENT different registries.

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_6899 net/minecraft/util/registry/RegistryFixedCodec
CLASS net/minecraft/class_6899 net/minecraft/registry/entry/RegistryFixedCodec
FIELD field_36484 registry Lnet/minecraft/class_5321;
METHOD <init> (Lnet/minecraft/class_5321;)V
ARG 1 registry

View File

@ -1,3 +1,3 @@
CLASS net/minecraft/class_7440 net/minecraft/tag/BannerPatternTags
CLASS net/minecraft/class_7440 net/minecraft/registry/tag/BannerPatternTags
METHOD method_43675 of (Ljava/lang/String;)Lnet/minecraft/class_6862;
ARG 0 id

View File

@ -1,3 +1,3 @@
CLASS net/minecraft/class_6908 net/minecraft/tag/BiomeTags
CLASS net/minecraft/class_6908 net/minecraft/registry/tag/BiomeTags
METHOD method_40434 of (Ljava/lang/String;)Lnet/minecraft/class_6862;
ARG 0 id

View File

@ -1,3 +1,3 @@
CLASS net/minecraft/class_3481 net/minecraft/tag/BlockTags
CLASS net/minecraft/class_3481 net/minecraft/registry/tag/BlockTags
METHOD method_15069 of (Ljava/lang/String;)Lnet/minecraft/class_6862;
ARG 0 id

View File

@ -1,3 +1,3 @@
CLASS net/minecraft/class_7369 net/minecraft/tag/CatVariantTags
CLASS net/minecraft/class_7369 net/minecraft/registry/tag/CatVariantTags
METHOD method_43046 of (Ljava/lang/String;)Lnet/minecraft/class_6862;
ARG 0 id

View File

@ -1,3 +1,3 @@
CLASS net/minecraft/class_3483 net/minecraft/tag/EntityTypeTags
CLASS net/minecraft/class_3483 net/minecraft/registry/tag/EntityTypeTags
METHOD method_15077 of (Ljava/lang/String;)Lnet/minecraft/class_6862;
ARG 0 id

View File

@ -0,0 +1,3 @@
CLASS net/minecraft/class_7088 net/minecraft/registry/tag/FlatLevelGeneratorPresetTags
METHOD method_41292 of (Ljava/lang/String;)Lnet/minecraft/class_6862;
ARG 0 id

View File

@ -1,3 +1,3 @@
CLASS net/minecraft/class_3486 net/minecraft/tag/FluidTags
CLASS net/minecraft/class_3486 net/minecraft/registry/tag/FluidTags
METHOD method_15095 of (Ljava/lang/String;)Lnet/minecraft/class_6862;
ARG 0 id

View File

@ -1,3 +1,3 @@
CLASS net/minecraft/class_5698 net/minecraft/tag/GameEventTags
CLASS net/minecraft/class_5698 net/minecraft/registry/tag/GameEventTags
METHOD method_32823 of (Ljava/lang/String;)Lnet/minecraft/class_6862;
ARG 0 id

View File

@ -1,3 +1,3 @@
CLASS net/minecraft/class_7441 net/minecraft/tag/InstrumentTags
CLASS net/minecraft/class_7441 net/minecraft/registry/tag/InstrumentTags
METHOD method_43676 of (Ljava/lang/String;)Lnet/minecraft/class_6862;
ARG 0 id

View File

@ -1,3 +1,3 @@
CLASS net/minecraft/class_3489 net/minecraft/tag/ItemTags
CLASS net/minecraft/class_3489 net/minecraft/registry/tag/ItemTags
METHOD method_15102 of (Ljava/lang/String;)Lnet/minecraft/class_6862;
ARG 0 id

View File

@ -1,3 +1,3 @@
CLASS net/minecraft/class_7406 net/minecraft/tag/PaintingVariantTags
CLASS net/minecraft/class_7406 net/minecraft/registry/tag/PaintingVariantTags
METHOD method_43384 of (Ljava/lang/String;)Lnet/minecraft/class_6862;
ARG 0 id

View File

@ -1,3 +1,3 @@
CLASS net/minecraft/class_7473 net/minecraft/tag/PointOfInterestTypeTags
CLASS net/minecraft/class_7473 net/minecraft/registry/tag/PointOfInterestTypeTags
METHOD method_43935 of (Ljava/lang/String;)Lnet/minecraft/class_6862;
ARG 0 id

View File

@ -1,3 +1,3 @@
CLASS net/minecraft/class_7045 net/minecraft/tag/StructureTags
CLASS net/minecraft/class_7045 net/minecraft/registry/tag/StructureTags
METHOD method_41006 of (Ljava/lang/String;)Lnet/minecraft/class_6862;
ARG 0 id

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_3495 net/minecraft/tag/TagBuilder
CLASS net/minecraft/class_3495 net/minecraft/registry/tag/TagBuilder
COMMENT A builder class to ease the creation of tags. It can also be used as a
COMMENT mutable form of a tag.
FIELD field_23688 entries Ljava/util/List;

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_3497 net/minecraft/tag/TagEntry
CLASS net/minecraft/class_3497 net/minecraft/registry/tag/TagEntry
FIELD field_15584 id Lnet/minecraft/class_2960;
FIELD field_39265 CODEC Lcom/mojang/serialization/Codec;
FIELD field_39266 ENTRY_CODEC Lcom/mojang/serialization/Codec;

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_7475 net/minecraft/tag/TagFile
CLASS net/minecraft/class_7475 net/minecraft/registry/tag/TagFile
FIELD field_39269 CODEC Lcom/mojang/serialization/Codec;
METHOD method_43950 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App;
ARG 0 instance

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_3503 net/minecraft/tag/TagGroupLoader
CLASS net/minecraft/class_3503 net/minecraft/registry/tag/TagGroupLoader
FIELD field_15605 dataType Ljava/lang/String;
FIELD field_15607 LOGGER Lorg/slf4j/Logger;
FIELD field_15609 registryGetter Ljava/util/function/Function;

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_6862 net/minecraft/tag/TagKey
CLASS net/minecraft/class_6862 net/minecraft/registry/tag/TagKey
FIELD comp_327 id Lnet/minecraft/class_2960;
FIELD field_36394 INTERNER Lcom/google/common/collect/Interner;
METHOD comp_327 id ()Lnet/minecraft/class_2960;

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_3505 net/minecraft/tag/TagManagerLoader
CLASS net/minecraft/class_3505 net/minecraft/registry/tag/TagManagerLoader
FIELD field_28312 registryManager Lnet/minecraft/class_5455;
FIELD field_36395 DIRECTORIES Ljava/util/Map;
FIELD field_36396 registryTags Ljava/util/List;

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_6864 net/minecraft/tag/TagPacketSerializer
CLASS net/minecraft/class_6864 net/minecraft/registry/tag/TagPacketSerializer
METHOD method_40101 (Lcom/mojang/datafixers/util/Pair;)Z
ARG 0 pair
METHOD method_40102 serializeTags (Lnet/minecraft/class_2378;)Lnet/minecraft/class_6864$class_5748;
@ -19,7 +19,7 @@ CLASS net/minecraft/class_6864 net/minecraft/tag/TagPacketSerializer
ARG 4 rawIds
CLASS class_5748 Serialized
COMMENT A serialization-friendly POJO representation of a {@linkplain
COMMENT net.minecraft.util.registry.RegistryEntryList registry entry list} of tags.
COMMENT net.minecraft.registry.entry.RegistryEntryList registry entry list} of tags.
COMMENT This allows easy transport of tags over Minecraft network protocol.
COMMENT
COMMENT <p>This stores tag entries with raw integer IDs and requires a registry

View File

@ -1,3 +1,3 @@
CLASS net/minecraft/class_7089 net/minecraft/tag/WorldPresetTags
CLASS net/minecraft/class_7089 net/minecraft/registry/tag/WorldPresetTags
METHOD method_41293 of (Ljava/lang/String;)Lnet/minecraft/class_6862;
ARG 0 id

View File

@ -68,7 +68,7 @@ CLASS net/minecraft/class_1703 net/minecraft/screen/ScreenHandler
COMMENT <p>The screen handler then has to be registered in a registry. Create a new instance of
COMMENT {@link ScreenHandlerType} with the screen handler type factory (which can be a reference
COMMENT to the client-side constructor; i.e. {@code MyScreenHandler::MyScreenHandler})
COMMENT and register it to {@link net.minecraft.util.registry.Registry#SCREEN_HANDLER}.
COMMENT and register it to {@link net.minecraft.registry.Registries#SCREEN_HANDLER}.
COMMENT
COMMENT <h3 id="opening">Opening</h3>
COMMENT <p>Most of the screen handlers are associated with a block and opened by using the block.

View File

@ -2,7 +2,7 @@ CLASS net/minecraft/class_3917 net/minecraft/screen/ScreenHandlerType
COMMENT Screen handler type is used to create screen handlers on the client.
COMMENT It is a holder object holding a factory (usually a reference to the constructor).
COMMENT They are registered in the registry under {@link
COMMENT net.minecraft.util.registry.Registry#SCREEN_HANDLER}.
COMMENT net.minecraft.registry.Registries#SCREEN_HANDLER}.
COMMENT
COMMENT <p>Technically speaking, screen handlers do not have to register screen handler
COMMENT types. However, such screen handlers are practically useless as they cannot be

View File

@ -1,3 +0,0 @@
CLASS net/minecraft/class_7088 net/minecraft/tag/FlatLevelGeneratorPresetTags
METHOD method_41292 of (Ljava/lang/String;)Lnet/minecraft/class_6862;
ARG 0 id

View File

@ -70,7 +70,7 @@ CLASS net/minecraft/class_2960 net/minecraft/util/Identifier
COMMENT
COMMENT <h2 id="using">Using Identifier</h2>
COMMENT <p>Identifiers identify several objects in the game. {@link
COMMENT net.minecraft.util.registry.Registry} holds objects, such as blocks and items, that are
COMMENT net.minecraft.registry.Registry} holds objects, such as blocks and items, that are
COMMENT identified by an identifier. Textures are also identified using an identifier; such
COMMENT an identifier is represented as a file path with an extension, such as {@code
COMMENT minecraft:textures/entity/pig/pig.png}.
@ -82,7 +82,7 @@ CLASS net/minecraft/class_2960 net/minecraft/util/Identifier
COMMENT <h3 id="registrykey">RegistryKey</h3>
COMMENT <p>Identifier is not type-aware; {@code minecraft:tnt} could refer to a TNT block, a TNT
COMMENT item, or a TNT entity. To identify a registered object uniquely, {@link
COMMENT net.minecraft.util.registry.RegistryKey} can be used. A registry key is a combination
COMMENT net.minecraft.registry.RegistryKey} can be used. A registry key is a combination
COMMENT of the registry's identifier and the object's identifier.
FIELD field_13353 namespace Ljava/lang/String;
FIELD field_13354 COMMAND_EXCEPTION Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;

View File

@ -1,2 +0,0 @@
CLASS net/minecraft/class_7922 net/minecraft/util/registry/DefaultedRegistry
METHOD method_10137 getDefaultId ()Lnet/minecraft/class_2960;

View File

@ -1,3 +0,0 @@
CLASS net/minecraft/class_7924 net/minecraft/util/registry/RegistryKeys
METHOD method_47517 of (Ljava/lang/String;)Lnet/minecraft/class_5321;
ARG 0 id

View File

@ -4,7 +4,7 @@ CLASS net/minecraft/class_5716 net/minecraft/world/event/PositionSource
COMMENT @see net.minecraft.world.event.listener.GameEventListener#getPositionSource()
FIELD field_28184 CODEC Lcom/mojang/serialization/Codec;
COMMENT A codec for encoding and decoding any position source whose {@link #getType() type}
COMMENT is in the {@link net.minecraft.util.registry.Registry#POSITION_SOURCE_TYPE registry}.
COMMENT is in the {@link net.minecraft.registry.Registries#POSITION_SOURCE_TYPE registry}.
METHOD method_32955 getType ()Lnet/minecraft/class_5717;
COMMENT Returns the type of this position source.
METHOD method_32956 getPos (Lnet/minecraft/class_1937;)Ljava/util/Optional;