From 3650ca36ddf052449f7700268b7b4b6deb9816aa Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 27 Dec 2014 16:07:04 -0600 Subject: [PATCH] Update from upstream SpigotMC take 2: Update harder --- CraftBukkit-Patches/0001-POM-Changes.patch | 13 ++----- CraftBukkit-Patches/0002-mc-dev-imports.patch | 14 +------- .../0015-Entity-Activation-Range.patch | 8 ++--- .../0127-Better-item-validation.patch | 18 +++++----- ...able-Explosion-avoiding-for-all-mobs.patch | 35 +++++++++++++++++++ 5 files changed, 51 insertions(+), 37 deletions(-) create mode 100644 CraftBukkit-Patches/0159-Disable-Explosion-avoiding-for-all-mobs.patch diff --git a/CraftBukkit-Patches/0001-POM-Changes.patch b/CraftBukkit-Patches/0001-POM-Changes.patch index fc6b09b370..be4caab5d7 100644 --- a/CraftBukkit-Patches/0001-POM-Changes.patch +++ b/CraftBukkit-Patches/0001-POM-Changes.patch @@ -1,4 +1,4 @@ -From 2a9f9dbe39c385cdbf3becdee0cbe388015427d3 Mon Sep 17 00:00:00 2001 +From 937e9038a288a440b7027378e856e79f33ce3da7 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 2 Jul 2013 13:07:39 +1000 Subject: [PATCH] POM Changes @@ -6,7 +6,7 @@ Subject: [PATCH] POM Changes Basic changes to the build system which mark the artifact as Spigot, and the necessary code changes to ensure proper functionality. Also disables the auto updater provided by CraftBukkit as it is useless to us. diff --git a/pom.xml b/pom.xml -index 2b29172..dc1d420 100644 +index 5c0c6c9..07077da 100644 --- a/pom.xml +++ b/pom.xml @@ -1,12 +1,12 @@ @@ -98,15 +98,6 @@ index 2b29172..dc1d420 100644 Bukkit Team Bukkit ${api.version} -@@ -147,7 +172,7 @@ - - org.apache.maven.plugins - maven-shade-plugin -- 1.4 -+ 2.1 - - - package diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java index f905d17..9304637 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java diff --git a/CraftBukkit-Patches/0002-mc-dev-imports.patch b/CraftBukkit-Patches/0002-mc-dev-imports.patch index 1eecb66bd0..9ea0d489fb 100644 --- a/CraftBukkit-Patches/0002-mc-dev-imports.patch +++ b/CraftBukkit-Patches/0002-mc-dev-imports.patch @@ -1,4 +1,4 @@ -From 7be8c74e425da1f52777b4670fde74649e661dcc Mon Sep 17 00:00:00 2001 +From 551a13859b2fc907a98be3a692218e49b078b05b Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 1 Dec 2013 15:10:48 +1100 Subject: [PATCH] mc-dev imports @@ -5432,18 +5432,6 @@ index 0000000..31fc0a9 + throw (T) t; + } +} -diff --git a/src/main/resources/org/spigotmc/SneakyThrow.class b/src/main/resources/org/spigotmc/SneakyThrow.class -new file mode 100644 -index 0000000000000000000000000000000000000000..635518693adaeee6f771d2a4c9f92672048a4c4d -GIT binary patch -literal 184 -zcmX^0Z`VEsW(HjbE=C64;Jnnt?8=agqWp5bEOrKVMh1bb#Ii*FoW#6zegCAa)Z`LI -z2Cm@z(xT*4x6GVWMg|t={1hN1q2Ys22-csNl#^<$83vTfFG|-hF33#JFUd{TN3wyD -ufvp&9A3M-~MFu7YP6iNQ1kxM~Y(Sb7$m0Xjj6j-6Yd=U5$YufY7#IQ5^(s;T - -literal 0 -HcmV?d00001 - -- 2.1.0 diff --git a/CraftBukkit-Patches/0015-Entity-Activation-Range.patch b/CraftBukkit-Patches/0015-Entity-Activation-Range.patch index 209525ed13..d00ab5d991 100644 --- a/CraftBukkit-Patches/0015-Entity-Activation-Range.patch +++ b/CraftBukkit-Patches/0015-Entity-Activation-Range.patch @@ -1,4 +1,4 @@ -From 65adc99054ba4baa0c77b63e75de3b2698eecf90 Mon Sep 17 00:00:00 2001 +From 057ad55b4ed8cb107d9e5f498196b6e2dfc6b1be Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 3 Feb 2013 05:10:21 -0500 Subject: [PATCH] Entity Activation Range @@ -9,7 +9,7 @@ This will drastically cut down on tick timings for entities that are not in rang This change can have dramatic impact on gameplay if configured too low. Balance according to your servers desired gameplay. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 5441e8b..c4cf603 100644 +index 3577d1f..de80728 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -89,14 +89,14 @@ public abstract class Entity implements ICommandListener { @@ -93,7 +93,7 @@ index 2adcc19..23091bd 100644 super(world); } diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java -index 3ba285a..ae00f60 100644 +index 3ba285a..6e5450a 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java @@ -15,7 +15,7 @@ public class EntityArrow extends Entity implements IProjectile { @@ -115,7 +115,7 @@ index 3ba285a..ae00f60 100644 + { + if ( this.inGround ) + { -+ this.ap += 19; // Despawn counter. First int after shooter ++ this.ap += 1; // Despawn counter. First int after shooter + } + super.inactiveTick(); + } diff --git a/CraftBukkit-Patches/0127-Better-item-validation.patch b/CraftBukkit-Patches/0127-Better-item-validation.patch index 131078456e..644ee95d2f 100644 --- a/CraftBukkit-Patches/0127-Better-item-validation.patch +++ b/CraftBukkit-Patches/0127-Better-item-validation.patch @@ -1,4 +1,4 @@ -From 174e58b02c66e7423734c55b14ce284af5d8f20c Mon Sep 17 00:00:00 2001 +From a38587bc0fc5796b4cbd0a8dfe6c59ea554d05ee Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Wed, 2 Jul 2014 23:35:51 +0100 Subject: [PATCH] Better item validation @@ -64,10 +64,10 @@ index 8b7dc17..5227007 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java -index 0c69a3e..6843fac 100644 +index e1badcb..9bf092c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java -@@ -20,6 +20,10 @@ import net.minecraft.server.ChatSerializer; +@@ -22,6 +22,10 @@ import net.minecraft.server.IChatBaseComponent; import net.minecraft.server.NBTTagString; import org.bukkit.craftbukkit.util.CraftChatMessage; @@ -78,7 +78,7 @@ index 0c69a3e..6843fac 100644 @DelegateDeserialization(SerializableMeta.class) class CraftMetaBook extends CraftMetaItem implements BookMeta { static final ItemMetaKey BOOK_TITLE = new ItemMetaKey("title"); -@@ -55,11 +59,11 @@ class CraftMetaBook extends CraftMetaItem implements BookMeta { +@@ -57,11 +61,11 @@ class CraftMetaBook extends CraftMetaItem implements BookMeta { super(tag); if (tag.hasKey(BOOK_TITLE.NBT)) { @@ -92,15 +92,15 @@ index 0c69a3e..6843fac 100644 } boolean resolved = false; -@@ -84,7 +88,7 @@ class CraftMetaBook extends CraftMetaItem implements BookMeta { +@@ -86,7 +90,7 @@ class CraftMetaBook extends CraftMetaItem implements BookMeta { // Ignore and treat as an old book } } -- pageArray[i] = page; -+ pageArray[i] = limit( page, 2048 ); // Spigot +- addPage(page); ++ addPage( limit( page, 2048 ) ); // Spigot } - - addPage(pageArray); + } + } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java index e80fce2..a4b09fa 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java diff --git a/CraftBukkit-Patches/0159-Disable-Explosion-avoiding-for-all-mobs.patch b/CraftBukkit-Patches/0159-Disable-Explosion-avoiding-for-all-mobs.patch new file mode 100644 index 0000000000..0a75823d4b --- /dev/null +++ b/CraftBukkit-Patches/0159-Disable-Explosion-avoiding-for-all-mobs.patch @@ -0,0 +1,35 @@ +From 690f4263f6d66b1c0e73698d3ef82bb33e67fb0e Mon Sep 17 00:00:00 2001 +From: Thinkofdeath +Date: Sat, 27 Dec 2014 21:08:51 +0000 +Subject: [PATCH] Disable Explosion avoiding for all mobs + +Its going in 1.8.1 anyway + +diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java +index d849ee7..1ed769f 100644 +--- a/src/main/java/net/minecraft/server/EntityMonster.java ++++ b/src/main/java/net/minecraft/server/EntityMonster.java +@@ -4,7 +4,7 @@ import org.bukkit.event.entity.EntityCombustByEntityEvent; // CraftBukkit + + public abstract class EntityMonster extends EntityCreature implements IMonster { + +- protected final PathfinderGoal a = new PathfinderGoalAvoidTarget(this, new EntitySelectorExplodingCreeper(this), 4.0F, 1.0D, 2.0D); ++ protected final PathfinderGoal a = null; // Spigot : new PathfinderGoalAvoidTarget(this, new EntitySelectorExplodingCreeper(this), 4.0F, 1.0D, 2.0D); + + public EntityMonster(World world) { + super(world); +diff --git a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java +index 35b42db..804ad3a 100644 +--- a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java ++++ b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java +@@ -24,6 +24,7 @@ public class PathfinderGoalSelector { + } + + public void a(int i, PathfinderGoal pathfindergoal) { ++ if (pathfindergoal == null) return; // Spigot + this.b.add(new PathfinderGoalSelectorItem(this, i, pathfindergoal)); + } + +-- +2.1.0 +