DummyHolderGetter

class DummyHolderGetter<T> : HolderGetter<T>

A dummy implementation of HolderGetter to help with RuntimeResourcePack creation.

Since Minecraft 1.21.3, the various recipe builders all expect some HolderGetter in order to look up tags in the registry. For the purposes of creating a RuntimeResourcePack, we don't actually need a registry though; simply storing the tag is sufficient. This implementation allows us to do that.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open operator override fun get(resourceKey: ResourceKey<T>): Optional<Holder.Reference<T>>
open operator override fun get(tagKey: TagKey<T>): Optional<HolderSet.Named<T>>
Link copied to clipboard
open fun getOrThrow(resourceKey: ResourceKey<T>): Holder.Reference<T>
open fun getOrThrow(tagKey: TagKey<T>): HolderSet.Named<T>