From 523d47c095c249bcc322f5ac7c0ad11f2251abf0 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. --- ...Item-entities-with-World.spawnEntity.patch | 25 +++++++++++++++++++ .../Report-issues-to-the-issue-tracker.patch | 20 --------------- ...ient-crashes-server-lists-and-Mojang.patch | 12 ++++----- 3 files changed, 31 insertions(+), 26 deletions(-) create mode 100644 Spigot-Server-Patches/Allow-spawning-Item-entities-with-World.spawnEntity.patch delete mode 100644 Spigot-Server-Patches/Report-issues-to-the-issue-tracker.patch diff --git a/Spigot-Server-Patches/Allow-spawning-Item-entities-with-World.spawnEntity.patch b/Spigot-Server-Patches/Allow-spawning-Item-entities-with-World.spawnEntity.patch new file mode 100644 index 000000000..7e29a379c --- /dev/null +++ b/Spigot-Server-Patches/Allow-spawning-Item-entities-with-World.spawnEntity.patch @@ -0,0 +1,25 @@ +From 0000000000000000000000000000000000000000 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 +@@ -0,0 +0,0 @@ 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)) { +-- \ No newline at end of file diff --git a/Spigot-Server-Patches/Report-issues-to-the-issue-tracker.patch b/Spigot-Server-Patches/Report-issues-to-the-issue-tracker.patch deleted file mode 100644 index 9c2b01f8a..000000000 --- a/Spigot-Server-Patches/Report-issues-to-the-issue-tracker.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 0000000000000000000000000000000000000000 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 -@@ -0,0 +0,0 @@ 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() ); - // --- \ No newline at end of file diff --git a/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index 8b70f15d9..b3f96f7f0 100644 --- a/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -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 @@ -0,0 +0,0 @@ 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 @@ -0,0 +0,0 @@ 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 @@ -0,0 +0,0 @@ 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 @@ -0,0 +0,0 @@ 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 @@ -0,0 +0,0 @@ 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() );