Skip to content

Commit b4bb240

Browse files
authored
Merge pull request #2 from everloste/main
fix bug >.<
2 parents 08b2f02 + 01553a6 commit b4bb240

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/datapack_changes.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,9 @@ export class DatapackModifier {
185185

186186
private wipeCache() {
187187
this.changeCache = {};
188+
this.changeQueue = [];
188189
console.info("[DatapackModifier] Change cache wiped.")
190+
console.info("[DatapackModifier] Change queue wiped.")
189191
}
190192

191193
// #endregion

src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ function exportButtonClicked() {
124124
const export_settings = getExportSettings();
125125

126126
datapackStore.getAll().forEach((datapack) => {
127-
datapack.instancedConfig?.apply();
127+
datapack.instancedConfig?.apply(); // this queues changes
128128
});
129129

130-
DatapackModifierInstance.applyChanges(datapackStore.getAll(), export_settings).then(() => {
130+
DatapackModifierInstance.applyChanges(datapackStore.getAll(), export_settings).then(() => { // this applies changes and wipes changes
131131
document.getElementById("progress-indicator")!.hidden = true;
132132
});
133133
}

0 commit comments

Comments
 (0)