Commit graph

3683 commits

Author SHA1 Message Date
Zach Brown
4bc185d0d7 Try and make zsh complain less
My turn to make "this cant possibly break" changes to the scripts.
2018-10-24 12:35:42 -04:00
Mark Vainomaa
a6fb2b44fa [CI-SKIP] Fix "grep: repetition-operator operand invalid" (#1612)
Some flavours of grep don't like '?' in their expressions (also `.*?` means "match zero or more times or maybe do not match at all" as far as I know).
2018-10-24 18:05:10 +03:00
Aikar
f4ecd3a322 Fix unloaded chunks movement setting 2018-10-24 08:38:34 -04:00
Aikar
caddaa85a6 [CI-SKIP] use cross platform strategy for sed -i
BSD sed can DIAF.
2018-10-24 01:24:17 -04:00
Aikar
c64c016957 [CI-SKIP] make rebuildPatches support BSD sed
because the world can't be a nice place where all seds are equal
2018-10-24 00:53:08 -04:00
Aikar
f827e93edf Improve default thread counts for DataFix BootStrap
Spigot capped it to 2 threads. This bumps it back up to do
maxcores -2 with a max cap of 6.

A typical 4C8T system can use 6 threads and be done in 6 seconds.

Server owners can use system property to override, but this
improves the default.
2018-10-23 23:53:13 -04:00
Aikar
f36773fd9c Use Last Access Cache for isLoaded calls
this should provide a pretty good across-the-board performance
improvement for the entire server, as it's very common for code
to check if (isLoaded(x, z)) { then do something on that chunk }

Previously, containsKey would not read or set the last access cache

By making it do get() != null, we gain the benefits of last access
and also improves thread safey for async isLoaded checks

This exact usage scenario is used in Entity movement, so that alone
saves us up to 5%~ of CPU time for Entity movement.
2018-10-23 23:50:51 -04:00
Aikar
6ca5deba8b Don't sleep after profile lookups if not needed
Mojang was sleeping even if we had no more requests to go after
the current one finished, resulting in 100ms lost per profile lookup
2018-10-23 21:14:03 -04:00
Aikar
ebeba451f2 Fix "prevent players from moving into unloaded chunks"
it used public method instead of private, and moved to world config

also improved the implementation to not use obfuscated stuff

Also removed the Fix Double chest conversion patch since its
fixed in other ways in vanilla
2018-10-23 21:13:58 -04:00
Zach Brown
0e5039cd83 Strip private area unicode characters from signs
It is not immediately clear how these characters ended up on signs in
previous versions. It is clear, however, that they now render as empty
unicode boxes in 1.13, whereas previously they rendered as invisible
characters.

When these signs are loaded in versions after this commit, these
characters from the private use area of the Unicode block will be
stripped. The sign will then be marked to ensure this conversion only
runs once.

There is a flag -DPaper.keepInvalidUnicode=true that can be used if you
do not want us to strip these characters from your signs, though I can
think of no reason to use it.

Fixes GH-1571
2018-10-23 20:59:08 -04:00
Automated
2f4572f0f4 [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:
3359cb19 MC-137353: Don't go crazy on amount of bootstrap threads needed
2018-10-23 05:40:18 -04:00
Shane Freeder
18ac1d68c0 Update for Minecraft 1.13.2 2018-10-23 00:16:21 +01:00
GreenMeanie
f20d327458 Reset players remainingAir on respawn (#1598)
As mentioned in #1597, your air level did not reset if you drown.

Now you get a full breath during respawn.
2018-10-22 15:25:48 -04:00
Gabriele C
039f9ecfd8 Add option to prevent players from moving into unloaded chunks (#1608)
Resolves #1551
2018-10-22 21:25:16 +02:00
Automated
897ae0754a [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:
a639ae44 Remove outdated build delay.
2018-10-22 15:02:10 -04:00
Aikar
af53c8c59e Remove debug text
resolves #1606
2018-10-21 19:16:54 -04:00
BillyGalbreath
71cf04c13d Fix #1604 (#1605) 2018-10-21 14:39:21 -05:00
Automated
fd43e4e3cf [CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-10-21 15:31:50 -04:00
Caleb Bassham
0c7c2af037 Fix NPE when setting a player's spectator target (#1596)
Fix NPE when setting a player's spectator target
2018-10-21 14:27:53 -05:00
Brokkonaut
4c9478551c Don't modify item tag if interaction is canceled (#1589)
The item tag is stored before executing the interaction and restored before handling the
resulting events. If the event was not canceled and the ItemStack is not modified in the
event, the new tag is set back to the new one afterwards. This is similar to the handling
of the item amount.

This fixes a bug where tools lose durability when the interaction is canceled and another bug
where tools become completely repaired when they should break but the interaction was canceled.
2018-10-20 16:03:35 +02:00
Riley Park
15fb6a6c01 Merge pull request #1588 from BillyGalbreath/MC93764
Fix MC-93764
2018-10-19 17:46:56 -07:00
BillyGalbreath
367d892a6e Fix MC-93764 2018-10-19 19:39:21 -05:00
Automated
927780a15f [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:
db10914a Improve minecart spawners
2018-10-19 05:31:49 -04:00
BillyGalbreath
4a5ad2e1d2 Add more Witch API (#1564) 2018-10-18 22:24:09 -05:00
Aikar
6ef36f5d24 Remove MOST Synchronization from Chunk Map
This will provide quite a major performance boost by avoiding
synchronizing on EVERY chunk lookup.

Synchronize, even without contention, incurs processor cache flushes.

Considering this is the 2nd hottest method in the code base, lets
avoid doing that...

Additionally, chunk conversion operations were occuring while
under synchronization which lead to deadlocks.

Now the conversion will occur outside of the lock, and fix
that issue, resolving #1586

Note, that the chunk map is still thread safe for get operations!

The chunk map was never intended to be modified async with our
changes, as we post to main to modify the map, however
we do still synchronize for write operations (put, remove)

We also synchronize for async get operations, ensuring that
async gets are safe.

We do not need to synchronize main thread gets as the processor
cache will be insync since the map is only updated on the main thread.

However, if someone does try to delete or put concurrently, we
will force their operation back to the main thread.
2018-10-18 22:41:23 -04:00
Aikar
8593ac6ec5 Remove useless hashes from patches
This avoids annoying conflicts as well as gets rid of diff noise
from clients preferring different hash lengths
2018-10-18 22:36:03 -04:00
Andrew Steinborn
344d299d69 Add Velocity IP forwarding support (#1557)
While Velocity supports BungeeCord-style IP forwarding, it is not secure. Users
have a lot of problems setting up firewalls or setting up plugins like IPWhitelist.
Further, the BungeeCord IP forwarding protocol still retains essentially its original
form, when there is brand new support for custom login plugin messages in 1.13.

Velocity's modern IP forwarding uses an HMAC-SHA256 code to ensure authenticity
of messages, is packed into a binary format that is smaller than BungeeCord's
forwarding, and is integrated into the Minecraft login process by using the 1.13
login plugin message packet.
2018-10-18 20:44:59 -04:00
Caleb Bassham
99cd22a793 Add events for player changing spectator target (#1498)
* Add events for player changing spectator target

- Add PlayerStartSpectatingEntityEvent
- Add PlayerStopSpectatingEntityEvent
2018-10-18 15:53:10 -05:00
Automated
5c711f1b9a [CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-10-17 23:06:33 -04:00
Brokkonaut
62630cfdc6 Fire EntityCombustEvent for phantoms (#1573) 2018-10-18 05:04:21 +02:00
Aikar
ec2f1e4093 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
b3b0490651 Improvements to Timings Performance
1) Get rid of string interning. can be heavy, has been seen to cause issues for some users
2) Use ConcurrentHashMap instead of a SynchronizedMap
3) Stop use of MRUMapCache which is not thread safe for Group lookups
4) Stop using IdentityHashMap which has performance issues in Java 8
2018-10-17 21:59:35 -04:00
Aikar
82d6028aa7 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
Aikar
ed7f9b32de [CI-SKIP] Fix build script for version detection
Apparently grep was being greedy even when it shouldn't.
This ensures it doesn't be too greedy.
2018-10-16 23:55:54 -04:00
BillyGalbreath
7040465881 Implement getters and setters for EntityItem owner and thrower
Closes #1526
2018-10-06 20:55:18 -05:00
Zach Brown
4a6e5b036f Fix equals case in lightning sounds 2018-10-16 21:40:32 -04:00
Trigary
cdbdd636e7 Limit lightning strike effect distance
Resolves GH-1436
2018-09-14 17:49:25 +02:00
Zach Brown
39d7c99598 [CI-SKIP] Remove debug echo statements from last 2018-10-16 20:41:07 -04:00
Zach Brown
963393ce85 Fix decompile script json regex
When Mojang added 1.13.2-pre2 to their manifest page it exposed a flaw
in the way the script's regex was getting the version json manifest.

I've tweaked the regex such that it will always first get the version
entry and then use that entry to get the json url, rather than trying to
do the whole thing in one shot.

Fixes GH-1582
2018-10-16 20:38:05 -04:00
Automated
96a9d10df0 [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:
cd6252a4 Fixed missed diff in PathfinderGoalPanic.
2018-10-16 17:21:46 -04:00
Automated
edff8c9a95 [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:
0adc1b99 SPIGOT-4428: Update Player CustomName
2018-10-15 04:26:41 -04:00
GreenMeanie
f7142b9603 Actually set the header (#1576) 2018-10-15 01:05:02 -04:00
Automated
ead4f30915 [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:
0e17dc03 Add Block#isPassable

CraftBukkit Changes:
e3d7b2fd Add Block#isPassable
2018-10-12 19:06:39 -04:00
Automated
0e6f024eda [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
442538c84f 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:41:15 +01:00
Automated
6f4f194503 [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
83e66d52da Here's Johnny! (#1563)
Adds Johnny API to Vindicator
2018-10-12 02:09:53 -05:00
Aikar
f481fac7c9 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
71645db85f Missed a +1 on village doors 2018-10-11 21:54:15 -04:00
Automated
b6902b9615 [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