Skip to content

Commit 4426b71

Browse files
committed
Used wrong map for store set values
1 parent 64ab4f5 commit 4426b71

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Item Creator/src/main/java/org/broken/arrow/library/itemcreator/utility/nms/ComponentItemDataSession.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,7 @@ public static final class VanillaComponentSession {
276276
}
277277
READY_VANILLA = ok;
278278
}
279-
280-
private final Map<String, Object> buffer = new HashMap<>();
281-
279+
282280
private final Object nmsStack; // The real NMS ItemStack
283281
private final Map<String, Object> bufferedValues;// key → primitive or String
284282

@@ -373,12 +371,12 @@ public Object get(String key) {
373371
* only primitives and Strings.
374372
*/
375373
public void applyBuffered() {
376-
if (buffer.isEmpty()) return;
374+
if (bufferedValues.isEmpty()) return;
377375
try {
378-
for (Map.Entry<String, Object> e : buffer.entrySet()) {
376+
for (Map.Entry<String, Object> e : bufferedValues.entrySet()) {
379377
ComponentInjector.setComponentRaw(this.nmsStack, e.getKey(), e.getValue());
380378
}
381-
buffer.clear();
379+
bufferedValues.clear();
382380
} catch (Throwable t) {
383381
t.printStackTrace();
384382
}

0 commit comments

Comments
 (0)