3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 20:40:07 +01:00
Commit graph

2644 Commits

Autor SHA1 Nachricht Datum
Thinkofdeath
90ac03522a Revert "Remove patch headers"
This reverts commit d6e3dff7d8.
2014-11-28 23:02:15 +00:00
GunfighterJ
d6e3dff7d8 Remove patch headers 2014-11-28 16:54:14 -06:00
Thinkofdeath
b84c71e522 Fix enchanting to match 1.8 behaviour 2014-11-28 22:39:33 +00:00
Thinkofdeath
c5d0d74eae Improve vanilla command handling for command blocks 2014-11-28 20:20:03 +00:00
Thinkofdeath
2575b3f9c0 Remove extra color codes at the start from converted json chat 2014-11-28 19:59:41 +00:00
Thinkofdeath
8768831c56 Only rebuild patches that are changed 2014-11-28 18:26:30 +00:00
Thinkofdeath
2abdb9a061 Use the right name for the AsyncPlayerPreLoginEvent 2014-11-28 17:43:48 +00:00
Thinkofdeath
669c44cb3c Fix eating food whilst not facing a block 2014-11-28 11:23:19 +00:00
Thinkofdeath
24557bc2b3 Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/
2014-11-28 17:16:30 +11:00
bendude56
a4805dbd77 Allow teleportation of entities on vehicles. Fixes BUKKIT-4210
Up 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 with Minecraft 1.5 teleportation logic.
2014-08-17 11:49:27 -06:00
Jerom van der Sar
80e8f2ab87 Implement ability to keep items on death via plugins. Adds BUKKIT-5724
When 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. The boolean flag is tested
prior to clearing the inventory as well as prior to dropping the items on
the ground. If the flag is true (indicating "keep inventory"), the items
are not removed from the player's inventory and are not dropped on the
ground.
2014-08-17 11:41:40 -06:00
Starbuck Johnson
3626720d53 Modify the invalid item set to permit command blocks. Fixes BUKKIT-4342
When 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 vanilla
behaviour by removing the command block item ID, 137, from the invalid
items set.
2014-08-17 11:23:28 -06:00
myiume
4507cec090 Fix PlayerFishEvent not correctly cancelling. Fixes BUKKIT-5396
Prior 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 logically be.

