From c298061d4dea3569a285b425bc4442d9e8445adc Mon Sep 17 00:00:00 2001 From: onebeastchris Date: Sun, 8 Dec 2024 06:18:42 +0800 Subject: [PATCH] address review --- .../geyser/translator/inventory/LoomInventoryTranslator.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/geysermc/geyser/translator/inventory/LoomInventoryTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/inventory/LoomInventoryTranslator.java index e294442f9..1fef4c4fd 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/inventory/LoomInventoryTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/inventory/LoomInventoryTranslator.java @@ -156,7 +156,10 @@ public class LoomInventoryTranslator extends AbstractBlockInventoryTranslator { inputCopy.setNetId(session.getNextItemNetId()); BannerPatternLayer bannerPatternLayer = BannerItem.getJavaBannerPattern(session, pattern); // TODO if (bannerPatternLayer != null) { - List patternsList = inputCopy.getComponentOrFallback(DataComponentType.BANNER_PATTERNS, new ArrayList<>()); + List patternsList = inputCopy.getComponent(DataComponentType.BANNER_PATTERNS); + if (patternsList == null) { + patternsList = new ArrayList<>(); + } patternsList.add(bannerPatternLayer); inputCopy.getOrCreateComponents().put(DataComponentType.BANNER_PATTERNS, patternsList); }