Skip to content

Commit

Permalink
Fix type errors with newer prismarine-item versions
Browse files Browse the repository at this point in the history
  • Loading branch information
IceTank committed Aug 15, 2023
1 parent 6ac3f88 commit 22773d3
Show file tree
Hide file tree
Showing 2 changed files with 236 additions and 190 deletions.
10 changes: 5 additions & 5 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Vec3 } from "vec3";
import { Client, ServerClient } from "minecraft-protocol";
import { Bot, GameState } from "mineflayer";
import { performance } from "perf_hooks";
import { Item as ItemType, NotchItem } from "prismarine-item";
import { Item as ItemType } from "prismarine-item";
import Item from "prismarine-item";
import { packetAbilities } from "@icetank/mcproxy";
const fetch = require('node-fetch')
Expand All @@ -26,9 +26,9 @@ class FakeEntity {
oldYaw: number
oldPitch: number
onGround: boolean
mainHand?: NotchItem
offHand?: NotchItem
armor: Array<NotchItem | undefined>
mainHand?: object
offHand?: object
armor: Array<object | undefined>
constructor(pos: Vec3, yaw: number, pitch: number) {
this.knownPosition = pos
this.yaw = yaw
Expand Down Expand Up @@ -245,7 +245,7 @@ export class FakePlayer {
}

writeFakePlayerEquipment(client: ServerClient) {
// const NotchItemEqual = (item1?: NotchItem, item2?: NotchItem) => {
// const objectEqual = (item1?: object, item2?: object) => {
// item1 = item1 ?? {}
// item2 = item2 ?? {}
// return JSON.stringify(item1) === JSON.stringify(item2)
Expand Down
Loading

0 comments on commit 22773d3

Please sign in to comment.