Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: yesdog/Paper
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.3
Choose a base ref
...
head repository: yesdog/Paper
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 16 commits
  • 108 files changed
  • 9 contributors

Commits on May 15, 2019

  1. Remove leftover line from spigots tick limiters

    Looking over the code, this appears to be one "high risk but hopefully
    unlikely that plugins are causing this to break", this line is however
    redundant leftovers from spigots tick limiter patch, which should be
    doing nothing as-is.
    electronicboy committed May 15, 2019
    Copy the full SHA
    17fe7a1 View commit details

Commits on May 26, 2019

  1. Copy the full SHA
    07762fc View commit details

Commits on May 30, 2019

  1. Copy the full SHA
    3c6f469 View commit details
  2. Merge pull request PaperMC#2105 from mikroskeem/fix-velocity-connecti…

    …on-throttle
    
    Set connection thottle to -1 when Velocity IP forwarding is enabled
    kashike authored May 30, 2019
    Copy the full SHA
    217a746 View commit details

Commits on Jun 3, 2019

  1. Copy the full SHA
    268b076 View commit details

Commits on Jun 10, 2019

  1. Copy the full SHA
    a0a6ab1 View commit details

Commits on Jun 12, 2019

  1. Updated Upstream (CraftBukkit)

    Upstream has released updates that appears to apply and compile correctly.
    This update has not been tested by PaperMC and as with ANY update, please do your own testing
    
    CraftBukkit Changes:
    84f3da35 SPIGOT-5054: Prevent issue with invalid hanging entities
    dfa7583f SPIGOT-4734: Sign placement fails when looking at grass
    electronicboy committed Jun 12, 2019
    Copy the full SHA
    df9c322 View commit details

Commits on Jun 15, 2019

  1. Copy the full SHA
    6e5c731 View commit details
  2. Merge pull request PaperMC#2184 from darbyjack/master

    Fixed 1.13 not properly firing the PreCreatureSpawnEvent (credit to Wiz)
    kashike authored Jun 15, 2019
    Copy the full SHA
    601fcb8 View commit details

