diff --git a/src/structures/ItemsDat.ts b/src/structures/ItemsDat.ts index 0a73006..24d0bf1 100644 --- a/src/structures/ItemsDat.ts +++ b/src/structures/ItemsDat.ts @@ -35,7 +35,7 @@ class ItemsDat { * @param items An array of items */ private getWriteSize(items: ItemDefinition[]) { - let size = 194 * items.length; + let size = 196 * items.length; // get sizes for the string for (const item of items) { const keys = Object.keys(item); diff --git a/test/items-builder-v16/index.js b/test/items-builder-v16/index.js index f9ddda6..b2737d2 100644 --- a/test/items-builder-v16/index.js +++ b/test/items-builder-v16/index.js @@ -11,4 +11,7 @@ const item = new ItemsDat(file); decoded.items.forEach((i) => { i.itemRenderer.length ? console.log(i) : undefined; }); + + const encoded = await item.encode(decoded); + console.log({ encoded }); })();