类 RidingSaver

java.lang.Object
top.r3944realms.superleadrope.util.riding.RidingSaver

public class RidingSaver extends Object
The type Riding saver.
  • 构造器详细资料

    • RidingSaver

      public RidingSaver()
  • 方法详细资料

    • save

      @Contract("null -> new") @NotNull public static @NotNull RidingRelationship save(@Nullable net.minecraft.world.entity.Entity entity)
      保存骑乘关系
      参数:
      entity - the entity
      返回:
      the riding relationship
    • save

      @Contract("null, _ -> new") @NotNull public static @NotNull RidingRelationship save(@Nullable net.minecraft.world.entity.Entity entity, boolean findRoot)
      保存骑乘关系
      参数:
      entity - the entity
      findRoot - the find root
      返回:
      the riding relationship
    • filterByWhitelistRoot

      public static RidingRelationship filterByWhitelistRoot(RidingRelationship relationship)
      过滤骑乘关系,只保留白名单根节点及其合法子树 如果根节点不在白名单,则回退到第一个合法父节点
      参数:
      relationship - the relationship
      返回:
      the riding relationship
    • setEntityProvider

      public static void setEntityProvider(Function<UUID,net.minecraft.world.entity.Entity> provider)
      Sets entity provider.
      参数:
      provider - the provider