Commit Graph

3384 Commits

Author SHA1 Message Date
Aikar
8175ec916f
Relookup Entity Save ID if was null during precache
Should fix #1280

Citizens hijacks entity map, and im guessing under the right conditions
the result might actually be null during entity creation

Pre the cache patch, the id is looked up on save, so it was fine.

Now, if its null and the save ID is requested, we will try to look
it up again and cache it if found.
2018-07-26 23:57:31 -04:00
Shane Freeder
fa99bd7049
Fix EntityDismountEvent changes
While upstream has now made this event cancellable, their changes
result in the vechicle being removed before the event is called,
thus leading cancellation to not behave as expected.
2018-07-26 18:41:03 +01:00
Shane Freeder
8808629550
Update B/CB/S 2018-07-26 16:20:37 +01:00
Aikar
4d3db05d2c
[CI-SKIP] Patch of progress on async chunkload, delay until 1.13.1
Do not even try to use this. It's seriously not ready.

1.13.1 changes a lot of stuff here, so i'm going to wait until that
to resume this work.
2018-07-26 01:28:53 -04:00
Aikar
7c5cc1ece7
Merge branch 'master' into pre/1.13
* master:
  Prevent Saving Bad entities to chunks
2018-07-26 00:57:16 -04:00
Aikar
42f6bebcc3
Prevent Saving Bad entities to chunks
See https://github.com/PaperMC/Paper/issues/1223

Should fix Vanilla bugs

Minecraft is saving invalid entities to the chunk files.

Avoid saving bad data, and also make improvements to handle
loading these chunks. Any invalid entity will be instant killed,
so lets avoid adding it to the world...

This lets us be safer about the dupe UUID resolver too, as now
we can ignore instant killed entities and avoid risk of duplicating
an invalid entity.

This should reduce log occurrences of dupe uuid messages.

Also reduce the logging spam overall.
2018-07-26 00:51:20 -04:00
Zach Brown
64e27b40d9
Move part of last change into proper file 2018-07-25 21:55:25 -05:00
Zach Brown
e64513b585
Remove deprecated AuthLib API from Paper-API
Use the PlayerProfile API as a replacement
2018-07-25 21:49:43 -05:00
Aikar
230b8d4258
Merge pull request #1256
bfbd24c5 Fix decompile error (Hugo Manrique)
1f5d23d9 Re-add Vanished players don't have rights patch (Hugo Manrique)

* pull/1256/head:
  Fix decompile error
  Re-add Vanished players don't have rights patch
