类 RindingLeash
java.lang.Object
top.r3944realms.superleadrope.util.riding.RindingLeash
The type Rinding leash.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voidapplyForceToPlayer(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.phys.Vec3 leashVec, double k, double dampingFactor, double maxForce) 给玩家应用拴绳力前的发包处理static net.minecraft.world.entity.EntitygetFinalEntityForLeashIfForce(net.minecraft.world.entity.Entity entity, boolean hasForce) 获取最终可作用的载具,用于拴绳合力应用。static @Nullable net.minecraft.world.entity.EntitygetSafeWhitelistRoot(net.minecraft.world.entity.Entity entity) 获取乘坐链中第一个在白名单的载具,如果没有则返回nullstatic voidprotectAnimalMovement(net.minecraft.world.entity.Entity entity, boolean hasLeash) 给动物应用拴绳力前的移动控制保护
-
构造器详细资料
-
RindingLeash
public RindingLeash()
-
-
方法详细资料
-
getSafeWhitelistRoot
@Nullable public static @Nullable net.minecraft.world.entity.Entity getSafeWhitelistRoot(net.minecraft.world.entity.Entity entity) 获取乘坐链中第一个在白名单的载具,如果没有则返回null- 参数:
entity- the entity- 返回:
- the safe whitelist root
-
getFinalEntityForLeashIfForce
public static net.minecraft.world.entity.Entity getFinalEntityForLeashIfForce(net.minecraft.world.entity.Entity entity, boolean hasForce) 获取最终可作用的载具,用于拴绳合力应用。 当链条中没有白名单载具时解除骑乘并返回自身 仅在拴绳合力不为零时调用- 参数:
entity- the entityhasForce- the has force- 返回:
- the final entity for leash if force
-
protectAnimalMovement
public static void protectAnimalMovement(net.minecraft.world.entity.Entity entity, boolean hasLeash) 给动物应用拴绳力前的移动控制保护- 参数:
entity- the entityhasLeash- the has leash
-
applyForceToPlayer
public static void applyForceToPlayer(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.phys.Vec3 leashVec, double k, double dampingFactor, double maxForce) 给玩家应用拴绳力前的发包处理- 参数:
player- the playerleashVec- the leash veck- the kdampingFactor- the damping factormaxForce- the max force
-