Commits on Jun 22, 2019

  1. Only write to cached header in RegionFile if write potentially succee…

    …ds (PaperMC#2212)
    
    * Only write to cached header in RegionFile if write potentially succeeds
    
    * Fail write if timestamp update fails
    
    This way timestamps should be consistent with their actual last write.
    
    * Simply order the time write before the chunk write
    
    otherwise we end up with an invalid offset on disk, it's better
    to have an invalid timestamp
    Spottedleaf authored and zachbr committed Jun 22, 2019
    Copy the full SHA
    35e71bb View commit details

Commits on Jun 24, 2019

  1. Anti-Xray improvements (PaperMC#2227)

    Spottedleaf authored and zachbr committed Jun 24, 2019
    Copy the full SHA
    725081b View commit details

Commits on Jun 25, 2019

  1. Copy the full SHA
    1b59bbb View commit details
  2. Copy the full SHA
    4180819 View commit details
  3. Copy the full SHA
    d1d195e View commit details
  4. yesdog changes

    colinrgodsey committed Jun 25, 2019
    Copy the full SHA
    44ac4b1 View commit details
  5. Merge pull request #3 from WesleyVanNeck/master

    upstream
    colinrgodsey authored Jun 25, 2019
    Copy the full SHA
    7ade850 View commit details
Showing with 964 additions and 481 deletions.
  1. +6 −1 README.md
  2. +5 −5 Spigot-Server-Patches/0004-MC-Utils.patch
  3. +7 −6 Spigot-Server-Patches/0041-Disable-spigot-tick-limiters.patch
  4. +14 −14 Spigot-Server-Patches/0056-Add-exception-reporting-event.patch
  5. +4 −4 Spigot-Server-Patches/0067-Handle-Item-Meta-Inconsistencies.patch
  6. +9 −9 Spigot-Server-Patches/0080-Optimize-isValidLocation-getType-and-getBlockData-fo.patch
  7. +3 −3 Spigot-Server-Patches/0094-Configurable-Keep-Spawn-Loaded-range-per-world.patch
  8. +4 −4 Spigot-Server-Patches/0096-Don-t-spam-reload-spawn-chunks-in-nether-end.patch
  9. +7 −7 Spigot-Server-Patches/0100-Remove-unused-World-Tile-Entity-List.patch
  10. +11 −11 Spigot-Server-Patches/0123-Delay-Chunk-Unloads-based-on-Player-Movement.patch
  11. +3 −3 Spigot-Server-Patches/0135-Chunk-registration-fixes.patch
  12. +3 −3 Spigot-Server-Patches/0197-Fix-MC-117075-TE-Unload-Lag-Spike.patch
  13. +5 −5 Spigot-Server-Patches/0223-PreCreatureSpawnEvent.patch
  14. +3 −3 Spigot-Server-Patches/0260-ItemStack-getMaxItemUseDuration.patch
  15. +5 −5 Spigot-Server-Patches/0279-Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch
  16. +4 −4 Spigot-Server-Patches/0297-Option-to-prevent-armor-stands-from-doing-entity-loo.patch
  17. +6 −6 Spigot-Server-Patches/0298-Vanished-players-don-t-have-rights.patch
  18. +7 −7 Spigot-Server-Patches/0307-Ignore-Dead-Entities-in-entityList-iteration.patch
  19. +5 −5 Spigot-Server-Patches/0312-World-EntityHuman-Lookup-Optimizations.patch
  20. +5 −5 Spigot-Server-Patches/0318-Entity-add-to-world-fixes.patch
  21. +3 −3 Spigot-Server-Patches/0331-Optimize-Hoppers.patch
  22. +12 −5 Spigot-Server-Patches/0335-Anti-Xray.patch
  23. +5 −5 Spigot-Server-Patches/0341-Optimize-getChunkIfLoaded-type-calls.patch
  24. +4 −4 Spigot-Server-Patches/0363-Optimize-Light-Recalculations.patch
  25. +3 −3 Spigot-Server-Patches/0364-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch
  26. +0 −33 Spigot-Server-Patches/0365-Don-t-recheck-type-after-setting-a-block.patch
  27. +2 −2 ...erver-Patches/{0366-Fix-Sending-Chunks-to-Client.patch → 0365-Fix-Sending-Chunks-to-Client.patch}
  28. +1 −1 ...onnection-throttle-kick-message.patch → 0366-Configurable-connection-throttle-kick-message.patch}
  29. +1 −1 ...{0368-Fix-FileIOThread-concurrency-issues.patch → 0367-Fix-FileIOThread-concurrency-issues.patch}
  30. +1 −1 ...erver-Patches/{0369-Hook-into-CB-plugin-rewrites.patch → 0368-Hook-into-CB-plugin-rewrites.patch}
  31. +1 −1 ...tches/{0370-Allow-setting-the-vex-s-summoner.patch → 0369-Allow-setting-the-vex-s-summoner.patch}
  32. +1 −1 ...tches/{0371-Add-LivingEntity-getTargetEntity.patch → 0370-Add-LivingEntity-getTargetEntity.patch}
  33. +2 −2 Spigot-Server-Patches/{0372-Add-sun-related-API.patch → 0371-Add-sun-related-API.patch}
  34. +1 −1 ...d-for-Villager-Aggression-Config.patch → 0372-Check-Drowned-for-Villager-Aggression-Config.patch}
  35. +1 −1 Spigot-Server-Patches/{0374-Here-s-Johnny.patch → 0373-Here-s-Johnny.patch}
  36. +1 −1 Spigot-Server-Patches/{0375-Turtle-API.patch → 0374-Turtle-API.patch}
  37. +1 −1 ...Limit-lightning-strike-effect-distance.patch → 0375-Limit-lightning-strike-effect-distance.patch}
  38. +1 −1 ...s-for-EntityItem-owner-a.patch → 0376-Implement-getters-and-setters-for-EntityItem-owner-a.patch}
  39. +1 −1 ...for-shooter-of-projectil.patch → 0377-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch}
  40. +1 −1 ...{0379-Call-player-spectator-target-events.patch → 0378-Call-player-spectator-target-events.patch}
  41. +21 −8 ...s/{0380-Add-Velocity-IP-Forwarding-Support.patch → 0379-Add-Velocity-IP-Forwarding-Support.patch}
  42. +1 −1 Spigot-Server-Patches/{0381-Add-more-Witch-API.patch → 0380-Add-more-Witch-API.patch}
  43. +1 −1 Spigot-Server-Patches/{0382-Fix-MC-93764.patch → 0381-Fix-MC-93764.patch}
  44. +1 −1 ...s-from-moving-into-unloa.patch → 0382-Add-option-to-prevent-players-from-moving-into-unloa.patch}
  45. +1 −1 ...hes/{0384-Reset-players-airTicks-on-respawn.patch → 0383-Reset-players-airTicks-on-respawn.patch}
  46. +1 −1 ...nicode-characters-from-signs.patch → 0384-Strip-private-area-unicode-characters-from-signs.patch}
  47. +15 −15 ...profile-lookups-if-not-needed.patch → 0385-Don-t-sleep-after-profile-lookups-if-not-needed.patch}
  48. +1 −1 ...ount-default-for-bootstr.patch → 0386-Use-more-reasonable-thread-count-default-for-bootstr.patch}
  49. +1 −1 ...{0388-Use-EntityTypes-for-living-entities.patch → 0387-Use-EntityTypes-for-living-entities.patch}
  50. +1 −1 ...-enchantment-checks-on-b.patch → 0388-MC-136865-Use-valid-item-for-enchantment-checks-on-b.patch}
  51. +1 −1 ...-Server-Patches/{0390-Optimize-World-Time-Updates.patch → 0389-Optimize-World-Time-Updates.patch}
  52. +1 −1 ...Restore-custom-InventoryHolder-support.patch → 0390-Restore-custom-InventoryHolder-support.patch}
  53. +1 −1 ...-Server-Patches/{0392-Use-Vanilla-Minecart-Speeds.patch → 0391-Use-Vanilla-Minecart-Speeds.patch}
  54. +1 −1 ...r-Patches/{0393-Fix-SpongeAbsortEvent-handling.patch → 0392-Fix-SpongeAbsortEvent-handling.patch}
  55. +1 −1 ...t-allow-digging-into-unloaded-chunks.patch → 0393-Don-t-allow-digging-into-unloaded-chunks.patch}
  56. +3 −3 ...-Server-Patches/{0395-Optimize-redstone-algorithm.patch → 0394-Optimize-redstone-algorithm.patch}
  57. +1 −1 ...tity-dismount-during-teleportation.patch → 0395-force-entity-dismount-during-teleportation.patch}
  58. +1 −1 Spigot-Server-Patches/{0397-Book-Size-Limits.patch → 0396-Book-Size-Limits.patch}
  59. +1 −1 ...mission-message-configurable.patch → 0397-Make-the-default-permission-message-configurable.patch}
  60. +1 −1 Spigot-Server-Patches/{0399-Add-more-Zombie-API.patch → 0398-Add-more-Zombie-API.patch}
  61. +3 −3 ...ll-consider-an-attackabl.patch → 0399-limit-the-range-at-which-we-ll-consider-an-attackabl.patch}
  62. +2 −2 ...401-Prevent-rayTrace-from-loading-chunks.patch → 0400-Prevent-rayTrace-from-loading-chunks.patch}
  63. +1 −1 ...-Large-Packets-disconnecting-client.patch → 0401-Handle-Large-Packets-disconnecting-client.patch}
  64. +1 −1 ...d-storage-in-CraftOfflinePlayer.patch → 0402-Lazy-init-world-storage-in-CraftOfflinePlayer.patch}
  65. +1 −1 ...r-Patches/{0404-Add-PlayerConnectionCloseEvent.patch → 0403-Add-PlayerConnectionCloseEvent.patch}
  66. +1 −1 ...405-Prevent-Enderman-from-loading-chunks.patch → 0404-Prevent-Enderman-from-loading-chunks.patch}
  67. +1 −1 ...e-OfflinePlayer-getLastPlayed.patch → 0405-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch}
  68. +1 −1 Spigot-Server-Patches/{0407-Fix-PlayerEditBookEvent.patch → 0406-Fix-PlayerEditBookEvent.patch}
  69. +1 −1 ...cking-issue-on-disconnect.patch → 0407-Workaround-for-vehicle-tracking-issue-on-disconnect.patch}
  70. +1 −1 ...vent-for-all-empty-pistons.patch → 0408-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch}
  71. +1 −1 ...from-being-called-on-Players.patch → 0409-Block-Entity-remove-from-being-called-on-Players.patch}
  72. +1 −1 ...tches/{0411-Allow-Saving-of-Oversized-Chunks.patch → 0410-Allow-Saving-of-Oversized-Chunks.patch}
  73. +2 −2 Spigot-Server-Patches/{0412-BlockDestroyEvent.patch → 0411-BlockDestroyEvent.patch}
  74. +1 −1 ...hapeless-Custom-Crafting-Recipes.patch → 0412-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch}
  75. +1 −1 Spigot-Server-Patches/{0414-Fix-sign-edit-memory-leak.patch → 0413-Fix-sign-edit-memory-leak.patch}
  76. +1 −1 ...ver-Patches/{0415-Limit-Client-Sign-length-more.patch → 0414-Limit-Client-Sign-length-more.patch}
  77. +1 −1 ...igns-boolean-every-sign-save.patch → 0415-Don-t-check-ConvertSigns-boolean-every-sign-save.patch}
  78. +4 −4 ...x-Whitelist-On-Off-inconsistency.patch → 0416-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch}
  79. +0 −89 Spigot-Server-Patches/0417-Handle-Excessive-Signs-in-Chunks-creating-too-large-.patch
  80. +3 −3 ...t-start-of-drowning-process.patch → 0417-Set-Zombie-last-tick-at-start-of-drowning-process.patch}
  81. +3 −3 ...when-whitelist-is-toggled.patch → 0418-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch}
  82. +3 −3 ...erialising-BungeeCord-te.patch → 0419-Use-proper-max-length-when-serialising-BungeeCord-te.patch}
  83. +8 −8 ...-Server-Patches/{0422-Entity-getEntitySpawnReason.patch → 0420-Entity-getEntitySpawnReason.patch}
  84. +4 −4 ...obs-towards-natural-spaw.patch → 0421-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch}
  85. +3 −3 ...tadata-for-all-tracked-players.patch → 0422-Update-entity-Metadata-for-all-tracked-players.patch}
  86. +5 −5 Spigot-Server-Patches/{0425-Fire-event-on-GS4-query.patch → 0423-Fire-event-on-GS4-query.patch}
  87. +3 −3 ...tches/{0426-Implement-PlayerPostRespawnEvent.patch → 0424-Implement-PlayerPostRespawnEvent.patch}
  88. +3 −3 ...elay-breaks-picking-up-i.patch → 0425-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch}
  89. +3 −3 ...-for-worlds-without-play.patch → 0426-Don-t-update-entity-trackers-for-worlds-without-play.patch}
  90. +3 −3 Spigot-Server-Patches/{0429-Server-Tick-Events.patch → 0427-Server-Tick-Events.patch}
  91. +3 −3 ...Patches/{0430-PlayerDeathEvent-getItemsToKeep.patch → 0428-PlayerDeathEvent-getItemsToKeep.patch}
  92. +4 −4 ...tches/{0431-Optimize-Persistent-Data-Loading.patch → 0429-Optimize-Persistent-Data-Loading.patch}
  93. +4 −4 ...nly-after-the-server-plu.patch → 0430-Allow-login-events-to-fire-only-after-the-server-plu.patch}
  94. +19 −10 ...n-files-more-reliable-to-write-to.patch → 0431-Make-region-files-more-reliable-to-write-to.patch}
  95. +4 −4 ...timize-GameRules-to-use-LinkedHashMap.patch → 0432-Optimize-GameRules-to-use-LinkedHashMap.patch}
  96. +4 −4 ...{0435-Optimize-Captured-TileEntity-Lookup.patch → 0433-Optimize-Captured-TileEntity-Lookup.patch}
  97. +4 −4 Spigot-Server-Patches/{0436-Add-Heightmap-API.patch → 0434-Add-Heightmap-API.patch}
  98. +3 −3 ...hes/{0437-Handle-bad-chunks-more-gracefully.patch → 0435-Handle-bad-chunks-more-gracefully.patch}
  99. +4 −4 ...erver-Patches/{0439-Mob-Spawner-API-Enhancements.patch → 0436-Mob-Spawner-API-Enhancements.patch}
  100. +3 −3 ...don-t-NPE-on-dimensionmanager-toString.patch → 0437-don-t-NPE-on-dimensionmanager-toString.patch}
  101. +0 −55 Spigot-Server-Patches/0438-Fix-NPE-from-sign-placement.patch
  102. +4 −4 ...mes-are-modified-MC-123450.patch → 0438-Fix-sounds-when-item-frames-are-modified-MC-123450.patch}
  103. +27 −0 Spigot-Server-Patches/0439-Catch-exceptions-from-dispenser-entity-spawns.patch
  104. +26 −0 Spigot-Server-Patches/0440-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch
  105. +58 −0 Spigot-Server-Patches/0441-YESDOG-stair-collision-for-pe-fix.patch
  106. +514 −0 Spigot-Server-Patches/0442-YESDOG-alternate-mob-spawning-mechanic.patch
  107. +1 −1 work/CraftBukkit
  108. +1 −1 work/Paperclip
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
Paper [![Build Status](https://papermc.io/ci/job/Paper/badge/icon)](https://papermc.io/ci/job/Paper/)
Yesdog Paper [![Build Status](https://travis-ci.org/yesdog/Paper.svg?branch=master)](https://travis-ci.org/yesdog/Paper)
===========

High performance Spigot fork that aims to fix gameplay and mechanics inconsistencies.

Yesdog Additions:
* PE stairs/slab/snow collision fix.
* Alternate mob spawn mechanics.
* Remove sign patch for now


**Support and Project Discussion:**
- [IRC](http://irc.spi.gt/iris/?channels=paper) or [Discord](https://discord.gg/jETyjUw)
10 changes: 5 additions & 5 deletions Spigot-Server-Patches/0004-MC-Utils.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From acf9c715648075076c1438814a611103748ec3a0 Mon Sep 17 00:00:00 2001
From 92fe4db1e3d4ad1435ad12587ccf2af74c0a515d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 20:55:47 -0400
Subject: [PATCH] MC Utils
@@ -277,7 +277,7 @@ index b8abd6363f..a07ee150c2 100644
// Paper end
}
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index 9e763b6e39..a7fc148591 100644
index 3e9621aea2..6a85fecb79 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -36,10 +36,19 @@ import org.bukkit.event.world.StructureGrowEvent;
@@ -301,7 +301,7 @@ index 9e763b6e39..a7fc148591 100644
@Deprecated
private Item item;
private NBTTagCompound tag;
@@ -590,6 +599,17 @@ public final class ItemStack {
@@ -593,6 +602,17 @@ public final class ItemStack {
return this.tag != null ? this.tag.getList("Enchantments", 10) : new NBTTagList();
}

@@ -319,15 +319,15 @@ index 9e763b6e39..a7fc148591 100644
public void setTag(@Nullable NBTTagCompound nbttagcompound) {
this.tag = nbttagcompound;
}
@@ -674,6 +694,7 @@ public final class ItemStack {
@@ -677,6 +697,7 @@ public final class ItemStack {
return this.tag != null && this.tag.hasKeyOfType("Enchantments", 9) ? !this.tag.getList("Enchantments", 10).isEmpty() : false;
}

+ public void getOrCreateTagAndSet(String s, NBTBase nbtbase) { a(s, nbtbase);} // Paper - OBFHELPER
public void a(String s, NBTBase nbtbase) {
this.getOrCreateTag().set(s, nbtbase);
}
@@ -747,6 +768,7 @@ public final class ItemStack {
@@ -750,6 +771,7 @@ public final class ItemStack {
// CraftBukkit start
@Deprecated
public void setItem(Item item) {
13 changes: 7 additions & 6 deletions Spigot-Server-Patches/0041-Disable-spigot-tick-limiters.patch
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
From 66294924c12de6f6629939c1f80582f443480e83 Mon Sep 17 00:00:00 2001
From bd7b275c123243666ca49a450f3b5e2146f2fedd Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Wed, 2 Mar 2016 23:45:17 -0600
Subject: [PATCH] Disable spigot tick limiters


diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 5788ec6f6..5ff06d247 100644
index 20990cbfd..3012580e8 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1124,10 +1124,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@@ -1124,11 +1124,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
// CraftBukkit start - Use field for loop variable
co.aikar.timings.TimingHistory.entityTicks += this.entityList.size(); // Paper
int entitiesThisCycle = 0;
- if (tickPosition < 0) tickPosition = 0;
- for (entityLimiter.initTick();
- entitiesThisCycle < entityList.size() && (entitiesThisCycle % 10 != 0 || entityLimiter.shouldContinue());
- tickPosition++, entitiesThisCycle++) {
- tickPosition = (tickPosition < entityList.size()) ? tickPosition : 0;
+ // Paper start - Disable tick limiters
+ //if (tickPosition < 0) tickPosition = 0;
+ for (tickPosition = 0; tickPosition < entityList.size(); tickPosition++) {
+ // Paper end
tickPosition = (tickPosition < entityList.size()) ? tickPosition : 0;
entity = (Entity) this.entityList.get(this.tickPosition);
// CraftBukkit end
@@ -1191,9 +1191,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
Entity entity1 = entity.getVehicle();
@@ -1191,9 +1190,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
// Spigot start
// Iterator iterator = this.tileEntityListTick.iterator();
int tilesThisCycle = 0;
@@ -35,5 +36,5 @@ index 5788ec6f6..5ff06d247 100644
TileEntity tileentity = (TileEntity) this.tileEntityListTick.get(tileTickPosition);
// Spigot start
--
2.20.1
2.21.0

28 changes: 14 additions & 14 deletions Spigot-Server-Patches/0056-Add-exception-reporting-event.patch
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
From 0f1c8615e262b38dcdde638ce67cf87eaa8175bb Mon Sep 17 00:00:00 2001
From d617197c2a04fee2ea3d2884bf00f3a2e5cb609c Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 03:15:41 -0600
Subject: [PATCH] Add exception reporting event


diff --git a/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java
new file mode 100644
index 0000000000..f699ce18ca
index 000000000..f699ce18c
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java
@@ -0,0 +1,38 @@
@@ -49,7 +49,7 @@ index 0000000000..f699ce18ca
+ }
+}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index cb56d067b9..67cd4af4f5 100644
index cb56d067b..67cd4af4f 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -1,5 +1,6 @@
@@ -88,7 +88,7 @@ index cb56d067b9..67cd4af4f5 100644
}
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index c2ecc034e8..1ed7c7e2c9 100644
index c2ecc034e..1ed7c7e2c 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -13,6 +13,7 @@ import java.util.concurrent.CompletableFuture;
@@ -119,7 +119,7 @@ index c2ecc034e8..1ed7c7e2c9 100644

}
diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
index 09ef8729d9..bf67dbf54a 100644
index 09ef8729d..bf67dbf54 100644
--- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
+++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
@@ -1,5 +1,6 @@
@@ -146,7 +146,7 @@ index 09ef8729d9..bf67dbf54a 100644
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index ab151a14d0..0f1c74dd33 100644
index ab151a14d..0f1c74dd3 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -1,5 +1,6 @@
@@ -173,7 +173,7 @@ index ab151a14d0..0f1c74dd33 100644

}
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
index c5ca896919..e507a996f1 100644
index c5ca89691..e507a996f 100644
--- a/src/main/java/net/minecraft/server/RegionFileCache.java
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java
@@ -1,5 +1,6 @@
@@ -192,7 +192,7 @@ index c5ca896919..e507a996f1 100644
}

diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index 6720a9648e..2aa0db5c22 100644
index 6720a9648..2aa0db5c2 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -10,6 +10,7 @@ import org.apache.logging.log4j.LogManager;
@@ -220,7 +220,7 @@ index 6720a9648e..2aa0db5c22 100644
}

diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java
index 58122b18eb..0ac1fb53a4 100644
index 58122b18e..0ac1fb53a 100644
--- a/src/main/java/net/minecraft/server/VillageSiege.java
+++ b/src/main/java/net/minecraft/server/VillageSiege.java
@@ -1,5 +1,7 @@
@@ -240,7 +240,7 @@ index 58122b18eb..0ac1fb53a4 100644
}

diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 09cf98ccdd..6e7c0c9da4 100644
index e6539846b..3714017cc 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1,6 +1,8 @@
@@ -252,7 +252,7 @@ index 09cf98ccdd..6e7c0c9da4 100644
import com.google.common.base.MoreObjects;
import com.google.common.collect.Lists;
import it.unimi.dsi.fastutil.longs.LongSet;
@@ -1151,8 +1153,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@@ -1150,8 +1152,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
} catch (Throwable throwable1) {
entity.tickTimer.stopTiming();
// Paper start - Prevent tile entity and entity crashes
@@ -264,7 +264,7 @@ index 09cf98ccdd..6e7c0c9da4 100644
entity.dead = true;
continue;
// Paper end
@@ -1217,8 +1221,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@@ -1216,8 +1220,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
this.methodProfiler.exit();
} catch (Throwable throwable2) {
// Paper start - Prevent tile entity and entity crashes
@@ -277,7 +277,7 @@ index 09cf98ccdd..6e7c0c9da4 100644
this.tileEntityListTick.remove(tileTickPosition--);
continue;
diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java
index 478bf49976..8d51af2867 100644
index 478bf4997..8d51af286 100644
--- a/src/main/java/net/minecraft/server/WorldPersistentData.java
+++ b/src/main/java/net/minecraft/server/WorldPersistentData.java
@@ -138,6 +138,7 @@ public class WorldPersistentData {
@@ -289,7 +289,7 @@ index 478bf49976..8d51af2867 100644
throw throwable1;
} finally {
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index d75cc42e11..0e9d5fe3a7 100644
index d75cc42e1..0e9d5fe3a 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -17,6 +17,9 @@ import java.util.function.Consumer;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 08653afb00866b63ce45e73d12eac4be100fe9f9 Mon Sep 17 00:00:00 2001
From c66fe6923ac746798de73d909fe6c62d8352bd06 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 28 May 2015 23:00:19 -0400
Subject: [PATCH] Handle Item Meta Inconsistencies
@@ -18,7 +18,7 @@ For consistency, the old API methods now forward to use the
ItemMeta API equivalents, and should deprecate the old API's.

diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index a7fc148591..37d37f1f64 100644
index 6a85fecb79..d8a5a78bdf 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -7,6 +7,8 @@ import com.mojang.brigadier.StringReader;
@@ -61,15 +61,15 @@ index a7fc148591..37d37f1f64 100644
this.getItem().a(this.tag);
// CraftBukkit end
}
@@ -612,6 +631,7 @@ public final class ItemStack {
@@ -615,6 +634,7 @@ public final class ItemStack {
// Paper end
public void setTag(@Nullable NBTTagCompound nbttagcompound) {
this.tag = nbttagcompound;
+ processEnchantOrder(this.tag); // Paper
}

public IChatBaseComponent getName() {
@@ -688,6 +708,7 @@ public final class ItemStack {
@@ -691,6 +711,7 @@ public final class ItemStack {
nbttagcompound.setString("id", String.valueOf(IRegistry.ENCHANTMENT.getKey(enchantment)));
nbttagcompound.setShort("lvl", (short) ((byte) i));
nbttaglist.add((NBTBase) nbttagcompound);
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From e97a654e918381c5b2eb07cf6d632fb55c457fa6 Mon Sep 17 00:00:00 2001
From c494d0736329d1bb4be277151e34a0bfe64b3341 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 02:07:55 -0600
Subject: [PATCH] Optimize isValidLocation, getType and getBlockData for inling
@@ -12,7 +12,7 @@ Replace all calls to the new place to the unnecessary forward.
Optimize getType and getBlockData to manually inline and optimize the calls

diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
index 5843ef65af..4c7793f86d 100644
index 5843ef65a..4c7793f86 100644
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
@@ -10,6 +10,14 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
@@ -31,7 +31,7 @@ index 5843ef65af..4c7793f86d 100644
public BaseBlockPosition(int i, int j, int k) {
this.a = i;
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index 9bb7c9c652..bc364ce371 100644
index 9bb7c9c65..bc364ce37 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
@@ -300,6 +300,16 @@ public class BlockPosition extends BaseBlockPosition {
@@ -52,7 +52,7 @@ index 9bb7c9c652..bc364ce371 100644
public MutableBlockPosition() {
this(0, 0, 0);
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 3f9de7e55a..b76c1579ea 100644
index 3f9de7e55..b76c1579e 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -425,12 +425,24 @@ public class Chunk implements IChunkAccess {
@@ -84,7 +84,7 @@ index 3f9de7e55a..b76c1579ea 100644
IBlockData iblockdata = null;

diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
index 3c5f10ad4d..621ed1fc53 100644
index 3c5f10ad4..621ed1fc5 100644
--- a/src/main/java/net/minecraft/server/ChunkSection.java
+++ b/src/main/java/net/minecraft/server/ChunkSection.java
@@ -7,7 +7,7 @@ public class ChunkSection {
@@ -97,7 +97,7 @@ index 3c5f10ad4d..621ed1fc53 100644
private NibbleArray skyLight;

diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index fd45090685..f4e91db7c6 100644
index 160341d6d..69d2f067b 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -257,11 +257,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@@ -173,7 +173,7 @@ index fd45090685..f4e91db7c6 100644
return FluidTypes.EMPTY.i();
} else {
Chunk chunk = this.getChunkAtWorldCoords(blockposition);
@@ -1767,7 +1767,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@@ -1766,7 +1766,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
public Map<BlockPosition, TileEntity> capturedTileEntities = Maps.newHashMap();
@Nullable
public TileEntity getTileEntity(BlockPosition blockposition) {
@@ -182,7 +182,7 @@ index fd45090685..f4e91db7c6 100644
return null;
} else {
// CraftBukkit start
@@ -1808,7 +1808,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@@ -1807,7 +1807,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
}

public void setTileEntity(BlockPosition blockposition, @Nullable TileEntity tileentity) {
@@ -191,7 +191,7 @@ index fd45090685..f4e91db7c6 100644
if (tileentity != null && !tileentity.x()) {
// CraftBukkit start
if (captureBlockStates) {
@@ -1869,7 +1869,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@@ -1868,7 +1868,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
}

public boolean p(BlockPosition blockposition) {
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From f4e4fe03783d2f79376e0dfb9254d398d1635a2f Mon Sep 17 00:00:00 2001
From 00c1a50483d196c47548593f019bdd92e1068652 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 13 Sep 2014 23:14:43 -0400
Subject: [PATCH] Configurable Keep Spawn Loaded range per world
@@ -63,10 +63,10 @@ index ee45d3705..01c5d3c57 100644
}

diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 34b5ca3a7..8a445a1fa 100644
index 98f98c35e..dbb00434f 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -2853,8 +2853,9 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@@ -2852,8 +2852,9 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
int k = i * 16 + 8 - blockposition.getX();
int l = j * 16 + 8 - blockposition.getZ();
boolean flag = true;
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
From e967f3bcc7b0a00d5282d2a2d5976e1e48107238 Mon Sep 17 00:00:00 2001
From ae41855e7de88db8a2656b3ebe137344425a0bce Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 5 Apr 2016 19:42:22 -0400
Subject: [PATCH] Don't spam reload spawn chunks in nether/end


diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index b595536648..5fc2da0d92 100644
index cf3e9a6c6..be99425bf 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -2849,6 +2849,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@@ -2848,6 +2848,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
return this.K;
}

@@ -17,7 +17,7 @@ index b595536648..5fc2da0d92 100644
BlockPosition blockposition = this.getSpawn();
int k = i * 16 + 8 - blockposition.getX();
diff --git a/src/main/java/net/minecraft/server/WorldProvider.java b/src/main/java/net/minecraft/server/WorldProvider.java
index 5e87e537e4..3911e4947e 100644
index 5e87e537e..3911e4947 100644
--- a/src/main/java/net/minecraft/server/WorldProvider.java
+++ b/src/main/java/net/minecraft/server/WorldProvider.java
@@ -69,7 +69,7 @@ public abstract class WorldProvider {
Loading