Commit graph

2951 commits

Author SHA1 Message Date
Aikar
602a6e2bee SPIGOT-3699: Fix cloning banner itemstacks
the banner meta would end up with a shared reference to the patterns
2017-12-15 15:57:15 -05:00
Zach Brown
efc08694d8 Update upstream CB 2017-12-12 21:34:50 -05:00
Aikar
fa254542bc Display warning on deprecated recipe API
Any plugin still using this API will result in the server saving an inconsistent UUID to player data files,
which then triggers warnings such as "Tried to load unrecognized recipe: bukkit:9e5b92f5-e549-4f47-b0a8-9f89390ed77b removed now."
on the players login.

Plugin authors need to define a key to keep it consistent between server restarts.
2017-12-09 12:42:11 -05:00
Aikar
036910d741 add latest copy of my apatch to the repo for easy access 2017-12-09 12:37:31 -05:00
Aikar
0ef74cf264 Update upstream 2017-12-09 12:37:09 -05:00
Shane Freeder
fd25094445 Update B/CB 2017-12-07 01:07:36 +00:00
Shane Freeder
786d044753 Update B/CB/S 2017-12-05 01:34:10 +00:00
Aikar
f854342c1b Fix AsyncTabCompleteEvent not setting isCommand 2017-11-29 23:36:31 -05:00
Aikar
93477a5b68 Avoid NPE in PathfinderGoalTempt 2017-11-29 22:19:24 -05:00
Shane Freeder
149f6e1511 Fix ClassCastException in tabCompletor (fixes #942) 2017-11-27 16:52:32 +00:00
Aikar
f7f8c59f60 AsyncTabCompleteEvent
Let plugins be able to control tab completion of commands and chat async.

This will be useful for frameworks like ACF so we can define async safe completion handlers,
and avoid going to main for tab completions.

Especially useful if you need to query a database in order to obtain the results for tab
completion, such as offline players.

Also adds isCommand and getLocation to the sync TabCompleteEvent
2017-11-26 22:05:48 -05:00
Shane Freeder
2a3e13cc52 Fix javadocs 2017-11-25 17:53:42 +00:00
Shane Freeder
ea4b94d62e Do not use a snapshot for hoppers
In 1.12, Spigot improved their blockstate implementation to take a full
copy of the TE, this allows for a much better snapshot in that it will
actually retain all of the TE's state, it is a much more expensive
implementation. This is also implicated with their backwards compat
for inventories meaning that accessing of a snapshots inventory of a
placed block will actually access the inventory of the live TE, making
creation of a snapshot redundant if the only intent is to interact with
the TEs inventory.

Hoppers are a horrible hit, every attempt to transfer an ItemStack will
result in two TileEntity snapshots, with two hoppers and a double chest
ontop, I managed to log 380 cases per second where a snapshot would have been
taken in cases where the snapshot is redundant.
2017-11-25 17:35:32 +00:00
Aikar
584a612fc0 API to get a BlockState without a snapshot
This allows you to get a BlockState without creating a snapshot, operating
on the real tile entity.

This is useful for where performance is needed
2017-11-24 07:28:57 +00:00
Shane Freeder
4bb7ee49bb Update B/CB 2017-11-24 07:14:38 +00:00
Shane Freeder
902eb624bd Update B/CB 2017-11-20 14:49:40 +00:00
Zach Brown
4966489929 Fix view distance API handling on negative values
Prior to this change, if a player was ever set to have a negative view
distance, an attempt to set them back to the default would fail, leading
to them appearing to be stuck in that state.

Now we just interpret that negative value as a "reset" to default.
2017-11-18 21:45:22 -05:00
Shane Freeder
a907e21341 Update B/CB/S 2017-11-18 03:04:21 +00:00
Shane Freeder
03960c3d95 Update B/CB/S 2017-11-17 09:40:49 +00:00
Shane Freeder
f77372c65e use CB BlockState implementations for captured blocks (Fixes #868) 2017-11-16 12:37:52 +00:00
Shane Freeder
7c23108a2d Update B/CB 2017-11-16 07:16:50 +00:00
Zach Brown
0c011b87c5 Merge pull request #935 from avatarmc/prevent-disconnected-logins
Prevent logins from being processed when the player has disconnected
2017-11-15 22:36:56 -05:00
Zach Brown
dfab59dfc7 Fix logic for unconditional xp orb merging
Fixes GH-936
2017-11-13 20:30:45 -05:00
Aikar
1f4f072193 Update CB Upstream 2017-11-12 18:53:38 -05:00
Aikar
64fdf06f84 Use <= instead of < for structure patch
Thankfully I randomly think about code and randomly wondered if I used <= or < here, and caught this!

This would of missed some chunks for the structure at the highest X/Z
2017-11-12 18:51:10 -05:00
killme
d117fd54d1 Prevent logins from being processed when the player has disconnected 2017-11-12 20:04:08 +01:00
Aikar
41afad51da Improve Structures Checking
Improves performance by keying every chunk thats part of a structure to a hashmap
instead of only the first one.

This allows us to avoid iterating the entire structures value set to see
if a block position is inside of a structure.

This should have pretty decent performance improvement to any standard world
that has been around for a whilewith lots of structures due to ineffeciencies
in how MC stores structures (even unloaded chunks has structured data loaded)
2017-11-11 18:47:30 -05:00
Zach Brown
9650c9dddc Add Obfuscation helper for armor change impl
Also alphabetize the importmcdev script... heathens, all of you
2017-11-11 00:07:45 -05:00
pkt77
c849f4f132 Add PlayerArmorChangeEvent
Closes GH-928
2017-11-10 23:46:55 -05:00
BillyGalbreath
f4a7453b2a Add configurable max exp value when merging orbs 2017-11-10 23:04:06 -05:00
BillyGalbreath
222aac9769 PlayerAttemptPickupItemEvent additions 2017-11-10 22:49:53 -05:00
Zach Brown
f141bae102 Update B/CB/S 2017-11-10 17:31:39 -05:00
Riley Park
151ee47076 Merge pull request #931 from Brokkonaut/CB
Update CB
2017-11-08 18:51:25 -08:00
Brokkonaut
44aa7d0ef4 Update CB 2017-11-09 03:36:59 +01:00
Shane Freeder
c1e786e5b0 Merge pull request '#925' from Brokkonaut/NoAttackSoundsFromVanishedPlayers
Send attack SoundEffects only to players who can see the attacker
2017-11-08 16:27:17 +00:00
Shane Freeder
6d76e5b46a Update B/CB/S 2017-11-08 16:13:57 +00:00
Shane Freeder
ef87e1e584 Revert maven-surefire to prevent a build regression
In some environments, the 2.20.1 version of the maven surefire plugin
can cause builds to fail due to changes in surefire in how it detects
that the forked JVM used for testing is still alive or not.
2017-11-06 23:58:32 +00:00
Shane Freeder
9fd1b06aa8 allow nerfed mobs to jump again
Entity AI tasks are initialized earlier in recent versions
of MC, this means that the fromMobSpawner has not been set
at the point where AI tasks are initilazed and so the goalFloat
will never be populated.

To rectify this, we can rely on the entity tick checking if
the mob is from a spawner each tick, and just initialize the
field should the paper option be enabled. This saves us from
having to modify the call chain in order to pass the fact that
it was created by a mobSpawner earlier.
2017-10-31 15:13:55 +00:00
Brokkonaut
2509fce30a Send attack SoundEffects only to players who can see the attacker 2017-10-31 03:29:53 +01:00
Shane Freeder
cfb274d3af rectify Configurable Cartographer Treasure Maps patch 2017-10-30 13:06:35 +00:00
Brokkonaut
56763aad0d Replace HashSet with fastutil's ObjectOpenHashSet in HashTreeSet
HashSet sometimes uses compareTo() instead of equals() and this breaks the comparison of net.minecraft.server.NextTickListEntry (the only place where HashTreeSet is used).

In this cases duplicate entries could be added to the HashSet of HashTreeSet, because NextTickListEntry.compareTo() does not return 0, even if NextTickListEntry.equals() returns true.

ObjectOpenHashSet never uses compareTo(), so the inconsistencies of NextTickListEntry cause no problems.

Fixes https://github.com/PaperMC/Paper/issues/588
2017-10-20 04:43:02 +02:00
Shane Freeder
c738f996e8 Update B/CB/S 2017-10-29 15:19:21 +00:00
Shane Freeder
16e823a55d Don't send keepalive logger message if we've already disconnected 2017-10-17 21:40:53 +01:00
Riley Park
2d0e7faeb1 Merge pull request #914 from Minecrell/expose-client-protocol-host
Expose client protocol version and virtual host
2017-10-17 11:03:58 -07:00
Shane Freeder
141f231181 Update CB 2017-10-17 14:05:49 +01:00
Shane Freeder
2b03c96d72 Merge pull request #919 from electronicboy/improve-keepalive-handling
allow keepalive to wait longer for a client response (#895)
2017-10-16 16:58:44 +01:00
Zach Brown
7cbc4cd377 Merge pull request #918 from Zbob750/port/entity-list-command
Add command for listing entities in a world
2017-10-15 19:07:03 -04:00
Zach Brown
689fdea2c7 Add command for listing entities in a world
Port of 303a775fc3

Will display a list of all entities in a world, as well as which chunks
they are in. Hopefully, this will make tracking down chunks with lots of
entities easier.

Only real change from the forge version is that instead of dimension
IDs, we accept world names in the form of a string.

/paper entity list - Lists all entities in the player's current world
/paper entity list minecraft:zombie - Lists all zombies in the player's
current world

/paper entity list * world_nether - Lists all entities in the nether
/paper entity list minecraft:ghast world_nether - Lists all ghasts in
the nether
2017-10-15 17:43:16 -04:00
Shane Freeder
b1fa92a5e4 allow keepalive to wait longer for a client response
and also provide a bit more information in the server
logs so we can work out what is going on.
2017-10-15 14:00:42 +01:00
Shane Freeder
0e26fc4fbb Update CB 2017-10-13 22:07:48 +01:00