You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A lot of the methods on Registry, HolderGetter, HolderLookup, RegistryAccess take ResourceKey as the sole parameter returning something. A lot of the time, those ResourceKey arguments are obtained from static final fields somewhere which makes choosing the name for the local var very easy.
A lot of the methods on Registry, HolderGetter, HolderLookup, RegistryAccess take
ResourceKey
as the sole parameter returning something. A lot of the time, those ResourceKey arguments are obtained from static final fields somewhere which makes choosing the name for the local var very easy.Something like
can be changed to
This is similar to #10 and how the various
is
andhas
methods are handled, by looking at the field used in the parameter.A non-exhaustive list of methods that this could apply to are:
TagKey
TagKey#create(ResourceKey, ResourceLocation)
ResourceKey
ResourceKey#create(ResourceKey, ResourceLocation)
Registry
Registry#get(ResourceKey)
Registry#getHolder(ResourceKey)
Registry#getOptional(ResourceKey)
Registry#getOrThrow(ResourceKey)
Registry#containsKey(ResourceKey)
Registry#getHolder(ResourceKey)
Registry#getTag(TagKey)
Registry#getTagOrEmpty(TagKey)
Registry#getOrCreateTag(TagKey)
RegistryAccess, RegistryAccess$Frozen, HolderLookup$Provider
RegistryAccess#lookup(ResourceKey)
RegistryAccess#lookupOrThrow(ResourceKey)
RegistryAccess#registry(ResourceKey)
RegistryAccess#registryOrThrow(ResourceKey)
HolderGetter, HolderLookup
HolderGetter#get(ResourceKey)
HolderGetter#getOrThrow(ResourceKey)
HolderGetter#get(TagKey)
HolderGetter#getOrThrow(TagKey)
BootstapContext
(yes there is a typo in Bootstap in the vanilla source)
Bootstap#register(ResourceKey, Object, Lifecycle)
Bootstap#register(ResourceKey, Object)
Bootstap#lookup(ResourceKey)
The text was updated successfully, but these errors were encountered: