Class RegistrySnapshot
java.lang.Object
net.neoforged.neoforge.registries.RegistrySnapshot
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map
<net.minecraft.resources.ResourceLocation, net.minecraft.resources.ResourceLocation> private final Map
<net.minecraft.resources.ResourceLocation, net.minecraft.resources.ResourceLocation> private @org.jetbrains.annotations.Nullable byte[]
private final @Nullable net.minecraft.core.Registry
<?> private final it.unimi.dsi.fastutil.ints.Int2ObjectSortedMap
<net.minecraft.resources.ResourceLocation> private final it.unimi.dsi.fastutil.ints.Int2ObjectSortedMap
<net.minecraft.resources.ResourceLocation> private static final Comparator
<net.minecraft.resources.ResourceLocation> static final net.minecraft.network.codec.StreamCodec
<net.minecraft.network.FriendlyByteBuf, RegistrySnapshot> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Creates a blank snapshot to populate.RegistrySnapshot
(net.minecraft.core.Registry<T> registry, boolean full) Creates a registry snapshot based on the given registry. -
Method Summary
-
Field Details
-
SORTER
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf,RegistrySnapshot> STREAM_CODEC -
ids
private final it.unimi.dsi.fastutil.ints.Int2ObjectSortedMap<net.minecraft.resources.ResourceLocation> ids -
idsView
private final it.unimi.dsi.fastutil.ints.Int2ObjectSortedMap<net.minecraft.resources.ResourceLocation> idsView -
aliases
private final Map<net.minecraft.resources.ResourceLocation,net.minecraft.resources.ResourceLocation> aliases -
aliasesView
private final Map<net.minecraft.resources.ResourceLocation,net.minecraft.resources.ResourceLocation> aliasesView -
fullBackup
@Nullable private final @Nullable net.minecraft.core.Registry<?> fullBackup -
binary
@Nullable private @org.jetbrains.annotations.Nullable byte[] binary
-
-
Constructor Details
-
RegistrySnapshot
private RegistrySnapshot()Creates a blank snapshot to populate. -
RegistrySnapshot
public RegistrySnapshot(net.minecraft.core.Registry<T> registry, boolean full) Creates a registry snapshot based on the given registry.- Type Parameters:
T
- the registry type- Parameters:
registry
- the registry to snapshot.full
- iftrue
, all entries will be stored in this snapshot. These entries are never saved to disk nor sent to the client.
-
-
Method Details
-
getIds
public it.unimi.dsi.fastutil.ints.Int2ObjectSortedMap<net.minecraft.resources.ResourceLocation> getIds() -
getAliases
public Map<net.minecraft.resources.ResourceLocation,net.minecraft.resources.ResourceLocation> getAliases() -
getFullBackup
@Nullable public <T> @Nullable net.minecraft.core.Registry<T> getFullBackup()
-