用户:TheRedKiller/Sandbox3
测试 TextCollapse
这个会同时切换五个的显示和隐藏。
你按下这玩意看看(1)
这就是被折叠的文本了,其 ID 为 Fold1。
你按下这玩意看看(2)
这就是被折叠的文本了,其 ID 为 Fold2。
你按下这玩意看看(3)
这就是被折叠的文本了,其 ID 为 Fold3。
你按下这玩意看看(4)
这就是被折叠的文本了,其 ID 为 Fold4。
你按下这玩意看看(5)
这就是被折叠的文本了,其 ID 为 Fold5。
这就是被折叠的文本了,其 ID 为 Fold1。这段文本会被最上面的开关控制折叠。
For Minecraft 1.21 Fabric
private Vec3d calculateDv(ClientPlayerEntity player) { /* * Elytra speed vector formula * * Used values: * v, yaw, pitch, horizontalVelocity, g * (horizontalVelocity) horizVelo = Math.sqrt(v.x * v.x + v.z * v.z); * g = 0.08 or 0.01 (latter has slow falling) */ Vec3d vInitial = player.getVelocity(); Vec3d v = vInitial; double yaw = Math.toRadians(player.getYaw()); double pitch = Math.toRadians(player.getPitch()); double horizVelo = Math.sqrt(v.x * v.x + v.z * v.z); float g = 0.08F; if (player.hasStatusEffect(StatusEffects.SLOW_FALLING)) { g = 0.01F; } /* * Apply free fall acceleration * Notify that g = 0.08, or 0.01 when have slow falling * dx = 0 * dy = g * (0.75 * Math.cos(pitch) * Math.cos(pitch) - 1) * dz = 0 */ v = new Vec3d( vInitial.x, vInitial.y + g * (0.75F * Math.cos(pitch) * Math.cos(pitch) - 1), vInitial.z ); /* * If pitch = 90 deg or -90 deg, then APPLY */ if (Math.cos(pitch) < 1E-13) { v = new Vec3d(v.x * 0.99, v.y * 0.98, v.z * 0.99); return v.subtract(vInitial); } /* * If (v.y < 0) : Apply dive forward acceleration * dx = 0.1 * v.y * Math.cos(pitch) * Math.cos(pitch) * Math.sin(yaw) * dy = -0.1 * v.y * Math.cos(pitch) * Math.cos(pitch) * dz = -0.1 * v.y * Math.cos(pitch) * Math.cos(pitch) * Math.cos(yaw) */ if (vInitial.y <= 0) { v = new Vec3d( v.x + 0.1 * v.y * Math.cos(pitch) * Math.cos(pitch) * Math.sin(yaw), v.y - 0.1 * v.y * Math.cos(pitch) * Math.cos(pitch), v.z - 0.1 * v.y * Math.cos(pitch) * Math.cos(pitch) * Math.cos(yaw) ); } /* * If looking upwards (pitch < 0) : Apply speed increasement acceleration * dx = -0.04 * horizVelo * Math.sin(pitch) * Math.sin(yaw) * dy = -0.128 * horizVelo * Math.sin(pitch) * dz = 0.04 * horizVelo * Math.sin(pitch) * Math.cos(yaw) */ if (pitch < 0) { v = new Vec3d( v.x - 0.04 * horizVelo * Math.sin(pitch) * Math.sin(yaw), v.y - 0.128 * horizVelo * Math.sin(pitch), v.z + 0.04 * horizVelo * Math.sin(pitch) * Math.cos(yaw) ); } /* * Apply glide forward acceleration * x = x * 0.9 - 0.1 * horizVelo * Math.sin(yaw) * dy = 0 * z = z * 0.9 + 0.1 * horizVelo * Math.cos(yaw) */ v = new Vec3d( v.x * 0.9 - 0.1 * horizVelo * Math.sin(yaw), v.y, v.z * 0.9 + 0.1 * horizVelo * Math.cos(yaw) ); /* * Apply air resistance force acceleration * x *= 0.99 * y *= 0.98 * z *= 0.99 */ v = new Vec3d(v.x * 0.99, v.y * 0.98, v.z * 0.99); return v.subtract(vInitial); }
破妄双瞳(不是破邪)For Minecraft 1.19.2 Fabric
@Mixin(Entity.class) public abstract class EntityMixin { @Inject(method = "isInvisible", at = @At("HEAD"), cancellable = true) private void onIsInvisible(CallbackInfoReturnable<Boolean> info) { info.setReturnValue(false); } }