From a082f773cb87308fd363f3575a606ecb1d8ba4ea Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 4 Jun 2018 20:48:14 -0400 Subject: [PATCH] Allow spawning Item entities with World.spawnEntity This API has more capabilities than .dropItem with the Consumer function Item can be set inside of the Consumer pre spawn function. --- ...ient-crashes-server-lists-and-Mojang.patch | 16 +++++------ ...Item-entities-with-World.spawnEntity.patch | 27 +++++++++++++++++++ ...9-Report-issues-to-the-issue-tracker.patch | 22 --------------- 3 files changed, 35 insertions(+), 30 deletions(-) create mode 100644 Spigot-Server-Patches/0299-Allow-spawning-Item-entities-with-World.spawnEntity.patch delete mode 100644 Spigot-Server-Patches/0299-Report-issues-to-the-issue-tracker.patch diff --git a/Spigot-Server-Patches/0015-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/0015-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index caaa3e5b1..073088e89 100644 --- a/Spigot-Server-Patches/0015-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/0015-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -1,4 +1,4 @@ -From 330ce044c0951d3829ed61953f64dc97072b8bb3 Mon Sep 17 00:00:00 2001 +From 7c7f7211d71e8292dda5a79d6552aca44e33a70f Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 14:32:43 -0600 Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang @@ -6,7 +6,7 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java -index 8361888c..3623751b 100644 +index 8361888c2..3623751bf 100644 --- a/src/main/java/net/minecraft/server/EULA.java +++ b/src/main/java/net/minecraft/server/EULA.java @@ -51,7 +51,8 @@ public class EULA { @@ -20,7 +20,7 @@ index 8361888c..3623751b 100644 EULA.a.warn("Failed to save {}", this.b, exception); } finally { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8d08b536..92d48025 100644 +index 8d08b536a..92d480251 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1049,7 +1049,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs @@ -33,7 +33,7 @@ index 8d08b536..92d48025 100644 public CrashReport b(CrashReport crashreport) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9042deed..33b40ffc 100644 +index 9042deed6..33b40ffc2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -136,7 +136,7 @@ import org.bukkit.event.server.TabCompleteEvent; @@ -46,7 +46,7 @@ index 9042deed..33b40ffc 100644 private final String bukkitVersion = Versioning.getBukkitVersion(); private final Logger logger = Logger.getLogger("Minecraft"); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 0c5862a3..e3667e55 100644 +index 0c5862a3f..e3667e558 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -192,7 +192,7 @@ public class Main { @@ -59,7 +59,7 @@ index 0c5862a3..e3667e55 100644 Thread.sleep(TimeUnit.SECONDS.toMillis(15)); } diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java -index 94a3d423..3ed983cc 100644 +index 94a3d4237..91b8aa6a1 100644 --- a/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java @@ -19,7 +19,7 @@ public class WatchdogThread extends Thread @@ -76,7 +76,7 @@ index 94a3d423..3ed983cc 100644 Logger log = Bukkit.getServer().getLogger(); log.log( Level.SEVERE, "The server has stopped responding!" ); - log.log( Level.SEVERE, "Please report this to http://www.spigotmc.org/" ); -+ log.log( Level.SEVERE, "Please report this to https://aquifermc.org/" ); ++ log.log( Level.SEVERE, "Please report this to https://github.com/PaperMC/Paper/issues" ); log.log( Level.SEVERE, "Be sure to include ALL relevant console errors and Minecraft crash reports" ); - log.log( Level.SEVERE, "Spigot version: " + Bukkit.getServer().getVersion() ); + log.log( Level.SEVERE, "Paper version: " + Bukkit.getServer().getVersion() ); @@ -93,5 +93,5 @@ index 94a3d423..3ed983cc 100644 log.log( Level.SEVERE, "------------------------------" ); // -- -2.14.3 +2.17.1 diff --git a/Spigot-Server-Patches/0299-Allow-spawning-Item-entities-with-World.spawnEntity.patch b/Spigot-Server-Patches/0299-Allow-spawning-Item-entities-with-World.spawnEntity.patch new file mode 100644 index 000000000..4d894589d --- /dev/null +++ b/Spigot-Server-Patches/0299-Allow-spawning-Item-entities-with-World.spawnEntity.patch @@ -0,0 +1,27 @@ +From 1bd75020d7f3a3ad3ec77930dc4fdf7be99ea430 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Mon, 4 Jun 2018 20:39:20 -0400 +Subject: [PATCH] Allow spawning Item entities with World.spawnEntity + +This API has more capabilities than .dropItem with the Consumer function + +Item can be set inside of the Consumer pre spawn function. + +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +index 36dd8ad60..e88846bb5 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +@@ -953,6 +953,10 @@ public class CraftWorld implements World { + if (Boat.class.isAssignableFrom(clazz)) { + entity = new EntityBoat(world, x, y, z); + entity.setPositionRotation(x, y, z, yaw, pitch); ++ // Paper start ++ } else if (org.bukkit.entity.Item.class.isAssignableFrom(clazz)) { ++ entity = new EntityItem(world, x, y, z, new net.minecraft.server.ItemStack(net.minecraft.server.Item.getItemOf(net.minecraft.server.Blocks.DIRT))); ++ // Paper end + } else if (FallingBlock.class.isAssignableFrom(clazz)) { + entity = new EntityFallingBlock(world, x, y, z, world.getType(new BlockPosition(x, y, z))); + } else if (Projectile.class.isAssignableFrom(clazz)) { +-- +2.17.1 + diff --git a/Spigot-Server-Patches/0299-Report-issues-to-the-issue-tracker.patch b/Spigot-Server-Patches/0299-Report-issues-to-the-issue-tracker.patch deleted file mode 100644 index aaf251c49..000000000 --- a/Spigot-Server-Patches/0299-Report-issues-to-the-issue-tracker.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0ba1966afe00a10523fefe20ffe56b412433a9fb Mon Sep 17 00:00:00 2001 -From: Kyle Wood -Date: Mon, 4 Jun 2018 01:53:43 -0500 -Subject: [PATCH] Report issues to the issue tracker - - -diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java -index cb1fcf0f..57a4748a 100644 ---- a/src/main/java/org/spigotmc/WatchdogThread.java -+++ b/src/main/java/org/spigotmc/WatchdogThread.java -@@ -56,7 +56,7 @@ public class WatchdogThread extends Thread - { - Logger log = Bukkit.getServer().getLogger(); - log.log( Level.SEVERE, "The server has stopped responding!" ); -- log.log( Level.SEVERE, "Please report this to https://aquifermc.org/" ); -+ log.log( Level.SEVERE, "Please report this to https://github.com/PaperMC/Paper/issues" ); - log.log( Level.SEVERE, "Be sure to include ALL relevant console errors and Minecraft crash reports" ); - log.log( Level.SEVERE, "Paper version: " + Bukkit.getServer().getVersion() ); - // --- -2.17.1 -