address review

This commit is contained in:
onebeastchris 2024-12-08 06:18:42 +08:00
parent f610a0d12b
commit c298061d4d

View file

@ -156,7 +156,10 @@ public class LoomInventoryTranslator extends AbstractBlockInventoryTranslator {
inputCopy.setNetId(session.getNextItemNetId());
BannerPatternLayer bannerPatternLayer = BannerItem.getJavaBannerPattern(session, pattern); // TODO
if (bannerPatternLayer != null) {
List<BannerPatternLayer> patternsList = inputCopy.getComponentOrFallback(DataComponentType.BANNER_PATTERNS, new ArrayList<>());
List<BannerPatternLayer> patternsList = inputCopy.getComponent(DataComponentType.BANNER_PATTERNS);
if (patternsList == null) {
patternsList = new ArrayList<>();
}
patternsList.add(bannerPatternLayer);
inputCopy.getOrCreateComponents().put(DataComponentType.BANNER_PATTERNS, patternsList);
}