This commit resolves the issue by ensuring the client is made aware of the
correct changes at the correct time regarding the bobber entity, therefore
keeping the logical steps of "fishing" proper and in-tact.
2014-08-17 00:17:02 -06:00
Wesley Wolfe
b3e83b00fc Implement deprecated methods. Adds BUKKIT-5752 2014-08-07 19:35:16 -05:00
Wesley Wolfe
1f0c791444 Use sensible AssertionError instead of ambiguous RuntimeException 2014-08-07 19:29:35 -05:00
ase34
87f6fa7bc9 Fix cancelling PlayerDropItemEvent. Fixes BUKKIT-3313
Up 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 available slot" if the
item has changed since the event was fired. Other remaining behaviour of
the event is still in tact and has not been modified.
2014-08-04 12:27:50 -06:00
feildmaster
971329c42b Fix removal of items from Item Frames. Fixes BUKKIT-5736 2014-08-02 16:12:03 -05:00
Travis Watkins
594d7cb8c9 Don't confuse client with sound coordinates outside view distance. 2014-07-15 21:28:10 -05:00
Wesley Wolfe
c7398b9fdf Provide modifier functions to EntityDamageEvent. Fixes BUKKIT-5688 2014-07-13 00:07:38 -05:00
Travis Watkins
319a9c20eb Handle uniform block ids greater than 127. Fixes BUKKIT-5686 2014-07-10 19:19:48 -05:00
Travis Watkins
13482ac7f6 Put damage modifiers in Functions for event. Fixes BUKKIT-5681 2014-07-09 18:21:59 -05:00
Travis Watkins
dbb5e6e3cd Update CraftBukkit to Minecraft 1.7.10 2014-07-08 14:31:10 -05:00
Wesley Wolfe
a8628fd645 Use 4787c23dce0f5ac856d8d398225828971a93a3ff Guava patch for onlinePlayers
This 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.
2014-07-01 00:48:07 -05:00
Wesley Wolfe
b602b5efa4 Implement new getOnlinePlayers. Adds BUKKIt-5668 2014-06-25 15:59:58 -05:00
t00thpick1
83e934b3bd [Bleeding] Fix checks for non-living entities. Fixes BUKKIT-5667 2014-06-24 18:24:29 -05:00
t00thpick1
9099e48e74 [Bleeding] Ignore damage done by LivingEntity.damage(). Fixes BUKKIT-5666
This matches behavior previous to new damage event API of not throwing
events for plugin-triggered damage.
2014-06-23 16:42:31 -05:00
Travis Watkins
6364f59ac4 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 this we use a compact format for every
part of the chunk. Memory saved from this technique will vary based on the
world but seems to be about 50% on normal Minecraft generated chunks.
2014-06-23 16:24:39 -05:00
t00thpick1
5adbab524d [Bleeding] Set projectile source for reflected fireballs. Fixes BUKKIT-5661 2014-06-22 16:52:52 -05:00
t00thpick1
6f21d3ca8f [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 amount as each modifier
is applied by vanilla code.

The method that actually damages the armor worn by an entity has been
relocated beneath the event called as to not apply durability loss when
the event has been cancelled.
2014-06-22 15:23:16 -05:00
t00thpick1
bed3f7f8f5 [Bleeding] Repair missing diff in Explosion. Fixes BUKKIT-5662
The blast protection enchantment dampers explosions, however
the functionality was only added to block explosions, and not
entity explosions.
2014-06-22 15:23:15 -05:00
Travis Watkins
5b9950b5f7 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 even though their result is unlikely to change
that often. To reduce the cost of these checks we replace them with a
system to keep track of what neighbor chunks a chunk has loaded and update
it when chunks load or unload which is a much less frequent action. On a
server with ten players this change removes about 100,000 calls a tick to
LongObjectHashMap's containsKey method.
2014-06-21 21:12:46 -05:00
Travis Watkins
ea126f98ad 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 they do happen. With this in mind
we now remove these checks which removes almost all uses of the
LongHashSet backing the unload queue.
2014-06-21 21:03:00 -05:00
EvilSeph
e6a2feda20 Updated version to 1.7.9-R0.3-SNAPSHOT for development towards next release. 2014-06-01 02:36:02 -04:00
EvilSeph
080edc16be Updated version to 1.7.9-R0.2 in pom.xml for Beta. 2014-06-01 01:45:55 -04:00
bloodshot
1b48298d25 Add special case for handling place event with lilies. Fixes BUKKIT-5641 2014-06-01 00:23:06 -05:00
Travis Watkins
1c13d076af Improve ItemStack filtering. 2014-06-01 00:23:06 -05:00
Nate Mortensen
47b57e6bcf Some assumptions are better than others. 2014-06-01 00:22:58 -05:00
Daniel Naylor
0a45c3ebf7 Use UUIDs in CraftPlayer equals and hashCode methods. Fixes BUKKIT-5634 2014-05-26 19:45:07 -05:00
Travis Watkins
38fbe60d46 Handle null targets in target event. Fixes BUKKIT-5635 2014-05-26 19:34:45 -05:00
Nate Mortensen
3fbf4d3b5f Fix ItemStack state during BlockPlaceEvent. Fixes BUKKIT-5632 2014-05-26 17:54:51 -06:00
Travis Watkins
e080bafa58 Rework mob item dropping on death. Fixes BUKKIT-5625
After the changes in d611cff2 we started including a mob's equipment when
calling EntityDeathEvent so plugins can access this data. However, the
changes to enable this triggered a bug that makes skeletons and pig zombies
no longer drop equipment because they handle this differently than the rest.
On top of this we don't handle dropping equipment for mobs that cannot
pick up items in vanilla even though vanilla does drop equipment for them
if you summon them with it. We also do not include a horse's inventory
in the event so they drop their saddle, armor, chest, and chest contents
with no way for a plugin to control this.

To solve this issues we revert mob item dropping back to vanilla logic
and instead just capture all their drops in the method they all call to
spawn them into the world. We also move horse inventory dropping so it
happens at a time when we're capturing these drops. With these changes
all items mobs drop on death should now be included in the event and
we have less diff to worry about for future updates.
2014-05-26 18:42:47 -05:00
Wesley Wolfe
4ab4fa5bb1 Fix polarity of Bat.isAwake() and Bat.setAwake(boolean). Fixes BUKKIT-5624 2014-05-20 03:18:26 -05:00
EvilSeph
a1f3d35808 Updated version to 1.7.9-R0.2-SNAPSHOT for development towards next release. 2014-05-14 23:38:50 -04:00
EvilSeph
07a5465058 Updated version to 1.7.9-R0.1 in pom.xml for Beta. 2014-05-14 22:40:51 -04:00
Travis Watkins
89d5265da6 Ensure we always log commands and log the right thing.
Waiting to log until after PlayerCommandPreprocessEvent makes the server
not log anything if the event is cancelled. It also makes the server log
what a plugin changed the command to instead of what the player actually
tried to run. As the point of the log is to have a record of every command
a player attempts to run these are both not desirable.
2014-05-14 14:28:52 -05:00
Wesley Wolfe
fa1b6ba834 Update CraftBukkit to use new YamlConfiguration encoding changes 2014-05-14 05:49:04 -05:00
Wesley Wolfe
8daacb9017 Implement awake flag for bats. Adds BUKKIT-5606 2014-05-13 20:38:42 -05:00
Wesley Wolfe
730a62c96a Handle chat packets correctly 2014-05-13 20:13:16 -05:00
Travis Watkins
65a6e97785 Handle inventory max stack sizes even better. Fixes BUKKIT-5595
In 7e37cf96 we modified the container logic to handle custom max stack
sizes better and ensure the client stays in sync with this scenario. This
had the effect of sending an extra set slot packet for every inventory
click a player did which was not wanted. These extra packets also cause the
client to recalculate recipes which breaks the result slot for custom
recipes. To avoid the extra packets in general we now only send them if the
max stack is not the one we started with. In the case of a setting a custom
max stack size on a workbench this is still not enough so we also now send
another extra packet to make sure the result slot is always correct.
2014-05-13 00:01:23 -05:00
Travis Watkins
5610337b4f Only set skull profile if it is a player skull. Fixes BUKKIT-5605 2014-05-12 23:22:04 -05:00