fix: remove duplicate blocks in pallete in litematic export
This commit is contained in:
parent
9a8c74071a
commit
26fb017d2d
1 changed files with 4 additions and 4 deletions
|
|
@ -50,14 +50,14 @@ function SaveLitematic({ close }: DialogProps) {
|
|||
|
||||
const returnData: { Name: string; Properties?: Record<string, string> } = {
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue