Commit graph

4775 commits

Author SHA1 Message Date
Spottedleaf
ec7bd6a7c6 even even even even more work 2020-06-25 16:38:24 -07:00
MiniDigger | Martin
e943ece469 even even even more work 2020-06-25 16:09:55 +02:00
Spottedleaf
4aa7955818 even even more work 2020-06-25 06:11:48 -07:00
Spottedleaf
d30edc35eb even more work 2020-06-25 05:04:34 -07:00
Spottedleaf
fbbf45ec42 more progress 2020-06-25 04:00:35 -07:00
Aikar
5287c1ba7c Current progress - Leaf, tag your it 2020-06-25 05:27:25 -04:00
Aikar
175f83e9d0 Current progress 2020-06-25 00:02:26 -04:00
Aikar
1a45fc25f5 API update 2020-06-24 22:33:35 -04:00
Aikar
e212d4bb19 1.16.1 prep 2020-06-24 21:10:30 -04:00
Aikar
872f10bf7b Initial prep for 1.16
Remove patcehs we know need to go
add comment on one im not sure should be dropped

go ahead and fix patched repos to turn off gpg signing, as this
helps rebase/apply --continue commands not suck.

Go ahead and prep the pom file change
2020-06-24 04:38:17 -04:00
Aikar
48473fe003 1.15.2 - 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:
149527f7 SPIGOT-5782: Set Arrow Launched From Crossbow

CraftBukkit Changes:
be6aaf04 SPIGOT-5782: Set Arrow Launched From Crossbow
833da9c4 SPIGOT-5799: InventoryCloseEvent fires after PlayerQuitEvent
26c0084f SPIGOT-5675, SPIGOT-5798, MC-149563: Fix tracking of entities across dimensions
7f3e7c3f SPIGOT-5797: Zombie(Villagers) Instant Convert based on their lifetime
2020-06-23 20:25:28 -04:00
Jan Tuck
3d69f1846a Add PrepareGrindstoneEvent 2020-06-22 01:16:21 +02:00
Aikar
03240a3fdd Fix Player skulls for offline mode servers
Always use online mode for them in Profile API calls

Adds new API to profile API to let you control online mode yourself

Fixes #3594
2020-06-23 04:53:02 -04:00
Aikar
6260d7ba7f 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:
b2f1908c SPIGOT-5783: Add helpful info to UnknownDependencyException
e4f46260 SPIGOT-2623: Add EntityEquipment methods to get/set ItemStacks by slot.
529a9a69 SPIGOT-5751: Clarify behaviour of block drop-related API methods

CraftBukkit Changes:
8ea9b138 Remove outdated build delay.
ffc2b251 Revert "#675: Fix redirected CommandNodes sometimes not being properly redirected"
cb701f6b #675: Fix redirected CommandNodes sometimes not being properly redirected
c9d7c16b SPIGOT-2623: Add EntityEquipment methods to get/set ItemStacks by slot.
fad2494a #673: Fix Craftworld#isChunkLoaded
8637ec00 SPIGOT-5751: Made breakNaturally and getDrops returns the correct item if no argument is given

Spigot Changes:
a99063f7 Rebuild patches

Fixes #3602
2020-06-23 04:30:45 -04:00
Aikar
1c5229f4e4 Fix many chunk loading issues
Fixes a few various issues with chunk ticket state

restores mojangs ticket throttle but tries to be smarter about it.
fixes a few state mismatches that needed to be handled.

Fixes fake NPC's adding player tickets when they shouldn't have been.

Improves teleport chunk loading by processing high priority on new area

