From 0daad69443a73137f8073e3c5d1063f7e3569fcc Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 30 Jul 2015 22:41:53 -0500 Subject: [PATCH] Update for upstream NMS mapping changes --- .../0033-Add-TNT-source-location-API.patch | 12 ++++++------ .../0052-Configurable-TNT-cannon-fix.patch | 14 +++++++------- .../0054-Optimize-explosions.patch | 8 ++++---- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Spigot-Server-Patches/0033-Add-TNT-source-location-API.patch b/Spigot-Server-Patches/0033-Add-TNT-source-location-API.patch index f2e83fe918..dec1ea52b6 100644 --- a/Spigot-Server-Patches/0033-Add-TNT-source-location-API.patch +++ b/Spigot-Server-Patches/0033-Add-TNT-source-location-API.patch @@ -1,20 +1,20 @@ -From 1c34c74c0497f33ab2bc59c7d101d6353d8bd799 Mon Sep 17 00:00:00 2001 +From d990bd4b2502bc262c2ccab5dd1d51e586a4169d Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 8 Mar 2015 04:23:41 -0500 Subject: [PATCH] Add TNT source location API diff --git a/src/main/java/net/minecraft/server/BlockTNT.java b/src/main/java/net/minecraft/server/BlockTNT.java -index 40c0a87..3a0bc4b 100644 +index e151bc5..27ce179 100644 --- a/src/main/java/net/minecraft/server/BlockTNT.java +++ b/src/main/java/net/minecraft/server/BlockTNT.java @@ -29,7 +29,8 @@ public class BlockTNT extends Block { public void wasExploded(World world, BlockPosition blockposition, Explosion explosion) { if (!world.isClientSide) { -- EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), (double) blockposition.getY(), (double) ((float) blockposition.getZ() + 0.5F), explosion.c()); +- EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), (double) blockposition.getY(), (double) ((float) blockposition.getZ() + 0.5F), explosion.getSource()); + org.bukkit.Location loc = explosion.source instanceof EntityTNTPrimed ? ((EntityTNTPrimed) explosion.source).sourceLoc : new org.bukkit.Location(world.getWorld(), blockposition.getX(), blockposition.getY(), blockposition.getZ()); // PaperSpigot -+ EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(loc, world, (double) ((float) blockposition.getX() + 0.5F), (double) ((float) blockposition.getY() + 0.5F), (double) ((float) blockposition.getZ() + 0.5F), explosion.c()); // PaperSpigot - add loc ++ EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(loc, world, (double) ((float) blockposition.getX() + 0.5F), (double) ((float) blockposition.getY() + 0.5F), (double) ((float) blockposition.getZ() + 0.5F), explosion.getSource()); // PaperSpigot - add loc entitytntprimed.fuseTicks = world.random.nextInt(entitytntprimed.fuseTicks / 4) + entitytntprimed.fuseTicks / 8; world.addEntity(entitytntprimed); @@ -29,7 +29,7 @@ index 40c0a87..3a0bc4b 100644 world.addEntity(entitytntprimed); world.makeSound(entitytntprimed, "game.tnt.primed", 1.0F, 1.0F); diff --git a/src/main/java/net/minecraft/server/DispenserRegistry.java b/src/main/java/net/minecraft/server/DispenserRegistry.java -index bd88be5..950db4d 100644 +index f2c78f3..bc07d3d 100644 --- a/src/main/java/net/minecraft/server/DispenserRegistry.java +++ b/src/main/java/net/minecraft/server/DispenserRegistry.java @@ -541,7 +541,7 @@ public class DispenserRegistry { @@ -128,5 +128,5 @@ index e08ad47..b7e8b4d 100644 + // PaperSpigot end } -- -1.9.5.msysgit.1 +2.4.5.windows.1 diff --git a/Spigot-Server-Patches/0052-Configurable-TNT-cannon-fix.patch b/Spigot-Server-Patches/0052-Configurable-TNT-cannon-fix.patch index dae10c9b71..2f2c54b5d7 100644 --- a/Spigot-Server-Patches/0052-Configurable-TNT-cannon-fix.patch +++ b/Spigot-Server-Patches/0052-Configurable-TNT-cannon-fix.patch @@ -1,4 +1,4 @@ -From 3a9c2d48b5a6d4a3741f91aa8b46accbf7452537 Mon Sep 17 00:00:00 2001 +From 9df302fa507958256667fb6d4a81e2d56e9d6cbd Mon Sep 17 00:00:00 2001 From: Iceee Date: Thu, 4 Jun 2015 13:55:02 -0700 Subject: [PATCH] Configurable TNT cannon fix @@ -125,18 +125,18 @@ index e5c675e..532188e 100644 int i = aenumdirection.length; diff --git a/src/main/java/net/minecraft/server/BlockTNT.java b/src/main/java/net/minecraft/server/BlockTNT.java -index 3a0bc4b..a901742 100644 +index 27ce179..3d1e583 100644 --- a/src/main/java/net/minecraft/server/BlockTNT.java +++ b/src/main/java/net/minecraft/server/BlockTNT.java @@ -30,7 +30,11 @@ public class BlockTNT extends Block { public void wasExploded(World world, BlockPosition blockposition, Explosion explosion) { if (!world.isClientSide) { org.bukkit.Location loc = explosion.source instanceof EntityTNTPrimed ? ((EntityTNTPrimed) explosion.source).sourceLoc : new org.bukkit.Location(world.getWorld(), blockposition.getX(), blockposition.getY(), blockposition.getZ()); // PaperSpigot -- EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(loc, world, (double) ((float) blockposition.getX() + 0.5F), (double) ((float) blockposition.getY() + 0.5F), (double) ((float) blockposition.getZ() + 0.5F), explosion.c()); // PaperSpigot - add loc +- EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(loc, world, (double) ((float) blockposition.getX() + 0.5F), (double) ((float) blockposition.getY() + 0.5F), (double) ((float) blockposition.getZ() + 0.5F), explosion.getSource()); // PaperSpigot - add loc + // PaperSpigot start - Fix cannons + double y = blockposition.getY(); + if (!world.paperSpigotConfig.fixCannons) y += 0.5; -+ EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(loc, world, (double) ((float) blockposition.getX() + 0.5F), y, (double) ((float) blockposition.getZ() + 0.5F), explosion.c()); // PaperSpigot - add loc ++ EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(loc, world, (double) ((float) blockposition.getX() + 0.5F), y, (double) ((float) blockposition.getZ() + 0.5F), explosion.getSource()); // PaperSpigot - add loc + // PaperSpigot end entitytntprimed.fuseTicks = world.random.nextInt(entitytntprimed.fuseTicks / 4) + entitytntprimed.fuseTicks / 8; @@ -155,7 +155,7 @@ index 3a0bc4b..a901742 100644 world.addEntity(entitytntprimed); world.makeSound(entitytntprimed, "game.tnt.primed", 1.0F, 1.0F); diff --git a/src/main/java/net/minecraft/server/DispenserRegistry.java b/src/main/java/net/minecraft/server/DispenserRegistry.java -index 950db4d..8700ab1 100644 +index bc07d3d..cc7a1e3 100644 --- a/src/main/java/net/minecraft/server/DispenserRegistry.java +++ b/src/main/java/net/minecraft/server/DispenserRegistry.java @@ -520,7 +520,11 @@ public class DispenserRegistry { @@ -277,7 +277,7 @@ index 3e16472..2df3921 100644 + // PaperSpigot end } diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index 349854f..f40f465 100644 +index b1bca26..a078799 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -142,9 +142,16 @@ public class Explosion { @@ -346,5 +346,5 @@ index b9b76ce..37369e8 100644 + } } -- -1.9.5.msysgit.1 +2.4.5.windows.1 diff --git a/Spigot-Server-Patches/0054-Optimize-explosions.patch b/Spigot-Server-Patches/0054-Optimize-explosions.patch index dbb39ba0f9..7468ffd4f4 100644 --- a/Spigot-Server-Patches/0054-Optimize-explosions.patch +++ b/Spigot-Server-Patches/0054-Optimize-explosions.patch @@ -1,4 +1,4 @@ -From 2cd37e23df2ba3480711fdd100abb7e46482e1aa Mon Sep 17 00:00:00 2001 +From 6e5dae727f6c1841733255c643684dd8631ee850 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Tue, 16 Jun 2015 05:52:58 -0700 Subject: [PATCH] Optimize explosions @@ -10,7 +10,7 @@ This patch adds a per-tick cache that is used for storing and retrieving an entity's exposure during an explosion. diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index f40f465..4afb8d7 100644 +index a078799..0f722c2 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -129,7 +129,7 @@ public class Explosion { @@ -22,7 +22,7 @@ index f40f465..4afb8d7 100644 double d13 = (1.0D - d7) * d12; // entity.damageEntity(DamageSource.explosion(this), (float) ((int) ((d13 * d13 + d13) / 2.0D * 8.0D * (double) f3 + 1.0D)));+ // CraftBukkit start -@@ -294,4 +294,86 @@ public class Explosion { +@@ -293,4 +293,86 @@ public class Explosion { public List getBlocks() { return this.blocks; } @@ -110,7 +110,7 @@ index f40f465..4afb8d7 100644 + // PaperSpigot end } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 0e88078..4945043 100644 +index 76ba101..c9a2ed7 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -860,6 +860,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs