3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-18 05:50:04 +01:00
Commit graph

2835 Commits

Autor SHA1 Nachricht Datum
Aikar
147081d0ff
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
f31eb87d39
Fix javadocs 2017-11-25 17:53:42 +00:00
Shane Freeder
f4e9f4737f
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:39:31 +00:00
Aikar
79f57aa18c
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
1912d06613
Update B/CB 2017-11-24 07:14:38 +00:00
Shane Freeder
6c5d4f75ee
Update B/CB 2017-11-20 14:50:30 +00:00
Zach Brown
e90dd1b684 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
7f12781017
Update B/CB/S 2017-11-18 03:04:21 +00:00
Shane Freeder
caec68907d
Update B/CB/S 2017-11-17 09:55:26 +00:00
Shane Freeder
5980496556
use CB BlockState implementations for captured blocks (Fixes #868) 2017-11-16 12:37:52 +00:00
Shane Freeder
33bf9031be
Update B/CB 2017-11-16 07:16:50 +00:00
Zach
b1c21f10da
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
ac880e00b4
Fix logic for unconditional xp orb merging
Fixes GH-936
2017-11-13 20:30:45 -05:00
killme
6aa7d59b7b Prevent logins from being processed when the player has disconnected 2017-11-13 15:32:20 +01:00
Aikar
9af72652cd Update CB Upstream 2017-11-12 18:53:38 -05:00
Aikar
7ba9baadca 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
Aikar
0f2c274998 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 19:06:45 -05:00
Zach Brown
e04bef9785
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
3438e96192
Add PlayerArmorChangeEvent
Closes GH-928
2017-11-10 23:49:34 -05:00
BillyGalbreath
072d6ec8cb Add configurable max exp value when merging orbs 2017-11-10 23:04:06 -05:00
BillyGalbreath
d7039347b0 PlayerAttemptPickupItemEvent additions 2017-11-10 22:49:53 -05:00
Zach Brown
bc1804b0e4
Update B/CB/S 2017-11-10 17:31:39 -05:00
kashike
2745e5f8a5
Merge pull request #931 from Brokkonaut/CB
Update CB
2017-11-08 18:51:25 -08:00
Brokkonaut
6870574dcf Update CB 2017-11-09 03:36:59 +01:00
Shane Freeder
f1e583753f
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
1d03f56bd6
Update B/CB/S 2017-11-08 16:13:57 +00:00
Shane Freeder
d1d4f3b465
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
Brokkonaut
d90528ab64 Send attack SoundEffects only to players who can see the attacker 2017-11-02 21:27:29 +01:00
Shane Freeder
4c71520375
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:35:05 +00:00
Shane Freeder
8381709166
rectify Configurable Cartographer Treasure Maps patch 2017-10-30 13:06:35 +00:00
Brokkonaut
8835dcc6f4
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-29 15:35:16 +00:00
Shane Freeder
23fa02d399
Update B/CB/S 2017-10-29 15:19:21 +00:00
Shane Freeder
cdce4486d8
Don't send keepalive logger message if we've already disconnected 2017-10-17 21:40:53 +01:00
kashike
1f2e01ba79 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
47def2d7b9
Update CB 2017-10-17 14:05:49 +01:00
Shane Freeder
50d69c6328 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
Shane Freeder
64ef6a6233
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-16 15:37:17 +01:00
Zach
5209f4b1fe 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
a1ea3785ca
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:53:49 -04:00
Shane Freeder
e9eb9ec7eb
Update CB 2017-10-13 22:07:48 +01:00
Minecrell
1f4d3af169 Expose client protocol version and virtual host 2017-10-12 17:31:36 +02:00
kashike
532e7d4fa8 Merge pull request #913 from Minecrell/deprecate-string-player-sample
Deprecate player sample list that includes only the player name
2017-10-12 07:22:10 -07:00
Minecrell
da11ba232e Deprecate player sample list that includes only the player name 2017-10-12 16:12:08 +02:00
Shane Freeder
a6f9074647
Remove lighting patches from spigot that cause more harm than good.
This commit removes two patches from spigot:
please review the patch messages for more information, however;

"Allow Disabling of Random Lighting Updates" potentially leaves chunk light maps in an invalid state, with
how often the server looks at these anyways, this patch really serves a questionable nature, the work is
going to be done, only it's being delayed and allowing the light map to be left in a potentially outdated
state.

"Fix some chunks not being sent to the client" sends chunks before their lighting has been calculated, this
means that the client will recieve chunks before they lighting has been calculated which can cause rendering
artifacts. The original issue around this patch appears to have already been fixed years ago.
2017-10-10 23:27:47 +01:00
Shane Freeder
599d18420d
Update B/CB 2017-10-09 10:15:17 +01:00
Shane Freeder
5d722d4080
Revert keepalive back to 15 seconds 2017-10-09 09:49:12 +01:00
Shane Freeder
4e44c2b38c
Update CB/S 2017-10-07 09:57:38 +01:00
stonar96
524ebe97d7
Anti Xray v2 (#858) 2017-10-06 04:39:34 +01:00
Shane Freeder
0bff7a667d
Fix patch message (off the main thread!)
Don't tired and push!
2017-10-06 04:27:26 +01:00
Shane Freeder
8683f2dbb0
rectify comment derp somebody just to point out 2017-10-05 03:39:51 +01:00