2018-07-25 19:41:35 -04:00
Aikar
04aba0fca7
Merge branch 'master' into pre/1.13
* master:
  Apply spawner delay for cancelled pre spawn events (#1276)
2018-07-25 19:07:56 -04:00
Aikar
48d75228ed
Update upstream 2018-07-25 19:05:07 -04:00
Max Lee
ef0dfd0628 Apply spawner delay for cancelled pre spawn events (#1276)
Setting the flag updates the spawner's delay which stops the spawner from trying to find a new spawn position each tick efter the event was cancelled/aborted which makes it usable for mob stackers/mergers and other plugins that don't actually want any mob to spawn in the spawner cycle but keep the overall behaviour close to vanilla.

This might slightly effect existing plugins that use this event but I doubt anyone really relied on this behaviour, the only possible use case that I can think of is cancelling the event until you find a suitable position in your plugin... and this should be handled by the plugin itself by cancelling and spawning at the position manually.
2018-07-25 18:19:51 -04:00
Shane Freeder
23ed74032c
Explictly reset chat format in vanilla scoreboard display (fixes #1263)
Vanilla now uses chat components for scoreboards, thus no longer
returns a string which also resets the chat the chat format, add
this back ourselves.
2018-07-25 09:58:03 +01:00
Aikar
ee9416b07d
Merge branch 'master' into pre/1.13
* master:
  Expand Location Manipulation API - Closes #1265
2018-07-25 01:38:59 -04:00
Aikar
cae33c7e3c
Expand Location Manipulation API - Closes #1265
Adds set(x, y, z), add(base, x, y, z), subtract(base, x, y, z);
2018-07-25 01:38:37 -04:00
Aikar
1ae30bb6b2
Fix RCON Ip Defaulting to wrong value - Closes #1267 2018-07-25 01:24:28 -04:00
Aikar
c280d84172
Update upstream and remove hopper patch for #1270 2018-07-25 01:11:08 -04:00
Brokkonaut
af561492ab Fix broken block iteration (#1269)
Fixes https://github.com/PaperMC/Paper/issues/1259 and generation of the end pillars
2018-07-24 21:39:30 -04:00
Aikar
0e5e60c1d8
Update upstream 2018-07-24 20:53:26 -04:00
Hugo Manrique
bfbd24c5be
Fix decompile error 2018-07-24 20:16:10 +02:00
Hugo Manrique
1f5d23d96d
Re-add Vanished players don't have rights patch 2018-07-24 20:15:57 +02:00
Aikar
480011c529
restore uuid to Entity.toString 2018-07-24 00:48:07 -04:00
Aikar
84d229cd29
Optimize Region File Cache
CraftBukkit added synchronization to read and write methods. This adds
much more contention on this object for accessing region files, as
the entire read and write of NBT data is now a blocking operation.

This causes issues when something then simply needs to check if a chunk exists
on the main thread, causing a block...

However, this synchronization was unnecessary, because there is already
enough synchronization done to keep things safe

1) Obtaining a Region File: Those methods are still static synchronized.
   Meaning we can safely obtain a Region File concurrently.

2) RegionFile data access: Methods reading and manipulating data from
   a region file are also marked synchronized, ensuring that no 2 processes
   are reading or writing data at the same time.

3) Checking a region file for chunkExists: getOffset is also synchronized
   ensuring that even if a chunk is currently being written, it will be safe.

By removing these synchronizations, we reduce the locking to only
when data is being write or read.

GZIP compression and NBT Buffer creation will no longer be part of the
synchronized context, reducing lock times.

Ultimately: This brings us back to Vanilla, which has had no indication of region file loss.

Closes #1260
2018-07-23 23:50:09 -04:00
Aikar
f51ad46686
Merge branch 'master' into pre/1.13
* master:
  Add some debug for entity slices
  Mark chunk dirty on entity changes
  Reduce and improve dupe uuid resolve message
  Add more entity debug info
  Bring some 1.13 authors to master
  Fixed more stuff
  Remove unsed method
  Extend player profile API to support skin changes
  Extend player profile API to support skin changes
2018-07-23 23:20:41 -04:00
Aikar
166eb8b489
Update upstream 2018-07-23 23:00:57 -04:00
Aikar
d155366b54
Add some debug for entity slices
If we find any entity in an unexpected state, log it so we can discover
what potentially put it in that state to relate to issue #1223
2018-07-23 22:55:27 -04:00
Aikar
ba80c7e580
Mark chunk dirty on entity changes
This is to hopefully help avoid any chunk saving entity issues.
Marks the chunk that it NEEDS to be saved, ensuring the latest state gets saved.
2018-07-23 22:54:52 -04:00
Aikar
9ec7ffa358
Reduce and improve dupe uuid resolve message 2018-07-23 22:54:43 -04:00
Aikar
5c4367f9d3
Add more entity debug info 2018-07-23 22:50:47 -04:00
Aikar
009031a21f
Bring some 1.13 authors to master 2018-07-23 21:09:25 -04:00
willies952002
29e39cbbc1 [CI-SKIP] Add Self to MIT List (#1262)
Apparently I wasn't already on this list..
2018-07-23 21:05:04 -04:00
Aikar
5f175ef9c3
Merge pull request #1250
Cleaned up some implementation notes to use existing Vanilla method for some things.
merged into parent patch

7dd5837d Fixed more stuff (NickAcPT)
09f01353 Remove unsed method (NickAcPT)
e5ea4656 Extend player profile API to support skin changes (NickAcPT)
e67d55d0 Extend player profile API to support skin changes (NickAcPT)

* pull/1250/head:
  Fixed more stuff
  Remove unsed method
  Extend player profile API to support skin changes
  Extend player profile API to support skin changes
2018-07-23 20:42:04 -04:00
kashike
c4be2c0803
Merge pull request #1261 from astei/patch-1
Add myself to the MIT list
2018-07-23 17:34:19 -07:00
Andrew Steinborn
b3f73074b3
Licensing stuff
I agree to license all of my current and future Paper changes under the MIT license.
2018-07-23 20:32:40 -04:00
Aikar
4f7a858bd6
Merge pull request #1248
c2d29a73 PlayerElytraBoostEvent (BillyGalbreath)

* pull/1248/head:
  PlayerElytraBoostEvent

Also merged paper config into parent
2018-07-23 20:29:55 -04:00
Aikar
3ad50727b9
Merge pull request #1254
0fbf3e77 Re-add Option to prevent armor stands from doing entity lookups (Hugo Manrique)

* pull/1254/head:
  Re-add Option to prevent armor stands from doing entity lookups
2018-07-23 20:22:51 -04:00
Aikar
56d4a0e1fe
rebuild patch and delete unused 2018-07-23 20:16:48 -04:00
Aikar
1b3658b2c4
Merge pull request #1257
0069113b Put the decompile fixes into MC Dev Fixes patch (Andrew Steinborn)
608b5e52 Optimize RegistryID.c() (Andrew Steinborn)

* pull/1257/head:
  Put the decompile fixes into MC Dev Fixes patch
  Optimize RegistryID.c()
2018-07-23 20:15:56 -04:00
Aikar
2c2b45ddb9
Fix a concurrency issue with chunk scheduler
It's possible we won't hit this on the servers current state since nothing is async,
but we are working towards that.

I experienced a crash due to this code during my work.
2018-07-23 19:41:41 -04:00
Aikar
433c56c2d3
Fix memory leak in proto chunk change 2018-07-23 19:41:29 -04:00
Aikar
9a17bddf12
Update upstream 2018-07-23 19:41:14 -04:00
Shane Freeder
4608731dca
Update S
Also drop a few patches which are no longer needed/already merged in.
2018-07-23 18:21:07 +01:00
Andrew Steinborn
0069113b2e Put the decompile fixes into MC Dev Fixes patch 2018-07-23 13:10:06 -04:00
Andrew Steinborn
608b5e5235 Optimize RegistryID.c()
Fixes #1253
2018-07-23 12:58:48 -04:00
Hugo Manrique
0fbf3e775d
Re-add Option to prevent armor stands from doing entity lookups
Remove old patch
2018-07-23 16:04:03 +02:00
Shane Freeder
12b0bf7983
Avoid ArithmeticException should server be stopped before worlds are loaded
Our changes for the spawn radius have the potential to throw an ArithmeticException
should the server be stopped before we've loaded worlds, we check if the server is
running earlier to check if we should even consider attempting to load chunks, which
would cause us to, 1) not load chunks anyways, as we're disabled; 2) throw an
ArithmeticException due to us expecting that we're going to be loading more than 0 chunks.
2018-07-23 10:25:03 +01:00
Shane Freeder
aad194a32e
Update B/CB/S 2018-07-23 09:44:57 +01:00
Aikar
6e3ef06255
Remove debug that got left in proto chunk change last build 2018-07-22 22:33:43 -04:00
Aikar
dda43c2566
Don't save Proto Chunks
These chunks are unfinished, and waste cpu time saving these unfinished chunks.
the loadChunk method refuses to acknoledge they exists, and will restart
a new chunk generation process to begin with, so saving them serves no benefit.
2018-07-22 21:25:48 -04:00
Aikar
643187e289
Fix spawn loading percentages 2018-07-22 19:53:01 -04:00