diff --git a/src/components/dialogs/SaveLitematic.tsx b/src/components/dialogs/SaveLitematic.tsx index db9e9c2..cdbfb9f 100644 --- a/src/components/dialogs/SaveLitematic.tsx +++ b/src/components/dialogs/SaveLitematic.tsx @@ -50,14 +50,14 @@ function SaveLitematic({ close }: DialogProps) { const returnData: { Name: string; Properties?: Record } = { Name: `minecraft:${blockInfo.id[0]}`, + ...(blockInfo.properties ? { Properties: blockInfo.properties } : {}), }; - if (blockInfo.properties) returnData["Properties"] = blockInfo.properties; - - return returnData; + // Stringify to remove duplicates + return JSON.stringify(returnData); }) ) - ), + ).map((serialized) => JSON.parse(serialized)), ]; // Get the block states