Class MappedRegistryMixin<T>

java.lang.Object
de.luckymcdev.foundryengine.mixin.registry.MappedRegistryMixin<T>
All Implemented Interfaces:
com.mojang.serialization.Keyable, EngineInterface<net.minecraft.core.MappedRegistry<T>>, EngineRegistry<T>, Iterable<T>, net.minecraft.core.HolderGetter<T>, net.minecraft.core.HolderLookup<T>, net.minecraft.core.HolderLookup.RegistryLookup<T>, net.minecraft.core.HolderOwner<T>, net.minecraft.core.IdMap<T>, net.minecraft.core.Registry<T>, net.minecraft.core.WritableRegistry<T>, net.neoforged.neoforge.registries.IRegistryExtension<T>

public abstract class MappedRegistryMixin<T> extends Object implements EngineRegistry<T>, net.minecraft.core.WritableRegistry<T>
Implements EngineRegistry and WritableRegistry on MappedRegistry to support entry removal and freezing.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface EngineRegistry

    EngineRegistry.RegistryRemoval

    Nested classes/interfaces inherited from interface net.minecraft.core.HolderLookup

    net.minecraft.core.HolderLookup.Provider, net.minecraft.core.HolderLookup.RegistryLookup<T>

    Nested classes/interfaces inherited from interface net.minecraft.core.HolderLookup.RegistryLookup

    net.minecraft.core.HolderLookup.RegistryLookup.Delegate<T>

    Nested classes/interfaces inherited from interface net.minecraft.core.Registry

    net.minecraft.core.Registry.PendingTags<T>
  • Field Summary

    Fields inherited from interface net.minecraft.core.IdMap

    DEFAULT
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns whether this registry is frozen.
    boolean
    engine$remove(net.minecraft.resources.Identifier key)
    Removes a registry entry by its identifier key.
    boolean
    Removes a registry entry by value.
    void
    engine$setFrozen(boolean value)
    Sets the frozen state of this registry.
    Stream<net.minecraft.core.Holder.Reference<T>>
    fixEntryStream(Stream<net.minecraft.core.Holder.Reference<T>> original)
    Filters null entries from the element stream.

    Methods inherited from class Object

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

    Methods inherited from interface EngineInterface

    engine$self

    Methods inherited from interface net.minecraft.core.HolderGetter

    get, get, getOrThrow, getOrThrow, getRandomElementOf

    Methods inherited from interface net.minecraft.core.HolderLookup

    listElementIds, listElements, listTagIds, listTags

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

    filterElements, filterFeatures, getData, registryLifecycle

    Methods inherited from interface net.minecraft.core.HolderOwner

    canSerializeIn

    Methods inherited from interface net.minecraft.core.IdMap

    byId, byIdOrThrow, getIdOrThrow, size

    Methods inherited from interface net.neoforged.neoforge.registries.IRegistryExtension

    addAlias, addCallback, addCallback, containsValue, doesSync, getId, getId, getKeyOrNull, getMaxId, resolve, resolve

    Methods inherited from interface Iterable

    forEach, iterator, spliterator

    Methods inherited from interface net.minecraft.core.Registry

    asHolderIdMap, byNameCodec, componentLookup, containsKey, containsKey, createIntrusiveHolder, entrySet, freeze, get, get, getAny, getDataMap, getId, getKey, getOptional, getOptional, getRandom, getResourceKey, getTagOrEmpty, getTags, getValue, getValue, getValueOrThrow, holderByNameCodec, key, keys, keySet, prepareTagReload, registrationInfo, registryKeySet, stream, wrapAsHolder

    Methods inherited from interface net.minecraft.core.WritableRegistry

    bindTags, createRegistrationLookup, isEmpty, register
  • Constructor Details

    • MappedRegistryMixin

      public MappedRegistryMixin()
  • Method Details

    • engine$remove

      public boolean engine$remove(T entry)
      Removes a registry entry by value.
      Specified by:
      engine$remove in interface EngineRegistry<T>
    • engine$remove

      public boolean engine$remove(net.minecraft.resources.Identifier key)
      Removes a registry entry by its identifier key.
      Specified by:
      engine$remove in interface EngineRegistry<T>
    • engine$setFrozen

      public void engine$setFrozen(boolean value)
      Sets the frozen state of this registry.
      Specified by:
      engine$setFrozen in interface EngineRegistry<T>
    • engine$isFrozen

      public boolean engine$isFrozen()
      Returns whether this registry is frozen.
      Specified by:
      engine$isFrozen in interface EngineRegistry<T>
    • fixEntryStream

      public Stream<net.minecraft.core.Holder.Reference<T>> fixEntryStream(Stream<net.minecraft.core.Holder.Reference<T>> original)
      Filters null entries from the element stream.