@nxg-org/mineflayer-physics-util 1.9.2 → 1.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,10 +14,11 @@ const entity_physics_json_1 = __importDefault(require("../info/entity_physics.js
14
14
  const physicsSettings_1 = require("./physicsSettings");
15
15
  const states_2 = require("../states");
16
16
  function load(data) {
17
+ const dataStr = data.version.type === "pc" ? data.version.minecraftVersion : `bedrock_${data.version.minecraftVersion}`;
17
18
  EPhysicsCtx.mcData = data;
18
19
  EPhysicsCtx.entityData = data["entitiesByName"];
19
20
  EPhysicsCtx.mobData = data["mobs"];
20
- EPhysicsCtx.entityConstructor = prismarine_entity_1.default(data.version.minecraftVersion);
21
+ EPhysicsCtx.entityConstructor = prismarine_entity_1.default(dataStr);
21
22
  }
22
23
  exports.emptyVec = new vec3_1.Vec3(0, 0, 0);
23
24
  class EPhysicsCtx {
@@ -172,6 +172,8 @@ class EntityState {
172
172
  bot.entity.onClimbable = this.onClimbable;
173
173
  bot.entity.yaw = this.yaw;
174
174
  bot.entity.pitch = this.pitch;
175
+ bot.entity.height = this.height;
176
+ bot.entity.width = this.halfWidth * 2;
175
177
  bot.controlState = this.control;
176
178
  bot.jumpTicks = this.jumpTicks;
177
179
  bot.jumpQueued = this.jumpQueued;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxg-org/mineflayer-physics-util",
3
- "version": "1.9.2",
3
+ "version": "1.9.3",
4
4
  "description": "Provides functionality for more accurate entity and projectile tracking.",
5
5
  "keywords": [
6
6
  "mineflayer",