Fixes #3605
Fixes #3537
Fixes #3573
2020-06-23 04:10:08 -04:00
Spottedleaf
7c419073e4 Fix not running level updates for light if no pre/post task 2020-06-22 21:17:28 -04:00
Josh Roy
ce5e21f683 Add and implement PlayerRecipeBookClickEvent (#3351)
Co-authored-by: LordKorea <lk97798@posteo.net>
2020-06-23 00:33:08 -04:00
Mariell
706761b531 Fix piston dupe patch creating ghost blocks (#3603)
The 2 flag (send change to clients) must always be set. If it is only set
when the `map.replace` call before it does something, as was suggested
on Discord, the issue will not change whatsoever.

Fixes #3593
2020-06-23 01:00:00 +02:00
PatoTheBest
7ae726ce8d Fix NPE on TileEntitySkull (#3598)
The setGameProfile method on TileEntitySkull is annotated with the @nullable annotation,
but the skull didn't check for null profiles before attempting to retrieve cached skin.
This bug was introduced by the commit making the skull use spigot's User Cache.

Additionally, CraftMetaSkull also had the same issue with a null GameProfile, so this also
ensures it doesn't break.

The whole CraftPlayerProfile class is not null-safe, it requires a GameProfile that isn't
null so we add a Validation on the constructor, that way it is easier to catch this kind
of issue in the future.
2020-06-21 21:59:34 -05:00
Nesaak
f0a807b3bd Expose getItemStack in Arrows 2020-05-22 13:56:24 -04:00
kickash32
9ae97409d4 Track Ender Dragon at current (no tick) view distance 2020-06-12 21:47:18 -04:00
Mariell Hoversholm
0de2f11f56 Add clear reputation API 2020-05-26 21:49:02 +02:00
Aikar
5a933b8217 Add note to use Personal Forks and not Organization forks for PR's
Paper will routinely modify your PR for you to rebase it on latest or take care of any minor nitpicks that we can
just solve for you instead of making you go back for a trivial item.

However, if you use an Organization for the PR, this prevents Paper from doing this, and will require us to manually
merge it and close the PR instead of it being marked as the purple merged.

We much prefer to have merged PR's show as merged, so please do not use organizations repo's for PR as GitHub sadly
does not support maintainers pushing to them.

See [https://github.com/isaacs/github/issues/1681](https://github.com/isaacs/github/issues/1681)
2020-06-20 15:51:03 -04:00
ㄗㄠˋ ㄑㄧˊ
4f81cb8c92 Add history file for terminal 2020-05-23 11:23:27 +08:00
Max Lee
d18935ed70 Add Inventory getHolder methods without creating new block snapshots (#3535) 2020-06-20 20:34:56 +01:00
Techcable
913467791a Make enableTreasureMaps apply to shipwreck loot generation
Fixes #3480
Previously it only controlled whether villagers could trade treasure maps.
Now it should apply to loot generated in treasure maps.

We don't unregister treasure maps from the loot table,
since this option is per-world and the table is global.
Instead I just replaced the implementation with a NOP.
2020-06-16 13:31:54 -07:00
HeartPattern
36e82720c5 Remove useless warn logging while disconnecting
Remove useless "handleDisconnection() called twice" logging.
This warning log every time player kicked by server.
2020-06-13 02:21:29 +09:00
Spottedleaf
2005255c62 Fix enderdragon exp dupe
Properly track death stage when unloading/loading in the dragon
2020-06-20 15:04:50 -04:00
Spottedleaf
a993a5d1fd Prevent position desync in teleporting during movement
Caused the server to revert to the player's overworld coordinates
after teleporting into the end.

Sidenote: The underlying issue is that the move call can teleport
entities and do other things like kill the entity. In the future,
to fix all exploits derieved from this usually unexpected
behaviour, we need to move all of this dangerous logic outside
of the move call and into an appropriate place in the tick method.
2020-06-20 14:59:49 -04:00
Spottedleaf
66039d1eb3 Fix sand not dying correctly
If the falling block dies during teleportation (entity#move), then we need
to detect that by placing a check after the move.
2020-06-20 14:58:35 -04:00
Spottedleaf
53b2b9f391 Fix carpet and rail duping by pistons under same TNT duping config
This renames the config from enable tnt duping to enable piston duping

Normally we would not have a config for rails and carpet duping, but
the fix for TNT is the same fix for rails and carpet, so they are
having to be covered under that same config.
2020-06-20 14:56:08 -04:00
Spottedleaf
06cf33bf4f Fix more cases of Bedrock breaking
This is still covered under the setting to re-enable this.
2020-06-20 14:53:15 -04:00
Mariell
1bb4fa735d Only complete from cache if ID is given (#3591)
As it stands, one can complete from the cache if no ID is given. If
there is no ID, it will throw an NPE, as ConcurrentHashMap (which is used
in UserCache) does not support null keys. This should fix any current
and future issues where exceptions are thrown just because a UUID is not
currently given on the profile due to a plugin or server bug/issue.

Fixes #3590.
2020-06-20 20:46:57 +02:00
Aikar
f3af3b7d5f Revert a change made to getChunkFuture for isUnloading
Talked with leaf on it and understand what its going now even though
it was a hack fix by Spigot, but seems ok.

I had orig made this change thinking it was the source of another
issue but that came out to not be true.

Fixes #3573
2020-06-20 14:23:09 -04:00
Aikar
93655fce88 Ensure we load chunks for Entity getCubes
Was some other code paths missing the set for loading chunks

Fixes #3582
Fixes #3368

Probably helps with "falling through world" issues too.
2020-06-20 05:22:09 -04:00
Aikar
5b7c4a0281 Optimize Network Manager Closed channel handling and flushing
Adds Netty Channel Flush Consolidation to reduce the amount of flushing
This improves performanceo of netty event loop.

If a problem is encountered with this, you can disable it by adding the java flag:
  -DPaper.disableFlushConsolidate=true

Also avoids spamming closed channel exception by rechecking closed state in dispatch
and then catch exceptions and close if they fire.

This should resolve connections getting stuck spamming ChannelClosed in logs and
let them clean up and close correctly.
2020-06-20 04:37:17 -04:00
Aikar
184795a274 Improvements to chunk priority / bug fixes
ensure we add missing player tickets even if already full status
remove the player ticket throttler entirely... causes a lot of issues and
our system handles the role that it was serving now too.

increase max delays on farther out chunks load delay

remove -5 priority delay for distant chunks seemed it applied at weird times.

ensure if delay distance manager tick ever got left lingering it unsets on a chunk load.

Fixes #3572
2020-06-20 02:37:21 -04:00
Aikar
ac6d387124 Make Skull Texture Lookup use the User Cache
Spigots cache only cached by name which really was not correct...

Additionally, user cache exposes a cache of any player who has logged in
once this session too even if offline.

Also fixed some quirks with Profile API where we might of had textures
in the cache that we didn't even try to look up.

So this should overall help reduce API calls to Mojang.

Sadly, the User Cache doesn't cache textures, but if that ever
changes in future, we would gain benefit there too.
2020-06-19 21:32:42 -04:00
Aikar
f6f42ece6b Improve light optimizations and fix bugs
Rewrites the Threaded task logic to no longer use 2 queues and instead
keep a single prioritized queue and do all of a chunks light tasks in a single batch

Fix a math issue in one place (Thankfully didn't seem to really be a common place since didn't notice anything)
2020-06-19 19:10:38 -04:00
Zach Brown
d933177708 Also restrict height in the vanilla teleport command
Uses the same ridiculously large limit as before,
just now also applied to the Y coord.

Fixes GH-3575
2020-06-17 17:46:45 -05:00
Josh Roy
c5b5820901 Add unsupported-settings section to config (piston tnt dupe config option) (#3565) 2020-06-15 12:29:39 -04:00
MiniDigger | Martin
454eaca2d3 Document fixup commit way of modifing patches (#3423) 2020-06-15 17:20:28 +02:00
Spottedleaf
cf3f29c3ac Fix piston physics inconsistency (fix tnt dupers) (#3544)
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
2020-06-12 00:30:30 -07:00
David Slovikosky
be6b3b9b37 Fix missing chunks due to integer overflow (#3527)
This patch fixes a bug in the WorldChunkManagerTheEnd class where the distance
from 0,0 squared overflows the maximum size of an integer. The overflow leads
to hard chunk borders around 370,000 blocks from 0,0. After this cutoff there
is a few hundred thousand block gap before end land resuming to generate at
530,000 blocks from spawn. This is due to the integer flipping back and forth.

The fix for the issue is quite simple, casting chunk coordinates to longs
allows the distance calculation to avoid overflow and work as intended.
2020-06-12 00:30:18 -07:00
avaruus1
9775c90c51 Scheduling an async task timer creates a non-repeating task (#3543) 2020-06-12 02:32:48 +03:00
Aikar
0ded25feee Fix issues with SIGTERM not shutting down gracefully - Fixes #3062
We had 2 issues.
1) Log4J2 Shutdown hook seemed to be causing issues as it shutdown logger while we still needed it
2) ServerShutdownThread needs to stay alive until server is shutdown to keep jvm open.

It appears SIGINT is handled differently than SIGTERM, as SIGINT worked correctly.

But this will make both methods work.
2020-06-10 23:40:28 -04:00
Spottedleaf
4347fa1b85 Ensure chunk gen tasks return to main thread before completing futures 2020-06-10 23:24:35 -04:00
Aikar
3ef000597a Improve chunk loading speed and prioritization further - Fixes #3530 2020-06-10 08:06:34 -04:00
Aikar
2a50b14734 Improve Chunk Priority, Frustum Priority and Load Speed Algorithms
Fix bug where mojang has a -90 modifier in yaw resulting in us calculating
chunks to the players left rather than in front of them.

Drastically improve Frustum Prioritization function to reduce lag from its
calculations (Found it was being spammed really heavy on world add/teleport)

Also improved the logic behind choosing chunks to prioritize.

Add Priority tickets to a radius of 3 on any login, world chnge or teleport

This should help improve world load / chunk sending upon a player changing
locations by loading those chunks faster.

Improved the Player Ticket Delayer to be a little bit smarter about delays to
let closer chunks load a bit faster and only delay the farther out ones more.

This update will provide significant improvements to priority of chunks and
reduce the cpu cost of doing these calculations.

Fixes #3530
2020-06-09 23:06:34 -04:00
Aikar
bfe5d554d3 Improve ChunkMapDistance.b crash fix to clean up properly
There is some vanilla level bug where this tracking state appears
to get messed up and player doesn't exists in chunk its trying to untrack.

We returned early to prevent crashing, but I suspect if there was a level being
tracked for the chunk, it got leaked due to the early return.

So going to ensure we clean up the level tracker when this state occurs.

This may help with any leaked chunk issues.
2020-06-09 23:01:47 -04:00