UNPKG

@nxg-org/mineflayer-physics-util

Version:

Provides functionality for more accurate entity and projectile tracking.

48 lines (47 loc) 1.76 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PhysicsWorldSettings = void 0; class PhysicsWorldSettings { constructor(mcData) { // public yawSpeed: number = 3.0; // public pitchSpeed: number = 3.0; this.playerSpeed = 0.1; this.negligeableVelocity = 0.003; // actually 0.005 for 1.8; but seems fine this.soulsandSpeed = 0.4; this.honeyblockSpeed = 0.4; this.honeyblockJumpSpeed = 0.5; this.ladderMaxSpeed = 0.15; this.ladderClimbSpeed = 0.2; // public gravity: number = 0.08; // public waterInertia: number = 0.8; // public lavaInertia: number = 0.5; // public liquidAcceleration: number = 0.02; this.defaultSlipperiness = 0.6; this.outOfLiquidImpulse = Math.fround(0.3); this.sprintTimeTriggerCooldown = 2; this.flyJumpTriggerCooldown = 7; this.autojumpCooldown = 10; // ticks (0.5s) this.bubbleColumnSurfaceDrag = { down: 0.03, maxDown: -0.9, up: 0.1, maxUp: 1.8, }; this.bubbleColumnDrag = { down: 0.03, maxDown: -0.3, up: 0.06, maxUp: 0.7, }; this.slowFalling = 0.125; this.sprintingUUID = "662a6b8d-da3e-4c1c-8813-96ea6097278d"; // SPEED_MODIFIER_SPRINTING_UUID is from LivingEntity.java this.jumpHeight = Math.fround(0.42); this.sprintSpeed = Math.fround(0.3); this.sneakSpeed = 0.3; this.usingItemSpeed = 0.2; this.mcData = mcData; this.entityData = mcData["entitiesByName"]; this.mobData = mcData["mobs"]; } } exports.PhysicsWorldSettings = PhysicsWorldSettings;