Skip to content

Commit

Permalink
feat: setskip checks variable
Browse files Browse the repository at this point in the history
  • Loading branch information
bdkopen committed Sep 7, 2024
1 parent 1066ce2 commit 19dfdb4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nbt.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ function simplify (data) {
return transform(data.value, data.type)
}

function setSkipChecks (value) {
compiler.setValue('skipChecks', value)
}

function equal (nbt1, nbt2) {
if (nbt1.type !== nbt2.type) return false

Expand Down Expand Up @@ -252,6 +256,7 @@ module.exports = {
writeUncompressed,
parseUncompressed,
simplify,
setSkipChecks,
hasBedrockLevelHeader,
parse,
parseAs,
Expand Down
1 change: 1 addition & 0 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ declare module 'prismarine-nbt'{

export function parse(data: Buffer, nbtType?: NBTFormat, options?: CompilerOptions): Promise<{parsed: NBT, type: NBTFormat, metadata: Metadata}>;
export function simplify(data: Tags[TagType]): any
export function setSkipChecks(skipChecks: boolean): void
export function equal(nbt1: Tags[TagType], nbt2: Tags[TagType]): boolean
// ProtoDef compiled protocols
export const protos: { big: any, little: any, littleVarint: any };
Expand Down

0 comments on commit 19dfdb4

Please sign in to comment.