From 463d2a2bc0f346de379c7eb438932c602d03594c Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sat, 9 Jun 2018 12:09:21 +0100
Subject: [PATCH] Allow plugins to replace texture if already set on skulls

---
 Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch     | 8 ++++----
 .../Configurable-baby-zombie-movement-speed.patch         | 4 ++--
 ...figurable-cactus-and-reed-natural-growth-heights.patch | 6 +++---
 .../Configurable-fishing-time-ranges.patch                | 4 ++--
 .../Configurable-speed-for-water-flowing-over-lava.patch  | 4 ++--
 Spigot-Server-Patches/Entity-Tracking-Improvements.patch  | 2 +-
 ...ove-Maps-in-item-frames-performance-and-bug-fixe.patch | 2 +-
 .../Use-UserCache-for-player-heads.patch                  | 8 +++++---
 8 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch b/Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch
index d339d28f7c..7d602902e6 100644
--- a/Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch
+++ b/Spigot-Server-Patches/Allow-nerfed-mobs-to-jump.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Allow nerfed mobs to jump
 
 
 diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
-index 45bddf3f..1d9dd0e0 100644
+index 45bddf3f4..1d9dd0e0b 100644
 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
 +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
 @@ -0,0 +0,0 @@ public class PaperWorldConfig {
@@ -19,7 +19,7 @@ index 45bddf3f..1d9dd0e0 100644
 +    }
  }
 diff --git a/src/main/java/net/minecraft/server/ControllerJump.java b/src/main/java/net/minecraft/server/ControllerJump.java
-index 4f2fa59a..8af52a61 100644
+index 4f2fa59ac..8af52a61f 100644
 --- a/src/main/java/net/minecraft/server/ControllerJump.java
 +++ b/src/main/java/net/minecraft/server/ControllerJump.java
 @@ -0,0 +0,0 @@ public class ControllerJump {
@@ -31,7 +31,7 @@ index 4f2fa59a..8af52a61 100644
          this.b.l(this.a);
          this.a = false;
 diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
-index 3c48d946..7b02b253 100644
+index 3c48d9463..7b02b253c 100644
 --- a/src/main/java/net/minecraft/server/EntityInsentient.java
 +++ b/src/main/java/net/minecraft/server/EntityInsentient.java
 @@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -56,7 +56,7 @@ index 3c48d946..7b02b253 100644
          }
          // Spigot End
 diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
-index b3b303b3..fc6c3bf7 100644
+index b3b303b3b..fc6c3bf71 100644
 --- a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
 +++ b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
 @@ -0,0 +0,0 @@ public class PathfinderGoalFloat extends PathfinderGoal {
diff --git a/Spigot-Server-Patches/Configurable-baby-zombie-movement-speed.patch b/Spigot-Server-Patches/Configurable-baby-zombie-movement-speed.patch
index 7690581171..a1a6af7228 100644
--- a/Spigot-Server-Patches/Configurable-baby-zombie-movement-speed.patch
+++ b/Spigot-Server-Patches/Configurable-baby-zombie-movement-speed.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Configurable baby zombie movement speed
 
 
 diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
-index 4a692ac1..d44cacc7 100644
+index 4a692ac1b..d44cacc7e 100644
 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
 +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
 @@ -0,0 +0,0 @@ public class PaperWorldConfig {
@@ -20,7 +20,7 @@ index 4a692ac1..d44cacc7 100644
 +    }
  }
 diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
-index 11c0f24f..277f1414 100644
+index 11c0f24f1..277f1414a 100644
 --- a/src/main/java/net/minecraft/server/EntityZombie.java
 +++ b/src/main/java/net/minecraft/server/EntityZombie.java
 @@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster {
diff --git a/Spigot-Server-Patches/Configurable-cactus-and-reed-natural-growth-heights.patch b/Spigot-Server-Patches/Configurable-cactus-and-reed-natural-growth-heights.patch
index 2bdd97b219..8124a385d9 100644
--- a/Spigot-Server-Patches/Configurable-cactus-and-reed-natural-growth-heights.patch
+++ b/Spigot-Server-Patches/Configurable-cactus-and-reed-natural-growth-heights.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Configurable cactus and reed natural growth heights
 
 
 diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
-index 621bf705..4a692ac1 100644
+index 621bf7051..4a692ac1b 100644
 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
 +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
 @@ -0,0 +0,0 @@ public class PaperWorldConfig {
@@ -23,7 +23,7 @@ index 621bf705..4a692ac1 100644
 +    }
  }
 diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java
