mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-12-23 08:49:23 +00:00
address review
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user