Class RegistrySnapshot

java.lang.Object
net.neoforged.neoforge.registries.RegistrySnapshot

public class RegistrySnapshot extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private 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

    Constructors
    Modifier
    Constructor
    Description
    private
    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

    Modifier and Type
    Method
    Description
    Map<net.minecraft.resources.ResourceLocation,net.minecraft.resources.ResourceLocation>
     
    <T> @Nullable net.minecraft.core.Registry<T>
     
    it.unimi.dsi.fastutil.ints.Int2ObjectSortedMap<net.minecraft.resources.ResourceLocation>
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • SORTER

      private static final Comparator<net.minecraft.resources.ResourceLocation> 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 - if true, 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()