@nxg-org/mineflayer-physics-util 1.3.11 → 1.4.0
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.
- package/dist/physics/engines/IPhysics.d.ts +1 -1
- package/dist/physics/engines/entityPhysics.d.ts +3 -3
- package/dist/physics/engines/entityPhysics.js +3 -3
- package/dist/physics/engines/index.d.ts +1 -1
- package/dist/physics/engines/index.js +1 -1
- package/dist/physics/player/playerControls.js +1 -1
- package/dist/wrapper.js +1 -5
- package/package.json +3 -7
|
@@ -2,8 +2,8 @@ import { AABB } from "@nxg-org/mineflayer-util-plugin";
|
|
|
2
2
|
import { IndexedData } from "minecraft-data";
|
|
3
3
|
import { Effect } from "mineflayer";
|
|
4
4
|
import { Entity } from "prismarine-entity";
|
|
5
|
-
import { EPhysicsCtx } from "../settings/entityPhysicsCtx";
|
|
6
5
|
import { CheapEffects, CheapEnchantments, makeSupportFeature } from "../../util/physicsUtils";
|
|
6
|
+
import { EPhysicsCtx } from "../settings/entityPhysicsCtx";
|
|
7
7
|
import { EntityState } from "../states";
|
|
8
8
|
export declare type MobsByName = {
|
|
9
9
|
[mobName: string]: Entity;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Vec3 } from "vec3";
|
|
2
1
|
import { AABB } from "@nxg-org/mineflayer-util-plugin";
|
|
3
2
|
import md from "minecraft-data";
|
|
4
|
-
import { Effect } from "prismarine-entity";
|
|
5
3
|
import { Block } from "prismarine-block";
|
|
4
|
+
import { Effect } from "prismarine-entity";
|
|
5
|
+
import { Vec3 } from "vec3";
|
|
6
6
|
import { CheapEffects, CheapEnchantments, makeSupportFeature } from "../../util/physicsUtils";
|
|
7
|
+
import { EPhysicsCtx } from "../settings/entityPhysicsCtx";
|
|
7
8
|
import { EntityState } from "../states/entityState";
|
|
8
9
|
import { IPhysics } from "./IPhysics";
|
|
9
|
-
import { EPhysicsCtx } from "../settings/entityPhysicsCtx";
|
|
10
10
|
/**
|
|
11
11
|
* Looking at this code, it's too specified towards players.
|
|
12
12
|
*
|
|
@@ -20,11 +20,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.EntityPhysics = void 0;
|
|
23
|
-
const vec3_1 = require("vec3");
|
|
24
23
|
const mineflayer_util_plugin_1 = require("@nxg-org/mineflayer-util-plugin");
|
|
25
|
-
const
|
|
26
|
-
const attributes = __importStar(require("../info/attributes"));
|
|
24
|
+
const vec3_1 = require("vec3");
|
|
27
25
|
const physicsUtils_1 = require("../../util/physicsUtils");
|
|
26
|
+
const attributes = __importStar(require("../info/attributes"));
|
|
27
|
+
const math = __importStar(require("../info/math"));
|
|
28
28
|
const physicsSettings_1 = require("../settings/physicsSettings");
|
|
29
29
|
/**
|
|
30
30
|
* Looking at this code, it's too specified towards players.
|
|
@@ -10,5 +10,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./IPhysics"), exports);
|
|
14
13
|
__exportStar(require("./entityPhysics"), exports);
|
|
14
|
+
__exportStar(require("./IPhysics"), exports);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PlayerControls = exports.ControlStateHandler = void 0;
|
|
4
|
-
;
|
|
5
4
|
const mineflayer_util_plugin_1 = require("@nxg-org/mineflayer-util-plugin");
|
|
5
|
+
;
|
|
6
6
|
class ControlStateHandler {
|
|
7
7
|
constructor(forward, back, left, right, jump, sprint, sneak) {
|
|
8
8
|
this.forward = forward;
|
package/dist/wrapper.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.PhysicsUtilWrapper = exports.SimulationTypes = void 0;
|
|
7
4
|
const engines_1 = require("./physics/engines");
|
|
8
5
|
const settings_1 = require("./physics/settings");
|
|
9
6
|
const simulators_1 = require("./simulators");
|
|
10
|
-
const prismarine_registry_1 = __importDefault(require("prismarine-registry"));
|
|
11
7
|
/**
|
|
12
8
|
* Just a convenience thing.
|
|
13
9
|
*/
|
|
@@ -22,7 +18,7 @@ class PhysicsUtilWrapper {
|
|
|
22
18
|
this.bot = bot;
|
|
23
19
|
this.physicsSettings = settings_1.PhysicsSettings;
|
|
24
20
|
this.ePhysicsCtx = settings_1.EPhysicsCtx;
|
|
25
|
-
this.data =
|
|
21
|
+
this.data = bot.registry;
|
|
26
22
|
settings_1.PhysicsSettings.loadData(this.data);
|
|
27
23
|
settings_1.EPhysicsCtx.loadData(this.data);
|
|
28
24
|
this.engine = new engines_1.EntityPhysics(this.data);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxg-org/mineflayer-physics-util",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Provides functionality for more accurate entity and projectile tracking.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mineflayer",
|
|
@@ -21,16 +21,12 @@
|
|
|
21
21
|
"test": "ts-node -T tests/fakeWorld.ts"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@nxg-org/mineflayer-util-plugin": "^1.
|
|
25
|
-
"prismarine-block": "^1.13.1",
|
|
26
|
-
"prismarine-entity": "^2.0.0",
|
|
27
|
-
"prismarine-item": "^1.11.1",
|
|
28
|
-
"prismarine-registry": "^1.1.0",
|
|
29
|
-
"vec3": "^0.1.7"
|
|
24
|
+
"@nxg-org/mineflayer-util-plugin": "^1.5.2"
|
|
30
25
|
},
|
|
31
26
|
"devDependencies": {
|
|
32
27
|
"@types/node": "^17.0.4",
|
|
33
28
|
"expect": "^29.3.1",
|
|
29
|
+
"mineflayer": "^4.6.0",
|
|
34
30
|
"typescript": "^4.5.5"
|
|
35
31
|
}
|
|
36
32
|
}
|