The behavioural nearby sensors are validated every tick on the entities
that registered the respective sensors and are therefore a good subject
to performance improvements.
More specifically this commit replaces the Stream#filter usage with
ArrayList#removeIf as the removeIf method on an array list is heavily
optimized towards a single internal array re-allocation without any
further overhead on the removeIf call.
The only negative of this change is the rather agressive diff these
patches introduce as the methods are basically being reimplemented
compared to the previous stream-based implementation.
See: https://nipafx.dev/java-stream-performance/
Note: Updated LICENCE.md to release this commit under MIT
A lot of plugins seem to use reflection to determine this, so this could be a bit of a starter-patch as future PR'ers could also exposed tracked entities as well.
For some reason, this doesn't always seem to capture all states of shutdown,
either the logger is just being fun, or, potentially, the thread is already
marked as dead when we're getting called so the trace is not generated through
the method on Thread
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
95ff95ed #588: Add Player#sendBlockDamage()
CraftBukkit Changes:
ea050e6e9 #807: Add Player#sendBlockDamage()
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
1e843b72 #510: Add NamespacedKey#fromString() to fetch from user input
a4d18241 #581: Add methods to modify despawn delay for wandering villagers
CraftBukkit Changes:
0cd8f19f #802: Add methods to modify despawn delay for wandering villagers
d5c5d998 SPIGOT-6362: ConcurrentModificationException: null --> Server Crash
8c7d69fe SPIGOT-5228: Entities that are removed during chunk unloads are not properly removed from the chunk.
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
5b289e69 SPIGOT-5778: Added World.getGameTime method
CraftBukkit Changes:
d97d91871 SPIGOT-6347: Nether Portals Default to Nether, even in Nether
8aa6a953f SPIGOT-5778: Added World.getGameTime method
Spigot Changes:
73fb6094 #107: Add async catching to chunk entity add/remove
This fixes a confusing issue where doing 'merchant.setRecipes(merchant.getRecipes());' would clear the merchants recipes, as the implementation of getRecipes is guavas Lists.transform wrapped in Collections.unmodifiableList, and the implementation of setRecipes clears the backing list before adding the elements of the provided list to the backing list.
The javadoc for the getRecipes method says 'an immutable list of trades', so this patch makes the javadoc correct.
Upstream has released updates that appear 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:
e5cb519d #793: Don't unnecessarily toString block in CraftBlockEntityState constructor
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
1b5ad2af SPIGOT-6316: PlayerBedLeaveEvent implements Cancellable
CraftBukkit Changes:
058b4df95 SPIGOT-6316: PlayerBedLeaveEvent implements Cancellable
Upstream has released updates that appear 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:
08de4679f #789: Call EntityDropItemEvent when a wither rose is dropped
Upstream has released updates that appear 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:
c3e684ef SPIGOT-3789: Can't Remove Entity Equipment in Same Tick Spawned without using Consumer
Spigot Changes:
89d6047d Rebuild patches
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
e70a125f #571: Expand the FishHook API
CraftBukkit Changes:
0bad58f1 #783: Expand the FishHook API
3636fb51 SPIGOT-6318: Fix smoke effect directions
We apparently were mixing netty versions before, and 13 was removed from netty 4.1.50
but when cat fixed a bug in our pom in 1.16.5 it fixed the mixed versions issue.
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
85b16b8a Update to Minecraft 1.16.5
CraftBukkit Changes:
f3f30947 Update to Minecraft 1.16.5
Spigot Changes:
018b9a0d Update to Minecraft 1.16.5
Instead of completely resetting a Villager's reputation for all players each time they are cured, we now only reset the relevant part of the reputation for only that player. This means the exploit is fixed and players cannot stack multiple cures until prices are down to 1, but doesn't have the same side effects that are commonly complained about with the current exploit fix.
Upstream has released updates that appear 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:
7a6c3c9a Remove outdated build delay.
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
bf617659 SPIGOT-6313: Revert "SPIGOT-6274: Reloading configuration does not clear previous values"
e8fa7a07 SPIGOT-6274: Reloading configuration does not clear previous values
Spigot Changes:
5fc0fb4e SPIGOT-6306: Handle watchdog reloads and disabling by 0/negative times
Reduces number of instructions a chunk lookup does
when accessing the last chunk cache. This reduces amount of work and opcodes
and allows better inlining.
In lots of profiling comparisons, this optimization was able to reduce the
cost of repeated chunk lookups that hit the cache pretty significantly.
Previous commit 97b2eadf1 pulled upstream change that implements the exact same fix.
CB change: 7029c0a8f3
Co-authored-by: Professor Bloodstone <git@bloodstone.dev>
Upstream has released updates that appear 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:
7029c0a8f SPIGOT-6311: Don't calculate portal shapes for up/down directions
Upstream has released updates that appear 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:
ff2b9440f SPIGOT-6304: Removed the detection of legacy text based on color codes
Upstream has released updates that appear 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:
560b65c4 #707, SPIGOT-5063, SPIGOT-5304, SPIGOT-5656, SPIGOT-3206, SPIGOT-5350, SPIGOT-5980, SPIGOT-4672: Persist the exact internal text representation where possible.
Spigot Changes:
ff439d1e Rebuild patches
EntityLiving#applyInstantEffect() immediately kills the player and drops their inventory.
Before this patch, instant effects would be applied before the potion ItemStack is removed and replaced with a glass bottle. This caused the potion ItemStack to be dropped before it was supposed to be removed from the inventory. It also caused the glass bottle to be put into a dead player's inventory.
This patch makes it so that instant effects are applied after the potion ItemStack is removed, and the glass bottle is only put into the player's inventory if the player is not dead. Otherwise, the glass bottle is dropped on the ground.
Faster version for isSolid() that utilizes NMS's state for isSolid instead of the slower
process to do this in the Bukkit API
Material#isSolid uses a large switch statement which isn't as performant vs a simple boolean return
Adds API for buildable, replaceable, burnable too.
There was 2 unnecessary lines of code in a core method used for DataBits
that repeatedly calculated a static value.
We now just precalculate that in the constructor and reuse the value instead.
This is a micro optimization, but this is some of the hottest code in the server so
it should provide some minor gains as well as improve inlining.
Additionally, to further help inlining, mark the DataBits methods as final.
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
f4a9ed36 SPIGOT-6273: Expose ItemFrame ItemDropChance through API
CraftBukkit Changes:
72c5e7477 SPIGOT-6273: Expose ItemFrame ItemDropChance through API
CB blindly drops any update flags when recording block modifications,
this causes the debug stick to blindly update neighbouring blocks on usage
in order to control this, we will special case this item, however, this
ideally should be fixed by recording the actual update flags used,
but will induce ABI breaks...
This patch also maintains the behavior of the BlockPlaceEvent, this
behavior will NOT be guaranteed in the future, however.
Upstream has released updates that appear 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:
6917945f0 SPIGOT-6289: Fix setting entity equipment