summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityPainting.patch
blob: cc62b6709b6f9808f7639aeaefd4c9af9e8eb1a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--- a/net/minecraft/server/EntityPainting.java
+++ b/net/minecraft/server/EntityPainting.java
@@ -11,6 +11,10 @@
 
     public EntityPainting(World world) {
         super(EntityTypes.PAINTING, world);
+        // CraftBukkit start - generate a non-null painting
+        ArrayList arraylist = Lists.newArrayList(Paintings.a);
+        this.art = (Paintings) arraylist.get(this.random.nextInt(arraylist.size()));
+        // CraftBukkit end
     }
 
     public EntityPainting(World world, BlockPosition blockposition, EnumDirection enumdirection) {