Record Class LootProviderContext
java.lang.Object
java.lang.Record
net.rebel459.unified.impl.util.LootProviderContext
- All Implemented Interfaces:
net.minecraft.data.loot.LootTableSubProvider.Context, net.minecraft.data.worldgen.BootstrapContextAccess, net.neoforged.neoforge.common.extensions.BootstrapContextAccessExtension, net.neoforged.neoforge.common.extensions.LootTableSubProviderContextExtension
public record LootProviderContext(net.minecraft.core.HolderLookup.Provider registries)
extends Record
implements net.minecraft.data.loot.LootTableSubProvider.Context
-
Constructor Summary
ConstructorsConstructorDescriptionLootProviderContext(net.minecraft.core.HolderLookup.Provider registries) Creates an instance of aLootProviderContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.core.Holder.Reference<net.minecraft.world.level.storage.loot.LootTable> accept(net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable> key, net.minecraft.world.level.storage.loot.LootTable.Builder value) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.<S> Stream<net.minecraft.core.Holder.Reference<S>> listContextElements(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<? extends S>> key) <S> net.minecraft.core.HolderGetter<S> lookup(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<? extends S>> key) net.minecraft.core.HolderLookup.ProviderReturns the value of theregistriesrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface net.neoforged.neoforge.common.extensions.BootstrapContextAccessExtension
holderLookupMethods inherited from interface net.neoforged.neoforge.common.extensions.LootTableSubProviderContextExtension
withConditions
-
Constructor Details
-
LootProviderContext
public LootProviderContext(net.minecraft.core.HolderLookup.Provider registries) Creates an instance of aLootProviderContextrecord class.- Parameters:
registries- the value for theregistriesrecord component
-
-
Method Details
-
accept
public net.minecraft.core.Holder.Reference<net.minecraft.world.level.storage.loot.LootTable> accept(net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable> key, net.minecraft.world.level.storage.loot.LootTable.Builder value) - Specified by:
acceptin interfacenet.minecraft.data.loot.LootTableSubProvider.Context
-
lookup
public <S> net.minecraft.core.HolderGetter<S> lookup(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<? extends S>> key) - Specified by:
lookupin interfacenet.minecraft.data.worldgen.BootstrapContextAccess
-
listContextElements
public <S> Stream<net.minecraft.core.Holder.Reference<S>> listContextElements(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<? extends S>> key) - Specified by:
listContextElementsin interfacenet.minecraft.data.worldgen.BootstrapContextAccess
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
registries
public net.minecraft.core.HolderLookup.Provider registries()Returns the value of theregistriesrecord component.- Returns:
- the value of the
registriesrecord component
-