Commit graph

1721 Commits

Autor SHA1 Nachricht Datum
Aikar
00f0a30680
Ensure chunk neighbor counts do not get desynced
Mojang was not checking that the chunk did not overwrite, or
was successfully removed.

We're seeing odd reports in #1561 that indicates issues around
this are having problems.
2018-10-17 22:47:27 -04:00
Aikar
e047098814
MC-50319: Check other worlds for shooter of projectiles
Say a player shoots an arrow through a nether portal, the game
would lose the shooter for determining things such as Player Kills,
because the entity is in another world.

If the projectile fails to find the shooter in the current world, check
other worlds.
2018-10-17 19:30:57 -04:00
BillyGalbreath
52ae2a1aec
Implement getters and setters for EntityItem owner and thrower
Closes #1526
2018-10-16 22:17:59 -04:00
Zach Brown
6ec7d9f674
Fix equals case in lightning sounds 2018-10-16 21:40:32 -04:00
Trigary
20515a30ae
Limit lightning strike effect distance
Resolves GH-1436
2018-10-16 21:23:44 -04:00
GreenMeanie
03ecc80de8 Actually set the header (#1576) 2018-10-15 01:05:02 -04:00
Aikar
6a60c4295d
[Auto] Updated Upstream (CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
e7ced970 Catch plugins setting null Material or BlockData to blocks
2018-10-12 18:46:42 -04:00
Shane Freeder
35fcc2e2d0
Share the main thread queue for AsyncChunkProvider
fixes an issue in which thread requests are only processed
for the current provider which can cause a deadlock should
multiple requests exist across providers
2018-10-12 15:50:58 +01:00
Aikar
69a4a30e47
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-10-12 03:11:50 -04:00
BillyGalbreath
3b580e8aa9 Here's Johnny! (#1563)
Adds Johnny API to Vindicator
2018-10-12 03:09:53 -04:00
Aikar
04b8268cf1
Improvements to DataFixers for performance
Mojang asked me to make some changes, so applied them here.
2018-10-12 01:29:28 -04:00
Aikar
77c6bafe46
Missed a +1 on village doors 2018-10-11 21:54:15 -04:00
Aikar
dc6dbeb6ad
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-10-11 21:46:35 -04:00
Aikar
ee7933e43e
Improve Village Door code to not break village mechanics 2018-10-11 21:42:52 -04:00
BillyGalbreath
a16ef75bfd Add sun related API (#1546)
These methods are used internally throughout the game for things like spawning mobs during day/night only or making them burn in daylight, etc. Now exposed for plugin usage.
2018-10-11 21:42:49 -04:00
BillyGalbreath
fe01fa5641 Turtle API (#1509) 2018-10-10 23:40:49 -04:00
Aikar
14de21393c
Use a method for EntityTrackerEntry for Gerrygames
Allow overriding the method for interception

https://github.com/PaperMC/Paper/issues/1537

Resolves #1537
2018-10-10 23:19:51 -04:00
Aikar
f21e10da65
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-10-10 23:06:38 -04:00
BillyGalbreath
950b62689f Check Drowned for Villager Aggression Config (#1560) 2018-10-10 23:01:14 -04:00
Aikar
62efc6ab31
Improvements to Async Chunks
If a chunk load comes in on a chunk load or gen thread,
execute it synchronously on that thread instead of enqueueing it.

It doesn't make sense to enqueue it as that thread is then
going to future.join() it and block until it's ready anyways.

This opens risk to a deadlock if every load or gen thread is
waiting on a recursive chunk but it will never finish because
all of the threads are waiting.
2018-10-10 22:48:35 -04:00
Aikar
0693716984
Identify corrupt region file data and self recover
If we identify an invalid offset (negative, or the header sectors),
then back up the region file and erase that specific chunks offset
data.

This will avoid crashing the server with AIOBB errors and also avoids
server owners having to consider the entire region file 'lost'.

I'm not sure what leads to this state, I can only assume write cut
off mid bits.

In this scenario, there is absolutely no way to know where the chunk
actually is in the data file without loading every
single chunk in the file. And even to do that, would be quite extreme
due to the fact the file isn't in some orderly fashion.

Since the file is backed up, the user can use a region fixer tool
externally to try to restore that single chunk. We could even
add a command to restore a chunk from a backup file in a different
commit later on. But this at least prevents the server from crashing.

The server will just generate a new chunk and move on,
after printing an error to the console about it.

Also fixed the case reported in this issue about the server
hanging when a corrupt chunk is encountered, so this issue
is now fully closed.

Resolves #1541
2018-10-10 21:28:12 -04:00
BillyGalbreath
b1b6a6c4e2 Add LivingEntity#getTargetEntity (#1467) 2018-10-08 21:14:55 -04:00
Aikar
a3cccc9359
Complete future when chunk fails to load 2018-10-08 21:14:13 -04:00
Aikar
df22839abf
Fix Light Bugs - Fixes #1542
Applied a "Only run this when the blocks are different" to
a place, that apparently must be called even with the same
block but different other data I guess.

This was causing oddness with light data.
2018-10-08 20:27:13 -04:00
Aikar
1f5866fcf8
Improve synchronization on chunk gen to not block main - Fixes #1550
Chunk Generation was occuring while inside of the progressCache lock
this caused the progressCache to stay blocked for a long period of time
which then blocked main when main needed to clean the expiring map.

We now maintain a separate map for pending scheduler entries, that
we can join on if a 2nd request comes in while one is starting.

This strategy keeps the lock only for a fraction of time but
maintains thread safety.

So now the chunk is generated without holding a lock and wont
block the main thread on the expiring map as we will insert it
once ready.
2018-10-08 00:45:04 -04:00
Aikar
2a2d9fb508
Improvements to Logging Warnings/Dupe Entities - Resolves #1544
1) Removed "Regen" mode of Dupe UUID resolver, forced safe.
Some servers who updated before we had safe mode added still had this value.

There's really no reason to keep this mode, as we've seen that vanilla
triggers this often and 99.9999999% of cases will be an actual duplicate
that needs to be deleted.

2) Made Vanilla Debug messages about dupe UUIDs and dupe uuid resolve messages
only show up if the debug.entities flag is on. This will stop server owners
from panicing from seeing these logs, and stop opening bug reports on this,
only for us to tell you "don't worry about it".

3) Avoid adding entities to world that are already added to world.

This can be triggered by anything that causes an entity to be added
to the world during the chunk load process, such as chunk conversions.

Issue #1544 was a case of this.

4) Removed debug warning about ExpiringMap.

Nothing more I know to do about this anyways. We recover from it,
stop warning to reduce noise of issues to us.
2018-10-07 15:10:23 -04:00
BillyGalbreath
438ee3f487 Fix weird issues with Creeper ignite state (#1534) 2018-10-07 12:58:09 -04:00
BillyGalbreath
4266bfa3e4 Fix timer in slime AI (#1548)
Seems my original pull for this created an unseen bug where the target timer would never run out (the slime would not "forget" it's target over time). Went ahead and fixed that, and made the code more legible by adding the imports.
2018-10-07 12:57:52 -04:00
BillyGalbreath
0ca403459b Allow setting the vex's summoner (#1545) 2018-10-06 23:31:21 -04:00
Aikar
468a1cbbd7
[Auto] Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
ee12ca7b Add maximum repair cost API to AnvilInventory

CraftBukkit Changes:
1ceee633 Implement maximum repair cost API to AnvilInventory
2018-10-06 05:31:40 -04:00
Aikar
addebee995
Fix logic error in water activation range immunity check
was no longer giving immunity to items
2018-10-06 01:17:32 -04:00
Aikar
49052de5e5
Fix many light bugs by removing recheckGaps change
Fixes #1539
Fixes #1483
2018-10-06 00:56:20 -04:00
Aikar
f21627490e
Don't stop chunk executors, cancel pending chunks instead
Fixes #1532
2018-10-06 00:15:40 -04:00
Aikar
70b156939f
Cancel pending chunk loads when they are no longer needed
This will improve queue times by canceling chunks when a player
leaves the radius of an async loading/generating chunk.

This matches behavior we had pre 1.13 for loading too.
2018-10-06 00:02:09 -04:00
Zach Brown
2ae1ed6336
Hook into CB's plugin rewriting system
Primarily to update plugins for our fastutil relocation. Can also be
used to do things like debug plugins accessing versioned NMS packages in
an IDE pre-relocate step.
2018-10-05 19:44:46 -04:00
133Seven
d7cb3a9989 [CI-SKIP] Change URL in POM to https://papermc.io 2018-10-05 11:52:04 -04:00
Matthew Miller
8749e58b72 Don't update snapshot blockstates (#1535)
Following this comment on PaperLib, https://github.com/PaperMC/PaperLib/pull/2#discussion_r222761017

I've made non-snapshot TE's not update when they receive the update call. They still do the rest of the update, just not the applying of the TE data. This is to still allow forced physics updates etc. Also in the case of Jukeboxes, updating the properties
2018-10-05 11:24:01 -04:00
Brokkonaut
0a6d449907 Sometimes World.save() did not save the whole world. (#1538)
flag = true is a force save of the whole world (for example World.save()), this should ignore the current queue size.
2018-10-05 11:23:20 -04:00
Aikar
e2418a9945
[CI-SKIP] Undo an accidental merger of patches
Accidently merged 1 pathfinding patch into a light patch instead
of the other pathfinding page.

Fixed that. Hand editting patch master race
2018-10-04 23:31:01 -04:00
Aikar
459987d69f
More improvements to activation range, improve turtles
improved the water code so that immunity wont trigger if the entity
has the water pathfinder system active, so this improves support
for all entities that know how to behave in water.

Merged 2 EAR patches together, and removed an MCUtil method that
doesnt have a purpose anymore
2018-10-04 23:18:46 -04:00
Aikar
a4df5ddee7
Report errors correctly from FutureTasks
Anything that posts something to main thread was not
correctly reporting their errors to the logger, passing the
ExecutionExcetion instead of the cause. This resolves that,
as well as patches some simple cases of System.nanoTime where mojang
had used a LongSupplier to use a different method on client.
2018-10-04 01:45:11 -04:00
Aikar
d7dd3798ec
Fix lag caused by water mobs across the board - Fixes #1462
This update introduces Entity Activation Range for water mobs.

Activation Range has been one of my biggest performance improvements
I ever added to Minecraft, however "Entity is in Water" is an immunity
case that keeps an entity active.

This update ignores the water check for known water based mobs, allowing
them to actually go inactive.

In addition to that, a new config option was added to spigot.yml to go with
the rest of the entity-activation-range options to let you configure
aquatic mobs like fish, squid and dolphins separately.

This should overall fix all lag caused by water mobs.
2018-10-04 01:21:02 -04:00
Zach Brown
ebe072deb6
Revert "Dont strip explicit leading color codes in chat components (#1512)"
This reverts commit 31a99db328.

Fixes GH-1525
Reintroduces GH-1484
2018-10-03 18:15:22 -04:00
Shane Freeder
2dcae290df Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
867794b2 Make setPersistent also control player saving

CraftBukkit Changes:
02518f92 Make setPersistent also control player saving
2018-10-03 20:19:35 +01:00
Shane Freeder
26153def87 Fix FileIOThread concurrency issues (fixes #1505)
FileIOThread was using two volatile counters in order to track if
any pending work was in the queue, this causes potential concurrency
issues when this counter is updated from multiple threads, potentially
causing these counters to desync due to the unsafe volatile update
2018-10-03 19:12:07 +01:00
Aikar
a64b0952cb
Add config options to paper.yml for Async Chunks and Shared Host Overrides
Shared Hosts have been concerned over the increased CPU usage that Async Chunks
has introduced. We understand that shared hosts can't allow 1 client
to abuse the systme resources depriving other servers of cpu time, so we've
added some configs to allow hosts to force some settings.

Hosts, you may set the following SYSTEM ENVIRONMENT VARIABLES (NOT JVM FLAGS)
to change some behavior:

PAPER_ASYNC_CHUNKS_SHARED_HOST_GEN=1   - Enable Single Threaded World Generation (capping CPU Usage
PAPER_ASYNC_CHUNKS_SHARED_HOST_GEN=2   - Disable Async Chunk Generation - Please do not do this!!!
  - Minecraft is moving towards asynchronousm per-world chunk generation itself. You need to prepare
  - for this, so please do not disable async chunk generation.

PAPER_ASYNC_CHUNKS_SHARED_HOST_LOAD=#  - Where # is Maximum number of threads to use on Chunk Loading
  - This is a max, so your end user can reduce it more too. I suggest no lower than 2. Minimum is 1.
  - These are usually much faster request, so outside of loading entire worlds, They usually do not
  - get as much load. Paperby default uses CPU Core count * 1.5, so this may default to a higher value
  - on shared host and you should override it with this value to say 2-4.

These settings will override your clients paper.yml options. Set as a system wide environment
variable to ensure all Paper clients respect your resource usage desires.

Resolves #1520
2018-10-02 23:51:03 -04:00
Zach Brown
10209bfbd8
Do not allow null in CanPlaceDestroy NBT API
Fixes GH-1523
2018-10-02 22:54:38 -04:00
Aikar
38f0f0b71a
Disable use of Locks on main thread for DataPaletteBlock
This should greatly improve performance by using a No Op lock
while on the main thread.

Vanilla always had a write lock on write operations, but we added
a Read Lock during Async Chunks to make concurrent writes non fatal
for Async Chunks.

This means we added on a bunch of over head to all chunk read operations.

This corrects that, as well as disabling the write lock while on main thread.

It is a general rule that you do not touch a chunk async once it is loaded
into the world, as we never had locks on the chunk before 1.13 even.

So once we are on main, we don't expect concurrent access to begin with,
so we don't need the write locks either.
2018-10-02 22:29:31 -04:00
Aikar
e45b853e60
Optimize some light chunk access
light calculations repeatedly looks up the same chunk while going
down on the Y access. Pass the chunk to it to skip many round trips
to the map lookup process.

while the gains arent as big since we have last access cache, it
should hopefully avoid many callstacks of depth and improve inlining,
as well as avoids entering a synchronized code block.

The avoiding of entering synchronized section is the main goal here.
2018-10-02 21:55:30 -04:00
Aikar
97b9ce8476
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-10-02 10:26:35 -04:00
BillyGalbreath
31a99db328 Dont strip explicit leading color codes in chat components (#1512) 2018-10-02 10:21:12 -04:00
Aikar
920bf4680b
[Auto] Updated Upstream (CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
68588dac SPIGOT-4405: Chunk generation problem
2018-10-02 09:06:52 -04:00
Shane Freeder
9038677c89
Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
c71bb9ca Add PlayerRecipeDiscoverEvent and methods to (un/)discover recipes

CraftBukkit Changes:
7a2f4867 Implement PlayerRecipeDiscoverEvent and methods to (un/)discover recipes
2018-10-02 11:01:56 +01:00
Shane Freeder
eaa2c39183
Configurable connection throttle kick message (Closes #1515) 2018-10-02 10:39:49 +01:00
Shane Freeder
3fc712a78f
Fix custom flying kick message 2018-10-02 10:39:49 +01:00
Shane Freeder
f1a92f03db
Cleanup tab completion
During testing, I could not find any case of TabCompleteEvent firing,
however, upon reinspection of the code, and additional testing, this
appears to work fine without any changes on our part.
2018-10-02 10:37:37 +01:00
Aikar
6371b4581d
Fix Async Chunk Load Callback if chunk was already loaded
Fixes ACL API mainly, but might fix other smaller things too

Also improved the high priority check if the chunk was already marked done
2018-10-01 01:00:09 -04:00
Aikar
48b1b0aac5
Optimize Spare Chunk loads to be removed faster
this has technically been a longer standing problem, but if an async
chunk loads after a chunk has been removed from the chunk map, it would
be treated as any other spare chunk and kept loaded until Chunk GC kicks in.

This fixes that, but also obsoletes ChunkGC in that anytime we load a spare
chunk (a chunk outside of any players view distance), we will immediately
mark it for unload.

This should reduce the amount of spare chunks loaded on a server.
2018-09-30 20:34:05 -04:00
BillyGalbreath
c81736fd60 Fix cancelled lootables (#1510) 2018-09-29 21:57:59 -04:00
Zach Brown
d9363f2979
Fix slime pathfinding when loaded from NBT
GH-1507

The canWander property is initialized to true by default, however when
loaded from NBT, if the key doesn't exist the property will be set to
false. The correct solution is to ensure the key exists before setting
the property.
2018-09-29 16:06:26 -04:00
Aikar
9285b9cf1c
Fix village check
obf helper was in an unimported file, so just going to skip helper here
2018-09-29 12:20:29 -04:00
Aikar
c64503c66f
Fix Village Loading Doors fix, add config option, hopefully fix farms
The patch was previously applied wrong, and still caused chunk loads.

Now, we will prevent it again, but also added a config option to
disable this optimization.

However, I also updated it so that doors are not removed if the chunk
the door is in is unloaded, so this should avoid breaking farms.

Fixes #1506
2018-09-29 12:03:11 -04:00
Aikar
08bb5b49d2
Fix Sending Chunks to Client - Fixes #1504
Vanilla has some screwy logic that doesn't send a chunk until
it has been post processed. This is an issue as post processing
doesn't occur until all neighbor chunks have been loaded.

This can reduce view distance while generating terrain, but also
cause bugs where chunks are never sent to the client.

This fix always sends chunks to the client, and simply updates
the client anytime post processing is triggered with the new chunk data.
2018-09-29 01:22:21 -04:00
Aikar
590c2f96eb
Fix bug in async load order priority
accidently had priority inverted!

This will greatly improve visual chunk load speeds
2018-09-28 23:12:16 -04:00
Aikar
0c9bb9b7ae
Don't recheck type after setting a block
The server does a "Did my update succeed" check after setting
a blocks data to a chunk.

However, writes can not fail outside of a hard error or a
a race condition from multiple threads writing, which is
not something that should ever occur on the server.

So this check is pointless, as if it did occur, the server would
be having data corruption issues anyways.

This provides a small boost to all setType calls.
2018-09-28 22:40:04 -04:00
Aikar
f02b4d200e
Fix issues with entity loss due to unloaded chunks
Vanilla has risk of losing entities by causing them to be
removed from all chunks if they try to move into an unloaded chunk.

This pretty much means high chance this entity will be lost in this scenario.

There is another case that adding an entity to the world can fail if
the chunk isn't loaded.

Lots of the server is designed around addEntity never expecting to fail for these reasons,
nor is it really logical.

This change ensures the chunks are always loaded when entities are
added to the world, or a valid entity moves between chunks.

Hopefully will fix issues #1496 and #1434
2018-09-28 22:39:20 -04:00
Aikar
cd6a5f3b51
Remove Water optimization from the Light Optimizations
case was found where it could cause light to become incorrect

But we still get to optimize out any same block updates which reduces light operations
2018-09-28 22:37:43 -04:00
Aikar
c75015c1a4
Remove the "Entity already removed" warning unless debug entities is on 2018-09-28 22:37:33 -04:00
Aikar
de4487435d
Optimize Light Recalculations
The server triggers light recalculations even if the new block
is the same as the old block. At this time, BlockData Properties
do not impact light calculations.

So the only way light should change, is if the block itself
changes from 1 block to another.

Additionally, as of 1.13, water now only blocks 1 light level
instead of 3, meaning that light level decreasing is the same as air.

This means, transitions between water and air also do not need
to recalculate light, which saves a TON of updates caused by
fluids flowing.
2018-09-28 21:30:03 -04:00
BillyGalbreath
3482df728f Fix turtle lag (for real this time) (#1503)
Amends #1502, to further fix #1501
2018-09-28 21:27:40 -04:00
Aikar
b62dfa0bf9
Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
39ce5d3a SPIGOT-4399: ItemMeta.equals broken with AttributeModifiers

CraftBukkit Changes:
1cf8b5dc SPIGOT-4400: Populators running on existing chunks
116cb9a1 SPIGOT-4399: Add attribute modifier equality test
5ee1c18a SPIGOT-4398: Set ASM7_EXPERIMENTAL flag
2018-09-28 19:31:59 -04:00
BillyGalbreath
afeb77bc88 Fix turtle lag (#1502)
Fix #1501

I just added a condition check to not start a new pathfinder goal if the turtle already has one set.

Needs more testing.

![Timings Comparison](https://i.imgur.com/p9eJQSo.png)
2018-09-28 13:58:06 -04:00
Aikar
515f2e7beb
Ignore Dimension NBT field in Entity data
Minecraft is trying to set Dimension Objects based on a Dimension ID

Dimension ID's for custom worlds are dynamically allocate dand not guaranteed
consistent.

This removes checking the NBT data, as the Entity will always have its
DimensionManager set to the world it is being placed into.

This fixes corrupt entities breaking chunk saving in custom worlds.
2018-09-27 00:11:50 -04:00
Aikar
2365b308c8
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly.

This update has been tested to ensure that World Conversion still occurs correctly.

Bukkit Changes:
0812ce2c SPIGOT-4397: isChunkGenerated API

CraftBukkit Changes:
4824655c SPIGOT-4398: Upgrade to ASM 6.2.1 for better Java 11 support
eea43870 MC-134115: Fix issues converting tile entities
1a7f2d10 SPIGOT-4397: isChunkGenerated API
40aed54d SPIGOT-4396: Improve vehicle movement

Spigot Changes:
f6a273b1 Rebuild patches
2018-09-26 22:35:46 -04:00
Daniel Ennis
c5fbde9f17
Async Chunk Loading and Generation (#1397)
This restores Asynchronous Chunk Loading to 1.13, as well as adds Asynchronous Chunk Generation..

This provides a massive boost to server performance and should bring 1.13 back closer to 1.12 performance levels for pre generated worlds.

World Generation will now be faster overall than 1.12 since 1.12 did not have async generation.


**DONATE:**
Lots of effort has went into making this happen. Want to say thanks and donate? 

https://donate.emc.gs/AsyncChunks
2018-09-26 18:21:44 -04:00
Aikar
5cdfbda4e4
Re-enable light queue toggle, optimize neighbor checks, add max queue time
light queue is actually buggy, so re-enabling the config.

however, if anyone is ok with the buggy behavior, made the max time lost due to
light queue configurable.

We want to get to making the ligth queue default if we can make it work perfectly.

also applying neighbor optimizations to use the faster method for light checks.
2018-09-26 00:57:59 -04:00
BillyGalbreath
e1ba203df8 Honor EntityAgeable#ageLock (#1481)
* test

* Obfuscation helper

* Fix #1459
2018-09-25 10:54:06 -04:00
Brokkonaut
e8e994656b Avoid dimension id collisions (#1487)
getDimensionId() returns the dimension id - 1. So without this patch
we would reuse an existing dimension id, if some other dimension was
unloaded before.

In Spigot this is nearly invisible because DimensionManager has no equals(),
so dimension id collisions just create 2 worlds with the same dimension.

The PaperWorldMap (Added in
https://github.com/PaperMC/Paper/blob/master/Spigot-Server-Patches/0376-Optimize-Server-World-Map.patch ) changes this - Now the dimension is overwritten if there is some collision,
what causes players to teleport to incorrect worlds, World checks will no longer work
and many more evil things.
2018-09-25 10:53:52 -04:00
Aikar
917d582441
[Auto] Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
b9620fd9 API to generate filled explorer maps

CraftBukkit Changes:
c1ecaa2f API to generate filled explorer maps
2018-09-24 05:41:32 -04:00
Aikar
6cd928f83e
[Auto] Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
6f57bf95 SPIGOT-4391: Sign editable API

CraftBukkit Changes:
5cffeca2 SPIGOT-4391: Sign editable API
2018-09-24 01:06:42 -04:00
Aikar
61709368af
Updated Upstream (CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
dcb43ef8 MC-136886: locate command loads chunks without needing to.

Spigot Changes:
f823ac54 Rebuild patches
2018-09-23 21:29:00 -04:00
Zach Brown
7a57f23710
Make bad custom name resolution more specific
Avoids interfering with other places in vanilla where these issues
are tolerated and expected.
2018-09-23 20:10:24 -04:00
Kyle Wood
5d7bf5d57a Enable experimental ASM support for Java 11 plugins (#1480)
JEP 181 brings a new bytecode format for nest mates. ASM API 7 supports
this, but API 7 is still experimental. Attempting to load a Java 11
class that contains nest mates will cause an
UnsupportedOperationException, as API 6 can't handle them. This doesn't
really require any changes to the rest of the code, since this is just
related to ASM's visitor.

We want to use the stable API 6 for all other plugins, only using the
experimental API when required, so we check the class version first.

This should be removed as soon as ASM API 7 is stable.
2018-09-23 15:00:46 -04:00
Aikar
9787753c4f
[Auto] Updated Upstream (CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
fc10dec5 Don't throw error on invalid data in CraftMetaItem.
2018-09-23 05:06:41 -04:00
BillyGalbreath
003c0e0766
Fix NPE race condition in ServerListPingEvent
Fixes GH-1473

If a ping is responded to prior to the server sample being populated
(pre-tick as an example) it can result in an NPE.
2018-09-22 23:55:30 -04:00
Mark Vainomaa
3491f5542e Create API for CanPlaceOn and CanDestroy NBT tags (#1015) 2018-09-22 23:30:54 -04:00
BillyGalbreath
df72ca1321 Expose attack cooldown methods for Player (#1412) 2018-09-22 23:03:53 -04:00
BillyGalbreath
fedb0c07ae Add creative-arrow-despawn-rate (#1411)
* Add creative-arrow-despawn-rate
2018-09-22 22:48:30 -04:00
BillyGalbreath
844687a91c Add obfuscation helper (aikar's request) (#1468) 2018-09-22 22:28:16 -04:00
Zach Brown
e62f3ae259
Return null if we get a ParseException in IChatBaseComponent
Fixes GH-1471, GH-1474

As a result, data that no longer parses correctly will not crash the server
instead just logging the exception and continuing (and in most cases should
fix the data)

Player data is fixed pretty much immediately but some block data (like
Shulkers) may need to be modified in-game in order for it to re-save
properly

No more crashing though.
2018-09-22 15:58:13 -04:00
Senmori
042e018bb1
Apply Spigot PR 493 - Fixes #1469 2018-09-22 12:58:57 -04:00
Aikar
1556158be3
Fix bug in last commit 2018-09-22 12:28:38 -04:00
Aikar
e07e0cb3ca
Improve Light Queue and force enable it for all
There is no reason for the light queue to even be an option. This
enables the light queue for everyone.

This also improves the "can we still tick" time logic to always
check before running a light operation.

previously, we always executed at least 10 on the first world
(but not other worlds...), but we are seeing light take up some
heavy time, so improving that for now.

I've now also improved recheck gaps logic to happen at the end of all single block updates

This also prevents multiple gap checks, as previously if a tick skipped
the gaps check, the next tick would end up re-adding the entry again,
resulting in multiple gap checks.

This now just sets a marker "We need to recheck gaps" and will only occur
once.

This also should reduce chunk loads, as previously, we checked if
the neighbor chunks were loaded for the gap check, however those
neighbor chunks might of unloaded before the light queue operation
actually ran. Now, the neighbor chunk is done when the gap check
is being done, so it should avoid loading chunks.

Fixes #1466
Fixes #1431
2018-09-22 12:09:12 -04:00
Aikar
b6c3d89496
Revert "All generated chunks should be loadable" - Fixes #1470
This reverts commit 60b1ed9c76.
2018-09-22 11:33:30 -04:00
Aikar
0b3afe6c97
[Auto] Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
4db9e3dc Add API to locate structures

CraftBukkit Changes:
65bb2d0f Increase expiration time to 10 days
88a5346f Add API to locate structures.

Spigot Changes:
68acb93f Rebuild patches
2018-09-22 03:16:43 -04:00
Aikar
1db10a30db
Improve synchronization on ExpiringMap 2018-09-21 21:43:50 -04:00
Aikar
60b1ed9c76
All generated chunks should be loadable
Some chunks that need conversion may fail the loadChunks pass, and
end up entering the world gen code to finish processing.

We solved this on the API level before, but this needs to apply to
all chunk loads when gen=false
2018-09-21 16:59:47 -04:00
Aikar
7438edc9a1
Rework Async Chunks API in prep for merge, add utility
This adds a new Future based, Consumer<Chunk> based, and ability
to control whether or not to generate to the Async Chunk API.

Until Async Chunks merges, these API's are still synchronous, but
this commit will allow plugins to start using the API's in use
with the Async Chunks beta.
2018-09-21 16:56:08 -04:00
Aikar
fd1bd5223a
Sync Player Position to Vehicles
Player Positions could become desynced with their vehicle resulting
in chunk conflicts about which chunk the entity should really be in.
2018-09-21 11:37:38 -04:00
Aikar
f02ab90a19
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
cbb4fc16 SPIGOT-1916: Attribute modifiers for ItemStacks

CraftBukkit Changes:
8164f4b2 SPIGOT-1916: Attribute modifiers for ItemStacks

Spigot Changes:
38536abd Rebuild patches
2018-09-21 11:29:17 -04:00