-index 64b7d08f..d8fb87f7 100644
+index 64b7d08fa..d8fb87f7a 100644
 --- a/src/main/java/net/minecraft/server/BlockCactus.java
 +++ b/src/main/java/net/minecraft/server/BlockCactus.java
 @@ -0,0 +0,0 @@ public class BlockCactus extends Block {
@@ -36,7 +36,7 @@ index 64b7d08f..d8fb87f7 100644
  
                  if (j >= (byte) range(3, ((100.0F / world.spigotConfig.cactusModifier) * 15) + 0.5F, 15)) { // Spigot
 diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/net/minecraft/server/BlockReed.java
-index 57f24f55..d19dce83 100644
+index 57f24f55d..d19dce839 100644
 --- a/src/main/java/net/minecraft/server/BlockReed.java
 +++ b/src/main/java/net/minecraft/server/BlockReed.java
 @@ -0,0 +0,0 @@ public class BlockReed extends Block {
diff --git a/Spigot-Server-Patches/Configurable-fishing-time-ranges.patch b/Spigot-Server-Patches/Configurable-fishing-time-ranges.patch
index a35fdb1060..3d90982902 100644
--- a/Spigot-Server-Patches/Configurable-fishing-time-ranges.patch
+++ b/Spigot-Server-Patches/Configurable-fishing-time-ranges.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Configurable fishing time ranges
 
 
 diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
-index d44cacc7..45bddf3f 100644
+index d44cacc7e..45bddf3f4 100644
 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
 +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
 @@ -0,0 +0,0 @@ public class PaperWorldConfig {
@@ -22,7 +22,7 @@ index d44cacc7..45bddf3f 100644
 +    }
  }
 diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
-index b4d3bcb4..339d1f1b 100644
+index b4d3bcb41..339d1f1b1 100644
 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java
 +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
 @@ -0,0 +0,0 @@ public class EntityFishingHook extends Entity {
diff --git a/Spigot-Server-Patches/Configurable-speed-for-water-flowing-over-lava.patch b/Spigot-Server-Patches/Configurable-speed-for-water-flowing-over-lava.patch
index 937faddcca..31795fa9e0 100644
--- a/Spigot-Server-Patches/Configurable-speed-for-water-flowing-over-lava.patch
+++ b/Spigot-Server-Patches/Configurable-speed-for-water-flowing-over-lava.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Configurable speed for water flowing over lava
 
 
 diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
-index 4da84671..d3484489 100644
+index 4da846719..d3484489b 100644
 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
 +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
 @@ -0,0 +0,0 @@ public class PaperWorldConfig {
@@ -20,7 +20,7 @@ index 4da84671..d3484489 100644
 +    }
  }
 diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java
-index 7b74df5b..62234a7c 100644
+index 7b74df5b9..62234a7c9 100644
 --- a/src/main/java/net/minecraft/server/BlockFlowing.java
 +++ b/src/main/java/net/minecraft/server/BlockFlowing.java
 @@ -0,0 +0,0 @@ public class BlockFlowing extends BlockFluids {
diff --git a/Spigot-Server-Patches/Entity-Tracking-Improvements.patch b/Spigot-Server-Patches/Entity-Tracking-Improvements.patch
index b628733d96..189971deb9 100644
--- a/Spigot-Server-Patches/Entity-Tracking-Improvements.patch
+++ b/Spigot-Server-Patches/Entity-Tracking-Improvements.patch
@@ -7,7 +7,7 @@ If any part of a Vehicle/Passenger relationship is visible to a player,
 send all passenger/vehicles to the player in the chain.
 
 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
-index 06857c483..ef096ef65 100644
+index 36c9bd418..65cee8cf0 100644
 --- a/src/main/java/net/minecraft/server/Entity.java
 +++ b/src/main/java/net/minecraft/server/Entity.java
 @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {
diff --git a/Spigot-Server-Patches/Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/Spigot-Server-Patches/Improve-Maps-in-item-frames-performance-and-bug-fixe.patch
index c774a877e9..3a22df4c15 100644
--- a/Spigot-Server-Patches/Improve-Maps-in-item-frames-performance-and-bug-fixe.patch
+++ b/Spigot-Server-Patches/Improve-Maps-in-item-frames-performance-and-bug-fixe.patch
@@ -48,7 +48,7 @@ index 4c6eb6ed1..759dacba7 100644
                  Iterator iterator = this.trackedPlayers.iterator(); // CraftBukkit
  
 diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
-index aae2d5786..bce3fca84 100644
+index 5f92355db..eca4903ed 100644
 --- a/src/main/java/net/minecraft/server/World.java
 +++ b/src/main/java/net/minecraft/server/World.java
 @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
diff --git a/Spigot-Server-Patches/Use-UserCache-for-player-heads.patch b/Spigot-Server-Patches/Use-UserCache-for-player-heads.patch
index 0f24f0d3ce..6d9074b715 100644
--- a/Spigot-Server-Patches/Use-UserCache-for-player-heads.patch
+++ b/Spigot-Server-Patches/Use-UserCache-for-player-heads.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Use UserCache for player heads
 
 
 diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
-index 8a58615f..987cc9a8 100644
+index b6b34627a..5659c1c70 100644
 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
 +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
 @@ -0,0 +0,0 @@ import net.minecraft.server.GameProfileSerializer;
@@ -22,9 +22,11 @@ index 8a58615f..987cc9a8 100644
          } else {
 -            profile = new GameProfile(null, name);
 +            // Paper start - Use Online Players Skull
++            GameProfile newProfile = null;
 +            EntityPlayer player = MinecraftServer.getServer().getPlayerList().getPlayer(name);
-+            if (profile == null && player != null) profile = player.getProfile();
-+            if (profile == null) profile = new GameProfile(null, name);
++            if (player != null) newProfile = player.getProfile();
++            if (newProfile == null) profile = new GameProfile(null, name);
++            profile = newProfile;
 +            // Paper end
          }