Class EntityDebugSubscriptionRegistry

java.lang.Object
net.fabricmc.fabric.api.debug.v1.EntityDebugSubscriptionRegistry

public final class EntityDebugSubscriptionRegistry extends Object
A server-side registry for debug subscriptions specific to entities or properties of entities.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T, E extends net.minecraft.world.entity.Entity>
    void
    register(net.minecraft.util.debug.DebugSubscription<T> debugSubscription, Predicate<net.minecraft.world.entity.Entity> shouldSubscribe, DebugValueFactory<E,T> valueFactory)
    Registers a DebugSubscription based on a given Entity and Predicate.
    static <T, E extends net.minecraft.world.entity.Entity>
    void
    register(net.minecraft.util.debug.DebugSubscription<T> debugSubscription, Predicate<net.minecraft.world.entity.Entity> shouldSubscribe, DebugValueFactory<E,T> valueFactory, boolean isEnabledFlag)
    Registers a DebugSubscription based on a given Entity and Predicate if isEnabledFlag is true.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EntityDebugSubscriptionRegistry

      public EntityDebugSubscriptionRegistry()
  • Method Details

    • register

      public static <T, E extends net.minecraft.world.entity.Entity> void register(net.minecraft.util.debug.DebugSubscription<T> debugSubscription, Predicate<net.minecraft.world.entity.Entity> shouldSubscribe, DebugValueFactory<E,T> valueFactory)
      Registers a DebugSubscription based on a given Entity and Predicate.
      Type Parameters:
      T - the inner type of the DebugSubscription.
      E - the type of Entity to check against.
      Parameters:
      debugSubscription - the DebugSubscription.
      shouldSubscribe - whether an Entity should subscribe to this DebugSubscription.
      valueFactory - the factory for the value of type T.
    • register

      public static <T, E extends net.minecraft.world.entity.Entity> void register(net.minecraft.util.debug.DebugSubscription<T> debugSubscription, Predicate<net.minecraft.world.entity.Entity> shouldSubscribe, DebugValueFactory<E,T> valueFactory, boolean isEnabledFlag)
      Registers a DebugSubscription based on a given Entity and Predicate if isEnabledFlag is true.
      Type Parameters:
      T - the inner type of the DebugSubscription.
      E - the type of Entity to check against.
      Parameters:
      debugSubscription - the DebugSubscription.
      shouldSubscribe - whether an Entity should subscribe to this DebugSubscription.
      valueFactory - the factory for the value of type T.
      isEnabledFlag - the flag determining whether to register this DebugSubscription.