From f125630ef1384dce3f95c37d317e1b8a6c1ebc8e Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 8 Jul 2014 22:05:35 -0500 Subject: [PATCH] PaperSpigot 1.7.10 --- Bukkit | 2 +- CraftBukkit | 2 +- .../0001-Rename-to-PaperSpigot.patch | 6 ++-- .../0002-PaperSpigot-config-files.patch | 30 ++++++++--------- ...-Invisible-players-don-t-have-rights.patch | 8 ++--- ...e-damage-multiplier-for-PvP-blocking.patch | 6 ++-- ...urable-interaction-limit-restriction.patch | 6 ++-- .../0021-Player-Exhaustion-Multipliers.patch | 32 +++++++++---------- .../0025-Fix-Null-Tile-Entity-Worlds.patch | 6 ++-- ...6-Revert-Bukkit-Damage-API-Behavior.patch} | 26 +++++++-------- MinecraftRelocate/pom.xml | 2 +- MinecraftServer/pom.xml | 28 ++++++++++++++-- 12 files changed, 87 insertions(+), 67 deletions(-) rename CraftBukkit-Patches/{0026-Revert-bukkit-damage-API-behavior.patch => 0026-Revert-Bukkit-Damage-API-Behavior.patch} (73%) diff --git a/Bukkit b/Bukkit index c18106baf..677e082bc 160000 --- a/Bukkit +++ b/Bukkit @@ -1 +1 @@ -Subproject commit c18106bafafd081dbea9013c40e35b82138020d1 +Subproject commit 677e082bc10ca217e21dee06424bb8044730b340 diff --git a/CraftBukkit b/CraftBukkit index b9b2a1942..bc14645b6 160000 --- a/CraftBukkit +++ b/CraftBukkit @@ -1 +1 @@ -Subproject commit b9b2a194200d74837169899e61e076083c331460 +Subproject commit bc14645b6f7442af6bb819098a2dcbde582ce923 diff --git a/CraftBukkit-Patches/0001-Rename-to-PaperSpigot.patch b/CraftBukkit-Patches/0001-Rename-to-PaperSpigot.patch index 0b92cccd7..7022bff71 100644 --- a/CraftBukkit-Patches/0001-Rename-to-PaperSpigot.patch +++ b/CraftBukkit-Patches/0001-Rename-to-PaperSpigot.patch @@ -1,11 +1,11 @@ -From 05ddf5f50ce8dc6bef17a65aaf7273396f6ffff8 Mon Sep 17 00:00:00 2001 +From ab6f4e8f6a5d83b5a3003b154b16ec777fcaca94 Mon Sep 17 00:00:00 2001 From: gsand Date: Tue, 15 Apr 2014 07:12:20 -0700 Subject: [PATCH] Rename to PaperSpigot diff --git a/pom.xml b/pom.xml -index df02bd3..e068516 100644 +index 6aeffa8..7fb61c8 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ @@ -15,7 +15,7 @@ index df02bd3..e068516 100644 - spigot + paperspigot jar - 1.7.9-R0.3-SNAPSHOT + 1.7.10-R0.1-SNAPSHOT Spigot @@ -119,7 +119,7 @@ gitdescribe-maven-plugin diff --git a/CraftBukkit-Patches/0002-PaperSpigot-config-files.patch b/CraftBukkit-Patches/0002-PaperSpigot-config-files.patch index 93741d387..25f1912f5 100644 --- a/CraftBukkit-Patches/0002-PaperSpigot-config-files.patch +++ b/CraftBukkit-Patches/0002-PaperSpigot-config-files.patch @@ -1,26 +1,26 @@ -From 50896e297f346e1e55553205e6bcdd0640013067 Mon Sep 17 00:00:00 2001 +From e633546d50c886637b5e1e64c33a7b1a01226542 Mon Sep 17 00:00:00 2001 From: Zach Brown -Date: Wed, 2 Jul 2014 22:26:16 -0500 +Date: Tue, 8 Jul 2014 21:08:51 -0500 Subject: [PATCH] PaperSpigot config files diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 62f4aa9..51968d1 100644 +index 9cc0526..e9a1a67 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -115,6 +115,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer - org.spigotmc.SpigotConfig.init(); - org.spigotmc.SpigotConfig.registerCommands(); - // Spigot end -+ // PaperSpigot start -+ org.github.paperspigot.PaperSpigotConfig.init(); -+ org.github.paperspigot.PaperSpigotConfig.registerCommands(); -+ // PaperSpigot end +@@ -131,6 +131,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer + org.spigotmc.SpigotConfig.init(); + org.spigotmc.SpigotConfig.registerCommands(); + // Spigot end ++ // PaperSpigot start ++ org.github.paperspigot.PaperSpigotConfig.init(); ++ org.github.paperspigot.PaperSpigotConfig.registerCommands(); ++ // PaperSpigot stop - i.info("Generating keypair"); - this.a(MinecraftEncryption.b()); + i.info("Generating keypair"); + this.a(MinecraftEncryption.b()); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 2df7bfb..07eeb2b 100644 +index 3dba573..b7509c4 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -197,6 +197,7 @@ public abstract class World implements IBlockAccess { @@ -40,7 +40,7 @@ index 2df7bfb..07eeb2b 100644 this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 8ad5b89..95d30e8 100644 +index 79d4d99..b6de6e9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -813,6 +813,7 @@ public final class CraftServer implements Server { diff --git a/CraftBukkit-Patches/0005-Invisible-players-don-t-have-rights.patch b/CraftBukkit-Patches/0005-Invisible-players-don-t-have-rights.patch index 57c394692..0c6664f2b 100644 --- a/CraftBukkit-Patches/0005-Invisible-players-don-t-have-rights.patch +++ b/CraftBukkit-Patches/0005-Invisible-players-don-t-have-rights.patch @@ -1,11 +1,11 @@ -From 733a279ce93f83a19e6e0e8371f9415ba76b9dd2 Mon Sep 17 00:00:00 2001 +From 51fa638e2b37570add22f0fd94492da0c0b05d54 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sun, 18 May 2014 16:35:38 -0500 Subject: [PATCH] Invisible players don't have rights diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java -index 13903e9..b311508 100644 +index de8dda7..69e254a 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java @@ -3,6 +3,7 @@ package net.minecraft.server; @@ -34,7 +34,7 @@ index 13903e9..b311508 100644 org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this); // CraftBukkit - Call event diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 07eeb2b..3bb1302 100644 +index b7509c4..9741e94 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -14,6 +14,7 @@ import java.util.concurrent.Callable; @@ -45,7 +45,7 @@ index 07eeb2b..3bb1302 100644 import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.craftbukkit.util.LongHashSet; import org.bukkit.craftbukkit.SpigotTimings; // Spigot -@@ -1665,6 +1666,15 @@ public abstract class World implements IBlockAccess { +@@ -1666,6 +1667,15 @@ public abstract class World implements IBlockAccess { for (int i = 0; i < list.size(); ++i) { Entity entity1 = (Entity) list.get(i); diff --git a/CraftBukkit-Patches/0007-Configurable-damage-multiplier-for-PvP-blocking.patch b/CraftBukkit-Patches/0007-Configurable-damage-multiplier-for-PvP-blocking.patch index 152cb9263..00973bd15 100644 --- a/CraftBukkit-Patches/0007-Configurable-damage-multiplier-for-PvP-blocking.patch +++ b/CraftBukkit-Patches/0007-Configurable-damage-multiplier-for-PvP-blocking.patch @@ -1,11 +1,11 @@ -From cdc8e9f58ce44646880bc7c4a8e7b23749feac93 Mon Sep 17 00:00:00 2001 +From 4ea57bb1bdbb11669951b3fcf524b36f9e0b82c9 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 24 Jun 2014 07:39:37 -0500 Subject: [PATCH] Configurable damage multiplier for PvP blocking diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 408c514..eb123ff 100644 +index 01062ce..a75e854 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -20,6 +20,8 @@ import org.bukkit.event.player.PlayerDropItemEvent; @@ -25,7 +25,7 @@ index 408c514..eb123ff 100644 + f = (1.0F + f) * PaperSpigotWorldConfig.playerBlockingDamageMultiplier; // PaperSpigot - Configurable PvP blocking damage multiplier } - f = this.b(damagesource, f); + f = this.applyArmorModifier(damagesource, f); diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java index dc8c581..9f2c3dc 100644 --- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java diff --git a/CraftBukkit-Patches/0020-Configurable-interaction-limit-restriction.patch b/CraftBukkit-Patches/0020-Configurable-interaction-limit-restriction.patch index 48ab3e99d..ece4f35b0 100644 --- a/CraftBukkit-Patches/0020-Configurable-interaction-limit-restriction.patch +++ b/CraftBukkit-Patches/0020-Configurable-interaction-limit-restriction.patch @@ -1,11 +1,11 @@ -From 247823b394423523fe209169a33f8bac0981c93d Mon Sep 17 00:00:00 2001 +From befb63a6e184c5e62c0af232d5860344e8cdfc36 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 3 Jul 2014 00:53:47 -0500 Subject: [PATCH] Configurable interaction limit restriction diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index bb6e91a..e855611 100644 +index 8485d6b..e587e6f 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -59,6 +59,8 @@ import org.bukkit.inventory.InventoryView; @@ -17,7 +17,7 @@ index bb6e91a..e855611 100644 public class PlayerConnection implements PacketPlayInListener { private static final Logger c = LogManager.getLogger(); -@@ -577,7 +579,7 @@ public class PlayerConnection implements PacketPlayInListener { +@@ -578,7 +580,7 @@ public class PlayerConnection implements PacketPlayInListener { public void a(PacketPlayInBlockPlace packetplayinblockplace) { boolean throttled = false; diff --git a/CraftBukkit-Patches/0021-Player-Exhaustion-Multipliers.patch b/CraftBukkit-Patches/0021-Player-Exhaustion-Multipliers.patch index 082cbecb5..2e5bfe106 100644 --- a/CraftBukkit-Patches/0021-Player-Exhaustion-Multipliers.patch +++ b/CraftBukkit-Patches/0021-Player-Exhaustion-Multipliers.patch @@ -1,11 +1,11 @@ -From 36c586d93bb138448fc82a3dfb9b52c85893dcd8 Mon Sep 17 00:00:00 2001 +From c601e3e2e6043058a1e246d40f8b81662e55a242 Mon Sep 17 00:00:00 2001 From: gsand -Date: Sun, 6 Jul 2014 06:42:49 -0400 +Date: Tue, 8 Jul 2014 21:41:43 -0500 Subject: [PATCH] Player Exhaustion Multipliers diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index aaead32..51f0ab5 100644 +index 0893a6f..89c2832 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java @@ -4,6 +4,8 @@ import java.util.Iterator; @@ -20,33 +20,33 @@ index aaead32..51f0ab5 100644 @@ -686,7 +688,7 @@ public class Block { public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) { - entityhuman.a(StatisticList.MINE_BLOCK_COUNT[b(this)], 1); -- entityhuman.a(0.025F); + entityhuman.a(StatisticList.MINE_BLOCK_COUNT[getId(this)], 1); +- entityhuman.applyExhaustion(0.025F); + entityhuman.a( PaperSpigotWorldConfig.playerExhaustionBlockBreak ); // PaperSpigot - Configurable block breaking exhaustion if (this.E() && EnchantmentManager.hasSilkTouchEnchantment(entityhuman)) { ItemStack itemstack = this.j(l); diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index eb123ff..ad3b0a1 100644 +index a75e854..814a02b 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -996,7 +996,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen } } -- this.a(0.3F); +- this.applyExhaustion(0.3F); + this.a( PaperSpigotWorldConfig.playerExhaustionAttack ); // PaperSpigot - Configurable attack exhaustion } else if (flag1) { entity.extinguish(); } @@ -1256,9 +1256,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen - super.bi(); + super.bj(); this.a(StatisticList.r, 1); if (this.isSprinting()) { -- this.a(0.8F); +- this.applyExhaustion(0.8F); + this.a( PaperSpigotWorldConfig.playerExhaustionSprintJumping ); // PaperSpigot - Configurable sprint jumping exhaustion } else { -- this.a(0.2F); +- this.applyExhaustion(0.2F); + this.a( PaperSpigotWorldConfig.playerExhaustionJumping ); // PaperSpigot - Configurable jumping exhaustion } } @@ -55,14 +55,14 @@ index eb123ff..ad3b0a1 100644 i = Math.round(MathHelper.sqrt(d0 * d0 + d1 * d1 + d2 * d2) * 100.0F); if (i > 0) { this.a(StatisticList.m, i); -- this.a(0.015F * (float) i * 0.01F); +- this.applyExhaustion(0.015F * (float) i * 0.01F); + this.a( PaperSpigotWorldConfig.playerExhaustionSwimming * (float) i * 0.01F); // PaperSpigot - Configurable swimming exhaustion } - } else if (this.L()) { + } else if (this.M()) { i = Math.round(MathHelper.sqrt(d0 * d0 + d2 * d2) * 100.0F); if (i > 0) { this.a(StatisticList.i, i); -- this.a(0.015F * (float) i * 0.01F); +- this.applyExhaustion(0.015F * (float) i * 0.01F); + this.a( PaperSpigotWorldConfig.playerExhaustionSwimming * (float) i * 0.01F); // PaperSpigot - Configurable swimming (diving) exhaustion } } else if (this.h_()) { @@ -71,16 +71,16 @@ index eb123ff..ad3b0a1 100644 if (i > 0) { this.a(StatisticList.h, i); if (this.isSprinting()) { -- this.a(0.099999994F * (float) i * 0.01F); +- this.applyExhaustion(0.099999994F * (float) i * 0.01F); + this.a( PaperSpigotWorldConfig.playerExhaustionSprinting * (float) i * 0.01F); // PaperSpigot - Configurable sprinting exhaustion } else { -- this.a(0.01F * (float) i * 0.01F); +- this.applyExhaustion(0.01F * (float) i * 0.01F); + this.a( PaperSpigotWorldConfig.playerExhaustionWalking * (float) i * 0.01F); // PaperSpigot - Configurable walking exhaustion } } } else { diff --git a/src/main/java/net/minecraft/server/FoodMetaData.java b/src/main/java/net/minecraft/server/FoodMetaData.java -index 4e91fe9..423a0c4 100644 +index 4169231..30f79a1 100644 --- a/src/main/java/net/minecraft/server/FoodMetaData.java +++ b/src/main/java/net/minecraft/server/FoodMetaData.java @@ -1,5 +1,7 @@ diff --git a/CraftBukkit-Patches/0025-Fix-Null-Tile-Entity-Worlds.patch b/CraftBukkit-Patches/0025-Fix-Null-Tile-Entity-Worlds.patch index b10c67dd6..e72e11c91 100644 --- a/CraftBukkit-Patches/0025-Fix-Null-Tile-Entity-Worlds.patch +++ b/CraftBukkit-Patches/0025-Fix-Null-Tile-Entity-Worlds.patch @@ -1,14 +1,14 @@ -From 2ad338cf6855c7e88f2c97a01a5f6459044da79e Mon Sep 17 00:00:00 2001 +From d60dc3eab52d9205ce594691e2fac0b340290129 Mon Sep 17 00:00:00 2001 From: "Evan A. Haskell" Date: Thu, 26 Jun 2014 18:37:29 -0400 Subject: [PATCH] Fix Null Tile Entity Worlds diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 1d949e7..ca1a02c 100644 +index 2dc61fc..19be986 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -2021,6 +2021,7 @@ public abstract class World implements IBlockAccess { +@@ -2016,6 +2016,7 @@ public abstract class World implements IBlockAccess { } } diff --git a/CraftBukkit-Patches/0026-Revert-bukkit-damage-API-behavior.patch b/CraftBukkit-Patches/0026-Revert-Bukkit-Damage-API-Behavior.patch similarity index 73% rename from CraftBukkit-Patches/0026-Revert-bukkit-damage-API-behavior.patch rename to CraftBukkit-Patches/0026-Revert-Bukkit-Damage-API-Behavior.patch index de00baf14..e0861e3df 100644 --- a/CraftBukkit-Patches/0026-Revert-bukkit-damage-API-behavior.patch +++ b/CraftBukkit-Patches/0026-Revert-Bukkit-Damage-API-Behavior.patch @@ -1,23 +1,18 @@ -From 087bba2d9d05ddab50ca8b320d726dbe2d55e14d Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Tue, 8 Jul 2014 19:21:28 -0400 +From fff7efbaf9c3df799386163152ee335d1ff84b24 Mon Sep 17 00:00:00 2001 +From: Zach Brown +Date: Tue, 8 Jul 2014 21:49:42 -0500 Subject: [PATCH] Revert Bukkit Damage API Behavior -This API is extremely broken and even updated plugins can not adequately restore their intended behavior with the existing API. - -Until Bukkit comes up with an adequate solution, lets revert the change in behavior. - -New plugins using the API will not error but will also not behave as intended, but there are likely no plugins using this new API. diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 6b4cd2c..f445d7e 100644 +index 67484dc..760cec5 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -967,6 +967,16 @@ public abstract class EntityLiving extends Entity { // CraftBukkit start protected boolean d(DamageSource damagesource, float f) { // void -> boolean if (!this.isInvulnerable()) { -+ // PaperSpigot start - moved up from below to bring back old behavior. ++ // PaperSpigot start - moved up from below to bring back old behavior + EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, f, 0, 0, 0, 0, 0, 0); + + if (event.isCancelled()) { @@ -30,8 +25,8 @@ index 6b4cd2c..f445d7e 100644 boolean human = this instanceof EntityHuman; float originalDamage = f; float preDamage = f; -@@ -1006,13 +1016,18 @@ public abstract class EntityLiving extends Entity { - f = Math.max(f - this.br(), 0.0F); +@@ -1006,13 +1016,19 @@ public abstract class EntityLiving extends Entity { + f = Math.max(f - this.getAbsorptionHearts(), 0.0F); float absorptionModifier = Math.max(f1 - f, 0.0F); - EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, -hardHatModifier, -blockingModifier, -armorModifier, -resistanceModifier, -magicModifier, -absorptionModifier); @@ -39,17 +34,17 @@ index 6b4cd2c..f445d7e 100644 - if (event.isCancelled()) { - return false; + // PaperSpigot start - Moved event call up -+ event.setDamage(DamageModifier.ARMOR, -armorModifier); ++ event.setDamage(DamageModifier.ARMOR, -armorModifier); + if (damagesource == DamageSource.FALLING_BLOCK || damagesource == DamageSource.ANVIL) { + event.setDamage(DamageModifier.HARD_HAT, -hardHatModifier); } -- + - f = (float) event.getFinalDamage(); + if (human) { + event.setDamage(DamageModifier.BLOCKING, -blockingModifier); + } + event.setDamage(DamageModifier.RESISTANCE, -resistanceModifier); -+ event.setDamage(DamageModifier.MAGIC, -magicModifier); ++ event.setDamage(DamageModifier.MAGIC, -magicModifier); + event.setDamage(DamageModifier.ABSORPTION, -absorptionModifier); + // PaperSpigot end @@ -57,3 +52,4 @@ index 6b4cd2c..f445d7e 100644 if ((damagesource == DamageSource.ANVIL || damagesource == DamageSource.FALLING_BLOCK) && this.getEquipment(4) != null) { -- 1.9.1 + diff --git a/MinecraftRelocate/pom.xml b/MinecraftRelocate/pom.xml index 4f6ae84b9..c223fe953 100644 --- a/MinecraftRelocate/pom.xml +++ b/MinecraftRelocate/pom.xml @@ -11,7 +11,7 @@ org.spigotmc minecraft-server-relocated - 1.7.9-SNAPSHOT + 1.7.10-SNAPSHOT jar Minecraft Server Relocation diff --git a/MinecraftServer/pom.xml b/MinecraftServer/pom.xml index 890e04562..d4920f604 100644 --- a/MinecraftServer/pom.xml +++ b/MinecraftServer/pom.xml @@ -11,7 +11,7 @@ org.spigotmc minecraft-server - 1.7.9-SNAPSHOT + 1.7.10-SNAPSHOT jar Minecraft Server @@ -27,7 +27,13 @@ org.bukkit minecraft-server - 1.7.9 + 1.7.10 + compile + + + io.netty + netty-handler + 4.0.21.Final compile @@ -46,6 +52,24 @@ + + + + + org.bukkit:minecraft-server + + net/minecraft/util/io/netty/** + + + + + + + io.netty + net.minecraft.util.io.netty + + +