类 CapabilityListenerHolder

java.lang.Object
net.neoforged.neoforge.capabilities.CapabilityListenerHolder

@Internal public class CapabilityListenerHolder extends Object
Holder for capability listeners associated to a level.
  • 字段详细资料

    • byChunkThenBlock

      private final it.unimi.dsi.fastutil.longs.Long2ReferenceMap<it.unimi.dsi.fastutil.longs.Long2ReferenceMap<Set<CapabilityListenerHolder.ListenerReference>>> byChunkThenBlock
      Map of chunk pos -> block pos -> listeners map.

      We have a two-level map to efficiently invalidate entire chunks at once.

    • queue

      Reference queue for the listener references. This allows us to listen to reference garbage collection, and remove empty entries from byChunkThenBlock.
  • 构造器详细资料

    • CapabilityListenerHolder

      public CapabilityListenerHolder()
  • 方法详细资料