Class DatagenLootTableManager

java.lang.Object
com.minecolonies.core.generation.DatagenLootTableManager
All Implemented Interfaces:
net.minecraft.core.HolderLookup.Provider, net.neoforged.neoforge.common.extensions.IHolderLookupProviderExtension

public class DatagenLootTableManager extends Object implements net.minecraft.core.HolderLookup.Provider
This is a HolderLookup.Provider that's populated on-demand during datagen, so that we can look up loot tables for LootTableAnalyzer.
  • Constructor Summary

    Constructors
    Constructor
    Description
    DatagenLootTableManager(net.minecraft.core.HolderLookup.Provider baseProvider, @NotNull net.neoforged.neoforge.common.data.ExistingFileHelper existingFileHelper)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <V> @NotNull net.minecraft.resources.RegistryOps<V>
    createSerializationContext(@NotNull com.mojang.serialization.DynamicOps<V> ops)
     
    @NotNull Stream<net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<?>>>
     
    <T> @NotNull Optional<net.minecraft.core.HolderLookup.RegistryLookup<T>>
    lookup(@NotNull net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<? extends T>> registryId)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.core.HolderLookup.Provider

    asGetterLookup, lookupOrThrow

    Methods inherited from interface net.neoforged.neoforge.common.extensions.IHolderLookupProviderExtension

    holder, holderOrThrow
  • Constructor Details

    • DatagenLootTableManager

      public DatagenLootTableManager(@NotNull net.minecraft.core.HolderLookup.Provider baseProvider, @NotNull @NotNull net.neoforged.neoforge.common.data.ExistingFileHelper existingFileHelper)
  • Method Details

    • listRegistries

      @NotNull public @NotNull Stream<net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<?>>> listRegistries()
      Specified by:
      listRegistries in interface net.minecraft.core.HolderLookup.Provider
    • lookup

      @NotNull public <T> @NotNull Optional<net.minecraft.core.HolderLookup.RegistryLookup<T>> lookup(@NotNull @NotNull net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<? extends T>> registryId)
      Specified by:
      lookup in interface net.minecraft.core.HolderLookup.Provider
    • createSerializationContext

      @NotNull public <V> @NotNull net.minecraft.resources.RegistryOps<V> createSerializationContext(@NotNull @NotNull com.mojang.serialization.DynamicOps<V> ops)
      Specified by:
      createSerializationContext in interface net.minecraft.core.HolderLookup.Provider