3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 02:50:09 +01:00

fix construction order in CraftBanner

Dieser Commit ist enthalten in:
Shane Freeder 2017-08-06 16:36:48 +01:00
Ursprung 7f38d169dc
Commit efe49baecf
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: A3F61EA5A085289C

Datei anzeigen

@ -0,0 +1,30 @@
From b0336c182dad6d1d0ab9ce63028fa30978e23fb2 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 6 Aug 2017 16:25:31 +0100
Subject: [PATCH] fix construction order in CraftBanner
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java
index f374385e9..def728dd8 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java
@@ -16,7 +16,7 @@ import org.bukkit.block.banner.PatternType;
public class CraftBanner extends CraftBlockEntityState<TileEntityBanner> implements Banner {
private DyeColor base;
- private List<Pattern> patterns = new ArrayList<Pattern>();
+ private List<Pattern> patterns; /* = new ArrayList<Pattern>(); */ // Paper
public CraftBanner(final Block block) {
super(block, TileEntityBanner.class);
@@ -31,6 +31,7 @@ public class CraftBanner extends CraftBlockEntityState<TileEntityBanner> impleme
super.load(banner);
base = DyeColor.getByDyeData((byte) banner.color.getInvColorIndex());
+ patterns = new ArrayList<>(); // Paper - Ensure that patterns is initialized
if (banner.patterns != null) {
for (int i = 0; i < banner.patterns.size(); i++) {
--
2.13.4