mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-01-03 09:49:10 +01:00
address review
This commit is contained in:
parent
f610a0d12b
commit
c298061d4d
1 changed files with 4 additions and 1 deletions
|
@ -156,7 +156,10 @@ public class LoomInventoryTranslator extends AbstractBlockInventoryTranslator {
|
||||||
inputCopy.setNetId(session.getNextItemNetId());
|
inputCopy.setNetId(session.getNextItemNetId());
|
||||||
BannerPatternLayer bannerPatternLayer = BannerItem.getJavaBannerPattern(session, pattern); // TODO
|
BannerPatternLayer bannerPatternLayer = BannerItem.getJavaBannerPattern(session, pattern); // TODO
|
||||||
if (bannerPatternLayer != null) {
|
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);
|
patternsList.add(bannerPatternLayer);
|
||||||
inputCopy.getOrCreateComponents().put(DataComponentType.BANNER_PATTERNS, patternsList);
|
inputCopy.getOrCreateComponents().put(DataComponentType.BANNER_PATTERNS, patternsList);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue