Class Registry<V>

    • Constructor Detail

      • Registry

        public Registry​(java.util.function.ToIntFunction<V> idGenerator)
      • Registry

        public Registry()
    • Method Detail

      • register

        public <R extends V> R register​(ResourceLocation location,
                                        R value)
      • register

        public <R extends V> R register​(java.lang.String location,
                                        R value)
      • registerLater

        public <R extends V> java.util.function.Supplier<R> registerLater​(ResourceLocation location,
                                                                          java.util.function.Supplier<R> initializer)
      • registerLater

        public <R extends V> java.util.function.Supplier<R> registerLater​(java.lang.String location,
                                                                          java.util.function.Supplier<R> initializer)
      • requireRegister

        public void requireRegister​(V value)
      • freeze

        public void freeze()
      • lateRegister

        public void lateRegister()
      • isFrozen

        public boolean isFrozen()
      • areDelayedRegistered

        public boolean areDelayedRegistered()
      • byLocation

        public java.util.Optional<V> byLocation​(ResourceLocation location)
      • byId

        public java.util.Optional<V> byId​(int id)
      • byIdOrThrow

        public V byIdOrThrow​(int id)
      • getId

        public java.util.OptionalInt getId​(V value)
      • getIdOrFallback

        public int getIdOrFallback​(V value)
      • getIdOrThrow

        public int getIdOrThrow​(V value)
      • getLocationFromId

        public java.util.Optional<ResourceLocation> getLocationFromId​(int id)
      • getLocationFromIdOrThrow

        public ResourceLocation getLocationFromIdOrThrow​(int id)
      • getIdFromLocation

        public java.util.OptionalInt getIdFromLocation​(ResourceLocation location)
      • getIdFromLocationOrFallback

        public int getIdFromLocationOrFallback​(ResourceLocation location)
      • getIdFromLocationOrThrow

        public int getIdFromLocationOrThrow​(ResourceLocation location)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.util.AbstractMap<ResourceLocation,​V>
      • getIdGenerator

        public java.util.function.ToIntFunction<V> getIdGenerator()
      • containsKey

        public boolean containsKey​(java.lang.Object key)
        Specified by:
        containsKey in interface java.util.Map<ResourceLocation,​V>
        Overrides:
        containsKey in class java.util.AbstractMap<ResourceLocation,​V>
      • containsValue

        public boolean containsValue​(java.lang.Object value)
        Specified by:
        containsValue in interface java.util.Map<ResourceLocation,​V>
        Overrides:
        containsValue in class java.util.AbstractMap<ResourceLocation,​V>
      • get

        public V get​(java.lang.Object key)
        Specified by:
        get in interface java.util.Map<ResourceLocation,​V>
        Overrides:
        get in class java.util.AbstractMap<ResourceLocation,​V>
      • remove

        public V remove​(java.lang.Object key)
        Specified by:
        remove in interface java.util.Map<ResourceLocation,​V>
        Overrides:
        remove in class java.util.AbstractMap<ResourceLocation,​V>
      • values

        @NotNull
        public @NotNull java.util.Collection<V> values()
        Specified by:
        values in interface java.util.Map<ResourceLocation,​V>
        Overrides:
        values in class java.util.AbstractMap<ResourceLocation,​V>
      • entrySet

        @NotNull
        public @NotNull java.util.Set<java.util.Map.Entry<ResourceLocation,​V>> entrySet()
        Specified by:
        entrySet in interface java.util.Map<ResourceLocation,​V>
        Specified by:
        entrySet in class java.util.AbstractMap<ResourceLocation,​V>
      • equals

        public boolean equals​(java.lang.Object o)
        Specified by:
        equals in interface java.util.Map<ResourceLocation,​V>
        Overrides:
        equals in class java.util.AbstractMap<ResourceLocation,​V>
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Map<ResourceLocation,​V>
        Overrides:
        hashCode in class java.util.AbstractMap<ResourceLocation,​V>