Commit Graph

4174 Commits

Author SHA1 Message Date
Spottedleaf
096e29ccfe Shove decompile fixes into the proper patch 2019-05-05 11:09:29 -07:00
Spottedleaf
fede947c28 More 1.14 patches
now we can rebase
2019-05-05 10:19:34 -07:00
Spottedleaf
1fee2081f1 Correct patches 2019-05-05 04:33:40 -07:00
William Blake Galbreath
9673aebba1 more 1.14 stuffs yay! 2019-05-05 06:12:32 -05:00
William Blake Galbreath
997e1c2ad3 More patches for 1.14 2019-05-05 03:33:44 -05:00
Shane Freeder
eb25d664df Even more patches for 1.14 2019-05-05 03:23:25 +01:00
Spottedleaf
acd2bd3c2c More 1.14 patches 2019-04-30 15:51:03 -07:00
Shane Freeder
df6c35d757 Even more patches for 1.14 2019-04-30 02:20:24 +01:00
Spottedleaf
9d3524b908 More 1.14 patches 2019-04-28 20:14:31 -07:00
Spottedleaf
4296582054 More 1.14 patches 2019-04-28 10:59:47 -07:00
Zach Brown
799f6af357
More patches for 1.14
Chunk related stuff will need to be revisted later
2019-04-27 19:24:00 -04:00
Spottedleaf
b4b181a1fb
More 1.14 work 2019-04-27 17:35:50 -04:00
Phoenix616
1183f1aa1e Fix itemframe sound on change 2019-04-27 20:05:20 +01:00
Spottedleaf
36873bf2d6 More 1.14 updates (#1995) 2019-04-26 23:05:36 -04:00
Shane Freeder
818e88dbc5 More work for 1.14 2019-04-26 02:24:00 +01:00
Shane Freeder
7e6db27085 Aim towards real 1.14 2019-04-25 07:53:51 +01:00
Shane Freeder
ab34e2751e A bit more work for 1.14 2019-04-24 03:34:11 +01:00
Shane Freeder
a64c1a03c9 More work towards 1.14 pre5 2019-04-24 02:00:24 +01:00
Shane Freeder
6c3f04049d Initial work on 1.14 pre-5 2019-04-23 10:35:52 +01:00
Shane Freeder
fb25dc17c6 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:
da08d022 SPIGOT-4700: Add PlayerFishEvent.State.REEL_IN
0cef14e4 Remove draft API from selectEntities

CraftBukkit Changes:
a46fdbc6 Remove outdated build delay.
3697519b SPIGOT-4708: Fix ExactChoice recipes neglecting material
9ead7009 SPIGOT-4677: Add minecraft.admin.command_feedback permission
c3749a23 Remove the Damage tag from items when it is 0.
f74c7b95 SPIGOT-4706: Can't interact with active item
494eef45 Mention requirement of JIRA ticket for bug fixes
51d62dec SPIGOT-4702: Exception when middle clicking certain slots
be557e69 SPIGOT-4700: Add PlayerFishEvent.State.REEL_IN
2019-04-22 22:36:14 +01:00
Shane Freeder
10d58504f7 don't NPE on dimensionmanager toString
CraftBukkit uses vanillas DimensionManager, but does not actually
register its own dimension types, etc, due to vanilla

This causes issues because anything, e.g. command feedback, trying
to print information about the world will often attempt to print out
the dimension name, which ends up throwing an NPE due to the lack of
a registered type, we work around this by just returning the world name,
this is not super elegant, but is the only route that promises not to
break stuff.
2019-04-22 20:20:22 +01:00
Shane Freeder
faf59c3242 Only store oversized values on spawners if needed, and ensure that vanilla values are read when applicable 2019-04-20 19:33:53 +01:00
William Blake Galbreath
f6a78c9715 Mob Spawner API Enhancements 2019-04-19 13:14:10 -05:00
Shane Freeder
90d8377b59 Fix NPE from sign placement (Closes #1963) (Fixes #1917)
This fixes issues with upstreams changes to solve a private issue on
their side, as signs are placed, they may replace existing blocks, e.g.
grass, which breaks upstreams assumption that the sign is always placed
adjacent to a surface
2019-04-17 00:53:55 +01:00
Shane Freeder
9c79f489ed Don't try to read the data outside of the try-catch 2019-04-15 05:09:57 +01:00
Shane Freeder
41c86a6548 Handle bad chunks more gracefully
Brought this patch back from the graveyard, 1.13.x changed how chunks
where loaded and the patch was dropped.

Prior to this change the server would crash when attempting to load a
chunk from a region with bad data.

After this change the server will defer back to vanilla behavior. At
this time, that means attempting to generate a chunk in its place
(and occasionally just not generating anything and leaving small
holes in the world (This might not be accurate as of 1.13.x)).

Should Mojang choose to alter this behavior in the future, this change
will simply defer to whatever that new behavior is.
2019-04-15 05:05:14 +01:00
Shane Freeder
f28e1455e3 Mark PlayerMoveEvent#setTo as NotNull 2019-04-15 00:17:55 +01:00
Zach Brown
43649ff73a
Fix blocking JavaDoc errors 2019-04-14 07:22:38 -04:00
Aikar
ab8bbdfd80
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2019-04-10 23:41:42 -04:00
Spottedleaf
237250c08d Add Heightmap API (#1724)
Resolves #1672 
This API is intended to expose useful heightmaps found in the server to API. This exposes all of the live world heightmaps currently in the server. 
If a heightmap becomes impossible to implement, api spec allows the implementation to throw UnsupportedOperationException (far better than returning some weird unexpected value).

Tested via:
https://gist.github.com/Spottedleaf/5d47f67c55a9fb870251ff344bfeb6b3
2019-04-10 23:36:31 -04:00
Spottedleaf
0181fb14b6 Add static encode/decode for block long keys (#1712)
Should make this API easier to use.
2019-04-09 00:08:14 -04:00
Timardo
0d098ca00d [CI-SKIP] Update makemcdevsrc.sh (#1950)
[Aikar note] we really should figure out a way to skip CI again :(
2019-04-08 19:55:49 -04:00
Aikar
84386e1631
[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:
7c395d42 SPIGOT-4681: Note about additional world creation on STARTUP
2019-04-08 06:51:36 -04:00
Aikar
2cb75d6cce
[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:
812f66aa SPIGOT-4684: Update persistence of converting zombie villagers
2019-04-08 06:31:50 -04:00
Aikar
c36f206209
Optimize Captured TileEntity Lookup
upstream was doing a containsKey/get pattern, and always doing it at that.
that scenario is only even valid if were in the middle of a block place.

Optimize to check if the captured list even has values in it, and also to
just do a get call since the value can never be null.
2019-04-06 10:25:21 -04:00
Aikar
0ff0c18238
Improve Cancelled Block Place Tile Entity discardment
We bandaided this logic on a case by case basis before with Loot Tables and Chests,
but that is not the correct fix.

Ultimately we just needed to clear out the captured tile entity list so that the
update calls did not process the tile entity that is no longer even valid.

This solution will ensure ALL placed tile entities data is ignored and not just
the few cases we previously had filters for.
2019-04-06 10:23:05 -04:00
Spottedleaf
6d7b032d2b Only flush to disk on chunk saves if paper.flush-on-save is true (#1942)
The cost of a call to sync() adds up quickly and especially for
HDDs. Playing around generating chunks for a while warranted a
3 min save time on a HDD. This is unacceptable default behaviour
and now the behaviour is hidden behind a flag for server owners
who are OK with taking a hit on saves (although SSDs will not have
this issue remotely as bad, since most of the time was spent seeking).
2019-04-06 05:59:42 -04:00
Zach Brown
bd5b758a92
Clear containers on cancelled place events
It is possible for a container to be brought into the world pre-filled
in place event (thanks NBT!). When the blockplacevent(s) are cancelled
their blockstate is updated in OBC. This triggers them to drop their
inventories.

Rather than screwing with the update method which is used elsewhere, we
can simply clear any inventories once we are told that a plugin intends
to cancel the interaction.

Fixes GH-1831
2019-04-06 00:31:19 -04:00
Spottedleaf
33a5a0f84e
Optimize GameRules to use LinkedHashMap
Previously TreeMap was used which has poor get(K) performance.
2019-04-05 23:25:12 -04:00
Aikar
9dc4d6448b
Numerous fixes to entity related changes
While it wasn't really "broken" before, if plugins use NMS
(which they really should't be) and mess with entity management
themselves, and get it wrong, they could ultimately corrupt our
state expectations.

I've been unable to reproduce any issues locally, but these changes
are the result of me analyzing the code pretty deeply and seeing
about how to make it more durable to abnormal usage.

Any servers seeing oddities, please run with -Ddebug.entities=true
and send me any logs triggered.
2019-04-05 23:08:45 -04:00
Shane Freeder
5c0133110b Revert entityList type in World
Why are plugins accessing this?! Whhhhy?!

For any plugin developers reading this, this are methods in World
specifically for adding entities to the world, aptly called spawnEntity
2019-04-05 13:45:21 +01:00
Zach Brown
86e6d961f0
Update upstream CB
--- work/CraftBukkit
Submodule work/CraftBukkit 0e1cea5a..f40143ef:
  > SPIGOT-4691: Fix custom world generator when placing tiles
2019-04-05 05:17:10 -04:00
Zach Brown
b963196ed5
Default nether void damage to off and allow that 2019-04-05 01:27:37 -04:00
Zach Brown
401cd58e70
Allow configurable nether void height damage
Fixes GH-1804
2019-04-05 01:09:32 -04:00
Zach Brown
58185a044c
Don't throw if a server unregisters the version cmd 2019-04-05 01:09:32 -04:00
Zach Brown
26bbc23a01
Prevent negative in lure times - Fixes GH-1583 2019-04-05 01:09:26 -04:00
Spottedleaf
c4ff33a9e5
Make region files more reliable to write to
Previously we would write to header before writing our chunk data,
which opens a window for corruption (or we would overwrite entirely).
Now the saving process has been changed to follow this chain of events:

1. We always allocate a new space to write so we do not potentially
overwrite and corrupt the current data
2. Write the chunk data first (the order of the fields in
the chunk data isn't relevant though)
3. Flush to disk
4. Write to the region header last
5. Flush to disk
6. Then we free the previous space allocated

With this chain of events it is impossible for a chunk write to corrupt
a region file, unless the operating system has lied and we have NOT flushed
to disk.

However server administrators are still recommended to continue performing
regular backups.

Note that when Mojang finally decides to change their region format
to deal with oversized chunks this patch must be changed to deal with
whatever system they decide to impose.

We also make use of two flushes to disk per chunk save (to ensure
ordering and ensure data has gone to disk), so this will negatively
affect save performance.
2019-04-03 22:24:55 -04:00
Aikar
87a726351b
[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:
7634491f Added Entity#setRotation.

CraftBukkit Changes:
0e1cea5a Added Entity#setRotation.
2019-04-03 04:51:39 -04:00
Spottedleaf
2e43721654
Allow login events to fire only after the server has loaded
Plugins that rely on the async login event to fire can miss the event
if a player tries to log in before the server has loaded.

The solution is to simply block the event threads from executing until
the server has loaded. This will not have an adverse affect on logins
since the event threads are cached and are only used for executing events
asynchronously.
2019-04-03 02:27:09 -04:00
Aikar
e9b353ff02
Updated Upstream (CraftBukkit/Spigot)
We pretty much reverted most of Spigots changes here as ours is better.

I guess least Spigot is trying to get closer to us? but missed..

CraftBukkit Changes:
0bf75bbd SPIGOT-4686: Enchantment ordering nondeterministic

Spigot Changes:
f09662d0 Rebuild patches
2019-04-02 23:27:31 -04:00