mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Merge pull request #840 from electronicboy/master
fix construction order in CraftBanner
This commit is contained in:
commit
96655d6f35
1 changed files with 28 additions and 0 deletions
|
@ -0,0 +1,28 @@
|
|||
From 0000000000000000000000000000000000000000 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
|
||||
@@ -0,0 +0,0 @@ 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);
|
||||
@@ -0,0 +0,0 @@ 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++) {
|
||||
--
|
Loading…
Reference in a new issue