Merge pull request #4 in SPIGOT/craftbukkit from ~MIKEPRIMM/craftbukkit:mikeprimm/SPIGOT-29 to master* commit 'dd33bcf6a53149d3813d128d5e93b5bf5ca69711':
Fix chunk snapshot generation (needed for Dynmap)
Allow teleportation of entities on vehicles. Fixes BUKKIT-4210Up until Minecraft version 1.5 it was not possible to teleport entities
within vehicles. With the 1.5 update came the change in the Minecraft
teleportation logic to dismount before teleporting the entity, if
applicable.
This commit ammends the existing CraftBukkit logic for rejecting
teleportation for entities in vehicles to permit the action. Due to this
change, CraftBukkit is now in-line wit...
Implement ability to keep items on death via plugins. Adds BUKKIT-5724When a player dies their inventory is normally scattered over the the area
in which they died. Plugins should be able to modify this behaviour by
defining whether or not the player's inventory will be dropped on the ground or waiting for the player when they eventually respawn.
This commit implements the methods included in the Bukkit half for the new
behaviour by acting upon the boolean flag....
Modify the invalid item set to permit command blocks. Fixes BUKKIT-4342When using a "vanilla" Minecraft server using the "pick block" key on a
command block yields the invoker with a command block within their
inventory while in creative mode. Implications of the invalid items set
containing the command block also include having a "ghost" item that
cannot be placed due to it not actually existing.
This commit resolves the problem and brings Craftbukkit closer to ...
Fix PlayerFishEvent not correctly cancelling. Fixes BUKKIT-5396Prior to this commit cancelling the PlayerFishEvent would cause various
states of the fishing routine to be incorrectly or wrongly fired. This
incorrect behaviour was due to the miscommunication between the server and
client regarding the fishing state. When the event was cancelled, the
bobber entity was removed and caused the client to incorrectly determine
what the "next state" was to logical...
Fix cancelling PlayerDropItemEvent. Fixes BUKKIT-3313Up until this commit the PlayerDropItemEvent, if cancelled, would return
items to the first available slot in the inventory - which is clearly
undesirable as a player and plugin author to deal with.
This commit changes that by ensuring that the item is returned to where
it came from in the player's inventory. This still supports modifying the
drop from the player and will default to "first ava...
Use 4787c23dce0f5ac856d8d398225828971a93a3ff Guava patch for onlinePlayersThis change improves the quality of life for plugin developers using
iterator iteration with side-effects. In the specified Guava patch, the
internal iterator no longer relies on the AbstractList iterator which
iterates by index, and will instead wrap the provided iterator in a
transformer given the Function.
[Bleeding] Ignore damage done by LivingEntity.damage(). Fixes BUKKIT-5666This matches behavior previous to new damage event API of not throwing
events for plugin-triggered damage.
Use compact memory format for uniform chunk section data.Many chunk sections contain parts of their data that are the same for
every block they contain. In these cases we can save memory by saving
a single value instead of an array of 4096 copies of that value. Block light
and block data are most likely to be uniform followed closely by sky light
data. Block ids are far less likely to be uniform but give the largest
saving when they are. Because of t...
[Bleeding] Implement new damage api. Fixes BUKKIT-5326, BUKKIT-3878.This commit centralizes event handling to where damage is actually applied
to the entity to avoid bugs that have resulted from nodamageticks,
modifications to damage after the event has been called, and similar
mishaps. This also implements new API for getting and setting of
modifications made to the damage amount actually applied to the entity.
This is done by storing the change in the damage ...
[Bleeding] Repair missing diff in Explosion. Fixes BUKKIT-5662The blast protection enchantment dampers explosions, however
the functionality was only added to block explosions, and not
entity explosions.
Avoid checking for loaded chunks for lighting and entity ticking.When a chunk is loaded the server tries to ensure it has its initial light
calculations done before sending it to the player. When ticking entities
the server tries to ensure the entity does not walk into an unloaded chunk.
To accomplish these the server checks a one chunk radius around the chunk
to be lit or a two chunk radius around the chunk the entity is in. These
lookups happen every tick ...
Don't check unload queue before ticking things anymore.In commits 71a238ee and c8591397 we added checks while ticking to ensure
we never ticked anything in a chunk meant to be unloaded. We did this to
prevent these chunks being removed from the unload queue and leaked.
However, this causes a ridiculously large number of lookups on the queue
for a somewhat rare occurance. We also now have the chunk GC which will
take care of these leaked chunks when...