Spigot patch update: 0004 (formerly 0003) Merge tweaks and configuration

https://github.com/EcoCityCraft/Spigot/blob/d9c76252eb02f7d0d6bea11efe77e3bb1edb0d99/CraftBukkit-Patches/0004-Merge-tweaks-and-configuration.patch
Spigot patch update: 0005 LongHash Tweaks.

This commit adds a flat array based cache to the LongHash(Set/Map) classes leading to excellent efficiency for servers where most activity is centered around the origin (0,0)

https://github.com/EcoCityCraft/Spigot/blob/d9c76252eb02f7d0d6bea11efe77e3bb1edb0d99/CraftBukkit-Patches/0005-LongHash-Tweaks.patch
Spigot patch update: 0006 Async Operation Catching

Catch and throw an exception when a potentially unsafe operation occurs on a thread other than the main server thread.

https://github.com/EcoCityCraft/Spigot/blob/d9c76252eb02f7d0d6bea11efe77e3bb1edb0d99/CraftBukkit-Patches/0006-Async-Operation-Catching.patch
Spigot patch update: 0007 View distance

This commit allows the user to select per world view distances, and view distances below 3. Be wary of the issues selecting a view distance of 1 or 2 may cause!

https://github.com/EcoCityCraft/Spigot/blob/d9c76252eb02f7d0d6bea11efe77e3bb1edb0d99/CraftBukkit-Patches/0007-View-Distance.patch
Spigot patch update: 0009 Implement 'lightening' of NibbleArrays - only allocate buffers when non-trivial value Saving from 40-45% of memory use by chunk section data.

Finish up NibbleArray lightening work - use for Snapshots, reduce copies

Fix nibble handling with NBT - arrays aren't copied by NBTByteArray

https://github.com/EcoCityCraft/Spigot/blob/d9c76252eb02f7d0d6bea11efe77e3bb1edb0d99/CraftBukkit-Patches/0009-Implement-lightening-of-NibbleArrays-only-allocate-b.patch
Spigot patch update: 0010 Fix mcRegion-to-Anvil conversion

https://github.com/EcoCityCraft/Spigot/blob/d9c76252eb02f7d0d6bea11efe77e3bb1edb0d99/CraftBukkit-Patches/0010-Fix-mcRegion-to-Anvil-conversion.patch
Spigot patch update: 0012 Optimize packet used to unload chunks for the client

At the moment telling a client to unload a chunk involves calling the entire chunk from memory, deflating it and then sending it through the pipes even though the client ignores it and based on the bitmap simply unloads the chunk, and to add the cherry on top, this is done on the main server thread.

https://github.com/EcoCityCraft/Spigot/blob/d9c76252eb02f7d0d6bea11efe77e3bb1edb0d99/CraftBukkit-Patches/0012-Optimize-packet-used-to-unload-chunks-for-the-client.patch
Spigot patch: 0014 Alternate, sync-free-but-safe chunk reference cache

https://github.com/EcoCityCraft/Spigot/blob/d9c76252eb02f7d0d6bea11efe77e3bb1edb0d99/CraftBukkit-Patches/0014-Alternate-sync-free-but-safe-chunk-reference-cache.patch
Spigot patch update: 0015 Tick loop optimization - sleep for as long as possible.

https://github.com/EcoCityCraft/Spigot/blob/d9c76252eb02f7d0d6bea11efe77e3bb1edb0d99/CraftBukkit-Patches/0015-Tick-loop-optimization-sleep-for-as-long-as-possible.patch
Spigot patch: 0016 Improved Timings System

Tracks nearly every point of minecraft internals and plugin events to give a good quick overview on what is causing TPS loss.

https://github.com/EcoCityCraft/Spigot/blob/d9c76252eb02f7d0d6bea11efe77e3bb1edb0d99/CraftBukkit-Patches/0016-Improved-Timings-System.patch
Allow non-vanilla tile entities on chests for Terrafirmacraft. Fixes #724.
Fix another NPE with Mystcraft lightning. Related #392.
Spigot patch update: 0024 Metrics. Rewrite the Metrics system to be closer to the Bukkit version.

https://github.com/EcoCityCraft/Spigot/blob/7db53a4407d49fd69c30ee29ad68499a6fac51b0/CraftBukkit-Patches/0024-Metrics.-Rewrite-the-Metrics-system-to-be-closer-to-.patch
Spigot patch update: 0017 Add oreobfuscator for Spigot.

https://github.com/EcoCityCraft/Spigot/blob/master/CraftBukkit-Patches/0017-Add-oreobfuscator-for-Spigot.patch

MCPC+ notes:

- Adds optional engine mode 2 to replace with random ores instead of stone (engine-mode)
- Ores from mods in the Forge oredict will be added to the obfuscate blocks list (forge-oredict-blocks)
- Block IDs >256 are not yet supported, sorry (chunk data not fully decoded)
- Off by default
Spigot patch update: 0018 Reduce number of LivingEntity collision checks.

https://github.com/EcoCityCraft/Spigot/blob/7db53a4407d49fd69c30ee29ad68499a6fac51b0/CraftBukkit-Patches/0018-Reduce-number-of-LivingEntity-collision-checks.patch
Spigot patch: 0019 Only count entities in chunks being processed for the spawn wave. Fixes mob spawn issues.

https://github.com/EcoCityCraft/Spigot/blob/master/CraftBukkit-Patches/0019-Only-count-entities-in-chunks-being-processed-for-th.patch
Spigot patch: 0020 Detect, remove and warn about null tile entities.

https://github.com/EcoCityCraft/Spigot/blob/master/CraftBukkit-Patches/0020-Detect-remove-and-warn-about-null-tile-entities.patch
Spigot patch: 0021 Entity Activation Range

This feature gives 3 new configurable ranges that if an entity of the matching type is outside of this radius of any player, will tick at 5% of its normal rate.

This will drastically cut down on tick timings for entities that are not in range of a user to actually be "used".
This change can have dramatic impact on gameplay if configured too low. Balance according to your servers desired gameplay.
Disable entity activation range by default

Spigot's entity activation range feature was merged into MCPC+ in:
MinecraftPortCentral/MCPC-Plus@057ee699fed01dd5a41c5d570931d9276605e9d1

This features defines a "range that says at what distance must an entity be
near a player for it to be active."

However, in the world of mods with automation and chunkloaders this
behavior may be unexpected, so this commit disables it by default.

On the other hand, it can "massively improve performance for large servers",
so if you want to turn it on see entity-activation-range* in bukkit.yml.
MCPC+'s default is 0/0/0, vanilla Spigot's is 32/32/16 (animals/monster/misc).

More details on this feature can be found at: http://www.spigotmc.org/threads/entity-activation-range.405/
Spigot patch: 0022 Optimize getTileEntities performance

Avoid traversing tile entities for every loaded chunk

https://github.com/EcoCityCraft/Spigot/blob/master/CraftBukkit-Patches/0022-Optimize-getTileEntities-performance.patch