From 9673aebba113422bd78a0ab21a5b42dc8865ed81 Mon Sep 17 00:00:00 2001 From: William Blake Galbreath Date: Sun, 5 May 2019 06:12:32 -0500 Subject: [PATCH] more 1.14 stuffs yay! --- ...332-Optimize-CraftBlockData-Creation.patch | 2 +- .../0333-Fix-MC-124320.patch | 2 +- .../0334-Slime-Pathfinder-Events.patch | 2 +- ...le-speed-for-water-flowing-over-lava.patch | 2 +- .../0337-Optimize-RegistryMaterials.patch | 2 +- .../0338-Add-PhantomPreSpawnEvent.patch | 2 +- .../0339-Add-More-Creeper-API.patch | 2 +- .../0340-Inventory-removeItemAnySlot.patch | 2 +- ...loadChunk-int-int-false-load-unconve.patch | 2 +- ...-ray-tracing-methods-to-LivingEntity.patch | 2 +- ...e-attack-cooldown-methods-for-Player.patch | 2 +- .../0345-Improve-death-events.patch | 232 +++++++++--------- ...ow-chests-to-be-placed-with-NBT-data.patch | 2 +- .../0347-Mob-Pathfinding-API.patch | 2 +- ...ent-chunk-loading-from-Fluid-Flowing.patch | 2 +- ...-for-CanPlaceOn-and-CanDestroy-NBT-v.patch | 2 +- ...ent-Mob-AI-Rules-from-Loading-Chunks.patch | 2 +- ...wning-from-loading-generating-chunks.patch | 2 +- ...e-Biome-Mob-Lookups-for-Mob-Spawning.patch | 2 +- ...nt-furnace-cook-speed-multiplier-API.patch | 2 +- .../0355-Support-Overriding-World-Seeds.patch | 2 +- .../0356-Optimize-Server-World-Map.patch | 2 +- .../0357-PreSpawnerSpawnEvent.patch | 2 +- ...arseException-in-Entity-and-TE-names.patch | 6 +- .../0359-Avoid-dimension-id-collisions.patch | 2 +- .../0360-Honor-EntityAgeable.ageLock.patch | 2 +- ...e-Dimension-NBT-field-in-Entity-data.patch | 6 +- ...t-recheck-type-after-setting-a-block.patch | 2 +- ...ble-connection-throttle-kick-message.patch | 2 +- .../0369-Hook-into-CB-plugin-rewrites.patch | 2 +- ...370-Allow-setting-the-vex-s-summoner.patch | 2 +- .../0372-Add-sun-related-API.patch | 2 +- ...owned-for-Villager-Aggression-Config.patch | 2 +- .../0374-Here-s-Johnny.patch | 2 +- Spigot-Server-Patches/0375-Turtle-API.patch | 2 +- ...mit-lightning-strike-effect-distance.patch | 2 +- ...ther-worlds-for-shooter-of-projectil.patch | 2 +- ...-Call-player-spectator-target-events.patch | 6 +- ...0-Add-Velocity-IP-Forwarding-Support.patch | 2 +- .../0381-Add-more-Witch-API.patch | 2 +- Spigot-Server-Patches/0382-Fix-MC-93764.patch | 2 +- ...event-players-from-moving-into-unloa.patch | 30 +-- ...84-Reset-players-airTicks-on-respawn.patch | 16 +- ...e-area-unicode-characters-from-signs.patch | 29 +-- ...-after-profile-lookups-if-not-needed.patch | 6 +- ...ble-thread-count-default-for-bootstr.patch | 28 +-- ...lid-item-for-enchantment-checks-on-b.patch | 8 +- .../0390-Optimize-World-Time-Updates.patch | 14 +- ...store-custom-InventoryHolder-support.patch | 8 +- .../0392-Use-Vanilla-Minecart-Speeds.patch | 8 +- .../0393-Fix-SpongeAbsortEvent-handling.patch | 45 ++-- ...t-allow-digging-into-unloaded-chunks.patch | 8 +- .../0395-Optimize-redstone-algorithm.patch | 60 ++--- ...entity-dismount-during-teleportation.patch | 51 ++-- .../0397-Book-Size-Limits.patch | 19 +- ...ault-permission-message-configurable.patch | 15 +- .../0399-Add-more-Zombie-API.patch | 84 ++----- 57 files changed, 363 insertions(+), 390 deletions(-) diff --git a/Spigot-Server-Patches/0332-Optimize-CraftBlockData-Creation.patch b/Spigot-Server-Patches/0332-Optimize-CraftBlockData-Creation.patch index d2853434e4..7126d53526 100644 --- a/Spigot-Server-Patches/0332-Optimize-CraftBlockData-Creation.patch +++ b/Spigot-Server-Patches/0332-Optimize-CraftBlockData-Creation.patch @@ -1,4 +1,4 @@ -From 83261d909e36f226f2043582f2bcadd3e89dd068 Mon Sep 17 00:00:00 2001 +From ccfeb7d5bd45b718398cc2c8109b25b5a8a8af38 Mon Sep 17 00:00:00 2001 From: miclebrick Date: Thu, 23 Aug 2018 11:45:32 -0400 Subject: [PATCH] Optimize CraftBlockData Creation diff --git a/Spigot-Server-Patches/0333-Fix-MC-124320.patch b/Spigot-Server-Patches/0333-Fix-MC-124320.patch index 432116240e..fcdd5d3208 100644 --- a/Spigot-Server-Patches/0333-Fix-MC-124320.patch +++ b/Spigot-Server-Patches/0333-Fix-MC-124320.patch @@ -1,4 +1,4 @@ -From 3d39c0e93184b77724106a9b6911d53179a61ce2 Mon Sep 17 00:00:00 2001 +From 3465b81fb8e52e9e126ab9bb25eeaf5501b5db8b Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Thu, 23 Aug 2018 09:25:30 -0500 Subject: [PATCH] Fix MC-124320 diff --git a/Spigot-Server-Patches/0334-Slime-Pathfinder-Events.patch b/Spigot-Server-Patches/0334-Slime-Pathfinder-Events.patch index 4d32831fcf..7a90361c63 100644 --- a/Spigot-Server-Patches/0334-Slime-Pathfinder-Events.patch +++ b/Spigot-Server-Patches/0334-Slime-Pathfinder-Events.patch @@ -1,4 +1,4 @@ -From ed723934e9e628f2d975d03730c391c2e27e3452 Mon Sep 17 00:00:00 2001 +From b404af9e2429ef6ad5f66c1c700e280fa30682e2 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 24 Aug 2018 08:18:42 -0500 Subject: [PATCH] Slime Pathfinder Events diff --git a/Spigot-Server-Patches/0336-Configurable-speed-for-water-flowing-over-lava.patch b/Spigot-Server-Patches/0336-Configurable-speed-for-water-flowing-over-lava.patch index 58fe2b339d..1e22e027b7 100644 --- a/Spigot-Server-Patches/0336-Configurable-speed-for-water-flowing-over-lava.patch +++ b/Spigot-Server-Patches/0336-Configurable-speed-for-water-flowing-over-lava.patch @@ -1,4 +1,4 @@ -From d7b2ad128b02dce9fcda0b35a8a76f01e2bc0614 Mon Sep 17 00:00:00 2001 +From 813ce11240c5780bc34e1e1a80d7828848a138cb Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 8 Aug 2018 16:33:21 -0600 Subject: [PATCH] Configurable speed for water flowing over lava diff --git a/Spigot-Server-Patches/0337-Optimize-RegistryMaterials.patch b/Spigot-Server-Patches/0337-Optimize-RegistryMaterials.patch index 57bc5a6259..9342a9da79 100644 --- a/Spigot-Server-Patches/0337-Optimize-RegistryMaterials.patch +++ b/Spigot-Server-Patches/0337-Optimize-RegistryMaterials.patch @@ -1,4 +1,4 @@ -From feb037bcc438e450631048b1bb2d45785ecc9ea8 Mon Sep 17 00:00:00 2001 +From 9fd5fca0c60c4f4a8db49680bedf51d26a9d46a5 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 26 Aug 2018 20:49:50 -0400 Subject: [PATCH] Optimize RegistryMaterials diff --git a/Spigot-Server-Patches/0338-Add-PhantomPreSpawnEvent.patch b/Spigot-Server-Patches/0338-Add-PhantomPreSpawnEvent.patch index 240ab101ef..7bc2122c39 100644 --- a/Spigot-Server-Patches/0338-Add-PhantomPreSpawnEvent.patch +++ b/Spigot-Server-Patches/0338-Add-PhantomPreSpawnEvent.patch @@ -1,4 +1,4 @@ -From 5ce2bea107f64d47592ed33ceddbfcc2b04ee2fc Mon Sep 17 00:00:00 2001 +From 81def067fdd714521f4c34842ca8b5eadb860e0b Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 25 Aug 2018 19:56:51 -0500 Subject: [PATCH] Add PhantomPreSpawnEvent diff --git a/Spigot-Server-Patches/0339-Add-More-Creeper-API.patch b/Spigot-Server-Patches/0339-Add-More-Creeper-API.patch index c55749df60..6fc06dc920 100644 --- a/Spigot-Server-Patches/0339-Add-More-Creeper-API.patch +++ b/Spigot-Server-Patches/0339-Add-More-Creeper-API.patch @@ -1,4 +1,4 @@ -From da041de23ba213f90f6d7fe6b5c3eb49cb53ab16 Mon Sep 17 00:00:00 2001 +From dce76a0f98ccdcd0159b2091497e3afba404a4ef Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 24 Aug 2018 11:50:26 -0500 Subject: [PATCH] Add More Creeper API diff --git a/Spigot-Server-Patches/0340-Inventory-removeItemAnySlot.patch b/Spigot-Server-Patches/0340-Inventory-removeItemAnySlot.patch index feda9a65fa..3dc2fd1cb3 100644 --- a/Spigot-Server-Patches/0340-Inventory-removeItemAnySlot.patch +++ b/Spigot-Server-Patches/0340-Inventory-removeItemAnySlot.patch @@ -1,4 +1,4 @@ -From 69a8e55d0ea65cb255d8a2a37b03596f352afeac Mon Sep 17 00:00:00 2001 +From b4216d70077ebc9773c56edb7a5c0e3658c4c1e1 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 28 Aug 2018 23:04:15 -0400 Subject: [PATCH] Inventory#removeItemAnySlot diff --git a/Spigot-Server-Patches/0342-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch b/Spigot-Server-Patches/0342-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch index 7302ffc775..5d1c0a43da 100644 --- a/Spigot-Server-Patches/0342-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch +++ b/Spigot-Server-Patches/0342-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch @@ -1,4 +1,4 @@ -From a54679a5585f693e6c222b3413ef1b5156892466 Mon Sep 17 00:00:00 2001 +From 5ed707772fcd0f0522c260292194b869021bd93d Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sun, 2 Sep 2018 19:34:33 -0700 Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted diff --git a/Spigot-Server-Patches/0343-Add-ray-tracing-methods-to-LivingEntity.patch b/Spigot-Server-Patches/0343-Add-ray-tracing-methods-to-LivingEntity.patch index a6ff5b123e..3275a9cdfd 100644 --- a/Spigot-Server-Patches/0343-Add-ray-tracing-methods-to-LivingEntity.patch +++ b/Spigot-Server-Patches/0343-Add-ray-tracing-methods-to-LivingEntity.patch @@ -1,4 +1,4 @@ -From 78b79db41419aab24fd685e01aa02dc7d9de02d4 Mon Sep 17 00:00:00 2001 +From 3ea3ceaa9c5e78e04925ad8da3bad86657ea8c92 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Mon, 3 Sep 2018 18:20:03 -0500 Subject: [PATCH] Add ray tracing methods to LivingEntity diff --git a/Spigot-Server-Patches/0344-Expose-attack-cooldown-methods-for-Player.patch b/Spigot-Server-Patches/0344-Expose-attack-cooldown-methods-for-Player.patch index 53b906fd2e..78cbfb0555 100644 --- a/Spigot-Server-Patches/0344-Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-Server-Patches/0344-Expose-attack-cooldown-methods-for-Player.patch @@ -1,4 +1,4 @@ -From 2f9d171741fcd9eeaca82f3592ae2ea1dbf5a9c7 Mon Sep 17 00:00:00 2001 +From 07d91651d9146cb2b0f7ec854170bdd189d206b3 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Tue, 4 Sep 2018 15:02:00 -0500 Subject: [PATCH] Expose attack cooldown methods for Player diff --git a/Spigot-Server-Patches/0345-Improve-death-events.patch b/Spigot-Server-Patches/0345-Improve-death-events.patch index ddcd256635..2c3897d692 100644 --- a/Spigot-Server-Patches/0345-Improve-death-events.patch +++ b/Spigot-Server-Patches/0345-Improve-death-events.patch @@ -1,4 +1,4 @@ -From 31b199c08aabc3bac1268a37ab726e9905d67f3c Mon Sep 17 00:00:00 2001 +From 2ad1d2512ac6cb016cdd66e1523ea117e0665599 Mon Sep 17 00:00:00 2001 From: Phoenix616 Date: Tue, 21 Aug 2018 01:39:35 +0100 Subject: [PATCH] Improve death events @@ -15,7 +15,7 @@ items and experience which is otherwise only properly possible by using internal code. diff --git a/src/main/java/net/minecraft/server/CombatTracker.java b/src/main/java/net/minecraft/server/CombatTracker.java -index bbd5e2b2a8..19750ceed1 100644 +index 20db76abd..a148cd437 100644 --- a/src/main/java/net/minecraft/server/CombatTracker.java +++ b/src/main/java/net/minecraft/server/CombatTracker.java @@ -175,6 +175,7 @@ public class CombatTracker { @@ -27,10 +27,10 @@ index bbd5e2b2a8..19750ceed1 100644 int i = this.f ? 300 : 100; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 90e0d9d453..c4d4775627 100644 +index 2dfa7d251..03e0e9e26 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1556,6 +1556,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1459,6 +1459,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return false; } @@ -38,29 +38,21 @@ index 90e0d9d453..c4d4775627 100644 public void a(Entity entity, int i, DamageSource damagesource) { if (entity instanceof EntityPlayer) { CriterionTriggers.c.a((EntityPlayer) entity, this, damagesource); -@@ -2408,6 +2409,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2340,6 +2341,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.fallDistance = 0.0F; } + public void onKill(EntityLiving entityLiving) { this.b(entityLiving); } // Paper - OBFHELPER public void b(EntityLiving entityliving) {} - protected boolean i(double d0, double d1, double d2) { -@@ -3072,6 +3074,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - return EnumPistonReaction.NORMAL; - } - -+ public SoundCategory getDeathSoundCategory() { return bV();} // Paper - OBFHELPER - public SoundCategory bV() { - return SoundCategory.NEUTRAL; - } + protected void i(double d0, double d1, double d2) { diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 2c54e3e34a..a5cc5e2842 100644 +index 7031dd0e4..f6dc96434 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java -@@ -659,7 +659,8 @@ public class EntityArmorStand extends EntityLiving { - } +@@ -675,7 +675,8 @@ public class EntityArmorStand extends EntityLiving { + @Override public void killEntity() { - org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, drops); // CraftBukkit - call event + org.bukkit.event.entity.EntityDeathEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, drops); // CraftBukkit - call event // Paper - make cancellable @@ -69,27 +61,28 @@ index 2c54e3e34a..a5cc5e2842 100644 } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 6367fdd469..3d1cdd6271 100644 +index 064703afe..bd8385cd5 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -76,14 +76,14 @@ public abstract class EntityLiving extends Entity { - public float aU; +@@ -77,7 +77,7 @@ public abstract class EntityLiving extends Entity { + public float aN; + public float aO; public EntityHuman killer; - public int lastDamageByPlayerTime; // Paper - public -- protected boolean killed; -+ protected boolean killed; protected void setDying(boolean dying) { this.killed = dying; } protected boolean isDying() { return this.killed; } // Paper - OBFHELPER +- protected int lastDamageByPlayerTime; ++ public int lastDamageByPlayerTime; // Paper - public + protected boolean killed; protected int ticksFarFromPlayer; - protected float aZ; - protected float ba; - protected float bb; - protected float bc; - protected float bd; -- protected int be; -+ protected int be; protected int getKillCount() { return this.be; } // Paper - OBFHELPER + protected float aT; +@@ -85,7 +85,7 @@ public abstract class EntityLiving extends Entity { + protected float aV; + protected float aW; + protected float aX; +- protected int aY; ++ protected int aY; protected int getKillCount() { return this.aY; } // Paper - OBFHELPER public float lastDamage; - protected boolean bg; - public float bh; -@@ -124,6 +124,7 @@ public abstract class EntityLiving extends Entity { + protected boolean jumping; + public float bb; +@@ -128,6 +128,7 @@ public abstract class EntityLiving extends Entity { public boolean collides = true; public boolean canPickUpLoot; public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper @@ -97,19 +90,19 @@ index 6367fdd469..3d1cdd6271 100644 @Override public float getBukkitYaw() { -@@ -1071,13 +1072,17 @@ public abstract class EntityLiving extends Entity { +@@ -1179,13 +1180,17 @@ public abstract class EntityLiving extends Entity { if (this.getHealth() <= 0.0F) { - if (!this.e(damagesource)) { -- SoundEffect soundeffect = this.cs(); + if (!this.f(damagesource)) { +- SoundEffect soundeffect = this.getSoundDeath(); + // Paper start - moved into CraftEventFactory event caller for cancellable death event -+ //SoundEffect soundeffect = this.cs(); ++ //SoundEffect soundeffect = this.getSoundDeath(); - if (flag1 && soundeffect != null) { -- this.a(soundeffect, this.cD(), this.cE()); +- this.a(soundeffect, this.getSoundVolume(), this.cU()); - } + //if (flag1 && soundeffect != null) { -+ // this.a(soundeffect, this.cD(), this.cE()); ++ // this.a(soundeffect, this.getSoundVolume(), this.cU()); + //} + this.silentDeath = !flag1; // mark entity as dying silently + // Paper end @@ -119,97 +112,110 @@ index 6367fdd469..3d1cdd6271 100644 } } else if (flag1) { this.c(damagesource); -@@ -1205,16 +1210,20 @@ public abstract class EntityLiving extends Entity { +@@ -1323,22 +1328,40 @@ public abstract class EntityLiving extends Entity { Entity entity = damagesource.getEntity(); - EntityLiving entityliving = this.cv(); + EntityLiving entityliving = this.getKillingEntity(); -- if (this.be >= 0 && entityliving != null) { -- entityliving.a(this, this.be, damagesource); +- if (this.aY >= 0 && entityliving != null) { +- entityliving.a(this, this.aY, damagesource); - } -+ // Paper start - move down to make death event cancellable -+ //if (this.be >= 0 && entityliving != null) { -+ // entityliving.a(this, this.be, damagesource); -+ //} - +- - if (entity != null) { - entity.b(this); - } +- +- if (this.isSleeping()) { +- this.dy(); +- } +- ++ // Paper start - move down to make death event cancellable ++ //if (this.aY >= 0 && entityliving != null) { ++ // entityliving.a(this, this.aY, damagesource); ++ //} ++ // + //if (entity != null) { + // entity.b(this); + //} - ++ // ++ //if (this.isSleeping()) { ++ // this.dy(); ++ //} ++ // this.killed = true; - this.getCombatTracker().g(); + //this.getCombatTracker().g(); -+ -+ org.bukkit.event.entity.EntityDeathEvent deathEvent = null; -+ // Paper end if (!this.world.isClientSide) { - int i = 0; - -@@ -1227,15 +1236,33 @@ public abstract class EntityLiving extends Entity { - - this.a(flag, i, damagesource); - // CraftBukkit start - Call death event -- CraftEventFactory.callEntityDeathEvent(this, this.drops); -+ deathEvent = CraftEventFactory.callEntityDeathEvent(this, this.drops); // Paper - cancellable death event - this.drops = new ArrayList(); - } else { -- CraftEventFactory.callEntityDeathEvent(this); -+ deathEvent = CraftEventFactory.callEntityDeathEvent(this); // Paper - cancellable death event - // CraftBukkit end - } - } - -- this.world.broadcastEntityEffect(this, (byte) 3); -+ // Paper start - cancellable death event -+ if (deathEvent == null || !deathEvent.isCancelled()) { -+ // triggers and stats got moved down -+ if (this.getKillCount() >= 0 && entityliving != null) { -+ entityliving.runKillTrigger(this, this.getKillCount(), damagesource); +- this.d(damagesource); ++ org.bukkit.event.entity.EntityDeathEvent deathEvent = this.d(damagesource); ++ if (deathEvent == null || deathEvent.isCancelled()) { ++ if (this.getKillCount() >= 0 && entityliving != null) { ++ entityliving.runKillTrigger(this, this.getKillCount(), damagesource); ++ } ++ if (entity != null) { ++ entity.onKill(this); ++ } ++ if (this.isSleeping()) { ++ this.dy(); ++ } ++ this.getCombatTracker().reset(); ++ } else { ++ this.killed = false; ++ this.setHealth((float) deathEvent.getReviveHealth()); + } ++ // Paper end + -+ if (entity != null) { -+ entity.onKill(this); -+ } -+ -+ this.getCombatTracker().reset(); -+ this.setDying(true); -+ this.world.broadcastEntityEffect(this, (byte) 3); -+ } else { -+ this.setDying(false); // Paper - reset if cancelled -+ this.setHealth((float) deathEvent.getReviveHealth()); -+ } -+ // Paper end + boolean flag = false; + + if (entityliving instanceof EntityWither) { +@@ -1365,7 +1388,8 @@ public abstract class EntityLiving extends Entity { } } -@@ -1289,6 +1316,7 @@ public abstract class EntityLiving extends Entity { - return SoundEffects.ENTITY_GENERIC_HURT; +- protected void d(DamageSource damagesource) { ++ protected org.bukkit.event.entity.EntityDeathEvent processDeath(DamageSource damagesource) { return d(damagesource); } ++ protected org.bukkit.event.entity.EntityDeathEvent d(DamageSource damagesource) { // Paper + Entity entity = damagesource.getEntity(); + int i; + +@@ -1376,19 +1400,20 @@ public abstract class EntityLiving extends Entity { + } + + boolean flag = this.lastDamageByPlayerTime > 0; +- ++ org.bukkit.event.entity.EntityDeathEvent deathEvent = null; // Paper + if (this.isDropExperience() && this.world.getGameRules().getBoolean("doMobLoot")) { + this.a(damagesource, flag); + this.dropDeathLoot(damagesource, i, flag); + // CraftBukkit start - Call death event +- CraftEventFactory.callEntityDeathEvent(this, this.drops); +- this.drops = new ArrayList(); ++ deathEvent = CraftEventFactory.callEntityDeathEvent(this, this.drops); // Paper ++ if (!deathEvent.isCancelled()) this.drops = new ArrayList(); // Paper + } else { +- CraftEventFactory.callEntityDeathEvent(this); ++ deathEvent = CraftEventFactory.callEntityDeathEvent(this); // Paper + // CraftBukkit end + } + +- this.cE(); ++ if (!deathEvent.isCancelled()) this.cE(); // Paper ++ return deathEvent; // Paper } -+ @Nullable public SoundEffect getDeathSoundEffect() { return cs();} // Paper - OBFHELPER - @Nullable - protected SoundEffect cs() { - return SoundEffects.ENTITY_GENERIC_DEATH; -@@ -1710,10 +1738,12 @@ public abstract class EntityLiving extends Entity { - - } - -+ public float getDeathSoundVolume() { return cD();} // Paper - OBFHELPER - protected float cD() { + protected void cE() {} +@@ -1895,6 +1920,7 @@ public abstract class EntityLiving extends Entity { return 1.0F; } -+ public float getDeathSoundPitch() { return cE();} // Paper - OBFHELPER - protected float cE() { ++ public float getSoundPitch() { return cU();} // Paper - OBFHELPER + protected float cU() { return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index dc72538de6..62feadc8af 100644 +index 634c30d93..332515128 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -72,6 +72,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -74,6 +74,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public int ping; public boolean viewingCredits; private int containerUpdateDelay; // Paper @@ -220,7 +226,7 @@ index dc72538de6..62feadc8af 100644 // CraftBukkit start public String displayName; -@@ -506,6 +510,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -524,6 +528,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { String deathmessage = defaultMessage.getString(); org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, deathmessage, keepInventory); @@ -236,7 +242,7 @@ index dc72538de6..62feadc8af 100644 // SPIGOT-943 - only call if they have an inventory open if (this.activeContainer != this.defaultContainer) { -@@ -638,8 +651,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -677,8 +690,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } } } @@ -257,10 +263,10 @@ index dc72538de6..62feadc8af 100644 } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java -index 17fab031b4..ee8219e3ba 100644 +index 73cb64e09..9f317ff2e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java -@@ -674,6 +674,22 @@ public enum CraftSound { +@@ -806,6 +806,22 @@ public enum CraftSound { WEATHER_RAIN_ABOVE("weather.rain.above"); private final String minecraftKey; @@ -284,10 +290,10 @@ index 17fab031b4..ee8219e3ba 100644 this.minecraftKey = minecraftKey; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 7a918ea72f..8d32982c53 100644 +index d505af188..5f752784d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1691,7 +1691,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1711,7 +1711,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void sendHealthUpdate() { @@ -305,10 +311,10 @@ index 7a918ea72f..8d32982c53 100644 public void injectScaledMaxHealth(Collection collection, boolean force) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index e76862ef49..68e30185a2 100644 +index 50444ed94..46c05c398 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -600,9 +600,16 @@ public class CraftEventFactory { +@@ -706,9 +706,16 @@ public class CraftEventFactory { public static EntityDeathEvent callEntityDeathEvent(EntityLiving victim, List drops) { CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity(); EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward()); @@ -325,7 +331,7 @@ index e76862ef49..68e30185a2 100644 victim.expToDrop = event.getDroppedExp(); for (org.bukkit.inventory.ItemStack stack : event.getDrops()) { -@@ -618,8 +625,15 @@ public class CraftEventFactory { +@@ -724,8 +731,15 @@ public class CraftEventFactory { CraftPlayer entity = victim.getBukkitEntity(); PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage); event.setKeepInventory(keepInventory); @@ -341,7 +347,7 @@ index e76862ef49..68e30185a2 100644 victim.keepLevel = event.getKeepLevel(); victim.newLevel = event.getNewLevel(); -@@ -640,6 +654,31 @@ public class CraftEventFactory { +@@ -746,6 +760,31 @@ public class CraftEventFactory { return event; } @@ -374,5 +380,5 @@ index e76862ef49..68e30185a2 100644 * Server methods */ -- -2.21.0 +2.20.1 diff --git a/Spigot-Server-Patches/0346-Allow-chests-to-be-placed-with-NBT-data.patch b/Spigot-Server-Patches/0346-Allow-chests-to-be-placed-with-NBT-data.patch index 4f768c0760..ff46e00ea0 100644 --- a/Spigot-Server-Patches/0346-Allow-chests-to-be-placed-with-NBT-data.patch +++ b/Spigot-Server-Patches/0346-Allow-chests-to-be-placed-with-NBT-data.patch @@ -1,4 +1,4 @@ -From d3120098ca824fcf3a86efcd2601976b301f06f8 Mon Sep 17 00:00:00 2001 +From 2434b85e839291d0b8e8a41c0455a1f1eaf62131 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 8 Sep 2018 18:43:31 -0500 Subject: [PATCH] Allow chests to be placed with NBT data diff --git a/Spigot-Server-Patches/0347-Mob-Pathfinding-API.patch b/Spigot-Server-Patches/0347-Mob-Pathfinding-API.patch index 868135a6e2..6cab119abc 100644 --- a/Spigot-Server-Patches/0347-Mob-Pathfinding-API.patch +++ b/Spigot-Server-Patches/0347-Mob-Pathfinding-API.patch @@ -1,4 +1,4 @@ -From ef8f04a7d876a0e7d3c2d86f7e37b83c0ea49347 Mon Sep 17 00:00:00 2001 +From 6645468cad7fa72316b3525dd7b8a65085317dac Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 9 Sep 2018 13:30:00 -0400 Subject: [PATCH] Mob Pathfinding API diff --git a/Spigot-Server-Patches/0348-Prevent-chunk-loading-from-Fluid-Flowing.patch b/Spigot-Server-Patches/0348-Prevent-chunk-loading-from-Fluid-Flowing.patch index d947ddbddf..df2d1babcb 100644 --- a/Spigot-Server-Patches/0348-Prevent-chunk-loading-from-Fluid-Flowing.patch +++ b/Spigot-Server-Patches/0348-Prevent-chunk-loading-from-Fluid-Flowing.patch @@ -1,4 +1,4 @@ -From 1cef982ae001f8da273de56a99ce6c1ef3d1de9a Mon Sep 17 00:00:00 2001 +From 4a85a3d33ce494a5f747f19e585b173cb466b892 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 10 Sep 2018 23:36:16 -0400 Subject: [PATCH] Prevent chunk loading from Fluid Flowing diff --git a/Spigot-Server-Patches/0349-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch b/Spigot-Server-Patches/0349-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch index 64b6912f21..730805e879 100644 --- a/Spigot-Server-Patches/0349-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch +++ b/Spigot-Server-Patches/0349-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch @@ -1,4 +1,4 @@ -From 7e60246a15e8dadda0eaf8c2e4ea5cbb8ee01492 Mon Sep 17 00:00:00 2001 +From 9e027a8f92c1ba05ac21926a6abccceffd528577 Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Wed, 12 Sep 2018 18:53:55 +0300 Subject: [PATCH] Implement an API for CanPlaceOn and CanDestroy NBT values diff --git a/Spigot-Server-Patches/0350-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch b/Spigot-Server-Patches/0350-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch index a4698176ca..d3477c3d57 100644 --- a/Spigot-Server-Patches/0350-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch +++ b/Spigot-Server-Patches/0350-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch @@ -1,4 +1,4 @@ -From e8030d939fc374bbef44bb68ebcaed841c330a7a Mon Sep 17 00:00:00 2001 +From 161ab7a647cd41cd92bbcac2f1ced445043771a2 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 10 Sep 2018 23:56:36 -0400 Subject: [PATCH] Prevent Mob AI Rules from Loading Chunks diff --git a/Spigot-Server-Patches/0351-Prevent-mob-spawning-from-loading-generating-chunks.patch b/Spigot-Server-Patches/0351-Prevent-mob-spawning-from-loading-generating-chunks.patch index e276263ea8..bf85ee33a1 100644 --- a/Spigot-Server-Patches/0351-Prevent-mob-spawning-from-loading-generating-chunks.patch +++ b/Spigot-Server-Patches/0351-Prevent-mob-spawning-from-loading-generating-chunks.patch @@ -1,4 +1,4 @@ -From e84f9798c9de10f7cd0fc3c479c72a6bfbec6b0d Mon Sep 17 00:00:00 2001 +From 51e5d0ca514e9ffc7f247926a95b6b14d263fbda Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 12 Sep 2018 21:12:57 -0400 Subject: [PATCH] Prevent mob spawning from loading/generating chunks diff --git a/Spigot-Server-Patches/0352-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch b/Spigot-Server-Patches/0352-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch index d0f380806d..ca5bce3d22 100644 --- a/Spigot-Server-Patches/0352-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch +++ b/Spigot-Server-Patches/0352-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch @@ -1,4 +1,4 @@ -From 8d39347a9a9836d2df429831bee64bc016e97c67 Mon Sep 17 00:00:00 2001 +From 1f668d899ae49687568d601970c078165abaf3a7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 12 Sep 2018 21:47:01 -0400 Subject: [PATCH] Optimize Biome Mob Lookups for Mob Spawning diff --git a/Spigot-Server-Patches/0354-Implement-furnace-cook-speed-multiplier-API.patch b/Spigot-Server-Patches/0354-Implement-furnace-cook-speed-multiplier-API.patch index c0196d6b31..65d65bdd58 100644 --- a/Spigot-Server-Patches/0354-Implement-furnace-cook-speed-multiplier-API.patch +++ b/Spigot-Server-Patches/0354-Implement-furnace-cook-speed-multiplier-API.patch @@ -1,4 +1,4 @@ -From 79869c22b965698c17bf620cf92b889c075ed027 Mon Sep 17 00:00:00 2001 +From cc661371925e5db06d8e2ec448589b026158e786 Mon Sep 17 00:00:00 2001 From: Tassu Date: Thu, 13 Sep 2018 08:45:21 +0300 Subject: [PATCH] Implement furnace cook speed multiplier API diff --git a/Spigot-Server-Patches/0355-Support-Overriding-World-Seeds.patch b/Spigot-Server-Patches/0355-Support-Overriding-World-Seeds.patch index 904093e05b..48a3974378 100644 --- a/Spigot-Server-Patches/0355-Support-Overriding-World-Seeds.patch +++ b/Spigot-Server-Patches/0355-Support-Overriding-World-Seeds.patch @@ -1,4 +1,4 @@ -From 0a6de7867ec114749ff0cfd6c3c49dcfb14417d5 Mon Sep 17 00:00:00 2001 +From 9dc7c60b583e36eca521c9b2f2249d02757527e7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 17 Sep 2018 23:05:31 -0400 Subject: [PATCH] Support Overriding World Seeds diff --git a/Spigot-Server-Patches/0356-Optimize-Server-World-Map.patch b/Spigot-Server-Patches/0356-Optimize-Server-World-Map.patch index 3d7d134efe..02baa1ae31 100644 --- a/Spigot-Server-Patches/0356-Optimize-Server-World-Map.patch +++ b/Spigot-Server-Patches/0356-Optimize-Server-World-Map.patch @@ -1,4 +1,4 @@ -From cf834d2b80d762e0229edf91987ea48e58767e7e Mon Sep 17 00:00:00 2001 +From 671fc3ee15d2bc2981d459dbd9102019854cf27f Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 17 Sep 2018 23:37:31 -0400 Subject: [PATCH] Optimize Server World Map diff --git a/Spigot-Server-Patches/0357-PreSpawnerSpawnEvent.patch b/Spigot-Server-Patches/0357-PreSpawnerSpawnEvent.patch index c61e43c1f7..6dedbf4afe 100644 --- a/Spigot-Server-Patches/0357-PreSpawnerSpawnEvent.patch +++ b/Spigot-Server-Patches/0357-PreSpawnerSpawnEvent.patch @@ -1,4 +1,4 @@ -From 95706a134f6565e2758e639b360ecfcd7ac9945c Mon Sep 17 00:00:00 2001 +From 35d7db6066c6959469ddd243c50a11c095ee7460 Mon Sep 17 00:00:00 2001 From: Phoenix616 Date: Tue, 18 Sep 2018 23:53:23 +0100 Subject: [PATCH] PreSpawnerSpawnEvent diff --git a/Spigot-Server-Patches/0358-Catch-JsonParseException-in-Entity-and-TE-names.patch b/Spigot-Server-Patches/0358-Catch-JsonParseException-in-Entity-and-TE-names.patch index 412141d86d..74939a238f 100644 --- a/Spigot-Server-Patches/0358-Catch-JsonParseException-in-Entity-and-TE-names.patch +++ b/Spigot-Server-Patches/0358-Catch-JsonParseException-in-Entity-and-TE-names.patch @@ -1,4 +1,4 @@ -From 51378c11a77da24269914f4f1e15d0905b672b82 Mon Sep 17 00:00:00 2001 +From e5eeb481db23231a6285d2c5a467ed942ab37753 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 22 Sep 2018 15:56:59 -0400 Subject: [PATCH] Catch JsonParseException in Entity and TE names @@ -26,10 +26,10 @@ index 4b7aefb7a..9e568d5d1 100644 if (nbttagcompound.hasKeyOfType("TrackOutput", 1)) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 2dfa7d251..98d798abd 100644 +index 03e0e9e26..c9aa5ae16 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1637,7 +1637,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1638,7 +1638,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.setPosition(this.locX, this.locY, this.locZ); this.setYawPitch(this.yaw, this.pitch); if (nbttagcompound.hasKeyOfType("CustomName", 8)) { diff --git a/Spigot-Server-Patches/0359-Avoid-dimension-id-collisions.patch b/Spigot-Server-Patches/0359-Avoid-dimension-id-collisions.patch index d328d18b51..a71794983b 100644 --- a/Spigot-Server-Patches/0359-Avoid-dimension-id-collisions.patch +++ b/Spigot-Server-Patches/0359-Avoid-dimension-id-collisions.patch @@ -1,4 +1,4 @@ -From 2f0f3c789fb42c5ef1b904b0c38919741006640d Mon Sep 17 00:00:00 2001 +From 6f94b19a248156022f89d6c5f31cf44c3320db79 Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Tue, 25 Sep 2018 06:53:43 +0200 Subject: [PATCH] Avoid dimension id collisions diff --git a/Spigot-Server-Patches/0360-Honor-EntityAgeable.ageLock.patch b/Spigot-Server-Patches/0360-Honor-EntityAgeable.ageLock.patch index eb3173ee92..3f9392ac01 100644 --- a/Spigot-Server-Patches/0360-Honor-EntityAgeable.ageLock.patch +++ b/Spigot-Server-Patches/0360-Honor-EntityAgeable.ageLock.patch @@ -1,4 +1,4 @@ -From 8c7a2d6f219fe6cca184f0cb9f363ca5e02980b5 Mon Sep 17 00:00:00 2001 +From 896d92d0fd299a8a6ddd9dfb2c30e100b259e696 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sun, 23 Sep 2018 20:59:53 -0500 Subject: [PATCH] Honor EntityAgeable.ageLock diff --git a/Spigot-Server-Patches/0362-Ignore-Dimension-NBT-field-in-Entity-data.patch b/Spigot-Server-Patches/0362-Ignore-Dimension-NBT-field-in-Entity-data.patch index 8a81943849..473bf5a7f8 100644 --- a/Spigot-Server-Patches/0362-Ignore-Dimension-NBT-field-in-Entity-data.patch +++ b/Spigot-Server-Patches/0362-Ignore-Dimension-NBT-field-in-Entity-data.patch @@ -1,4 +1,4 @@ -From 26828dd84bae00ca74903c8233623d9e19455a23 Mon Sep 17 00:00:00 2001 +From 33dac55b42040a29364c8c5662d3faa1173995b6 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 27 Sep 2018 00:08:31 -0400 Subject: [PATCH] Ignore Dimension NBT field in Entity data @@ -14,10 +14,10 @@ DimensionManager set to the world it is being placed into. This fixes corrupt entities breaking chunk saving in custom worlds. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 98d798abd..f5625fca3 100644 +index c9aa5ae16..464e1d2d9 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1622,7 +1622,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1623,7 +1623,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.setAirTicks(nbttagcompound.getShort("Air")); this.onGround = nbttagcompound.getBoolean("OnGround"); if (nbttagcompound.hasKey("Dimension")) { diff --git a/Spigot-Server-Patches/0365-Don-t-recheck-type-after-setting-a-block.patch b/Spigot-Server-Patches/0365-Don-t-recheck-type-after-setting-a-block.patch index 5abd62fe7f..933ca7e260 100644 --- a/Spigot-Server-Patches/0365-Don-t-recheck-type-after-setting-a-block.patch +++ b/Spigot-Server-Patches/0365-Don-t-recheck-type-after-setting-a-block.patch @@ -1,4 +1,4 @@ -From 353301bbd8a11960f5b06ffa3eec29bb13b13795 Mon Sep 17 00:00:00 2001 +From 4d4c344c62dfec481ac95bfa8bd8cc4eed268968 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 28 Sep 2018 22:27:33 -0400 Subject: [PATCH] Don't recheck type after setting a block diff --git a/Spigot-Server-Patches/0367-Configurable-connection-throttle-kick-message.patch b/Spigot-Server-Patches/0367-Configurable-connection-throttle-kick-message.patch index edcca19f90..191012638e 100644 --- a/Spigot-Server-Patches/0367-Configurable-connection-throttle-kick-message.patch +++ b/Spigot-Server-Patches/0367-Configurable-connection-throttle-kick-message.patch @@ -1,4 +1,4 @@ -From b5948f0b7250322cb54dab6aff82ad1c55a8d779 Mon Sep 17 00:00:00 2001 +From d7b7b457072fcdc2039703724fed4d51d6f1e032 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Tue, 2 Oct 2018 09:57:50 +0100 Subject: [PATCH] Configurable connection throttle kick message diff --git a/Spigot-Server-Patches/0369-Hook-into-CB-plugin-rewrites.patch b/Spigot-Server-Patches/0369-Hook-into-CB-plugin-rewrites.patch index a8d185b311..488c1e190b 100644 --- a/Spigot-Server-Patches/0369-Hook-into-CB-plugin-rewrites.patch +++ b/Spigot-Server-Patches/0369-Hook-into-CB-plugin-rewrites.patch @@ -1,4 +1,4 @@ -From bfbc1f427e79c169269872707cfea2b275a88483 Mon Sep 17 00:00:00 2001 +From 7b3e2236c1a1703ead6a034951603590fdb0eb4b Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 3 Oct 2018 20:09:18 -0400 Subject: [PATCH] Hook into CB plugin rewrites diff --git a/Spigot-Server-Patches/0370-Allow-setting-the-vex-s-summoner.patch b/Spigot-Server-Patches/0370-Allow-setting-the-vex-s-summoner.patch index 2fe1ca4161..7a5cf22976 100644 --- a/Spigot-Server-Patches/0370-Allow-setting-the-vex-s-summoner.patch +++ b/Spigot-Server-Patches/0370-Allow-setting-the-vex-s-summoner.patch @@ -1,4 +1,4 @@ -From 4f0debfaae841ff5458c87e8c16808c54d1ece2e Mon Sep 17 00:00:00 2001 +From d937237c3e6b37fb71749d0648e38acd8cd15c13 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 6 Oct 2018 21:47:44 -0500 Subject: [PATCH] Allow setting the vex's summoner diff --git a/Spigot-Server-Patches/0372-Add-sun-related-API.patch b/Spigot-Server-Patches/0372-Add-sun-related-API.patch index 6ead3b2ee4..1ec95c58d4 100644 --- a/Spigot-Server-Patches/0372-Add-sun-related-API.patch +++ b/Spigot-Server-Patches/0372-Add-sun-related-API.patch @@ -1,4 +1,4 @@ -From 783671ae5df4a62f75c3662231e8e8f473c1594c Mon Sep 17 00:00:00 2001 +From b588ba389f00390b2f1972896804aeea504d07a7 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sun, 7 Oct 2018 00:54:21 -0500 Subject: [PATCH] Add sun related API diff --git a/Spigot-Server-Patches/0373-Check-Drowned-for-Villager-Aggression-Config.patch b/Spigot-Server-Patches/0373-Check-Drowned-for-Villager-Aggression-Config.patch index 41502c79ec..b12e70fdbe 100644 --- a/Spigot-Server-Patches/0373-Check-Drowned-for-Villager-Aggression-Config.patch +++ b/Spigot-Server-Patches/0373-Check-Drowned-for-Villager-Aggression-Config.patch @@ -1,4 +1,4 @@ -From 60e5273939e2db036b46509e51a97f05f7025e61 Mon Sep 17 00:00:00 2001 +From d79f4a77c0c8fab17a1565c668a1f54cb7b1e924 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Wed, 10 Oct 2018 21:22:44 -0500 Subject: [PATCH] Check Drowned for Villager Aggression Config diff --git a/Spigot-Server-Patches/0374-Here-s-Johnny.patch b/Spigot-Server-Patches/0374-Here-s-Johnny.patch index 86461ae7f8..5222ad98f4 100644 --- a/Spigot-Server-Patches/0374-Here-s-Johnny.patch +++ b/Spigot-Server-Patches/0374-Here-s-Johnny.patch @@ -1,4 +1,4 @@ -From 28e15116850717bceba1cd078a32c6519ea3935c Mon Sep 17 00:00:00 2001 +From b59ff4e2634c197677db8abddd8a88ec9aee3216 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 12 Oct 2018 01:37:22 -0500 Subject: [PATCH] Here's Johnny! diff --git a/Spigot-Server-Patches/0375-Turtle-API.patch b/Spigot-Server-Patches/0375-Turtle-API.patch index b60c718424..f37e5b4bef 100644 --- a/Spigot-Server-Patches/0375-Turtle-API.patch +++ b/Spigot-Server-Patches/0375-Turtle-API.patch @@ -1,4 +1,4 @@ -From f545c659cc4dd700d009f0912c5dc71962c930d4 Mon Sep 17 00:00:00 2001 +From 8ca9aa840baa8b73a690492a4e7f8eabbd84459e Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 29 Sep 2018 16:08:23 -0500 Subject: [PATCH] Turtle API diff --git a/Spigot-Server-Patches/0376-Limit-lightning-strike-effect-distance.patch b/Spigot-Server-Patches/0376-Limit-lightning-strike-effect-distance.patch index 646da358f3..215a032923 100644 --- a/Spigot-Server-Patches/0376-Limit-lightning-strike-effect-distance.patch +++ b/Spigot-Server-Patches/0376-Limit-lightning-strike-effect-distance.patch @@ -1,4 +1,4 @@ -From e448b41d1488e3cff3b4bcda8c2d035cabafe69c Mon Sep 17 00:00:00 2001 +From 29e5e87a0972c9cc533998e6e29763b68a59ca90 Mon Sep 17 00:00:00 2001 From: Trigary Date: Fri, 14 Sep 2018 17:42:08 +0200 Subject: [PATCH] Limit lightning strike effect distance diff --git a/Spigot-Server-Patches/0378-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch b/Spigot-Server-Patches/0378-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch index 60e9276d28..586729dfcb 100644 --- a/Spigot-Server-Patches/0378-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch +++ b/Spigot-Server-Patches/0378-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch @@ -1,4 +1,4 @@ -From 6a7b1343bfcd0709f7f0a4ba2e6870809c55a138 Mon Sep 17 00:00:00 2001 +From b531670a0b37bb42392bcde1581b8d327d017e57 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 17 Oct 2018 19:17:27 -0400 Subject: [PATCH] MC-50319: Check other worlds for shooter of projectiles diff --git a/Spigot-Server-Patches/0379-Call-player-spectator-target-events.patch b/Spigot-Server-Patches/0379-Call-player-spectator-target-events.patch index 813cd7b65f..2c3ad5eb9d 100644 --- a/Spigot-Server-Patches/0379-Call-player-spectator-target-events.patch +++ b/Spigot-Server-Patches/0379-Call-player-spectator-target-events.patch @@ -1,11 +1,11 @@ -From 0c13726aeda1ae50653ac107789455a2a9803a5c Mon Sep 17 00:00:00 2001 +From 04b270bf65e102f17b5caed5f4559b0d71b33dac Mon Sep 17 00:00:00 2001 From: Caleb Bassham Date: Fri, 28 Sep 2018 02:32:19 -0500 Subject: [PATCH] Call player spectator target events diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 634c30d93..d34daafda 100644 +index 332515128..8d18c51c9 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -59,7 +59,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -17,7 +17,7 @@ index 634c30d93..d34daafda 100644 public boolean worldChangeInvuln; private boolean cp; private void setHasSeenCredits(boolean has) { this.cp = has; } // Paper - OBFHELPER private final RecipeBookServer recipeBook; -@@ -1525,15 +1525,35 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1547,15 +1547,35 @@ public class EntityPlayer extends EntityHuman implements ICrafting { return (Entity) (this.spectatedEntity == null ? this : this.spectatedEntity); } diff --git a/Spigot-Server-Patches/0380-Add-Velocity-IP-Forwarding-Support.patch b/Spigot-Server-Patches/0380-Add-Velocity-IP-Forwarding-Support.patch index e3e8cf7597..0bdf2b0af2 100644 --- a/Spigot-Server-Patches/0380-Add-Velocity-IP-Forwarding-Support.patch +++ b/Spigot-Server-Patches/0380-Add-Velocity-IP-Forwarding-Support.patch @@ -1,4 +1,4 @@ -From 98329c0298e555bd0b4bc87f00ac49c7bc210d85 Mon Sep 17 00:00:00 2001 +From 8b7d846baf05001d3dc4f47696a5bfad03ffb815 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Mon, 8 Oct 2018 14:36:14 -0400 Subject: [PATCH] Add Velocity IP Forwarding Support diff --git a/Spigot-Server-Patches/0381-Add-more-Witch-API.patch b/Spigot-Server-Patches/0381-Add-more-Witch-API.patch index 156ebd2f01..9996744bf7 100644 --- a/Spigot-Server-Patches/0381-Add-more-Witch-API.patch +++ b/Spigot-Server-Patches/0381-Add-more-Witch-API.patch @@ -1,4 +1,4 @@ -From 00346e25360ac12c7efe575695f6781ef3f9af20 Mon Sep 17 00:00:00 2001 +From 81f186827ee2be062515c87b8479ee7c0b3f815b Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 12 Oct 2018 14:10:46 -0500 Subject: [PATCH] Add more Witch API diff --git a/Spigot-Server-Patches/0382-Fix-MC-93764.patch b/Spigot-Server-Patches/0382-Fix-MC-93764.patch index 3c7f34c675..8138d87d2a 100644 --- a/Spigot-Server-Patches/0382-Fix-MC-93764.patch +++ b/Spigot-Server-Patches/0382-Fix-MC-93764.patch @@ -1,4 +1,4 @@ -From 86e08f09cb0cd4d89a438048bff83a1af9fe398b Mon Sep 17 00:00:00 2001 +From 9e908a08ca6718a04ffe3655804b6458527b8ce4 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 19 Oct 2018 19:38:45 -0500 Subject: [PATCH] Fix MC-93764 diff --git a/Spigot-Server-Patches/0383-Add-option-to-prevent-players-from-moving-into-unloa.patch b/Spigot-Server-Patches/0383-Add-option-to-prevent-players-from-moving-into-unloa.patch index 9ac4c1b740..ba04cfe0a7 100644 --- a/Spigot-Server-Patches/0383-Add-option-to-prevent-players-from-moving-into-unloa.patch +++ b/Spigot-Server-Patches/0383-Add-option-to-prevent-players-from-moving-into-unloa.patch @@ -1,4 +1,4 @@ -From 92cb3409be8524f1e5684352cd18fc5737491707 Mon Sep 17 00:00:00 2001 +From 6a3e3c116ef3c503203adc5a18c85c637f57729c Mon Sep 17 00:00:00 2001 From: Gabriele C Date: Mon, 22 Oct 2018 17:34:10 +0200 Subject: [PATCH] Add option to prevent players from moving into unloaded @@ -6,12 +6,12 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 2a912286b2..61ad2cef7b 100644 +index fb44fccc9..ad793ffa3 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -583,4 +583,9 @@ public class PaperWorldConfig { - replacementBlocks = getList("anti-xray.replacement-blocks", Arrays.asList("stone", "planks")); - log("Anti-Xray: " + (antiXray ? "enabled" : "disabled") + " / Engine Mode: " + engineMode.getDescription() + " / Chunk Edge Mode: " + chunkEdgeMode.getDescription() + " / Up to " + ((maxChunkSectionIndex + 1) * 16) + " blocks / Update Radius: " + updateRadius); +@@ -434,4 +434,9 @@ public class PaperWorldConfig { + this.armorStandTick = this.getBoolean("armor-stands-tick", this.armorStandTick); + log("ArmorStand ticking is " + (this.armorStandTick ? "enabled" : "disabled") + " by default"); } + + public boolean preventMovingIntoUnloadedChunks = false; @@ -20,24 +20,24 @@ index 2a912286b2..61ad2cef7b 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 9a96078004..4705dd2c68 100644 +index e59037211..16a7aba49 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -341,6 +341,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -348,6 +348,13 @@ public class PlayerConnection implements PacketListenerPlayIn { } speed *= 2f; // TODO: Get the speed of the vehicle instead of the player + // Paper start - Prevent moving into unloaded chunks -+ if (player.world.paperConfig.preventMovingIntoUnloadedChunks && !worldserver.isChunkLoaded((int) Math.floor(packetplayinvehiclemove.getX()) >> 4, (int) Math.floor(packetplayinvehiclemove.getZ()) >> 4, false)) { ++ if (player.world.paperConfig.preventMovingIntoUnloadedChunks && !worldserver.isChunkLoaded((int) Math.floor(packetplayinvehiclemove.getX()) >> 4, (int) Math.floor(packetplayinvehiclemove.getZ()) >> 4)) { + this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity)); + return; + } + // Paper end + - if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && (!this.minecraftServer.H() || !this.minecraftServer.G().equals(entity.getDisplayName().getString()))) { + if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isExemptPlayer()) { // CraftBukkit end PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getDisplayName().getString(), this.player.getDisplayName().getString(), d6, d7, d8); -@@ -849,9 +856,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -889,9 +896,9 @@ public class PlayerConnection implements PacketListenerPlayIn { double d1 = this.player.locY; double d2 = this.player.locZ; double d3 = this.player.locY; @@ -49,20 +49,20 @@ index 9a96078004..4705dd2c68 100644 float f = packetplayinflying.a(this.player.yaw); float f1 = packetplayinflying.b(this.player.pitch); double d7 = d4 - this.l; -@@ -891,6 +898,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -931,6 +938,13 @@ public class PlayerConnection implements PacketListenerPlayIn { speed = player.abilities.walkSpeed * 10f; } + // Paper start - Prevent moving into unloaded chunks -+ if (player.world.paperConfig.preventMovingIntoUnloadedChunks && (this.player.locX != toX || this.player.locZ != toZ) && !worldserver.isChunkLoaded((int) Math.floor(toX) >> 4, (int) Math.floor(toZ) >> 4, false)) { ++ if (player.world.paperConfig.preventMovingIntoUnloadedChunks && (this.player.locX != toX || this.player.locZ != toZ) && !worldserver.isChunkLoaded((int) Math.floor(toX) >> 4, (int) Math.floor(toZ) >> 4)) { + this.internalTeleport(this.player.locX, this.player.locY, this.player.locZ, this.player.yaw, this.player.pitch, Collections.emptySet()); + return; + } + // Paper end + - if (!this.player.H() && (!this.player.getWorldServer().getGameRules().getBoolean("disableElytraMovementCheck") || !this.player.dc())) { - float f2 = this.player.dc() ? 300.0F : 100.0F; + if (!this.player.H() && (!this.player.getWorldServer().getGameRules().getBoolean("disableElytraMovementCheck") || !this.player.isGliding())) { + float f2 = this.player.isGliding() ? 300.0F : 100.0F; -- -2.21.0 +2.20.1 diff --git a/Spigot-Server-Patches/0384-Reset-players-airTicks-on-respawn.patch b/Spigot-Server-Patches/0384-Reset-players-airTicks-on-respawn.patch index b513b7c2de..6f83504dcb 100644 --- a/Spigot-Server-Patches/0384-Reset-players-airTicks-on-respawn.patch +++ b/Spigot-Server-Patches/0384-Reset-players-airTicks-on-respawn.patch @@ -1,27 +1,27 @@ -From 80169c2065257040205b6544a51cdb3975c14bdb Mon Sep 17 00:00:00 2001 +From ff8fcdaf3f1adc48192221444997caa6ec33574c Mon Sep 17 00:00:00 2001 From: GreenMeanie Date: Sat, 20 Oct 2018 22:34:02 -0400 Subject: [PATCH] Reset players airTicks on respawn diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index de45e3c7a8..f745ed8fee 100644 +index 464e1d2d9..4bdeba399 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2335,7 +2335,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2253,7 +2253,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } -- public int bf() { -+ public int getMaxAirTicks() { return bf(); } public int bf() { // Paper - OBF HELPER +- public int bo() { ++ public int getMaxAirTicks() { return bo(); } public int bo() { return 300; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index f1b7353cf8..5b1bbc7724 100644 +index 8d18c51c9..c71e4dfbe 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1633,6 +1633,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1835,6 +1835,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } this.setHealth(this.getMaxHealth()); @@ -30,5 +30,5 @@ index f1b7353cf8..5b1bbc7724 100644 this.fallDistance = 0; this.foodData = new FoodMetaData(this); -- -2.21.0 +2.20.1 diff --git a/Spigot-Server-Patches/0385-Strip-private-area-unicode-characters-from-signs.patch b/Spigot-Server-Patches/0385-Strip-private-area-unicode-characters-from-signs.patch index 7e694e4f58..fa89f90717 100644 --- a/Spigot-Server-Patches/0385-Strip-private-area-unicode-characters-from-signs.patch +++ b/Spigot-Server-Patches/0385-Strip-private-area-unicode-characters-from-signs.patch @@ -1,4 +1,4 @@ -From 9cf28103bd677d93deb8ea8a0adf3c095a6e3b73 Mon Sep 17 00:00:00 2001 +From ed6837e75e4cd01666c7a616ef7e2dd087dc6536 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 23 Oct 2018 20:53:43 -0400 Subject: [PATCH] Strip private area unicode characters from signs @@ -20,12 +20,12 @@ think of no reason to use it. Fixes GH-1571 diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java -index 458d1561d0..c2bcbbbab9 100644 +index 9de03a24c..4165c6d11 100644 --- a/src/main/java/net/minecraft/server/TileEntitySign.java +++ b/src/main/java/net/minecraft/server/TileEntitySign.java -@@ -11,6 +11,11 @@ public class TileEntitySign extends TileEntity implements ICommandListener { - private EntityHuman g; - private final String[] h = new String[4]; +@@ -14,6 +14,11 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // + private final String[] k = new String[4]; + private EnumColor l; + // Paper start - Strip invalid unicode from signs on load + private static final boolean keepInvalidUnicode = Boolean.getBoolean("Paper.keepInvalidUnicode"); // Allow people to keep their bad unicode if they really want it @@ -34,11 +34,12 @@ index 458d1561d0..c2bcbbbab9 100644 + public TileEntitySign() { super(TileEntityTypes.SIGN); - } -@@ -30,6 +35,12 @@ public class TileEntitySign extends TileEntity implements ICommandListener { - } + this.l = EnumColor.BLACK; +@@ -36,6 +41,13 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // // CraftBukkit end + nbttagcompound.setString("Color", this.l.b()); ++ + // Paper start - Only remove private area unicode once + if (this.privateUnicodeRemoved) { + nbttagcompound.setBoolean("Paper.RemovedPrivateUnicode", true); @@ -48,9 +49,9 @@ index 458d1561d0..c2bcbbbab9 100644 return nbttagcompound; } -@@ -37,6 +48,11 @@ public class TileEntitySign extends TileEntity implements ICommandListener { - this.isEditable = false; +@@ -45,6 +57,11 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // super.load(nbttagcompound); + this.l = EnumColor.a(nbttagcompound.getString("Color"), EnumColor.BLACK); + // Paper start - Keep track, only do it once per sign + this.privateUnicodeRemoved = nbttagcompound.getBoolean("Paper.RemovedPrivateUnicode"); @@ -60,7 +61,7 @@ index 458d1561d0..c2bcbbbab9 100644 // CraftBukkit start - Add an option to convert signs correctly // This is done with a flag instead of all the time because // we have no way to tell whether a sign is from 1.7.10 or 1.8 -@@ -49,6 +65,19 @@ public class TileEntitySign extends TileEntity implements ICommandListener { +@@ -57,6 +74,19 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // s = "\"\""; } @@ -80,8 +81,8 @@ index 458d1561d0..c2bcbbbab9 100644 try { //IChatBaseComponent ichatbasecomponent = IChatBaseComponent.ChatSerializer.a(s); // Paper - move down - the old format might throw a json error -@@ -75,6 +104,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { - this.h[i] = null; +@@ -83,6 +113,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // + this.k[i] = null; } + if (ranUnicodeRemoval) this.privateUnicodeRemoved = true; // Paper - Flag to write NBT @@ -89,5 +90,5 @@ index 458d1561d0..c2bcbbbab9 100644 public void a(int i, IChatBaseComponent ichatbasecomponent) { -- -2.21.0 +2.20.1 diff --git a/Spigot-Server-Patches/0386-Don-t-sleep-after-profile-lookups-if-not-needed.patch b/Spigot-Server-Patches/0386-Don-t-sleep-after-profile-lookups-if-not-needed.patch index 1de9cc7818..6857ca7653 100644 --- a/Spigot-Server-Patches/0386-Don-t-sleep-after-profile-lookups-if-not-needed.patch +++ b/Spigot-Server-Patches/0386-Don-t-sleep-after-profile-lookups-if-not-needed.patch @@ -1,4 +1,4 @@ -From 36a9e372200a64be4ebbc59acf474aa3e4ac0eff Mon Sep 17 00:00:00 2001 +From 3cfdf00b7cfe3250bc84a34afffaebe84929043e Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 23 Oct 2018 20:25:05 -0400 Subject: [PATCH] Don't sleep after profile lookups if not needed @@ -7,7 +7,7 @@ Mojang was sleeping even if we had no more requests to go after the current one finished, resulting in 100ms lost per profile lookup diff --git a/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java b/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java -index 71e48e87b4..23f1447cfc 100644 +index 71e48e87b..23f1447cf 100644 --- a/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java +++ b/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java @@ -42,6 +42,7 @@ public class YggdrasilGameProfileRepository implements GameProfileRepository { @@ -32,5 +32,5 @@ index 71e48e87b4..23f1447cfc 100644 try { Thread.sleep(DELAY_BETWEEN_PAGES); -- -2.21.0 +2.20.1 diff --git a/Spigot-Server-Patches/0387-Use-more-reasonable-thread-count-default-for-bootstr.patch b/Spigot-Server-Patches/0387-Use-more-reasonable-thread-count-default-for-bootstr.patch index 50b4d30c5f..9d58d956bf 100644 --- a/Spigot-Server-Patches/0387-Use-more-reasonable-thread-count-default-for-bootstr.patch +++ b/Spigot-Server-Patches/0387-Use-more-reasonable-thread-count-default-for-bootstr.patch @@ -1,22 +1,22 @@ -From 1a60b5dbb30c2608e2af7833c00aa29dbb141e20 Mon Sep 17 00:00:00 2001 +From 47c19a59b47215cd29d1789020aa626fa841c681 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 23 Oct 2018 23:14:38 -0400 Subject: [PATCH] Use more reasonable thread count default for bootstrap -diff --git a/src/main/java/net/minecraft/server/DataConverterRegistry.java b/src/main/java/net/minecraft/server/DataConverterRegistry.java -index ee40bccf63..db9af361d6 100644 ---- a/src/main/java/net/minecraft/server/DataConverterRegistry.java -+++ b/src/main/java/net/minecraft/server/DataConverterRegistry.java -@@ -21,7 +21,7 @@ public class DataConverterRegistry { +diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java +index 706040212..d5d8f7eb8 100644 +--- a/src/main/java/net/minecraft/server/SystemUtils.java ++++ b/src/main/java/net/minecraft/server/SystemUtils.java +@@ -66,7 +66,7 @@ public class SystemUtils { + } - a(datafixerbuilder); - // CraftBukkit start -- ForkJoinPool pool = new ForkJoinPool(Integer.getInteger("net.minecraft.server.DataConverterRegistry.bootstrapThreads", Math.min(Runtime.getRuntime().availableProcessors(), 2))); -+ ForkJoinPool pool = new ForkJoinPool(Integer.getInteger("net.minecraft.server.DataConverterRegistry.bootstrapThreads", Math.min(6, Math.max(Runtime.getRuntime().availableProcessors() - 2, 2)))); // Paper - use more reasonable default - 2 is hard minimum to avoid using unlimited threads - DataFixer fixer = datafixerbuilder.build(pool); - pool.shutdown(); - return fixer; + private static ExecutorService k() { +- int i = MathHelper.clamp(Runtime.getRuntime().availableProcessors() - 1, 1, 7); ++ int i = Math.min(6, Math.max(Runtime.getRuntime().availableProcessors() - 2, 2)); // Paper - use more reasonable default - 2 is hard minimum to avoid using unlimited threads + Object object; + + if (i <= 0) { -- -2.21.0 +2.20.1 diff --git a/Spigot-Server-Patches/0389-MC-136865-Use-valid-item-for-enchantment-checks-on-b.patch b/Spigot-Server-Patches/0389-MC-136865-Use-valid-item-for-enchantment-checks-on-b.patch index 5bf4fbb30c..004e2786ce 100644 --- a/Spigot-Server-Patches/0389-MC-136865-Use-valid-item-for-enchantment-checks-on-b.patch +++ b/Spigot-Server-Patches/0389-MC-136865-Use-valid-item-for-enchantment-checks-on-b.patch @@ -1,4 +1,4 @@ -From 20db885a920ddae1dc283c0c906b2b226739ae89 Mon Sep 17 00:00:00 2001 +From d158145e22e63dcaf1eec50e93de0a9a8b81f2b3 Mon Sep 17 00:00:00 2001 From: MisterVector Date: Thu, 1 Nov 2018 14:50:05 -0700 Subject: [PATCH] MC-136865: Use valid item for enchantment checks on block @@ -13,10 +13,10 @@ keep the clone of the item used to a non empty value so it represents the item used. diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index 22378b6bc8..5e595b62e5 100644 +index f692da609..5bc8bd7cd 100644 --- a/src/main/java/net/minecraft/server/PlayerInteractManager.java +++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java -@@ -380,10 +380,11 @@ public class PlayerInteractManager { +@@ -354,10 +354,11 @@ public class PlayerInteractManager { ItemStack itemstack1 = this.player.getItemInMainHand(); boolean flag1 = this.player.hasBlock(iblockdata); @@ -30,5 +30,5 @@ index 22378b6bc8..5e595b62e5 100644 iblockdata.getBlock().a(this.world, this.player, blockposition, iblockdata, tileentity, itemstack2); } -- -2.21.0 +2.20.1 diff --git a/Spigot-Server-Patches/0390-Optimize-World-Time-Updates.patch b/Spigot-Server-Patches/0390-Optimize-World-Time-Updates.patch index c606533e44..9adefcb739 100644 --- a/Spigot-Server-Patches/0390-Optimize-World-Time-Updates.patch +++ b/Spigot-Server-Patches/0390-Optimize-World-Time-Updates.patch @@ -1,4 +1,4 @@ -From 42871ad2d0b7b9bd4d5ecfafc8b03e532384ff11 Mon Sep 17 00:00:00 2001 +From 5cf3baddf895999083a82dc77734d0298d5d542a Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 2 Nov 2018 23:11:51 -0400 Subject: [PATCH] Optimize World Time Updates @@ -8,12 +8,12 @@ the updates per world, so that we can re-use the same packet object for every player unless they have per-player time enabled. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 236fbafeb5..ce39ea09e8 100644 +index e6054dddb..e90cf0629 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1033,12 +1033,24 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati +@@ -1101,12 +1101,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Mon, 5 Nov 2018 04:23:51 +0000 Subject: [PATCH] Restore custom InventoryHolder support @@ -17,10 +17,10 @@ will always work as intended in the past, those without will create implementati based inventories. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java -index 23389743d5..d25928e094 100644 +index 9957ed040..ae280dd40 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java -@@ -31,10 +31,20 @@ public final class CraftInventoryCreator { +@@ -39,10 +39,20 @@ public final class CraftInventoryCreator { } public Inventory createInventory(InventoryHolder holder, InventoryType type) { @@ -42,5 +42,5 @@ index 23389743d5..d25928e094 100644 } -- -2.21.0 +2.20.1 diff --git a/Spigot-Server-Patches/0392-Use-Vanilla-Minecart-Speeds.patch b/Spigot-Server-Patches/0392-Use-Vanilla-Minecart-Speeds.patch index 1454758673..22ed6496d1 100644 --- a/Spigot-Server-Patches/0392-Use-Vanilla-Minecart-Speeds.patch +++ b/Spigot-Server-Patches/0392-Use-Vanilla-Minecart-Speeds.patch @@ -1,4 +1,4 @@ -From f84c15041538210bd0cde5c8296beb9d207518ce Mon Sep 17 00:00:00 2001 +From 47c534c81bcd0b82efbafdff594dbee5e5c2547e Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 8 Nov 2018 21:33:09 -0500 Subject: [PATCH] Use Vanilla Minecart Speeds @@ -6,10 +6,10 @@ Subject: [PATCH] Use Vanilla Minecart Speeds CraftBukkit changed the values on flying speed, restore back to vanilla diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java -index 0f531e7d42..8e773edc54 100644 +index 6fc332dbf..828a8711d 100644 --- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java +++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java -@@ -37,9 +37,9 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT +@@ -35,9 +35,9 @@ public abstract class EntityMinecartAbstract extends Entity { private double derailedX = 0.5; private double derailedY = 0.5; private double derailedZ = 0.5; @@ -23,5 +23,5 @@ index 0f531e7d42..8e773edc54 100644 // CraftBukkit end -- -2.21.0 +2.20.1 diff --git a/Spigot-Server-Patches/0393-Fix-SpongeAbsortEvent-handling.patch b/Spigot-Server-Patches/0393-Fix-SpongeAbsortEvent-handling.patch index 6fd3c58fbf..f6be49d75c 100644 --- a/Spigot-Server-Patches/0393-Fix-SpongeAbsortEvent-handling.patch +++ b/Spigot-Server-Patches/0393-Fix-SpongeAbsortEvent-handling.patch @@ -1,44 +1,41 @@ -From ce9234ee5d3532f7e454a0033d4420c8cdbd6f6c Mon Sep 17 00:00:00 2001 +From 8f317e9ad1d4711329821c5c254cf41e31d3a86b Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sat, 10 Nov 2018 05:15:21 +0000 Subject: [PATCH] Fix SpongeAbsortEvent handling Only process drops when the block is actually going to be removed +diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java +index 549c50de7..5e6609944 100644 +--- a/src/main/java/net/minecraft/server/Block.java ++++ b/src/main/java/net/minecraft/server/Block.java +@@ -465,7 +465,7 @@ public class Block implements IMaterial { + + iblockdata.dropNaturally(world, blockposition, ItemStack.a); + } +- ++ public static void dropNaturally(IBlockData iblockdata, World world, BlockPosition blockposition, @Nullable TileEntity tileentity) { a(iblockdata, world, blockposition, tileentity); } + public static void a(IBlockData iblockdata, World world, BlockPosition blockposition, @Nullable TileEntity tileentity) { + if (world instanceof WorldServer) { + a(iblockdata, (WorldServer) world, blockposition, tileentity).forEach((itemstack) -> { diff --git a/src/main/java/net/minecraft/server/BlockSponge.java b/src/main/java/net/minecraft/server/BlockSponge.java -index cbc8e8d139..cda6f2b732 100644 +index 4e281ce6d..6a64af71b 100644 --- a/src/main/java/net/minecraft/server/BlockSponge.java +++ b/src/main/java/net/minecraft/server/BlockSponge.java -@@ -106,7 +106,11 @@ public class BlockSponge extends Block { - } else if (iblockdata.getBlock() instanceof BlockFluids) { +@@ -113,8 +113,11 @@ public class BlockSponge extends Block { // NOP } else if (material == Material.WATER_PLANT || material == Material.REPLACEABLE_WATER_PLANT) { -- iblockdata.a(world, blockposition2, 0); + TileEntity tileentity = iblockdata.getBlock().isTileEntity() ? world.getTileEntity(blockposition2) : null; +- +- a(iblockdata, world, blockposition2, tileentity); + // Paper start + if (block.getHandle().getMaterial() == Material.AIR) { -+ iblockdata.dropNaturally(world, blockposition2, 0); ++ dropNaturally(iblockdata, world, blockposition2, tileentity); + } + // Paper end } } world.setTypeAndData(blockposition2, block.getHandle(), block.getFlag()); -@@ -117,3 +121,4 @@ public class BlockSponge extends Block { - return i > 0; - } - } -+ -diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java -index 08a5acb0ac..aa3547690a 100644 ---- a/src/main/java/net/minecraft/server/IBlockData.java -+++ b/src/main/java/net/minecraft/server/IBlockData.java -@@ -236,6 +236,7 @@ public interface IBlockData extends IBlockDataHolder { - this.getBlock().a(this, world, blockposition, entity); - } - -+ default void dropNaturally(World world, BlockPosition blockPosition, int i) { a(world, blockPosition, i);} // Paper - OBFHELPER - default void a(World world, BlockPosition blockposition, int i) { - this.dropNaturally(world, blockposition, 1.0F, i); - } -- -2.21.0 +2.20.1 diff --git a/Spigot-Server-Patches/0394-Don-t-allow-digging-into-unloaded-chunks.patch b/Spigot-Server-Patches/0394-Don-t-allow-digging-into-unloaded-chunks.patch index 34d64b3a6a..8a929868e4 100644 --- a/Spigot-Server-Patches/0394-Don-t-allow-digging-into-unloaded-chunks.patch +++ b/Spigot-Server-Patches/0394-Don-t-allow-digging-into-unloaded-chunks.patch @@ -1,14 +1,14 @@ -From c9b3d48edee5c67f2d1af7bd247e6ec5b634446f Mon Sep 17 00:00:00 2001 +From 14f33763163441956bf08dd3414a25d0f222afe3 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 11 Nov 2018 21:01:09 +0000 Subject: [PATCH] Don't allow digging into unloaded chunks diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 4705dd2c68..0467a8feab 100644 +index 16a7aba49..8d2b02894 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1207,6 +1207,11 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1246,6 +1246,11 @@ public class PlayerConnection implements PacketListenerPlayIn { case START_DESTROY_BLOCK: case ABORT_DESTROY_BLOCK: case STOP_DESTROY_BLOCK: @@ -21,5 +21,5 @@ index 4705dd2c68..0467a8feab 100644 double d1 = this.player.locY - ((double) blockposition.getY() + 0.5D) + 1.5D; double d2 = this.player.locZ - ((double) blockposition.getZ() + 0.5D); -- -2.21.0 +2.20.1 diff --git a/Spigot-Server-Patches/0395-Optimize-redstone-algorithm.patch b/Spigot-Server-Patches/0395-Optimize-redstone-algorithm.patch index 08411d286c..365e097df7 100644 --- a/Spigot-Server-Patches/0395-Optimize-redstone-algorithm.patch +++ b/Spigot-Server-Patches/0395-Optimize-redstone-algorithm.patch @@ -1,4 +1,4 @@ -From 6e73e08568141499f1c97c1574d249495b32a2cf Mon Sep 17 00:00:00 2001 +From 666bfc88b5bd606367c2be958ccffd57c0b25300 Mon Sep 17 00:00:00 2001 From: theosib Date: Thu, 27 Sep 2018 01:43:35 -0600 Subject: [PATCH] Optimize redstone algorithm @@ -19,10 +19,10 @@ Aside from making the obvious class/function renames and obfhelpers I didn't nee Just added Bukkit's event system and took a few liberties with dead code and comment misspellings. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 61ad2cef7b..a70a64070e 100644 +index ad793ffa3..ef882b897 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -588,4 +588,14 @@ public class PaperWorldConfig { +@@ -439,4 +439,14 @@ public class PaperWorldConfig { private void preventMovingIntoUnloadedChunks() { preventMovingIntoUnloadedChunks = getBoolean("prevent-moving-into-unloaded-chunks", false); } @@ -39,7 +39,7 @@ index 61ad2cef7b..a70a64070e 100644 } diff --git a/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java new file mode 100644 -index 0000000000..21d9d6d7ed +index 000000000..21d9d6d7e --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java @@ -0,0 +1,910 @@ @@ -954,7 +954,7 @@ index 0000000000..21d9d6d7ed + } +} diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java -index 2e30270bb7..72d2617071 100644 +index da903f74b..f8dfc91f2 100644 --- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java +++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java @@ -1,5 +1,7 @@ @@ -966,18 +966,18 @@ index 2e30270bb7..72d2617071 100644 import com.google.common.collect.Lists; import com.google.common.collect.Maps; @@ -22,7 +24,10 @@ public class BlockRedstoneWire extends Block { - public static final BlockStateInteger POWER = BlockProperties.al; - public static final Map> q = Maps.newEnumMap(ImmutableMap.of(EnumDirection.NORTH, BlockRedstoneWire.NORTH, EnumDirection.EAST, BlockRedstoneWire.EAST, EnumDirection.SOUTH, BlockRedstoneWire.SOUTH, EnumDirection.WEST, BlockRedstoneWire.WEST)); - protected static final VoxelShape[] r = new VoxelShape[] { Block.a(3.0D, 0.0D, 3.0D, 13.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 3.0D, 13.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 3.0D, 13.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 3.0D, 13.0D, 1.0D, 16.0D), Block.a(3.0D, 0.0D, 0.0D, 13.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 0.0D, 13.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 0.0D, 13.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 0.0D, 13.0D, 1.0D, 16.0D), Block.a(3.0D, 0.0D, 3.0D, 16.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 3.0D, 16.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 3.0D, 16.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 3.0D, 16.0D, 1.0D, 16.0D), Block.a(3.0D, 0.0D, 0.0D, 16.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 0.0D, 16.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 0.0D, 16.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 0.0D, 16.0D, 1.0D, 16.0D)}; -+ public boolean canProvidePower() { return this.s; } // Paper - OBFHELPER -+ public void setCanProvidePower(boolean value) { this.s = value; } // Paper - OBFHELPER - private boolean s = true; -+ private Set getBlocksNeedingUpdate() { return this.t; } // Paper - OBFHELPER - private final Set t = Sets.newHashSet(); + public static final BlockStateInteger POWER = BlockProperties.as; + public static final Map> f = Maps.newEnumMap(ImmutableMap.of(EnumDirection.NORTH, BlockRedstoneWire.NORTH, EnumDirection.EAST, BlockRedstoneWire.EAST, EnumDirection.SOUTH, BlockRedstoneWire.SOUTH, EnumDirection.WEST, BlockRedstoneWire.WEST)); + protected static final VoxelShape[] g = new VoxelShape[] { Block.a(3.0D, 0.0D, 3.0D, 13.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 3.0D, 13.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 3.0D, 13.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 3.0D, 13.0D, 1.0D, 16.0D), Block.a(3.0D, 0.0D, 0.0D, 13.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 0.0D, 13.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 0.0D, 13.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 0.0D, 13.0D, 1.0D, 16.0D), Block.a(3.0D, 0.0D, 3.0D, 16.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 3.0D, 16.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 3.0D, 16.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 3.0D, 16.0D, 1.0D, 16.0D), Block.a(3.0D, 0.0D, 0.0D, 16.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 0.0D, 16.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 0.0D, 16.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 0.0D, 16.0D, 1.0D, 16.0D)}; ++ public boolean canProvidePower() { return this.h; } // Paper - OBFHELPER ++ public void setCanProvidePower(boolean value) { this.h = value; } // Paper - OBFHELPER + private boolean h = true; ++ private Set getBlocksNeedingUpdate() { return this.i; } // Paper - OBFHELPER + private final Set i = Sets.newHashSet(); public BlockRedstoneWire(Block.Info block_info) { -@@ -154,6 +159,117 @@ public class BlockRedstoneWire extends Block { - return iblockdata1.q() || iblockdata1.getBlock() == Blocks.GLOWSTONE; +@@ -157,6 +162,117 @@ public class BlockRedstoneWire extends Block { + return Block.d(iblockdata1, iworldreader, blockposition1, EnumDirection.UP) || iblockdata1.getBlock() == Blocks.HOPPER; } + // Paper start - Optimize redstone @@ -1093,17 +1093,17 @@ index 2e30270bb7..72d2617071 100644 + // Paper end private IBlockData a(World world, BlockPosition blockposition, IBlockData iblockdata) { iblockdata = this.b(world, blockposition, iblockdata); - List list = Lists.newArrayList(this.t); -@@ -264,7 +380,7 @@ public class BlockRedstoneWire extends Block { - - public void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1) { + List list = Lists.newArrayList(this.i); +@@ -255,7 +371,7 @@ public class BlockRedstoneWire extends Block { + @Override + public void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag) { if (iblockdata1.getBlock() != iblockdata.getBlock() && !world.isClientSide) { - this.a(world, blockposition, iblockdata); + this.updateSurroundingRedstone(world, blockposition, iblockdata, null); // Paper - Optimize redstone Iterator iterator = EnumDirection.EnumDirectionLimit.VERTICAL.iterator(); EnumDirection enumdirection; -@@ -310,7 +426,7 @@ public class BlockRedstoneWire extends Block { +@@ -302,7 +418,7 @@ public class BlockRedstoneWire extends Block { world.applyPhysics(blockposition.shift(enumdirection), this); } @@ -1112,20 +1112,20 @@ index 2e30270bb7..72d2617071 100644 Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator(); EnumDirection enumdirection1; -@@ -350,7 +466,7 @@ public class BlockRedstoneWire extends Block { - public void doPhysics(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, BlockPosition blockposition1) { +@@ -343,7 +459,7 @@ public class BlockRedstoneWire extends Block { + public void doPhysics(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, BlockPosition blockposition1, boolean flag) { if (!world.isClientSide) { if (iblockdata.canPlace(world, blockposition)) { - this.a(world, blockposition, iblockdata); + this.updateSurroundingRedstone(world, blockposition, iblockdata, blockposition1); // Paper - Optimize redstone } else { - iblockdata.a(world, blockposition, 0); - world.setAir(blockposition); + c(iblockdata, world, blockposition); + world.a(blockposition, false); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 027bb64acc..645af17a58 100644 +index c917c39b9..17401ea28 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -648,6 +648,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -545,6 +545,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose } @@ -1133,14 +1133,14 @@ index 027bb64acc..645af17a58 100644 public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) { if (!this.isClientSide) { IBlockData iblockdata = this.getType(blockposition); -@@ -2593,6 +2594,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc +@@ -1306,6 +1307,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose return this.getBlockFacePower(blockposition.down(), EnumDirection.DOWN) > 0 ? true : (this.getBlockFacePower(blockposition.up(), EnumDirection.UP) > 0 ? true : (this.getBlockFacePower(blockposition.north(), EnumDirection.NORTH) > 0 ? true : (this.getBlockFacePower(blockposition.south(), EnumDirection.SOUTH) > 0 ? true : (this.getBlockFacePower(blockposition.west(), EnumDirection.WEST) > 0 ? true : this.getBlockFacePower(blockposition.east(), EnumDirection.EAST) > 0)))); } -+ public int isBlockIndirectlyGettingPowered(BlockPosition pos) { return u(pos); } // Paper - OBFHELPER - public int u(BlockPosition blockposition) { ++ public int isBlockIndirectlyGettingPowered(BlockPosition pos) { return r(pos); } // Paper - OBFHELPER + public int r(BlockPosition blockposition) { int i = 0; EnumDirection[] aenumdirection = World.a; -- -2.21.0 +2.20.1 diff --git a/Spigot-Server-Patches/0396-force-entity-dismount-during-teleportation.patch b/Spigot-Server-Patches/0396-force-entity-dismount-during-teleportation.patch index 1f4c47f467..111bbe10aa 100644 --- a/Spigot-Server-Patches/0396-force-entity-dismount-during-teleportation.patch +++ b/Spigot-Server-Patches/0396-force-entity-dismount-during-teleportation.patch @@ -1,4 +1,4 @@ -From e5b4fd7a68006fa22e4d6efea4893026f03e284e Mon Sep 17 00:00:00 2001 +From cba797992e47d77d2fa6ba776d3bead0800c43cd Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Thu, 15 Nov 2018 13:38:37 +0000 Subject: [PATCH] force entity dismount during teleportation @@ -20,10 +20,10 @@ this is going to be the best soultion all around. Improvements/suggestions welcome! diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index f745ed8fee..a678dc89c8 100644 +index 4bdeba399..dec531ab7 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2097,12 +2097,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1981,12 +1981,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } @@ -41,7 +41,7 @@ index f745ed8fee..a678dc89c8 100644 } } -@@ -2147,7 +2150,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2037,7 +2040,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return true; // CraftBukkit } @@ -53,7 +53,7 @@ index f745ed8fee..a678dc89c8 100644 if (entity.getVehicle() == this) { throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)"); } else { -@@ -2157,7 +2163,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2047,7 +2053,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) { VehicleExitEvent event = new VehicleExitEvent( (Vehicle) getBukkitEntity(), @@ -62,7 +62,7 @@ index f745ed8fee..a678dc89c8 100644 ); Bukkit.getPluginManager().callEvent(event); CraftEntity craftn = (CraftEntity) entity.getBukkitEntity().getVehicle(); -@@ -2168,7 +2174,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2058,7 +2064,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // CraftBukkit end // Spigot start @@ -72,56 +72,59 @@ index f745ed8fee..a678dc89c8 100644 if (event.isCancelled()) { return false; diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 4bbf577523..f5d9b4abc2 100644 +index f17c1c54b..e811a2917 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -991,8 +991,11 @@ public abstract class EntityHuman extends EntityLiving { +@@ -937,9 +937,11 @@ public abstract class EntityHuman extends EntityLiving { return -0.35D; } +- @Override - public void stopRiding() { - super.stopRiding(); + // Paper start -+ public void stopRiding() { stopRiding(false); } -+ public void stopRiding(boolean suppressCancellation) { -+ // Paper end ++ @Override public void stopRiding() { stopRiding(false); } ++ @Override public void stopRiding(boolean suppressCancellation) { ++ // Paper end + super.stopRiding(suppressCancellation); // Paper - suppress - this.k = 0; + this.j = 0; } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 14f1029687..4d5459d24f 100644 +index bd8385cd5..868b44a4b 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2479,10 +2479,13 @@ public abstract class EntityLiving extends Entity { - return ((Byte) this.datawatcher.get(EntityLiving.aw) & 4) != 0; +@@ -2659,11 +2659,13 @@ public abstract class EntityLiving extends Entity { + return ((Byte) this.datawatcher.get(EntityLiving.ar) & 4) != 0; } +- @Override - public void stopRiding() { + // Paper start -+ public void stopRiding() { stopRiding(false); } -+ public void stopRiding(boolean suppressCancellation) { ++ @Override public void stopRiding() { stopRiding(false); } ++ @Override public void stopRiding(boolean suppressCancellation) { + // Paper end Entity entity = this.getVehicle(); - super.stopRiding(); + super.stopRiding(suppressCancellation); // Paper - suppress if (entity != null && entity != this.getVehicle() && !this.world.isClientSide) { - this.A(entity); + this.B(entity); } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 5b1bbc7724..57c6455bd8 100644 +index c71e4dfbe..71ad35f71 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -784,10 +784,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -981,11 +981,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } } +- @Override - public void stopRiding() { + // Paper start -+ public void stopRiding() { stopRiding(false); } -+ public void stopRiding(boolean suppressCancellation) { -+ // paper end ++ @Override public void stopRiding() { stopRiding(false); } ++ @Override public void stopRiding(boolean suppressCancellation) { ++ // paper end Entity entity = this.getVehicle(); - super.stopRiding(); @@ -130,5 +133,5 @@ index 5b1bbc7724..57c6455bd8 100644 if (entity1 != entity && this.playerConnection != null) { -- -2.21.0 +2.20.1 diff --git a/Spigot-Server-Patches/0397-Book-Size-Limits.patch b/Spigot-Server-Patches/0397-Book-Size-Limits.patch index 58ff880c4a..ad4c3b08ef 100644 --- a/Spigot-Server-Patches/0397-Book-Size-Limits.patch +++ b/Spigot-Server-Patches/0397-Book-Size-Limits.patch @@ -1,4 +1,4 @@ -From e2d85e74d938a2486d48169b69af45ffb70eb811 Mon Sep 17 00:00:00 2001 +From da0362d759be7bd323ea133f351c5de56dafccce Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 16 Nov 2018 23:08:50 -0500 Subject: [PATCH] Book Size Limits @@ -6,10 +6,10 @@ Subject: [PATCH] Book Size Limits Puts some limits on the size of books. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index cac79686d8..c5b8354fa7 100644 +index ee282cb35..3d6101c4d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -449,4 +449,11 @@ public class PaperConfig { +@@ -372,4 +372,11 @@ public class PaperConfig { velocitySecretKey = secret.getBytes(StandardCharsets.UTF_8); } } @@ -22,21 +22,20 @@ index cac79686d8..c5b8354fa7 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 0467a8feab..5c041c48fa 100644 +index 8d2b02894..15fb7ed60 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -12,6 +12,8 @@ import java.util.Collections; - import java.util.Iterator; +@@ -14,6 +14,7 @@ import java.util.Iterator; + import java.util.Optional; import java.util.Set; import javax.annotation.Nullable; -+ +import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -@@ -748,6 +750,42 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { - } +@@ -784,6 +785,42 @@ public class PlayerConnection implements PacketListenerPlayIn { + @Override public void a(PacketPlayInBEdit packetplayinbedit) { + // Paper start + ItemStack testStack = packetplayinbedit.b(); @@ -78,5 +77,5 @@ index 0467a8feab..5c041c48fa 100644 PlayerConnectionUtils.ensureMainThread(packetplayinbedit, this, this.player.getWorldServer()); if (this.lastBookTick + 20 > MinecraftServer.currentTick) { -- -2.21.0 +2.20.1 diff --git a/Spigot-Server-Patches/0398-Make-the-default-permission-message-configurable.patch b/Spigot-Server-Patches/0398-Make-the-default-permission-message-configurable.patch index a773d1b250..1dcb4658cd 100644 --- a/Spigot-Server-Patches/0398-Make-the-default-permission-message-configurable.patch +++ b/Spigot-Server-Patches/0398-Make-the-default-permission-message-configurable.patch @@ -1,11 +1,11 @@ -From b9b889e4ac8118cc7aaeba6c4dd296f767002436 Mon Sep 17 00:00:00 2001 +From b1cb08688d24eb143d7b026617267c6d063d88c1 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 18 Nov 2018 19:49:56 +0000 Subject: [PATCH] Make the default permission message configurable diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index c5b8354fa7..9f240c35d6 100644 +index 3d6101c4d..010d2a796 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -21,6 +21,7 @@ import java.util.regex.Pattern; @@ -16,7 +16,7 @@ index c5b8354fa7..9f240c35d6 100644 import org.bukkit.command.Command; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.InvalidConfigurationException; -@@ -302,6 +303,11 @@ public class PaperConfig { +@@ -278,6 +279,11 @@ public class PaperConfig { connectionThrottleKickMessage = getString("messages.kick.connection-throttle", connectionThrottleKickMessage); } @@ -29,20 +29,21 @@ index c5b8354fa7..9f240c35d6 100644 private static void savePlayerData() { savePlayerData = getBoolean("settings.save-player-data", savePlayerData); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index af065bd705..9c5b79920f 100644 +index 15756014a..b05d7b0e8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2188,6 +2188,10 @@ public final class CraftServer implements Server { +@@ -2118,6 +2118,11 @@ public final class CraftServer implements Server { return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions; } ++ @Override + public String getPermissionMessage() { + return com.destroystokyo.paper.PaperConfig.noPermissionMessage; + } + + @Override public com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nonnull UUID uuid) { return createProfile(uuid, null); - } -- -2.21.0 +2.20.1 diff --git a/Spigot-Server-Patches/0399-Add-more-Zombie-API.patch b/Spigot-Server-Patches/0399-Add-more-Zombie-API.patch index 66eae07361..da67d3f178 100644 --- a/Spigot-Server-Patches/0399-Add-more-Zombie-API.patch +++ b/Spigot-Server-Patches/0399-Add-more-Zombie-API.patch @@ -1,33 +1,22 @@ -From 71f4a80d0a3fa035ed1bee5c0539f65f0a4b9639 Mon Sep 17 00:00:00 2001 +From 690ee0b9cbb926fcb9509eb8877402930a77a9d4 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sun, 7 Oct 2018 04:29:59 -0500 Subject: [PATCH] Add more Zombie API diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 81cc0c3b33..24bc3e0f08 100644 +index 92d1cd851..f8baaea03 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java -@@ -21,8 +21,8 @@ public class EntityZombie extends EntityMonster { - private final AttributeModifier babyModifier = new AttributeModifier(EntityZombie.a, "Baby speed boost", world.paperConfig.babyZombieMovementSpeed, 1); // Paper - Remove static - Make baby speed configurable - private static final DataWatcherObject bC = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); - private static final DataWatcherObject bD = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b); -- private static final DataWatcherObject bE = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); -- public static final DataWatcherObject DROWN_CONVERTING = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); -+ private static final DataWatcherObject bE = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); private static final DataWatcherObject armsRaised = bE; // Paper - OBFHELPER -+ public static final DataWatcherObject DROWN_CONVERTING = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); private static final DataWatcherObject drowning = DROWN_CONVERTING; // Paper - OBFHELPER - private final PathfinderGoalBreakDoor bG; - private boolean bH; - private int bI; -@@ -30,6 +30,7 @@ public class EntityZombie extends EntityMonster { - private float bK; - private float bL; +@@ -31,6 +31,7 @@ public class EntityZombie extends EntityMonster { + private int bF; + public int drownedConversionTime; private int lastTick = MinecraftServer.currentTick; // CraftBukkit - add field + private boolean shouldBurnInDay = true; // Paper - public EntityZombie(EntityTypes entitytypes, World world) { + public EntityZombie(EntityTypes entitytypes, World world) { super(entitytypes, world); -@@ -78,14 +79,22 @@ public class EntityZombie extends EntityMonster { +@@ -78,6 +79,7 @@ public class EntityZombie extends EntityMonster { this.getDataWatcher().register(EntityZombie.DROWN_CONVERTING, false); } @@ -35,43 +24,28 @@ index 81cc0c3b33..24bc3e0f08 100644 public boolean isDrownConverting() { return (Boolean) this.getDataWatcher().get(EntityZombie.DROWN_CONVERTING); } - -+ public void setArmsRaised(boolean raised) { s(raised); } // Paper - OBFHELPER - public void s(boolean flag) { - this.getDataWatcher().set(EntityZombie.bE, flag); - } - -+ // Paper start -+ public boolean isArmsRaised() { -+ return ((Boolean) this.getDataWatcher().get(EntityZombie.armsRaised)).booleanValue(); -+ } -+ // Paper end -+ - public boolean dH() { - return this.bH; - } -@@ -207,6 +216,13 @@ public class EntityZombie extends EntityMonster { +@@ -209,6 +211,13 @@ public class EntityZombie extends EntityMonster { this.getDataWatcher().set(EntityZombie.DROWN_CONVERTING, true); } + // Paper start + public void stopDrowning() { + this.drownedConversionTime = -1; -+ this.getDataWatcher().set(EntityZombie.drowning, Boolean.valueOf(false)); ++ this.getDataWatcher().set(EntityZombie.DROWN_CONVERTING, false); + } + // Paper end + - protected void dE() { - this.a((EntityZombie) EntityTypes.DROWNED.create(world)); // Paper + protected void eb() { + this.b(EntityTypes.DROWNED); this.world.a((EntityHuman) null, 1040, new BlockPosition((int) this.locX, (int) this.locY, (int) this.locZ), 0); -@@ -245,10 +261,17 @@ public class EntityZombie extends EntityMonster { +@@ -253,10 +262,17 @@ public class EntityZombie extends EntityMonster { } } -+ public boolean shouldBurnInDay() { return L_(); } // Paper - OBFHELPER - protected boolean L_() { ++ public boolean shouldBurnInDay() { return J_(); } // Paper - OBFHELPER + protected boolean J_() { - return true; -+ return shouldBurnInDay; // Paper ++ return shouldBurnInDay; } + // Paper start @@ -80,18 +54,18 @@ index 81cc0c3b33..24bc3e0f08 100644 + } + // Paper end + + @Override public boolean damageEntity(DamageSource damagesource, float f) { if (super.damageEntity(damagesource, f)) { - EntityLiving entityliving = this.getGoalTarget(); -@@ -361,6 +384,7 @@ public class EntityZombie extends EntityMonster { - nbttagcompound.setBoolean("CanBreakDoors", this.dH()); - nbttagcompound.setInt("InWaterTime", this.isInWater() ? this.bI : -1); +@@ -374,6 +390,7 @@ public class EntityZombie extends EntityMonster { + nbttagcompound.setBoolean("CanBreakDoors", this.ef()); + nbttagcompound.setInt("InWaterTime", this.isInWater() ? this.bF : -1); nbttagcompound.setInt("DrownedConversionTime", this.isDrownConverting() ? this.drownedConversionTime : -1); + nbttagcompound.setBoolean("Paper.ShouldBurnInDay", shouldBurnInDay); // Paper } - public void a(NBTTagCompound nbttagcompound) { -@@ -374,7 +398,11 @@ public class EntityZombie extends EntityMonster { + @Override +@@ -388,7 +405,11 @@ public class EntityZombie extends EntityMonster { if (nbttagcompound.hasKeyOfType("DrownedConversionTime", 99) && nbttagcompound.getInt("DrownedConversionTime") > -1) { this.startDrownedConversion(nbttagcompound.getInt("DrownedConversionTime")); } @@ -103,12 +77,12 @@ index 81cc0c3b33..24bc3e0f08 100644 + // Paper end } - public void b(EntityLiving entityliving) { + @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java -index e93ecb076b..c516d34759 100644 +index c28ccd0d9..442befba8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java -@@ -77,4 +77,34 @@ public class CraftZombie extends CraftMonster implements Zombie { +@@ -76,4 +76,26 @@ public class CraftZombie extends CraftMonster implements Zombie { getHandle().startDrownedConversion(time); } } @@ -126,14 +100,6 @@ index e93ecb076b..c516d34759 100644 + getHandle().stopDrowning(); + } + -+ public void setArmsRaised(boolean raised) { -+ getHandle().setArmsRaised(raised); -+ } -+ -+ public boolean isArmsRaised() { -+ return getHandle().isArmsRaised(); -+ } -+ + public boolean shouldBurnInDay() { + return getHandle().shouldBurnInDay(); + } @@ -144,5 +110,5 @@ index e93ecb076b..c516d34759 100644 + // Paper end } -- -2.21.0 +2.20.1