Commit graph

3469 commits

Author SHA1 Message Date
BillyGalbreath
d28aadb2bd Allow chests to be placed with NBT (#1425)
This restores vanilla behavior of allowing placed chests to retain any Block Entity Tag data.

Upstream added filtering to chests, breaking vanilla behavior, and preventing use of loot table chests as a reward mechanism.

Upon review, we can find no security risk in allowing players to place a chest with NBT data, as Spawn Eggs, Minecarts, command blocks etc all have their own checks.

Additionally, survival mode players, non op players can not create these items anyways. If a player has Creative or Op, they already have high levels of access.

Plus, Chests aren't the only inventory that could have free form items, so this filter was insufficient anyways.
2018-09-09 11:53:23 -05:00
Aikar
f848af3df4 Merge branch 'master' into pre/1.13
* master:
  Remove no longer needed tests due to last change
2018-09-09 01:14:52 -04:00
Aikar
e0c865681c Remove no longer needed tests due to last change 2018-09-09 01:14:18 -04:00
Aikar
ae158dbbc8 Merge branch 'master' into pre/1.13
* master:
  Remove deadlock risk in firing async events
2018-09-09 01:06:44 -04:00
Aikar
68b25624d8 Remove deadlock risk in firing async events
The PluginManager incorrectly used synchronization on firing any event
that was marked as synchronous.

This synchronized did not even protect any concurrency risk as
handlers were already thread safe in terms of mutations during event
dispatch.

The way it was used, has commonly led to deadlocks on the server,
which results in a hard crash.

This change removes the synchronize and adds some protection around enable/disable
2018-09-09 01:04:29 -04:00
chickeneer
938a3d5c70 Fix invalid data types for particles and fix colors in the ParticleBuilder (#1422)
* Fix invalid data types for particles and fix colors in the ParticleBuilder
2018-09-08 18:52:56 -05:00
Zach Brown
09ca94cb13 Merge branch 'master' into pre/1.13 2018-09-08 19:12:58 -04:00
Zach Brown
2d541bf948 Update again so the dumb bot stops breaking things 2018-09-07 23:51:16 -04:00
Automated
97de438dd2 [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:
310dc809 Add ServerLoadEvent

CraftBukkit Changes:
19d654bd Add ServerLoadEvent
2018-09-07 23:49:37 -04:00
Max Lee
4ff931a021 Improve death events (#1362)
* Improve death events

This adds the ability to cancel the events and to specify the sound.
2018-09-08 02:14:48 +02:00
Automated
21bbd524c5 [CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-09-07 20:06:35 -04:00
BillyGalbreath
3d3333ff23 Fix #1420 (#1421) 2018-09-07 19:03:38 -05:00
Automated
6850b5e98d [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:
228a5cd5 Remove vanilla command ambiguity warning
2018-09-07 06:59:30 -04:00
Automated
5bfec7de13 [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:
12bbe1d1 SPIGOT-4350: Expand EntityTeleportEvent to /teleport command

CraftBukkit Changes:
0ddd67b0 SPIGOT-4350: Expand EntityTeleportEvent to /teleport command
2018-09-07 06:39:38 -04:00
Aikar
5ae4306581 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:
632449b6 SPIGOT-4349: End portal has wrong TeleportCause
3eb8af23 SPIGOT-4348: Use online player for setting skull owner if possible
2018-09-06 22:08:35 -04:00
Zach Brown
3d0c4bd860 MC-2025 - Save entity AABB to prevent fp wobble
This work is largely a result of the analysis done on the Mojang issue
tracker. See patch header for additional information.
2018-09-04 19:18:06 -04:00
Automated
602aa8b021 [Auto] Updated Upstream (Bukkit)
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:
3278a727 Add a #getLootTable() method to LootTables enum
2018-09-04 07:09:29 -04:00
Automated
1492b5ec46 [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:
c88ae6b1 SPIGOT-4342: Fix PlayerMoveEvent from pitch/yaw incorrect
2018-09-04 07:04:38 -04:00
Aikar
a1590d9769 Fix yet another issue with concurrency with datafixers 2018-09-04 01:50:14 -04:00
Aikar
e24d823e5f Fix another case of concurrency issue in data fixers 2018-09-04 00:02:38 -04:00
Aikar
0753080fe7 Fix concurrency issues in DataFixers
We are seeing issues with DataFixers being not thread safe in async chunks
and even in some spigot packet sending code.

There are a few more global objects that are mutated that need to
be synchronized to be safe for use over multiple threads.

There may be more cases, but these are extremely obvious ones.
2018-09-03 22:36:41 -04:00
Aikar
ce32154f65 [CI-SKIP] Download mojang libraries sources so we can modify them 2018-09-03 19:55:14 -04:00
BillyGalbreath
1ee368448e Add ray tracing methods to LivingEntity (#1410)
This method will return the Block a player is looking at while taking into consideration the AABB of each block in the path.

For example, you can look through the 1/4 space of air in a Stair block and get the block behind it instead of the Stair block you are looking past.
2018-09-03 18:59:54 -05:00
Aikar
62c2210d6c Check that phantom spawned uuid is set for save/load
Fixes #1408

Spawn eggs wont have a player set
2018-09-03 15:22:41 -04:00
Aikar
bc78ff210a [CI-SKIP] Improve last patch to not use wildcard
Since were having issues on windows for too many patch file names,
figured better use -R instead.

Also added $basedir back
2018-09-03 14:57:29 -04:00
Aikar
a289645aa9 [CI-SKIP] Fix the NMS Imports detecting our own files
the way I handled this on my fork was using the metadata in the
git "stats" output of patches, however we don't include stats in
the patch files for paper so the code didn't work.

Changed the code to detect our own file editions inside of NMS
to a method that works without stats.

So we no longer need to manually add files to this list
2018-09-03 14:52:26 -04:00
Automated
f100b5d921 [CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-09-03 12:31:32 -04:00
Aikar
f5e95be322 Remove Pass World Tile Entities patch
Some things break from this, while this was trying to fix other things
since the thing this patch tried to fix still had problems and required
yet another fix, just going to remove this patch.
2018-09-03 12:23:25 -04:00
Aikar
d76de615d5 fix typo in patch file 2018-09-03 10:38:28 -04:00
Aikar
06787e40db Merge remote-tracking branch 'origin/master' into pre/1.13 2018-09-03 10:32:30 -04:00
Automated
a0e356e9ae [CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-09-03 10:11:35 -04:00
willies952002
18aaaa150c Add Force-Loaded Chunk API (#1387) 2018-09-03 10:05:55 -04:00
Gergely Sarkozi
4e4a4dbf5e Cached, local-class-supporting task names (#1409)
Fixes issue #1177 

`MapMaker#weakKeys()` makes the `Map` use identity comparison for the keys, while also enabling the automatical removal of dropped classes from the cache.

The changes are the same as in #1399, except now the original patch is modified instead of a new one being created.
2018-09-03 16:04:50 +02:00
Automated
86798d2ec5 [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:
8ab814cd Add getFacing method to get the current cardinal direction an entity is facing.

CraftBukkit Changes:
ee5efeb0 Add getFacing method to get the current cardinal direction an entity is facing.

Spigot Changes:
0ede7d0e Rebuild patches
2018-09-03 04:14:40 -04:00
Spottedleaf
2375f1fef2 Make CraftWorld#loadChunk(int, int, false) load unconverted chunks (#1407) 2018-09-02 20:40:14 -07:00
Automated
b9e235e5d2 [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:
3037eb3e BlockSpreadEvent for Kelp
6cf60193 SPIGOT-4340: Improve client bug workaround
2018-09-02 21:44:27 -04:00
Shane Freeder
84993e3fca fix newlines in spigot tab list API
Spigots implementation around the header/footer strips newlines from the
header/footer, this patch allows the tab list header/footer to retain newlines.
2018-09-01 11:33:50 +01:00
Shane Freeder
1294a18cf9 fix paper tab list API 2018-09-01 11:09:13 +01:00
Automated
01fcf62ca5 [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:
9e031b7b SPIGOT-4338: breedCause API

CraftBukkit Changes:
60d79820 SPIGOT-4338: breedCause API
2018-09-01 05:35:21 -04:00
Aikar
e45e15cfb0 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:
dc69d2b3 Fix unbound shaped recipe ingredients
2018-09-01 00:30:04 -04:00
Aikar
6d1e141269 fix bug in needs redecomp deleting wrong directory 2018-08-31 23:59:03 -04:00
Aikar
c77b303abe 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:
eaf05a2a Expand Recipe API to allow multiple Materials per slot

CraftBukkit Changes:
4c219e2a Expand Recipe API to allow multiple Materials per slot
2018-08-31 23:53:49 -04:00
Aikar
e82ef9ec05 Switch to using ForgeFlower for Paper Only mc-dev imports
ForgeFlower is better than Spigots FernFlower at decompiling the source.

However, in order to maintain the CraftBukkit patches, we must keep
using spigots for the primary.

However, for any file that we import on top of Spigots imported files
there is nothing stopping us from using better decompiled files.

So these changes will use ForgeFlower to maintain a better set of
decomped files, so anything we add on top of Paper can start off
in a better spot.
2018-08-31 18:56:57 -04:00
Aikar
bd4da1aea0 [CI-SKIP] Merge branch 'master' into pre/1.13
* master:
  Pull the last upstream updates
2018-08-31 11:53:04 -04:00
Aikar
c832bed57d Pull the last upstream updates 2018-08-31 11:51:41 -04:00
Aikar
f942c53fd8 Don't double add golems to world - Fixes #1385
spawnCreature adds to world now
2018-08-30 20:57:22 -04:00
Aikar
a8f31a2704 Improvements to Timings
With 1.13, the idea of accessing chunks async is going to have to
be supported with the push towards thread safe chunk access mojang
has done.

This commit changes timings to always thread check at start and stop
timings and only mutate state on main thread.

This makes startTimingIfSync pointless, but I'm just going to leave
it as is.

Timings will no longer complain when used async, it just will not
do anything.

Further concurrency issues have been addressed with creating
timings handlers that may of overall been an issue for any handler
that might of been created async (happened even for things that
only timed sync)

with that, the 'protected' concept of handlers has been removed,
and 'plugin' vs 'safe' handlers are now the same.

Got rid of some guava functions in favor of java 8 real stuff now too.
2018-08-30 20:43:15 -04:00
Zach Brown
8eef3b43f3 Ensure Creeper fuseTicks are still incremented
Fixes GH-1389

Because we are no longer enabling creepers to rapidly change status
every tick, in order to prevent event spam, their datawatcher value
ends up negative.

This datawatcher value is used to increment the fuseTicks within the
creeper tick. Because the value is negative, it is constantly zero'd
and therefore never incremented, instead acting the same as creepers
that aren't ignited.

We can just as easily increment this ourselves when the creeper is
ignited, so that's what we'll do.
2018-08-29 22:55:21 -04:00
Aikar
137a05af75 Optimize getChunkIfLoaded type calls
Uses optimized check to avoid major locks and large method.

Will improve inlining across many hot methods.

Improve getBrightness to not do double chunk map lookups.
2018-08-29 22:12:17 -04:00
Automated
71f5449321 [Auto] Updated Upstream (Bukkit)
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:
28237f03 SPIGOT-4330: Improve isSimilar for legacy stacks
2018-08-29 21:54:31 -04:00