Commit Graph

2730 Commits

Author SHA1 Message Date
Spottedleaf db3af11cea Fix race condition with regionfile being closed right after getting one (#2812)
Occurs when 1 thread retrieves a regionfile, and then the
regionfile is closed due to it being thrown out of cache.
2020-01-09 19:42:33 -06:00
BillyGalbreath 9aeba7c95a Prevent bees loading chunks checking hive position (#2828) 2020-01-09 19:28:29 -06:00
Shane Freeder bd1e1ad1aa
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:
5d4de46e Fix checkstyle.xml formatting
adf331f1 SPIGOT-5496: API to create and manipulate hardcore worlds

CraftBukkit Changes:
c727dc2a Fix checkstyle.xml formatting
e7202cd4 SPIGOT-5496: API to create and manipulate hardcore worlds
9820cd2d MC-151364, SPIGOT-5494: Feeding dolphin hangs if generate-structures=false
2020-01-05 23:08:18 +00:00
Zach Brown b74fe8ea11
Update upstream B/CB
--- work/Bukkit
Submodule work/Bukkit bbfd13dd..72e3dfd4:
  > SPIGOT-5486: Raider CanJoinRaid

--- work/CraftBukkit
Submodule work/CraftBukkit 83af86db..731e819c:
  > SPIGOT-5486: Raider CanJoinRaid
  > SPIGOT-5487: Increase outdated build delay
2020-01-01 17:44:53 -06:00
Shane Freeder 7530141468
remove burtned TNT blocks (Fixes #2808) 2019-12-30 12:49:48 +00:00
Zach Brown 92933b162c
Fix double dropping xp now that Spigot fixed it 2019-12-26 22:28:02 -05:00
Zach Brown 4ed5ab7c79
Update upstream CB/S
--- work/CraftBukkit
Submodule work/CraftBukkit 297ff400..83af86db:
  > SPIGOT-5457: Downgrade 'Mismatch in destroy block pos' message to debug
  > SPIGOT-5481: PlayerBedLeaveEvent returns wrong bed location
  > SPIGOT-5482: Structure Block setUsageMode encounters NullpointerException
  > SPIGOT-5426: isSimilar for player heads fails
  > SPIGOT-5478: XP not dropping when a player dies

--- work/Spigot
Submodule work/Spigot 05bb8bcf..492a7792:
  > Rebuild patches
2019-12-26 22:18:27 -05:00
Shane Freeder c32f8e132c
PlayerDeathEvent#shouldDropExperience 2019-12-24 00:36:24 +00:00
Shane Freeder 05ecc314d2
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:
8073dbec SPIGOT-5474: Just ignore bugged fireball data
2019-12-23 03:59:27 +00:00
Shane Freeder f8fd607e04
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:
bbfd13dd Hyperlink 'Events' in raid event package documentation
b2095bed SPIGOT-5413: Add TrustedPlayer API for foxes
1bf1f3f4 Block trace methods do not require hash sets
abf0cfdc Javadoc improvements per checkstyle
c4a2b425 Add TimeSkipEvent

CraftBukkit Changes:
817116de SPIGOT-5413: Add TrustedPlayer API for foxes
062680a8 SPIGOT-5467: Calm down bees that cannot exit hive
75fac431 SPIGOT-5472: Spurious warning when using clone command on tile entities
85106731 SPIGOT-5471: Allow empty title/author for books
2d9db47f Add TimeSkipEvent
384225c2 Add thread name to TerminalConsoleWriterThread

Spigot Changes:
05bb8bcf Postpone stopping the watchdog until the server is completely stopped
18e2b9be Add package-info.java for Spigot APIs
2019-12-23 02:37:47 +00:00
Omer Uddin 3f5564f1bc Port Optimize-Hoppers.patch to 1.15 (#2765)
* port patch

* fix hoppers eating items
2019-12-22 02:28:35 +00:00
Shane Freeder 26dfbc8046
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:
3aa8286b SPIGOT-794: Add boats to EntityPlaceEvent
c36d90a6 SPIGOT-5464: Add BEEHIVE SpawnReason for when a bee leaves a beehive

CraftBukkit Changes:
90ef74ef SPIGOT-794: Add boats to EntityPlaceEvent
fb7abcb3 SPIGOT-5466: Bees still get angry even if damage event cancelled
4499fec5 SPIGOT-5464: Add BEEHIVE SpawnReason for when a bee leaves a beehive
2019-12-19 19:17:36 +00:00
BillyGalbreath 539543ca9a MC-145656 Fix Follow Range Initial Target (#2778) 2019-12-19 19:03:16 +00:00
Shane Freeder 8e972bf5aa
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:
bf1fa3e3 Update to Minecraft 1.15.1

CraftBukkit Changes:
30a1b691 Update to Minecraft 1.15.1
e2790ae2 Remove outdated build delay.

Spigot Changes:
2ee05fef Update to Minecraft 1.15.1
2019-12-17 22:39:07 +00:00
Shane Freeder 3cd952e225
Yank 0417-Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch
Currently causing leaks
2019-12-16 19:02:26 +00:00
Shane Freeder c47cf32c7c
Restore 0129-Optimize-World.isLoaded-BlockPosition-Z.patch 2019-12-16 02:58:14 +00:00
Shane Freeder cd499c92a1
Restore Use-getChunkIfLoadedImmediately-in-places.patch 2019-12-16 02:47:46 +00:00
Callahhh 7986f57e5d Bring back Reduce-sync-loads.patch (#2761) 2019-12-16 01:43:21 +00:00
Shane Freeder 9e58f22640
Address gen concurrency issue causing crashes (Fixes #2746) 2019-12-16 01:38:00 +00:00
Shane Freeder 8b25307b34
Merge branch 'ver/1.14' 2019-12-15 23:05:36 +00:00
Shane Freeder 1c38436266
attempt to allow timings to continue with janky plugin classes 2019-12-15 22:45:17 +00:00
Shane Freeder 443ffb450b
Fix spectator teleport target (#2743) 2019-12-15 20:19:52 +00:00
Shane Freeder 7d8117083f
Fix spawn radius being treated as 0 (Fixes #2742) 2019-12-15 19:42:35 +00:00
Shane Freeder c36cf2aff4
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:
e43416a3 SPIGOT-5455: Mobs do not ignite due to sun in extra worlds
2019-12-15 19:40:28 +00:00
Shane Freeder 8782be3bb0
[CI-SKIP] Rebuild patches 2019-12-15 18:33:43 +00:00
Black Hole ff8a48b9d1 Don't show 1.15 plugins as legacy in plugins command (#2755)
* Don't show 1.15 plugins as legacy in plugins command

* Use CraftMagicNumbers.SUPPORTED_API
2019-12-15 18:28:44 +00:00
Omer Uddin a133980223 port PlayerLaunchProjectileEvent patch to 1.15 (#2758) 2019-12-15 18:25:10 +00:00
Omer Uddin f3c55f239a port TE chunk lookup patch to 1.15 (#2757) 2019-12-15 18:17:16 +00:00
Shane Freeder 0585f99b05
Prevent TRAP while loading Fireballs 2019-12-14 01:15:01 +00:00
Shane Freeder 12051feb76
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:
61d4b090 SPIGOT-5428: Better handling of some ItemMeta

Spigot Changes:
047b6f86 SPIGOT-5421: Add separate trident despawn rate
c1047ed9 SPIGOT-5445: Add log-villager-deaths option
2019-12-14 01:02:52 +00:00
Shane Freeder bc447dc137
Track correct branch for /version 2019-12-13 22:56:02 +00:00
Shane Freeder 7dbceea208
Restore zero-tick farms fix
They no longer directly call the tick method, so, one step forward...
2019-12-13 22:48:40 +00:00
Shane Freeder 55944bc6ff
Revert "Drop fix zero-tick farms (Fixes #2736)"
This reverts commit 3b93c5b112.
2019-12-13 22:41:00 +00:00
Shane Freeder 3b93c5b112
Drop fix zero-tick farms (Fixes #2736)
Fixed by mojang in 1.15, farm blocks are no longer in the next tick list

Also, add hopper optimization patch to the removed folder
2019-12-13 21:53:20 +00:00
Shane Freeder 31bc07cb65
Drop hopper optimization patch 2019-12-13 20:41:01 +00:00
Shane Freeder 788e033817
Don't set the count on already empty items in hopper moves (Fixes #2735) 2019-12-13 20:11:45 +00:00
Shane Freeder c034be8a82
Remove debug statement and rebuild patches properly 2019-12-13 16:29:51 +00:00
Shane Freeder 058e4efb41
Allow reading of oversized region files 2019-12-13 16:22:16 +00:00
Shane Freeder ae68db1f0e
Drop entity experience on death 2019-12-13 15:21:58 +00:00
Shane Freeder d413dca4ee
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:
333b9f02 SPIGOT-5422: Add support for 3-dimensional biomes
170d7386 Fix bad link in deprecated FlowerPot MaterialData class

CraftBukkit Changes:
16dc5758 SPIGOT-5449: Fix issue with projectiles
fd25653f SPIGOT-5448: Shulker Boxes collapse empty slots when picked up
b97d581a SPIGOT-5443: BEE_NEST BlockState
73698cf8 SPIGOT-5442: Fix issue with fire charges
beff9fb9 SPIGOT-5437: Fix CustomChunkGenerator.CustomBiomeGrid ignoring the y value for biomes
f777640e SPIGOT-5425: Prevent empty/air loot (again?)
db0dafb1 SPIGOT-5422: Add support for 3-dimensional biomes
4633e6c5 Fix crash with disabled worlds

Spigot Changes:
f39a89ef SPIGOT-5423: Remove covariant type change to give better chance of Java downgrades working
2019-12-13 14:08:40 +00:00
MiniDigger bd93836d4c Nuke IOWorker, make stuff compile (#2733)
* remove removed patch cause its not removed anymore

* Nuke IOWorker, oh, and also make it compile

* synchronize writes properly

* Remove note about IOWorker
2019-12-13 13:46:45 +00:00
Zach Brown 4565495711
More compile fixes 2019-12-12 21:29:45 -06:00
Shane Freeder b0dc983f21
More progression on patches 2019-12-12 21:01:16 +00:00
MiniDigger d8a0622602 Compile fixes (#2732) 2019-12-12 18:45:00 +00:00
MiniDigger 44d032f1e9 Houston, we got a patch (#2731)
* Houston, we got a patch

* is this the end of the beginning or the beginning of the end
2019-12-12 16:20:43 +00:00
Shane Freeder bbf27ec651
Fixup timings patch 2019-12-12 03:06:23 +00:00
Zach Brown e2c4ff50a2
My Name is ;
Hi! My name is (what?)
My name is (who?)
My name is
;

Hi! My name is (huh?)
My name is (what?)
My name is
;
2019-12-11 21:00:50 -06:00
Zach Brown 01de058bf2
Little more progress
Keep getting interrupted so not as much as I'd like :(
2019-12-11 20:48:34 -06:00
MiniDigger b00d871009 Patches 100-260 (#2729) 2019-12-11 17:43:22 -06:00
Zach Brown f2ed239ead
More progress 2019-12-10 22:01:17 -06:00
Shane Freeder a308619d28
Work on server patches 2019-12-11 00:56:03 +00:00
Shane Freeder 4d2f85630a
Fix ArmorStand#setItem flow (Fixes #2726) 2019-12-10 23:37:32 +00:00
Shane Freeder bb8b1e3eca
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:
8b6dd103 Update /version to reflect final build status.
6bdfd385 Remove some draft API designations
78a12dd9 SPIGOT-5417: Campfire should implement Directional

CraftBukkit Changes:
65670174 SPIGOT-5417: Campfire should implement Directional
eeae942e SPIGOT-5416: Block.getDrops gives drops even when tool should not give drops
2019-12-10 23:23:50 +00:00
Lukasz Derlatka 86daffa21c
Fix AssertionError when player hand set to empty type
Fixes GH-2718
2019-12-07 19:09:44 -06:00
Shane Freeder 3032599d38
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:
43183eab SPIGOT-5399: spawn-npcs ignored during world generation
e9bb2f15 SPIGOT-5403: isSimilar returns true for different skulls
5c9e7236 SPIGOT-5409: Remove unnecessary defaulting in CraftMetaBookSigned
821238b6 SPIGOT-5412: Use SpawnReason.NATURAL for wandering traders and trader llamas
2019-12-05 10:23:10 +00:00
stefvanschie 779f34cc37 Fix empty CanPlaceOn tags causing errors (#2713) 2019-12-01 00:20:12 +00:00
BillyGalbreath 4a97a7ca44 Add option to disable pillager patrols (#2626) 2019-11-24 01:10:15 -06:00
Gerrygames 23e53aab97 Backport MC-160177 fix from 1.15 (#2702) 2019-11-24 00:36:20 -06:00
Zach Brown 45089d59f0
Update upstream CB
--- work/CraftBukkit
Submodule work/CraftBukkit 7554e08e..ccd47a50:
  > SPIGOT-5395: Call BlockFadeEvent for Scaffolding
  > Increase outdated build delay to 4 weeks
2019-11-24 00:06:19 -06:00
BillyGalbreath 761c24fae9 Fix stuck in sneak when changing worlds (MC-10657) (#2627) 2019-11-24 00:02:47 -06:00
Spottedleaf 10c29e7369 Fix racey NextTickListEntry creation. (#2683)
The counter is used to distinguish entries from each other, however
since we can concurrently increment the counter we could totally
screw over the comparision of entries (see a() in NextTickListEntry),
as it compares only the time when the entry will tick, the priority
at which it will tick, and the counter. The block is not compared.

Async loading loads the chunk asynchronously which creates these
entries asynchronously.
2019-11-10 12:00:16 -06:00
William Blake Galbreath 8d036cea01
Expose the internal current tick 2019-10-30 18:10:42 +00:00
MisterErwin 0c71539093 [PATCH] bounding box check for hanging entities (#2664)
This patch intends to fix an issue with LeashHitchs where an exception
was thrown due EntityHanging#calculateBoundingBox not being able to
accept EnumDirections UP and DOWN.

This issue was introduced in a fix for SPIGOT-4674
(d65a2576e40e58c8e446b330febe6799d13a604f)
2019-10-30 17:29:40 +00:00
Shane Freeder 527073aa65
Update config version 2019-10-27 00:07:42 +01:00
Zach Brown 0d3b35c339
Rename baby zombie movement config option
This option does not set the absolute speed of the entity as the name
implies. It sets a modifier. The default (vanilla) value of `0.5` sets
the baby zombie to move at 50% faster than the base speed.

A negative value like `-0.4` would set them to move at 40% slower.

There should be no functional changes as a result of this change, it's
just clarifying the config name.
2019-10-26 17:55:58 -05:00
Spottedleaf df984898ac Fix server deadlock when loading some chunks (#2647)
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:
7554e08e Add UUID support to CraftProfileBanList
3fe37460 SPIGOT-5378: Fix TileEntity fixer deadlock
12386dd4 SPIGOT-5375: Add spaces to coordinates from tile fixer
606c19e2 SPIGOT-5373: Simultaneous left+right click in creative mode does not work
13caf848 SPIGOT-5370: Fix Block#rayTrace considering other blocks.
2019-10-20 10:03:39 +01:00
weaondara 9ea1f9ee3d performance improvement for CraftChunk.getEntities() (#2629) 2019-10-19 23:33:35 +01:00
Shane Freeder 419ae0e668
Fire EntityRemovedFromWorldEvent for all entities (Fixes #2282) 2019-10-19 09:14:26 +01:00
Shane Freeder 0f2ea04c1c
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:
af58d316 Fix javadoc warning in Firework.setShotAtAngle

CraftBukkit Changes:
e2dd6555 SPIGOT-5372: Re-add tile entity fixer due to MC-163945
1e7a197f Fix incorrect inequality in 683bae0670c
db98d54d SPIGOT-5362: Suspicious stews fail isSimilar check

Spigot Changes:
56f84710 Rebuild patches
2019-10-18 17:31:01 +01:00
Jonathan Frederick 2c8d20406f Re-implement treasure-maps-return-already-discovered for 1.14 (#2636) 2019-10-18 16:14:43 +01:00
Spottedleaf 8260cdf8c1 Use getIfLoadedImmediately and not cached immediately for isLoa… (#2641) 2019-10-18 16:05:45 +01:00
Andrew Steinborn ff8b9ef3d5
Really fix JLine on Windows
The history of how paths work in Win32 is a sad story and shall not be documented here.
Needless to say, Windows hates the temporary file name for jansi's native code since it
includes the version. For git builds, it includes quotes around the actual version. But
alas, the issue apparently doesn't occur if you build on Windows since it removes the
quotes from the git commandline that is ultimately used to build the version string,
because of more Win32 sadness and shame.

Go look at Raymond Chen's blog, The Old New Thing. It's full of Windows oddities and
it will make you want to weep because almost 90% of the world uses this legacy OS from
the 1980s.
2019-10-13 16:36:23 -05:00
Zach c65396072f
Revert "Fix jline with git builds under Windows (#2624)" (#2632)
This reverts commit 0c64f7b0ae.
2019-10-13 01:19:22 -05:00
Zach Brown a4dbabdbd3
Update upstream CB
--- work/CraftBukkit
Submodule work/CraftBukkit 7deb3728..d6b3eddf:
  > SPIGOT-5355: Double Chests still open after InventoryOpenEvent cancelled
2019-10-13 00:28:46 -05:00
Andrew Steinborn 0c64f7b0ae Fix jline with git builds under Windows (#2624) 2019-10-13 00:06:44 -05:00
Shane Freeder e8c82f4eee
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:
0399d9d6 SPIGOT-5341: Add Material.isAir
547f5709 SPIGOT-5353: Expand explosion API by adding source entity

CraftBukkit Changes:
7deb3728 SPIGOT-5309: Call cancelled EntityDamageEvent when damaging invisible armor stands
46351e17 SPIGOT-5341: Add Material.isAir
683bae06 SPIGOT-5342: Lore lost when deserializing items with no version stored
c2d12011 SPIGOT-5353: Expand explosion API by adding source entity
2019-10-08 19:37:02 +01:00
Omer Uddin aa776c1b15 Don't save canTick of armor stands if it has not been set by API (#2608) 2019-10-02 19:20:40 -05:00
Spottedleaf bfc807c27a Improve spawn loading and debug output for waiting on a chunk (#2595)
Spawn loading has been changed to use getChunkAt calls to manually
load chunks since watchdog can watch these calls and so we guard
against plugins/players changing the radius of a spawn while it's
loading

Debug output has been improved to note the status of the currently
waiting chunk
2019-09-29 20:23:09 -05:00
Spottedleaf 826b4762c0 Remove debug logging for incremental saves (#2600) 2019-09-29 20:14:39 -05:00
Spottedleaf d39916c7e2 Add more timings to chunk provider tick (#2549)
- Misc mob spawning
- Chunk range checks
2019-09-29 16:06:03 -05:00
Spottedleaf 43ec79a32c Add server oversleep to timings (#2509)
Now everything except waiting for the next tick should be included
in timings
2019-09-29 15:49:38 -05:00
Spottedleaf 1d2a5915ed Check if there are workers before trying to notify them (#2593)
* Fix #2591

We need to check if there are workers before trying to notify
them...
2019-09-29 15:29:56 -05:00
Zach Brown 89eb890239
[CI-SKIP] Rebuild patches 2019-09-29 15:02:04 -05:00
Spottedleaf 27fca92fa1 Drop Optimize-GameRules-to-use-LinkedHashMap (#2594)
Mojang has since replicated the logic
2019-09-29 15:01:21 -05:00
Zach Brown 936d57ba93
Use local variable for bedrock generation
Fixes GH-2596.
2019-09-27 20:53:20 -05:00
Zach Brown 767b935552
[CI-SKIP] Fix wrong patch author on zero-tick fix
See GH-2559 for context
2019-09-27 18:10:48 -05:00
Zach Brown 7caed1a8fa
[CI-SKIP] Rebuild patches 2019-09-24 18:19:41 -05:00
Spottedleaf 777073a54d Check horse entity validity in container interactions (#2584)
Fixes #2580
2019-09-24 18:16:16 -05:00
BillyGalbreath d69fe6c511 Fix zero-tick instant grow farms MC-113809 (#2559) 2019-09-22 23:07:01 -05:00
Spottedleaf c68dbb864c Updated Upstream (Bukkit/CraftBukkit/Spigot) (#2576)
* 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:
6527cb58 SPIGOT-5329: Clarify isGlowing documentation
5ddb414f Make Lantern extend BlockData
cb888903 Fix typos in previous commits
2a5e0ca2 Bring EnchantItemEvent documentation in line with EnchantmentOffer
3c5fcea2 SPIGOT-5317: Create accessors for player absorption hearts
c6e0d625 SPIGOT-5320: Clarify scope of ExactChoice

CraftBukkit Changes:
a3fdef8c SPIGOT-5331: Add support for Java 13
6ddeb980 SPIGOT-5317: Create accessors for player absorption hearts
5d335e96 SPIGOT-5315: Cannot serialize armor stand ItemMeta

Spigot Changes:
94af569b SPIGOT-5319: Async catcher for getNearbyEntities
2019-09-21 23:12:45 -05:00
Spottedleaf 30f9955e2a Fix race conditions in flush allowing for previously scheduled tasks to execute later than the flush call (#2548) 2019-09-15 23:02:13 -05:00
Spottedleaf 9e1620e3d3 Improve save logic (#2485)
Only wait for IO at the end of the save
we also were not force flushing async saves with /save-all flush
2019-09-15 22:39:30 -05:00
Zach Brown 728605013c
[CI-SKIP] Fix duplicate patch number 2019-09-15 22:15:33 -05:00
prplz 8735587529 Fix nether portal frame creation (#2546) 2019-09-15 22:12:17 -05:00
Zach Brown 26acc9b77a
Re-add flat bedrock config option 2019-09-15 19:20:02 -05:00
Shane Freeder 14513c3ce1
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:
92f24ff2 SPIGOT-5158: Add SuspiciousStewMeta
b9bf4dae SPIGOT-5310: Add Chunk.contains
b2adbb45 Add API to get/set inhabited time of a Chunk
e3c812dd SPIGOT-5250: Add ChunkSnapshot.contains
71973d85 SPIGOT-5255: Raid / patrol spawn reasons

CraftBukkit Changes:
03b145b3 SPIGOT-5158: Add SuspiciousStewMeta
9aa74304 SPIGOT-5310: Add Chunk.contains
7ef2b20d SPIGOT-3308: RecipeIterator cannot longer remove recipes
023f438c Add API to get/set inhabited time of a Chunk
b79a86ed SPIGOT-5250: Add ChunkSnapshot.contains
aa492e55 SPIGOT-5255: Raid / patrol spawn reasons
2019-09-10 19:51:02 +01:00
Omer Uddin b7dc6fb00e fix double world add bug (#2486) 2019-09-02 17:46:04 +01:00
Shane Freeder 439131c704
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:
e28fb3bd SPIGOT-5301: BlockIgniteEvent for campfire + arrow

CraftBukkit Changes:
763e5601 SPIGOT-5294: Cancelled EntityPickupItemEvent and PlayerPickupItemEvent alter on-ground stacks
403ac185 SPIGOT-5301: BlockIgniteEvent for campfire + arrow
2019-09-02 17:28:24 +01:00
Zach Brown 14e07afd20
[CI-SKIP] Fix patch number 2019-09-01 20:50:15 -05:00
Spottedleaf fc570959d4 Improve POI data saving logic (#2475)
- Do not unload data if world saving is disabled
- Aggressively target unloading
2019-09-01 20:49:09 -05:00
Spottedleaf 5ef93ded42 Fix #2499 (#2500)
Proper scheduling if async chunks is disabled, we would execute
a task that is cancelled without setting its run status
2019-09-01 20:30:25 -05:00
Nassim 26f644c554 Fix sign line capping check (#2522) 2019-09-01 17:21:08 -05:00
Spottedleaf b2758246c8 Target more sync loads (#2476) 2019-09-01 17:17:51 -05:00
Spottedleaf 5272f3c2ef Fix #2511 (#2519)
Did not double-flush the file io thread if async = false
2019-09-01 16:18:39 -05:00
Shane Freeder c9fd745840
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:
ff0672ca SPIGOT-5211: Add Raid API

CraftBukkit Changes:
96bc85f0 SPIGOT-5298: Remove unexplained 0.1 drop chance offset
6ed8a189 SPIGOT-5290: Invulnerable and/or Marker armor stand triggers EntityDamageEvent
631eaeb0 SPIGOT-5297: PlayerBedLeaveEvent.getBed() returns player location
8d4bc541 SPIGOT-5293: Sponge behaviour differs from Vanilla
e91fd75e SPIGOT-5291: Missing event for ravagers trampling crops
cbdd7139 SPIGOT-5211: Add Raid API
edd8fdfb SPIGOT-5287: Fix rare CME generating new chunks
3fc97f08 SPIGOT-5265: FireworkExplodeEvent only fired when rockets explode in air

Spigot Changes:
065a3734 Rebuild patches
a5961826 SPIGOT-5286: tick-inactive-villagers invokes the AI for NoAI villagers
2019-08-31 20:30:44 +01:00
Shane Freeder aba4969668
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:
e970fd72 Remove incorrect javadoc from TargetReason
84df6df1 SPIGOT-5282: Improve bucket event API

CraftBukkit Changes:
b2bcde89 SPIGOT-5258: TNT Not Moving Players in Creative Mode
44d675ad SPIGOT-5263: Chests stay open after InventoryOpenEvent cancelled.
2439178e SPIGOT-5278: EntityDrowned memory leak
7055c931 SPIGOT-5264: Call event for experience orbs losing their target
49141172 SPIGOT-5282: Improve bucket event API
6bbb3b04 SPIGOT-5281: Clearer error messages for ChunkSnapshot misuse
2019-08-26 15:36:37 +01:00
Omer Uddin 21faf8227b Implement optional per player mobspawning (#2171) 2019-08-21 02:02:51 +01:00
Omer Uddin 88722ec89c Prevent consuming the wrong itemstack (#2477) 2019-08-19 16:24:33 +01:00
Spottedleaf 294e30462b Async chunk api/io/loading (#2308) 2019-08-18 18:40:04 -05:00
Shane Freeder eee1a019f9
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:
2012f1e0 SPIGOT-5269: Item attribute modifiers don't persist their order
7a806a3a SPIGOT-5270: Call BlockSpreadEvent when bamboo saplings grow

Spigot Changes:
798ea6ab Add async catcher to World#save
2019-08-17 04:26:58 +01:00
Spottedleaf c4ae0002e1 Fix some API and commands usage of inactive chunks (#2457)
* /paper entity will no longer report entities in inactive chunks
* World#getEntityCount and World#getChunkCount will report only
in active chunks
2019-08-14 21:47:38 -05:00
Spottedleaf 700a664981 Print entity debug stacktrace on entity double add (#2438) 2019-08-14 21:37:07 -05:00
Spottedleaf 9d6680eec0 Fix MC-158900 (#2458)
The problem was we were checking isExpired() on the entry, but if it
was expired at that point, then it would be null.
2019-08-14 21:32:25 -05:00
Zach Brown 928abb41f8
[CI-SKIP] Rebuild patches for last merge 2019-08-11 11:27:09 -05:00
Paul Sauve 34e64781e8 Do less work if we have a custom Bukkit generator (#2318) 2019-08-11 11:23:11 -05:00
Zach Brown cdd0bb4376
Update upstream CB/S
--- work/CraftBukkit
Submodule work/CraftBukkit 1ec1b05e..368f4e99:
  > Increase outdated build delay to 3 weeks
  > SPIGOT-5249: Do not add data to empty loot table
  > SPIGOT-5257: Call EntityBreedEvent for foxes and set the child's spawn reason to BREEDING

--- work/Spigot
Submodule work/Spigot e5b1b5db..ea7e48b3:
  > Add string default for view distance, and API to retrieve per world
2019-08-10 12:44:57 -05:00
Shane Freeder aa022fdaca
Fix java cross-version compilation
(Also, rebuild patches)
2019-08-08 16:12:57 +01:00
Omer Uddin 8b7952a958 Implement alternative item-despawn-rate (#2128) 2019-08-07 22:06:08 +01:00
Omer Uddin 6ccf0bda3b Reimplement hopper optimization patch (#2388)
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
2019-08-07 19:08:22 +01:00
TheGreatKetchup e264c365ac MC-156852 fix (#2396) 2019-08-07 04:12:15 +01:00
Spottedleaf b6c32b2a15 Fix recursion in EntityFox (#2418)
I changed a method call without looking at the implications.
super.processDeath would re-invoke the unmapped method, whereas super.d
would call the super method.
2019-08-06 04:31:38 +01:00
Spottedleaf 7c640a1ae2 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#2415)
* fixup patch and rebuild

* 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:
bde198c9 SPIGOT-5246: PlayerQuitEvent.get/setQuitMessage() is incorrectly marked as NotNull
24ad5a79 SPIGOT-5240: Vector.angle not valid for angles very close to each other
a143db9a SPIGOT-5231: ShotAtAngle API for Fireworks
10db5c3d SPIGOT-5226: Update Javadoc of PlayerDeathEvent

CraftBukkit Changes:
1ec1b05e SPIGOT-5245: Unneeded cast to WorldNBTStorage in CraftWorld#getWorldFolder
e5e8eec2 SPIGOT-5241: setAttributeModifiers does not work on untouched stack
803eaa31 SPIGOT-5231: ShotAtAngle API for Fireworks
7881d2ae SPIGOT-5237: Horses, pigs do not drop their inventory
06efc9ec Don't accept connections until all plugins have enabled
da62a66a SPIGOT-5225: World handle isn't closed if world is unloaded without saving
104b3831 SPIGOT-5222: Cannot get Long values from Entity memory
f0b3fe43 SPIGOT-5220: Server CPU usage reaches 100% when stdin is null

Spigot Changes:
e5b1b5db SPIGOT-5235: Destroy expired area effect clouds / fireworks that are inactive
cbcc8e87 Make region files more reliable to write to
8887c5f4 Remove redundant late-bind option
dac29063 Rebuild patches

* Preserve old flush on save flag for reliable regionfiles

Originally this patch was in paper

* Fix some issues with the death event

- Entities potentially entering a glitched state to the client where
they appear to be falling over
- Donkeys losing their chest if the event was cancelled (only an
issue since the upstream merge)
- Some wither death logic running for an entity killed by a wither
2019-08-05 11:35:40 -05:00
BillyGalbreath 474e5ad269 Fix enderpearl item use cooldown (fix #2412) (#2413) 2019-08-05 03:15:53 +01:00
Spottedleaf ae90011500 Fix chest logic being weird for coordinates that sum to 0 or a… (#2364)
We were previously calling what looks like a legacy check for distance
away for the inventory. Unfortunately, with our logic, we called the
open logic before the active container was set. So the legacy check
would register 0 viewers and the logic would become bugged.
2019-08-02 18:48:22 +01:00
Omer Uddin 263057961b Offset Itemframe ticking (#2385) 2019-08-02 18:31:24 +01:00
Nassim c80ba8dcc4 Fix server crash with piercing shots through vanished players (#2390) 2019-07-31 23:04:45 +01:00
Shane Freeder 93891ad57a
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:
3d9d2efc SPIGOT-5202: WorldCreator#copy does not copy all options

CraftBukkit Changes:
3e7b3862 SPIGOT-5195 (#2): Player loot table does not drop when keepInventory is on
c88867e4 SPIGOT-5208: Reset state on cancelled EntityTransformEvent to prevent event spam
f744c09c SPIGOT-5214: setCooldown not working
860b3540 SPIGOT-5204: Typo in deprecated enchantment name
2019-07-28 15:32:14 +01:00
Shane Freeder 42daaaddf6
Seperate out incremental saving
This fixes multiple issues, mainly cleaning up the patch as well as making save-all
actually save all. (Worth noting, that you should probably be using save-all flush if
you're relying on this for backups)
2019-07-28 01:39:02 +01:00
Shane Freeder 3a713bd57b
Mark entities as being ticked when notifying navigation 2019-07-28 00:53:49 +01:00
Spottedleaf 6f709200dd
use getChunkImmediately for vehicles 2019-07-28 00:38:49 +01:00
Spottedleaf fe7ef7b5d6 Do not schedule to main for getChunkImmediately type calls (#2362)
They are MT-Safe already. These changes reduce deadlock chances
given these calls are used in Entity#isValid(), and plugins
check this in packet handling...
2019-07-26 02:36:26 +01:00
Spottedleaf c6987e1a02 Peek the unload queue for chunk generation checks (#2332) 2019-07-23 22:41:26 -05:00
Spottedleaf 4ac69cec8d Bring task execution into server tick timings (#2357) 2019-07-23 22:20:14 -05:00
Black Hole 8ecd433727 Set spawning entity for fireworks spawned by a crossbow (#2358)
Fixes #2327
2019-07-23 22:12:40 -05:00
Lucavon ad8dbf3d2b
Add option to disable relative projectile velocity
Allows server owners to use 1.8 (and prior)'s projectile behavior
(ignored shooter's velocity when calculating projectile's velocity).

This patch adds an option "disable relative projectile velocity", which, when
enabled, will cause projectiles to ignore the shooter's current velocity,
like they did in Minecraft 1.8 and prior.
If a player is falling, for example, their shooting range will be drastically
reduced, as a downwards velocity is applied to the projectile. This prevents
players from saving themselves from falling off floating islands, for example,
as a thrown ender pearl will not make it back to the island, while it would
have in 1.8.

While this could easily be done with plugins, too, there are multiple problems:
1) If multiple plugins cancel the velocity by subtracting the shooter's velocity
   from the projectile's velocity, the projectile's velocity would be different.
   As there's no way to detect whether the projectile's velocity has already been
   adjusted to ignore the player's velocity, plugins can't not do it if it's not
   necessary.
2) I've noticed some inconsistencies, e.g. weird velocity when shooting while
   using an elytra. Checking for those inconsistencies is possible, but not as
   efficient as just not applying the velocity in the first place.
3) Solutions for 1) and especially 2) might not be future-proof, while this
   server-internal fix makes this change future-proof.
2019-07-23 20:31:21 -05:00
Minecrell fa8b4994ac Update TerminalConsoleAppender + JLine, use Jansi instead of JNA (#2299)
Remove dependency on JNA since it is no longer needed.
2019-07-23 19:25:05 -05:00
Shane Freeder 48b6bfe2a6
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:
c987938a SPIGOT-5180: Add Villager#sleep() and #wakeup() methods

CraftBukkit Changes:
7f33c6a2 SPIGOT-5196: Restore previous version behaviour regarding cancelled BlockBreakEvent
6a5fc902 Improve diff in EntityHanging
c98d61bf SPIGOT-4712: Allow spawning of upwards or downwards facing item frames
db971477 SPIGOT-5199: Fix NPE if setting the book of the ItemMeta of a lectern
b0ef3996 SPIGOT-4679 Fix black lines after book paragraphs
1215188f SPIGOT-5180: Add Villager#sleep() and #wakeup() methods
c03b2bef SPIGOT-4975: NPE on WorldGenStronghold When Using Multiple Worlds
65ea162c Ensure Bukkit data pack is always up to date
0b107b8d MC-157395, SPIGOT-5193: Small armor stands do not drop loot
6da0abca SPIGOT-5195: Player loot table does not drop when keepInventory is on
8b09d983 SPIGOT-5190: Superfluous EntityCombustEvent called when using fire aspect sword

Spigot Changes:
1981d553 SPIGOT-5198: Catch more bad async operations
6a14ca46 Rebuild patches
2019-07-23 20:17:32 +01:00
Spottedleaf 396d3f13c4 Ensure xray does not perform non MT-Safe operations (#2361) 2019-07-23 10:59:48 +01:00
Spottedleaf 160d1bc9e4 Only write to cached header in RegionFile if write potentially succeeds (#2294) 2019-07-21 16:36:27 -05:00
Andreas Troelsen ef6823811b
SPIGOT-5190: Do not call superfluous EntityCombustEvent 2019-07-20 19:14:06 -05:00
Spottedleaf 9fe63a1673 Update to 1.14.4 (#2333) 2019-07-19 23:01:24 -05:00
Spottedleaf 920ad7c742 Use getChunkIfLoadedImmediately in places (#2297)
* Use getChunkIfLoadedImmediately in places

This prevents us from hitting chunk loads for chunks at or less-than
ticket level 33 (yes getChunkIfLoaded will actually perform a chunk
load in that case).

* Resolve issue #2301

* Also target World#getChunkIfLoaded
2019-07-17 23:41:24 -05:00
Shane Freeder 0708fa363b
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:
eb2e6578 SPIGOT-5116: Fix concurrent modification exception inside ChunkMapDistance
989f9b3d SPIGOT-4849: Fix server crash when accessing chunks during chunk load/unload/populate events
f554183c SPIGOT-5171: Don't fire PlayerTeleportEvent if not actually moving
2349feb8 SPIGOT-5163: Cancelling PlayerBucketFillEvent visually removes the targeted block

Spigot Changes:
9a643a6a Remove DataWatcher Locking
2019-07-16 23:09:32 +01:00
kickash32 fa726c3f76 Create 0402-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch
delete old patch

Comment didn't make sense

Use original header

use original date in header
2019-07-13 13:38:22 -07:00
Spottedleaf 36c4831619 Fix loadChunk(x, z, false)
I was not correctly checking if the status was even cached.

Actually fix it this time

Do not forget about the async chunk placeholder

Actually fix it this time I hope

No plugin tickets for getChunkAtGen(x, z, boolean)

Change ChunkStatus ABI

This is required for asynchronous IO. async io will require
calls to getChunkStatusIfCached to return the chunk status for a
chunk currently queued to save - this cannot be reasonably done
with current ABI
2019-07-13 13:18:54 -07:00
Shane Freeder ff085b8e8e
Improve timings around chunk loading
Timers such as syncChunkLoad are hit persistently due to changes in how
this mechanism works which impacts the usablity of timings
2019-07-12 05:13:15 +01:00
Shane Freeder 7e8ae207bd
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:
e99c9444 Add Plugin Chunk Ticket API
6a235f06 Fix incorrect nullability annotations for PlayerJoinEvent's join message

CraftBukkit Changes:
5f889388 Tweak build expiration to 7 days
572c02b0 MC-155077, SPIGOT-5113: EntityTracker desync
7ad3a1f4 SPIGOT-5146: BlockDataMeta does not work
60860983 SPIGOT-5155: Setting EntityExplodeEvent yield to 0 still causes blocks to drop
087a2cf4 Print number of force loaded chunks per plugin in crash reports
07b5b06d Add Plugin Chunk Ticket API
7ffb2a27 SPIGOT-5149: resetRecipes does nothing
a2275f19 SPIGOT-5141: World.generateTree() causes ClassCastException with huge mushrooms
31d4a777 SPIGOT-5142: Ignore invalid firework effects

Spigot Changes:
5e4e7f32 BUILDTOOLS-471: Rebuild patches
6e944739 SPIGOT-5159: Raider activation range overridden by Monster range
2019-07-11 17:59:21 +01:00
kashike 8812fed9bb
Merge pull request #2240 from Spottedleaf/anti-xray
Re-Add Anti-Xray
2019-07-09 18:11:34 -07:00
Spottedleaf ef7202b9c2 Fix entity count in timings graph (#2293) 2019-07-08 14:29:22 +01:00
Shane Freeder 0a8afdacb6
Fix more issues with timings
- fixed usage of timings IDs (fixes region view)
- fixed more duplicated tick handlers
2019-07-08 03:54:40 +01:00
Shane Freeder c8bc57c719
Cleanup ChunkMapDistance patch 2019-07-05 03:23:33 +01:00
Shane Freeder 276afaa2ea
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:
c2d72c82 SPIGOT-3102: Add EXPLOSION SpawnReason

CraftBukkit Changes:
fca41573 SPIGOT-5136: EntityPortalEvent getting called on interdimensional entity teleports
604c8bf0 SPIGOT-3102: Add EXPLOSION SpawnReason
375969a6 Re-add chunk GC for plugin chunk loads
58151368 SPIGOT-5123: Snapshot tile entities can end up with a non-null world
491c8482 SPIGOT-5130: PersistentDataContainer not removing values on TileEntities

Spigot Changes:
d05d3c1f Rebuild patches
2019-07-05 03:13:38 +01:00
Jonathan Frederick 0d079188ea Remove unused fire-physics-event-for-redstone config option (#2277) 2019-07-03 15:44:07 -05:00
Shane Freeder 1bacdbd169
use a Queue in ChunkMapDistance
An oversight in this patch may be to blame for several issues in certain
cases, we'll opt to using a queue as this will fall in line with what is
expected and may help some issues where chunks remain loaded or fail to
load
2019-07-02 19:50:07 +01:00
Spottedleaf bd46b6397c Merge branch 'ver/1.14' of github.com:PaperMC/Paper into anti-xray 2019-07-01 22:24:09 -07:00
Zach Brown dafc3dbcd5
Update upstream B/CB/S
--- work/Bukkit
Submodule work/Bukkit aba2aaaf..949124e0:
  > SPIGOT-5121: Method to set PierceLevel of arrows

--- work/CraftBukkit
Submodule work/CraftBukkit c6997924..bf329334:
  > SPIGOT-5133: Throwing items into secondary end world portal causes crash
  > SPIGOT-5121: Method to set PierceLevel of arrows
  > SPIGOT-5122: Skip world#notify if sign has no world.
  > SPIGOT-5105: The EntityTag nbt tag disappears from preset armor_stand items.
  > SPIGOT-5106: Config option to prevent plugins with incompatible API's from loading

--- work/Spigot
Submodule work/Spigot 595711b0..935adb34:
  > SPIGOT-5088: Additional growth modifiers
2019-07-01 23:51:06 -05:00
Spottedleaf e679a7c11d Config migrations 2019-07-01 14:53:51 -07:00
Spottedleaf 0a667728c8 Resolve crash issue by shoving chunk loads onto the next tick 2019-07-01 14:36:31 -07:00
Spottedleaf 3a2d7f2ded Merge branch 'ver/1.14' of github.com:PaperMC/Paper into anti-xray 2019-07-01 12:53:51 -07:00
Shane Freeder edd3e778c4
Don't double-start the tickEntities Timing 2019-06-30 21:18:10 +01:00
Spottedleaf 511a6a1228
Actually use our log full policy 2019-06-29 20:38:27 -07:00
Spottedleaf 8f5b96ccc9 Queue log events when log buffer is full
This should resolve out of order logs when the buffer is full
2019-06-29 10:04:38 -07:00
Spottedleaf 5ffa0dae25 Do not force load chunks for plugin constructed packets 2019-06-28 08:05:52 -07:00
Spottedleaf e993aa6f69 Merge branch 'ver/1.14' of github.com:PaperMC/Paper into anti-xray 2019-06-28 06:37:28 -07:00
Shane Freeder a51823a732
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:
c6997924 SPIGOT-5110: Zombies converting to drowned too quickly
0c575603 SPIGOT-5101: Raids crash
2019-06-28 14:02:49 +01:00
BillyGalbreath 1019a87c2c Fix #2232 - Passive mobs don't move (#2253) 2019-06-28 11:33:17 +01:00
Spottedleaf 9a4a185fc1 Keep neighbour chunks loaded while obfuscating 2019-06-26 19:04:28 -07:00
Shane Freeder aa8483ea7e
Only save world data during a full save (Fixes #2243) 2019-06-26 15:21:16 +01:00
Spottedleaf f1f8060a4e
Fix build? 2019-06-25 22:27:22 -07:00
Spottedleaf 76eb2a5e5c
Use getChunkIfLoadedImmediately not getChunkIfCachedImmediately 2019-06-25 22:20:20 -07:00
Spottedleaf 46a6f1b2c5 Re-Add Anti-Xray 2019-06-25 21:56:19 -07:00
Shane Freeder 2ff7722630
Fix raids throwing an UnsupportedOperationException 2019-06-26 03:11:29 +01:00
Shane Freeder dc841f3379
Fix CME from raids
Use the iterator to remove elements
2019-06-26 01:31:26 +01:00
Shane Freeder 6048122e23
Revert "Optimize Pathfinding"
This patch appears to be causing some issues with 1.14.3 entity AI
2019-06-25 20:18:50 +01:00
Shane Freeder 304244232f
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:
aba2aaaf Correct pom.xml version

CraftBukkit Changes:
e8b39d43 SPIGOT-5103: World.save does not save gamerules
3164e531 Correct pom.xml version

Spigot Changes:
595711b0 Correct pom.xml version
2019-06-25 14:55:44 +01:00
Shane Freeder 269e1e95d9
Revert "Update VersionFetcher regex for upstream versioning changes"
This reverts commit 56ee5647ab.
2019-06-25 14:40:54 +01:00
Shane Freeder 844eb92abf
Revert "Optimize Persistent Data loading" (Fixes #2229) 2019-06-25 05:14:30 +01:00
Zach Brown 56ee5647ab
Update VersionFetcher regex for upstream versioning changes
Spigot dropped the -R0.1 from their version.
`1.14.2-R0.1-SNAPSHOT` -> `1.14.3-SNAPSHOT`

If this is changed upstream this commit can be reverted.
2019-06-24 22:24:57 -05:00
Shane Freeder 73983e4c16
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:
3dc4cdcd Update to Minecraft 1.14.3-pre4
88b25a8c SPIGOT-5098: Add a method to allow colored sign changes
6d913552 Update to Minecraft 1.14.3-pre4

CraftBukkit Changes:
f1f33559 Update to Minecraft 1.14.3
8a3d3f49 SPIGOT-5098: Add a method to allow colored sign changes
533290e2 SPIGOT-5100: Console warning from pig zombie targeting
6dde4b9f SPIGOT-5094: Allow opening merchant for wandering traders and hide the xp bar for custom merchants
9af90077 SPIGOT-5097: Bukkit.clearRecipes() no longer working
38fa220f Fix setting game rules via the API
fe3930ce Update to Minecraft 1.14.3-pre4
da071ec5 Remove outdated build delay.

Spigot Changes:
4d2f30f1 Update to Minecraft 1.14.3
f16400e3 Update to Minecraft 1.14.3-pre4
2019-06-25 03:46:54 +01:00
Spottedleaf bf1d217193 Fix tracker desync issue (#2224) 2019-06-23 21:32:10 -05:00
William Blake Galbreath f63fdaeb39 Rework fix for MC-114618 so not break map maker's workflow. Fixes #2221 2019-06-23 14:31:33 -05:00
Spottedleaf 768b46ed63 Optimize protochunk saving (#2218)
Use a chunk status cache to check if we could potentially overwrite
a levelchunk.
The check could be entirely elided at the risk of overwriting chunk data,
however most protochunks should have their corresponding regionfile loaded
with their chunk status.
2019-06-22 15:17:40 -05:00
Spottedleaf 405d146f57 Fix verified-loaded-count being off for chunk debug command (#2219)
We need to bypass ticket checks when counting
2019-06-22 15:07:31 -05:00
Spottedleaf 693102cce7 Fix performance regression in loadChunk(x, z, false) (#2211)
Resolve a regression where calling loadChunk(x, z, false) would
potentially double-load chunk data
2019-06-22 15:04:26 -05:00
Zach Brown 31891d1916 Rebuild patches 2019-06-22 14:09:20 -05:00
Byteflux 1a15d8213c Add support for OpenJ9 heap dumps in /paper heap 2019-06-22 14:09:20 -05:00
Zach Brown 729551d7e0 Rebuild patches 2019-06-22 13:11:19 -05:00
Spottedleaf fe38ae401a Fix vanished players don't have rights patch 2019-06-22 13:11:19 -05:00
Omer Uddin 2715be9fef Rework bed dismount mechanics (#2145)
Fixes #1726
2019-06-22 12:59:47 -05:00
Spottedleaf e3a3cb7b94 Log other thread in DataPaletteBlock lock failure 2019-06-21 14:45:20 -07:00
Spottedleaf 55aa29c700 Fix MC-154214 (#2195)
This should resolve unloading issues.
2019-06-19 17:48:48 -05:00
Shane Freeder d9c4f8f67b
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:
fd317e44 Fix javadoc mistakes in previous commit
70e4c23d SPIGOT-5061: Add explode and ignite methods to Creeper

CraftBukkit Changes:
efd8a2b5 SPIGOT-5089: UnsupportedOperationException on setting villager memory to null
8003ced5 SPIGOT-5061: Add explode and ignite methods to Creeper
2019-06-19 12:55:03 +01:00
Spottedleaf f3203b14d1
Better format 2019-06-17 17:43:18 -07:00
Spottedleaf 72894a6d54
Add WorldName to blockstate location 2019-06-17 17:41:53 -07:00
Spottedleaf 7fc60e411a Fix chunks refusing to save (#2196)
We should only set hasBeenLoaded to false potentially after saving a chunk
other wise we will not save it. The method to do this is
PlayerChunk#l(), which we were potentially calling for chunks we were not saving.
2019-06-17 08:47:51 +01:00
Spottedleaf c319922ab1 Fix World#isChunkGenerated calls (#2186)
* Fix World#isChunkGenerated calls

Optimize World#loadChunk() too
This patch also adds a chunk status cache on region files (note that
its only purpose is to cache the status on DISK)

* Ensure correct regionfile usage

This also bumps the minimum region file cache to 4 files given
readChunkData can load potentially 4 files.

* Fix closed check

* Better checks for invalid regionfile usage
2019-06-16 22:52:34 -05:00
Shane Freeder 84d6850443
Fix out of bounds falling block removal (#2188) 2019-06-16 15:13:14 +01:00
Shane Freeder edaba19eb0
Fix enderchests not playing close sound (#2190) 2019-06-16 14:14:20 +01:00
Shane Freeder 637a5bcfec
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:
04405534 SPIGOT-5034: FoodLevelChangeEvent add getItem method
8154c64c SPIGOT-4984: EnchantmentOffer.getCost() documentation is misleading

CraftBukkit Changes:
f2757f95 SPIGOT-5071: Player loot tables not triggered
f4242226 Optimize getEntitiesByClasses slightly
e81013d7 SPIGOT-5072: Process phantom, cat and patrol spawning in CustomChunkGenerator
30a63379 SPIGOT-5010: World#getEntitiesByClass/es also return entities in border chunks.
43431ba6 SPIGOT-5034: FoodLevelChangeEvent add getItem method
2019-06-16 11:15:21 +01:00
Spottedleaf fcb4d9ab28
fix exception message 2019-06-15 11:07:03 -07:00
Spottedleaf 9a5ec7f21d Proper paper commenting 2019-06-15 10:36:09 -07:00
Spottedleaf 61a6d011d9 Show blockstate location if we failed to read it 2019-06-15 10:30:43 -07:00
wizjany 3213b6b1e4 Use the entity registry id instead of translation key when posting PreCreatureSpawnEvent and PreSpawnerSpawnEvent 2019-06-14 22:06:36 -07:00
Spottedleaf e23dceab07
Change format 2019-06-14 21:21:39 -07:00
Spottedleaf cde2399145 Add chunkinfo command
Used so that server owners can tell what types of chunks are loaded
without requiring to use a tool to analyse a debug report
2019-06-13 22:51:37 -07:00
Spottedleaf 5c7081fecc Update upstream & fix some chunk related issues (#2177)
* 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:
45690fe9 SPIGOT-5047: Correct slot types for 1.14 inventories

CraftBukkit Changes:
4090d01f SPIGOT-5047: Correct slot types for 1.14 inventories
e8c08362 SPIGOT-5046: World#getLoadedChunks returning inaccessible cached chunks.
d445af3b SPIGOT-5067: Add item meta for 1.14 spawn eggs

* Bring Chunk load checks in-line with spigot

As of the last upstream merge spigot now checks ticket level status
when returning loaded chunks for a world from api. Now our checks
will respect that decision.

* Fix spawn ticket levels

Vanilla would keep the inner chunks of spawn available for ticking,
however my changes made all chunks non-ticking. Resolve by changing
ticket levels for spawn chunks inside the border to respect this
behavior.


* Make World#getChunkIfLoadedImmediately return only entity ticking chunks

Mojang appears to be using chunks with level > 33 (non-ticking chunks)
as cached chunks and not actually loaded chunks.

* Bring all loaded checks in line with spigot

Loaded chunks must be at least border  chunks, or level <= 33
2019-06-14 03:27:40 +01:00
Omer Uddin 68c6699ce9 Stop natural spawning after limit has been reached (#2127) 2019-06-12 21:34:18 -05:00
Shane Freeder 89182676ed
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:
9e95da12 SPIGOT-5052: PlayerPortalEvent not called when nether is disabled
28ea3fd1 SPIGOT-5062: end_portal on an non-default end world crashes the server
4a07dc69 SPIGOT-5058: ClassCastException when getting InventoryHolder of lectern when it's destroyed
2019-06-12 09:45:30 +01:00
Shane Freeder ec405a6bea
Fix async calls to getChunkAtIfLoadedImmediately 2019-06-11 04:17:39 +01:00
Shane Freeder 16909a3637
Fix PlayerNaturallySpawnCreaturesEvent
Trivia: Did you know that events need to be called to work?
2019-06-11 02:45:46 +01:00
Spottedleaf 1c68c72b1f Improve chunk loaded checks 2019-06-11 02:37:37 +01:00
Shane Freeder 7a3054158d
Only fire WorldSaveEvent on full chunk saves (Fixes #2161) 2019-06-10 21:45:22 +01:00
Shane Freeder ae153a18f9
Merge branch 'master' into ver/1.14 2019-06-10 10:11:29 +01:00
Shane Freeder a0a6ab18b7
Catch exceptions from dispenser entity spawns 2019-06-10 09:53:10 +01:00
Shane Freeder eba1fb2247
Improve autosave
- don't trip manual save warning
- respect world#isSavingDisabled
2019-06-10 06:43:28 +01:00
Shane Freeder 6f2c8a6449
Incremental chunk saving 2019-06-09 20:48:13 +01:00
Zach Brown ef170ee659
Update upstream B/CB/S
--- work/Bukkit
Submodule work/Bukkit 6eac6d70..1ef8b9d9:
  > Add Player#openBook(ItemStack) method

--- work/CraftBukkit
Submodule work/CraftBukkit 17543ecf..649921e5:
  > Add Player#openBook(ItemStack) method
  > SPIGOT-2000: Picking up items to shield slot working inconsistently when inventory is full
  > SPIGOT-5037: Player.openMerchant does not show merchant level
  > SPIGOT-5038: Inventory.getHolder returns null for wandering traders

--- work/Spigot
Submodule work/Spigot baafee91..df0eb250:
  > SPIGOT-5043: Desync if world is changed in PlayerSpawnLocationEvent
  > Rebuild patches

Implementation developer note:
This patch adds a "pre-source" patch system for fixing malformed patches
from upstream directly. This seems to keep happening so it's best we
have some way to deal with them. This system brings those issues into
our domain rather than needing to wait for upstream to fix their
malformed files.
2019-06-08 15:33:05 -05:00
Spottedleaf 2f782a6652 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:
17543ecf SPIGOT-5035: Error Using Virtual Merchant GUI
0fc6922b SPIGOT-5028: Villager#setVillagerExperience() doesn't work
bdbdbe44 SPIGOT-5024: Fox error - Unknown target reason
2019-06-06 16:56:51 +01:00
Shane Freeder 4ff5387091
Fix chunk ticking range 2019-06-06 06:13:00 +01:00
Zach Brown f4088faea2
Update upstream BD/CB/S
--- work/BuildData
Submodule work/BuildData 633897ca..f0032df4:
  > Mappings Update

--- work/CraftBukkit
Submodule work/CraftBukkit b7fea427..043d31de:
  > SPIGOT-5015: Players in spectator mode prevent block placement and block projectiles
  > Make bukkitEntity private to prevent incorrect usage

--- work/Spigot
Submodule work/Spigot 01d0f046..baafee91:
  > Rebuild patches
2019-06-02 22:26:25 -05:00
Mark Vainomaa 68eec9621f
Set connection thottle to -1 when Velocity IP forwarding is enabled
Port of 3c6f46936e
2019-06-02 22:00:23 -05:00
Zach Brown 268b076ab2
Backport MC-114618 - EntityAreaEffectCloud negative size fix 2019-06-02 21:49:14 -05:00
Spottedleaf da0aa69e44 Fix tabcomplete firing off-main
Also rebuild patches
2019-06-03 03:27:10 +01:00
Spottedleaf f210855d4c Chunk debug command (#2118)
* Chunk debug command

Prints all chunk information to a text file into the debug
folder in the root server folder.

Will output server version and all online players to the
file as well. We do not log anything but the location,
world and username of the player.

Also logs the value of these config values (note not all are paper's):
- keep spawn loaded value
- spawn radius
- view distance

Each chunk has the following logged:
- Coordinate
- Ticket level & its corresponding state
- Whether it is queued for unload
- Chunk status (may be unloaded)
- All tickets on the chunk

Example log:
https://gist.github.com/Spottedleaf/203bd211020a3a04da0e574fb57dab45

For references on certain keywords (ticket, status, etc), please see:

https://bugs.mojang.com/browse/MC-141484?focusedCommentId=528273&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-528273
https://bugs.mojang.com/browse/MC-141484?focusedCommentId=528577&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-528577

* Use JSON for the chunk dump

* Fix obfhelper naming

* Fix incorrect JSON spec
2019-06-02 20:25:12 -05:00
kashike fd75f355f9
Merge pull request #2097 from simpleauthority/add-get-step-sound
Add BlockSoundGroup to Block & Implement
2019-06-01 21:13:31 -07:00
Spottedleaf 264a3545fe Fix memory leak if the server is constantly overloaded (#2109) 2019-05-30 22:19:06 -05:00
Zach Brown 9f01a14531
Update upstream CB/S
--- work/CraftBukkit
Submodule work/CraftBukkit ba575a5a..b7fea427:
  > SPIGOT-5010: World.getEntities returns entities in border chunks
  > Show incorrect size passed into createInventory

--- work/Spigot
Submodule work/Spigot 093165d1..01d0f046:
  > SPIGOT-4986: EntityActivationRange - Raiders
  > SPIGOT-4988: Setting "mob-spawn-range" in spigot.yml also effects random block ticks
2019-05-30 18:54:25 -05:00
Zach Brown 550e5f8eaf
Fix `null` display when no version history
Should've been null checked since I made it nullable. String concat
saved us any real damage and so all we saw was "null" shown to users.
Quick check and now we don't.
2019-05-30 18:31:48 -05:00
Zach Brown de002d43b3
Allow proto chunks to be saved again
Appear to be used more extensively in 1.14. Subject to further review.
2019-05-30 18:22:34 -05:00
Mark Vainomaa 3c6f46936e
Set connection thottle to -1 when Velocity IP forwarding is enabled 2019-05-30 18:46:50 +03:00
Shane Freeder 5405793b86
Don't replace entries in the tracked player map (Fixes #2102) 2019-05-29 05:54:11 +01:00
Shane Freeder c605be20c7
ChunkMapDistance-CME 2019-05-29 04:25:08 +01:00
simpleauthority 87cc15d6e3 Add BlockSoundGroup to Block and implement 2019-05-28 20:08:59 -07:00
kashike eb5951cd1c
Merge pull request #2089 from BillyGalbreath/GH2088
MC-114618 - Fix EntityAreaEffectCloud from going negative size
2019-05-28 17:44:32 -07:00
William Blake Galbreath 3c51fa0ac7 MC-114618 - Fix EntityAreaEffectCloud from going negative size 2019-05-28 19:35:06 -05:00
Spottedleaf af021b9456 Update to 1.14.2 2019-05-28 00:30:44 +01:00
Spottedleaf 01670a5103 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:
e041de28 SPIGOT-4946: Add VillagerCareerChangeEvent

CraftBukkit Changes:
fcb9f90b SPIGOT-4946: Add VillagerCareerChangeEvent
a4a2f679 SPIGOT-4987: Shulkerbox does not save empty slots
2019-05-27 03:57:28 -07:00
Zach Brown 70ce6ce831
Move version command update checking to the implementation
This makes it easier for downstream projects (forks) to replace the
version fetching system with their own. It is as simple as implementing
an interface and overriding the default implementation of
org.bukkit.UnsafeValues#getVersionFetcher()

It also makes it easier for us to organize things like the version
history feature.

Lastly I have updated the paper implementation to check against the site
API rather than against jenkins.
2019-05-27 04:13:41 -05:00
Spottedleaf 7fb12d787e Improve MT-Safety of UserCache (#2080)
We were missing a synchronize on a get if cached method, however
it appears that using a ConcurrentHashMap is a better solution
so readers can avoid locking if they just want a cached value.

Existing synchronization for writers remains untouched, the
ConcurrentHashMap is just so readers can safely read without
synchronization
2019-05-27 01:17:50 -05:00
Spottedleaf 5dc46cd3b2 Move getTypeIfLoaded and friends to IBlockAccess (#2077) 2019-05-27 01:14:14 -05:00
Spottedleaf 90141ff411 Handle gen flag for placeholder getChunkAtAsync (#2079)
Also fix a loadChunk call in heightmap api
2019-05-27 00:17:12 -05:00
Zach Brown 7fe6e643d1
Check property exists before playing chest close sound
There is an artificial delay added to chest close sounds (of 10 ticks)
to make them "feel" more true to vanilla. The problem is that because of
this delay it is possible for the block to be removed by the time the
sound plays.

With 1.14 in the state it is the timing necessary to encounter this
issue has increased.

The correct fix is to just return early if the property checked for in
the TileEntityChest sound method does not exist for the block at the
current location.

Fixes GH-2074
2019-05-26 23:42:39 -05:00
Shane Freeder e9c7232267
Merge branch 'master' into ver/1.14 2019-05-27 01:16:47 +01:00
Spottedleaf 07762fc610 Revert Don-t-recheck-type-after-setting-a-block.patch 2019-05-26 10:40:12 -07:00
Shane Freeder d627cfa110
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:
17da3420 Fix reading custom persistent entity data
83783357 SPIGOT-4980: Shields will not be put on cooldown when hit with an axe
8d0f3722 SPIGOT-4752: Fixed inconsistency between isChunkLoaded and chunk load/unload events
3f9f31c3 SPIGOT-4982: Armor disappearing while breaking the armor stand
2019-05-26 02:56:30 +01:00
Shane Freeder ddab5b61a8
Fix some concurrency issues around world generation (Fixes #2052, #2037) 2019-05-24 11:16:03 +01:00
Shane Freeder b3aa7dadcd
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:
c45c0a98 SPIGOT-4972: Cannot add contextual data to loot table API
2019-05-24 04:49:27 +01:00
Spottedleaf c47f54dc88 Add configurable spawn loaded range back (#2051) 2019-05-24 04:12:57 +01:00
Spottedleaf 27731ddb32 Fix /tps (#2066) 2019-05-22 19:57:27 +01:00
Shane Freeder d9ad4e8bd8
Fix compilation 2019-05-22 05:14:56 +01:00
Shane Freeder 08aaab0105
Remove TPS catchup improvements
These changes are incompatbile as-is with 1.14 due to the Thread.sleep
call, this should ideally be brought back in the future
2019-05-22 04:59:14 +01:00
Shane Freeder 4800d2da2a
improve CraftWorld#isChunkLoaded to use the chunk status
vs just checking that it exists as an updating chunk, as this appears to
be a "the chunk should be loaded, but might not be"
2019-05-21 21:32:47 +01:00
Shane Freeder 034fefceb7
stop CraftWorld#isChunkLoaded from loading chunks 2019-05-21 02:37:47 +01:00
Spottedleaf d189ac1db3 Fix RegionFileCache#hasRegionFile (#2062)
also remove the pointless synchronization on
RegionFileCache#getRegionFileName
2019-05-20 03:26:17 +01:00
Shane Freeder 6b05c3f8d6
try-with-resources on populate timer (Fixes #2061)
Lets also ignore the fixup patch, that never existed, right? Right.
2019-05-20 02:32:41 +01:00
Shane Freeder 25621957f1
Don't run death logic on dupe entity removals 2019-05-19 20:48:54 +01:00
Shane Freeder 060bc7bbee
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:
4543fb40 SPIGOT-4943: Zombie villager conversion player API.

CraftBukkit Changes:
585b2ebd Tweak thresholds for can't keep up message
91ada5c2 SPIGOT-4956: EntityTameEvent not triggered when taming a Cat
9bda4134 SPIGOT-4943: Zombie villager conversion player API.
5a027071 SPIGOT-4947: Allow setting the content on a lectern
09d00e9f SPIGOT-4938: Call EntityPickupItemEvent for dolphins
a278e445 SPIGOT-4948: Lectern.getInventory should return a LecternInventory

Spigot Changes:
4f661b22 Rebuild patches
2019-05-19 04:16:22 +01:00
Shane Freeder da3b503596
Restore some entity duplication fix patches 2019-05-18 06:01:44 +01:00
Spottedleaf 2e18e54a83 Fix MinecraftServer#isMainThread (#2046)
See patch notes
2019-05-16 17:27:36 -05:00
Zach Brown 24a5bfb9cb
Fix logic issue with no save proto chunks patch
Should be returning true as a no-op "yes it was saved" rather than false
as a "there was an issue saving"
2019-05-16 16:53:17 -05:00
Shane Freeder 17fe7a1b43
Remove leftover line from spigots tick limiters
Looking over the code, this appears to be one "high risk but hopefully
unlikely that plugins are causing this to break", this line is however
redundant leftovers from spigots tick limiter patch, which should be
doing nothing as-is.
2019-05-15 22:53:13 +01:00
Shane Freeder 2f4fe0962b
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:
f6909573 SPIGOT-4935: Lore deserializes incorrectly from previous versions
dd99c5bb SPIGOT-4929: Beacon inventory getType() returns CHEST
2019-05-15 19:12:22 +01:00
kashike 3a425b3a72
Merge pull request #2029 from Spottedleaf/optimize-datawatcher
Optimize DataWatcher
2019-05-15 01:13:05 -07:00
Spottedleaf 89a1469d3f Resolve memory leak involving TileEntities
Their chunk is set to null before removal, so we kept them around.
2019-05-14 17:19:58 -05:00
Spottedleaf 1672ac6fc1 Fix CraftServer#isPrimaryThread
md_5 changed it so he could shut down the server asynchronously
from watchdog, although we have patches that prevent that type
of behavior for this exact reason.
2019-05-13 23:19:48 -05:00
Zach Brown 6c2a2f2dd2
Re-add dropped keep alive disconnect
Should fix the terminal spam
2019-05-13 23:17:05 -05:00
Spottedleaf 05d074d557 Optimize DataWatcher
The lock in DataWatcher is used to prevent concurrent modifications
to the 'd' field (entries in MCP). However any modifications to
this map only occur on initialization of an Entity in its
constructor. This modification is write-locked.

Every other access is through a readlock, which allows
the threads to pass if there is no thread holding the
writelock.

Since the writelock is only obtained in the constructor
of the Entity, the further readlocks are actually
useless (which get obtained on set, get, etc calls).

The entries field ('d' currently) has also been declared as
Int2ObjectOpenHashMap to avoid autoboxing on put(), get(), etc
calls.
2019-05-13 20:37:18 -07:00
Zach Brown d84080e6d1
MC 1.14.1 2019-05-13 21:20:58 -05:00
Zach Brown 5e7cfaf718
Add comment to MC-151674 fix
[11:00 PM] kashike: <snip> missed // Paper - MC-151674 comment here
2019-05-12 23:06:28 -05:00
Spottedleaf 4f47cbdb77 Fix MC-151674 Close RegionFiles when they get evicted from cache
https://bugs.mojang.com/browse/MC-151674
2019-05-12 23:57:49 -04:00
Spottedleaf da850bab55 Review EntityPathfindEvent
Add missing target forward
2019-05-12 23:57:49 -04:00
Spottedleaf a2db4c09a2 Remove TODO on Add more Zombie API
Testing in game verified the zombie's arms raise and fall correctly
when using the API.
Renamed the OBFHELPER since the method is placed on EntityInsentient
(since we want to conflict on changes).
2019-05-12 23:57:49 -04:00
Spottedleaf a22dfd8c16 Remove TODO on Add ray tracing methods to LivingEntity
Note: The entity parameter stays 'this' since we want the block the
entity is targetting. This can change based on the block the player
has in their hand (see scaffholding). With a scaffhold in hand, the
scaffhold blocks in the world become solid 1x1x1 cubes, and without they
follow their model's shape.
2019-05-12 23:57:49 -04:00
Spottedleaf dc97f7d401 Fix TODOs in Optional TNT doesn't move in water
Turns out the doWaterMovement method was never called.
Moved the tracker updates into tick() and delete doWaterMovement
2019-05-12 23:57:49 -04:00
Spottedleaf 5a44b38dc5 Resolve TODO on PlayerNaturallySpawnCreaturesEvent
- Add missing isCancelled check

We don't need to worry about going out of range of int
since the value is clamped to view distance, and view
distance is clamped to 33
2019-05-12 23:57:49 -04:00
Shane Freeder 92e77aa7cb
Merge branch 'master' into ver/1.14 2019-05-10 20:06:21 +01:00
Shane Freeder 150fb7cda8
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:
7d29eb5e SPIGOT-4899: Horse inventory title not set
2019-05-10 19:11:17 +01:00
Shane Freeder 026210202b
Fix MCUtils and other calls to postTaskOnMain
Method changed changed it's role to providing a TickTask object which
isn't automatically scheduled onto the server
2019-05-10 18:42:33 +01:00
Spottedleaf 994679a0c9 Fix patch "Faster redstone torch rapid clock removal" (#2014)
Tux pointed out the patch still has O(n^2) time complexity since
the sublist class in arraylist does not override clear() from
AbstractList, which uses a forward moving iterator to clear
the list.

Resolved by using a peek and poll from ArrayDeque.

This patch also removes the useless WeakHashMap which holds
the list (it mapped world->list) and replaces it with a
field on World.
2019-05-10 16:48:58 +01:00
Shane Freeder a72509fbe1
Fix accidental reversion of patches, oops 2019-05-09 15:23:52 +01:00
Shane Freeder 7f9b65035a
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:
fe0cadf0 Add BlockShearEntityEvent for Dispensers shearing Sheep
90e5cca3 SPIGOT-4892: Allow to set the currently viewed page of a book on a lectern inventory
a30337f7 SPIGOT-4887: Villager level minimum is 1
d88d828c SPIGOT-4886: Villager type SNOWY should be named SNOW

CraftBukkit Changes:
6ceffb0d SPIGOT-4895: Bed doesn't explode in Nether and The End
ee881847 SPIGOT-4888: setSleepingIgnored resets the night even when there is no one in a bed
15e02b40 SPIGOT-4890: EntityDeathEvent fires twice when breaking an armor stand in survival mode
b38a3c33 Add BlockShearEntityEvent for Dispensers shearing Sheep
70ebefca SPIGOT-4891: LecternInventory.getType() should return InventoryType.LECTERN
0036d1b7 SPIGOT-4887: Villager level minimum is 1
2019-05-09 08:20:01 +01:00
Spottedleaf 8191255cfa Use WorldServer#entitesById for entity iteration
WorldServer#globalEntityList is not the actual list of entities in a world
2019-05-07 18:49:41 -07:00
Spottedleaf 4ebd1808aa Actually write to the tracker field on entity
perhaps we can also look into removing this modification altogether
2019-05-07 18:13:24 -07:00
Shane Freeder 427078900e
Fix a ClassCastException from shooting fireworks 2019-05-07 19:56:32 +01:00
Shane Freeder 39bcf78e87
Fix RegionFileCache write logic 2019-05-07 16:26:55 +01:00
Spottedleaf 9db83af2ab Fix foxes not dropping items 2019-05-07 08:20:32 -07:00
Spottedleaf cf17353783 Fix tracking dead entities 2019-05-07 06:50:02 -07:00
Shane Freeder 725cf24308
Don't double set air in BlockFire 2019-05-07 13:16:22 +01:00
Spottedleaf c3534f1340 Fix entities refusing to die and portal search not working 2019-05-07 05:00:51 -07:00
Spottedleaf bc024aec6e Update upstream 2019-05-06 17:33:26 -07:00
Spottedleaf b5b481da62 Fix more runtime stuff
Remove chunk neighbour system until we can figure out the chunk system
2019-05-06 17:05:41 -07:00
Spottedleaf a189bdc0fc Fix some runtime issues 2019-05-06 13:45:02 -07:00
Spottedleaf e9439e7655 It compiles 2019-05-06 12:30:27 -07:00
Zach Brown 27c7749f42
More compile fixes
- Re-removes Bukkit#getServerName - This was (hopefully?) only added back
  for Timings v2. It should be kept in that scope.

- Intend to let PlayerViewDistance API slip. Given the scope of the
  changes in this area it seems best to let this slip past initial
  release. It can be re-added when there is additional time to focus on it
  and the changed systems it relies on. If it is fixed prior to release
  this is implemented as a single shim patch that can be dropped.
2019-05-06 03:20:16 -04:00
Spottedleaf 8dfd5dc0c4 Fix some more compile errors 2019-05-05 20:53:47 -07:00
Spottedleaf eeb2ecd789 Update Upstream 2019-05-05 19:58:04 -07:00
Spottedleaf cb24079b77 More compile error fixes 2019-05-05 17:57:14 -07:00
Spottedleaf 87759ffbb4 Fix some compile errors 2019-05-05 16:24:37 -07:00
Spottedleaf 027575df7f Fix some issues on the list 2019-05-05 14:39:51 -07:00
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
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
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
Aikar eb3be0ea5c
Re-add isTypeNotPersistent check
seems CB did something different with that field more than I understood.

So now it permanently doesn't match vanilla? :(
2019-03-29 08:50:52 -04:00
Shane Freeder 761d6ae72e Fix PersistentStructureLegacy NPE on custom worlds
This is caused due to the DimensionManager in CB worlds not being
registered by NMS, we fix this by copying CBs behavior of using the
world providers DimensionManager, vs using the actual dimension manager
of the world
2019-03-29 11:37:20 +00:00
Aikar f4f4396f0e
Restore vanilla behavior of mob counts for persistent mobs
Now decounts entities that got name tagged or persistent state changed.

Removes a bad CB check that ignored some persistent mobs persistence state.

Vanilla code explicitly only cares 'is this mob persistent?' and if
it is, it is not counted. CB should not of been checking its type state.

Fixes #1922
2019-03-29 03:38:23 -04:00
Aikar 27c32b9344
Fix map rendering issues - Fixes #1796 2019-03-29 03:38:23 -04:00
Aikar 52ebb355bc
Optimize Persistent Data Loading
removes Mineshaft loading legacy as we had pre 1.13.2 to avoid managing
that very large data file from legacy systems.

Previous to 1.13.2 these data files were never loaded to begin with, so they
effectively do not contain valid/relevant data.

These files take a long time to convert on large worlds and crashes the server.

Additionally, cache the result of a file being missing so we don't keep spam checking it.
2019-03-29 03:38:22 -04:00
Aikar b66154b26e
Fix a concurrency issue with legacy structure data loading
This code could get hit by many threads at once, causing multiple
chunk loads to convert legacy data, leading to all sorts of fun.

Additionally, go ahead and preload it async on world load.
2019-03-29 03:38:22 -04:00
Aikar a73444b0e1
Reuse buffers for chunk compression to optimize memory use
Instead of allocating a buffer for every chunk compression, reuse
the same 64k sized buffer.

Also stopped doing dynamic compression levels. It wasn't helping enough.

This will improve memory usage and zlib performance of chunk compression.
2019-03-28 23:46:45 -04:00
Aikar def0033929
Forgot to convert duration to millis per the API expectation for tick event 2019-03-28 01:27:39 -04:00
Aikar be067fea11
PlayerDeathEvent#getItemsToKeep
Exposes a mutable array on items a player should keep on death.

This allows a cleaner method to implement "Keep certain items on death"
than how plugins currently do it in that it never removes them in first
place, so its safe if the player logs out/server is shutdown before respawn.

Example Usage: https://gist.github.com/aikar/5bb202de6057a051a950ce1f29feb0b4
2019-03-28 01:12:38 -04:00
Aikar 8f25112b93
Server Tick Events
Fires event at start and end of a server tick
2019-03-27 22:49:29 -04:00
Aikar af52f138da
Remove light optimization
getting lots of bug reports on light. just going to drop this even though
I really don't see how it could be the source due to my understanding of
the games light engine...

Fixes #1920
2019-03-27 20:46:46 -04:00
Shane Freeder 8383c2b97c 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:
4c8327f7 SPIGOT-4673: EntitySpawnEvent should not be called for players

Spigot Changes:
5629554b Rebuild patches
2019-03-27 18:41:12 +00:00
Aikar 25e5bfe669
Revert "Optimize Bukkit <-> NMS Mapping tables and legacy conversion"
This reverts commit f5e7717214.

Has issues, will fix later
2019-03-26 02:04:09 -04:00
Aikar 4d3f9e2033
Fix issue in last build with null task timings 2019-03-26 01:31:59 -04:00
Aikar e055103d3d
Improve Timings stack protection more
Ensures in more places that exceptions will not corrupt the Timings stack.

Timings will now better report stack corruption and auto repair itself too.
2019-03-26 00:58:23 -04:00
Aikar f5e7717214
Optimize Bukkit <-> NMS Mapping tables and legacy conversion
Use O(1) patterns for mapping conversions to improve plugin performance.
Optimize collections used by legacy plugin conversion

This should improve plugin performance across the board
on Paper for both Modern and Legacy Plugins.

Also log how long building those tables takes...
2019-03-26 00:07:20 -04:00
Aikar e8bbfbfddf
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2019-03-24 23:51:44 -04:00
Shane Freeder 8e9ec4b058 Don't update entity trackers for worlds without players
PlayerList#moveToWorld already untracks the player from the player list,
meaning that we do not need to worry about this untracking players
who've left the world, The server also untracks a player during
disconnect, handing yet another case.

If we don't need to untrack players who've left the world, it should be
reasonably save to do this, as we're not going to be performing any
server->client updates here, which is what this code is intended to do,
and all players should be untracked.
2019-03-24 23:55:05 +00:00
Aikar 95941afd59
missed a spot for pickupDelay fix 2019-03-24 18:15:39 -04:00
Aikar 76fab035d3
don't go below 0 for pickupDelay, breaks picking up items
vanilla checks for == 0

Fixes #1911
2019-03-24 18:12:56 -04:00
Aikar 424b05051b
update metadata refresh approach
same fix, less work needed to do it
2019-03-24 17:48:22 -04:00
Aikar 5fc918bbf1
include chunk gen mobs in natural counting, fix some spawn reasons 2019-03-24 14:11:06 -04:00
Joel Paulien 830137acbe Add PlayerPostRespawnEvent (#1622) 2019-03-24 13:50:42 -04:00
Mark Vainomaa 556259dd97 Add GS4 query event (#1906) 2019-03-24 13:01:31 -04:00
Johnny Cao 0f82626d76 Fixes issues with player interaction preventing metadata from being updated for other players (#1896) 2019-03-24 13:00:42 -04:00
Aikar 76d2a4cb8f
Add a config for mob spawn change, really shouldn't use it
turning this to true allows 1 player to deny other players the ability
to have mobs spawn. It really is a bad idea and reverts back to iffy
mob spawn limits where mob farms in the world stops natural spawns
from occuring.

Really recommend resorting to different solutions than ever using this config.
2019-03-24 12:59:28 -04:00
Aikar 458aa79f63
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:
451bd74e Use gson for decoding version command

CraftBukkit Changes:
51100db8 SPIGOT-4678: Fix placing signs in certain circumstances
2019-03-24 12:33:39 -04:00
Aikar 5368451566
Only count Natural Spawned mobs towards natural spawn mob limit
This resolves the super common complaint about mobs not spawning.

This was ultimately a flaw in the vanilla count algorithim that allows
spawners and other misc mobs to count against the mob limit, which are
not bounded, and can prevent the entire world from spawning new.

I believe Bukkits changes around persistence may of actually made it
worse than vanilla.

This should fully solve all of the issues around it so that only natural
influences natural spawns.
2019-03-24 01:05:20 -04:00
Aikar e58c65bb37
Entity#getEntitySpawnReason
Allows you to return the SpawnReason for why an Entity Spawned

Pre existing entities will return NATURAL if it was a non
persistenting Living Entity, SPAWNER for spawners,
or DEFAULT since data was not stored.
2019-03-24 01:05:20 -04:00
Aikar 81ff6e67f5
Fix a case where mob spawning could load/gen chunks 2019-03-24 01:05:20 -04:00
kashike 2e4520d902 Use proper max length when serialising BungeeCord text component 2019-03-20 21:20:56 -07:00
Shane Freeder ea855e2b46 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

Developers!: You will need to clean up your work/Minecraft/1.13.2 folder
for this

Also, restore a patch that was dropped in the last upstream

Bukkit Changes:
279eeab3 Fix command description not being set
96e2bb18 Remove debug print from SyntheticEventTest

CraftBukkit Changes:
d3ed1516 Fix dangerously threaded beacons
217a293d Don't relocate joptsimple to allow --help to work.
1be05a21 Prepare for imminent Java 12 release
a49270b2 Mappings Update
5259d80c SPIGOT-4669: Fix PlayerTeleportEvent coordinates for relative teleports

Spigot Changes:
e6eb36f2 Rebuild patches
2019-03-20 01:55:16 +00:00
Shane Freeder 0976d52bbd 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

Please note that this build includes changes to meet upstreams
requirements for nullability annotations. While we aim for a level of
accuracy, these might not be 100% correct, if there are any issues,
please speak to us on discord, or open an issue on the tracker to
discuss.

Bukkit Changes:
9a6a1de3 Remove nullability annotations from enum constructors
3f0591ea SPIGOT-2540: Add nullability annotations to entire Bukkit API

CraftBukkit Changes:
8d8475fc SPIGOT-4666: Force parameter in HumanEntity#sleep
8b1588e2 Fix ExplosionPrimeEvent#setFire not working with EnderCrystals
39a287b7 Don't ignore newlines in PlayerListHeader/Footer

Spigot Changes:
cf694d87 Add nullability annotations
2019-03-20 00:31:18 +00:00
Zach Brown c3c889523f
Stop loading entity bounding boxes from NBT
This may be creating more issues than it's solving
cc GH-1806
2019-03-15 23:25:32 -04:00
Mark Vainomaa bf2be652f0 Add WhitelistToggleEvent (#1899) 2019-03-13 16:51:42 -04:00
Shane Freeder 2828dd1c67 Revert "Don't update snapshot blockstates" (Fixes #1882)
CraftBukkit already checks that we're not trying to copy data
back to the same snapshot, reverting this fixes the ability to
properly update non-snapshot blockstates
2019-03-07 17:21:02 +00:00
Zach Brown 825d17c326
Update upstream B/CB
--- work/Bukkit
Submodule work/Bukkit 96e09e50..0b95b68f:
  > SPIGOT-4650: Charging API for Vex

--- work/CraftBukkit
Submodule work/CraftBukkit f102d882..77ca7ca0:
  > Rebuild patches
  > Improve damage handling of dead entities
  > SPIGOT-4646: Test + fix InventoryWrapper.getContents
  > SPIGOT-4650: Charging API for Vex
2019-03-06 00:46:21 -05:00
Phoenix616 2c9924816f
Improve damage handling of dead entities
Manually applied because of upstream patch file issues.
Upstream 73597ed865e92dbfad404b69eb6468fb7e129ad2
2019-03-06 00:00:34 -05:00
Aikar 9f8a17af2a
[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:
f102d882 SPIGOT-4647: Properly cancel VehicleDamageEvent
ec17d07d Use getBukkitEntity for ExplosionPrimeEvent instead of creating new one
2019-03-05 00:46:37 -05:00
Zach Brown ffd51cbe2d
Set Zombie lastTick at start of drowned conversion
Fixes GH-1887

Prior to this change, the lastTick value for zombies would be set to
their initial spawn tick. This caused the drowned conversion process to
immediately occur rather than observing the vanilla delay.

Easy fix, just make sure its set again when the process actually starts.

And no, this change has absolutely nothing to do with the other thing.
That's been fixed and remains fixed.
2019-03-04 02:27:27 -05:00
Zach Brown 814356359a
Fire PlayerArmorChangeEvent for more cases 2019-03-03 15:22:30 -05:00
Aikar f0d45d4eab
Fix crops not popping when no plugin listens to physics 2019-03-03 12:22:24 -05:00
Aikar 21ee8800f8
Remove left over debug from entity slices 2019-03-02 18:52:16 -05:00
Aikar 7e3169e3de
MC-145260: Fix Whitelist On/Off inconsistency - Fixes #1880
Mojang stored whitelist state in 2 places (Whitelist Object, PlayerList)

some things checked PlayerList, some checked object. This moves
everything to the Whitelist object.
2019-03-02 16:23:06 -05:00
Aikar 40e666b44a
Add config to disable light recalculation optimizations
I really don't know how this could break things with light, but wanted to
let it be an option so we can try turning it off to fix some light bug reports
2019-03-02 16:22:01 -05:00
Aikar a684cde66b
Handle Excessive Signs in Chunks creating too large of packets
Also adds a limit to stop sending Sign data to client after 500
signs per chunk to limit client lag.

Use -DPaper.excessiveSignsLimit=500 to configure that limit, or -1
to disable the limit and let your players be abused.

fixes #1878
2019-03-02 15:30:00 -05:00
Aikar 420ce3aaed
don't check convert signs boolean every sign save
that lookup isn't "cheap", and synchronizes so cache it to a boolean instead
2019-03-02 15:29:09 -05:00
Aikar 58398da145
Remove outbound string length limits on signs, improve codepoint logic
now 80 chars counts multi sized code points the same so 80 chinese
characters would be allowed too.

Removed outbound limit as it doesn't solve the chunk oversize problem.

proper fix for chunk sending in another patch next.
2019-03-02 15:28:04 -05:00
Zach Brown 40f5a94b8f
Remove unnecessary set init I missed in last 2019-02-28 20:04:14 -05:00
Zach Brown 24fed5a3a5
Fix CanDestroy CanPlaceOn on untagged items 2019-02-28 19:52:12 -05:00
Shane Freeder 025a590fbd Apply sign limits to signs text content 2019-02-28 18:07:14 +00:00
Aikar 3ab6da0e4f
Fix incorrect check on vehicle for auto dismount
This fixes an issue where players are dismounted from their horse on logout.
2019-02-28 02:43:38 -05:00
Aikar 2f8bdbfde8
Fix BlockState hashCode optimization patch performance bug
we missed something in updating this patch and accidently left
hashCode as a 0 value. This caused a pretty nasty performance hit
for BlockStateEnum instances as they would be all a hash collision.

This update fixes that and also promotes the optimizations to cover
ALL cases of Block States, not just enums.

While mojang cached hashCode in 1.13, we can still just use a simple
large prime based hashCode that auto increments guaranteeing no overlap.

Additionally, replace all equals with an identity check.
2019-02-28 01:35:06 -05:00
Aikar 906684ff4f
Fix a sign memory leak 2019-02-28 00:47:57 -05:00
Aikar b2d7ef4f3c
Strip extra Sign data to/from client - Fixes #1876
modified clients can send abnormally large data from the client
to the server and it would get stored on the sign as sent.

the client can barely render around 16 characters as-is, but formatting
codes can get it to be more than 16 actual length.

Set a limit of 80 which should give an average of 16 characters 2
sets of legacy formatting codes which should be plenty for all uses.

This does not strip any existing data from the NBT as plugins
may use this for storing data out of the rendered area.

it only impacts data sent to and from the client.

Set -DPaper.maxSignLength=XX to change limit or -1 to disable
2019-02-28 00:47:50 -05:00
Aikar 47c6e17d45
Improve reliability of Shapeless Recipe logic
per feedback from @liach about a bug with vanillas previous logic
that we essentially just reverted to. complex recipes could run into
cases where a recipe that does have enough items can be unsatisfied
if the items are in certain orders, making them not truely shapeless.

this scenario doesn't occur in vanilla, but users can load custom recipes.

this improves the logic to do some sorting on the lists to improve
chances of matching the recipes harder ingredients before the easier
to satisfy ingredients.

the likelyhood of someone adding a recipe that still fails this is too
extreme to care about. i doubt mojangs implementation is perfect either.

we can improve this logic more later if we actually get bug reports on it.
2019-02-28 00:45:45 -05:00
Aikar ac5b19c55e
Fix Custom Shapeless Custom Crafting Recipes
Mojang implemented Shapeless different than Shaped

This made the Bukkit RecipeChoice API not work for Shapeless.

This reimplements vanilla logic using the same test logic as Shaped
2019-02-27 21:06:04 -05:00
Aikar 2ced55d05f
Revert "Fix Custom Shapeless Crafting Recipes"
This reverts commit e56f465acd.
2019-02-26 01:25:27 -05:00
Aikar e56f465acd
Fix Custom Shapeless Crafting Recipes
Mojang implemented Shapeless different than Shaped

Make shaped also support the RecipeChoice API
2019-02-25 21:31:50 -05:00
Aikar 32b9e543d9
BlockDestroyEvent
Adds an event for when the server is going to destroy a current block,
potentially causing it to drop. This event can be cancelled to avoid
the block destruction, such as preventing signs from popping when
floating in the air.

This can replace many uses of BlockPhysicsEvent, as this will not fire
with the same velocity as BPE.
2019-02-25 21:26:12 -05:00
Aikar 0a76e7d1aa
Remove redstone checks for BlockPhysicsEvent as it wasnt working, general optimize
Just make it ignore the event fires when no plugin is listening to it.
2019-02-25 21:26:12 -05:00
Zach Brown 1e38743b1d
Update upstream B/CB/S
Also fixes build as a result of an upstream force push

--- work/Bukkit
Submodule work/Bukkit 217dc08d..d13fdf8c:
  > SPIGOT-4637: Add source block to BlockPhysicsEvent.

--- work/CraftBukkit
Submodule work/CraftBukkit acbba8ba..cb98c6ea:
  > Fix line endings in CraftDefaultPermissions
  > SPIGOT-4637: Add source block to BlockPhysicsEvent.

--- work/Spigot
Submodule work/Spigot 75ee78a0c...4165cd8f4 (commits not present)
  > (Manually Added) - Appears to be a result of an upstream force push
  > (Manually Added) - Changed: SPIGOT-4636: Add creative mode NBT permissions
2019-02-25 04:39:24 -05:00
Aikar e6fc2d18c3
[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:
acbba8ba SPIGOT-4635: Restore shield damage sound
2019-02-25 02:56:39 -05:00
Aikar b4e7e439e4
Missed diff on spigot chunk patch
not much concern over it, it would of just misidentified a corrupt chunk as not corrupt
2019-02-23 16:18:46 -05:00
Aikar 7ab257e4f1
Remove ChunkSection debug - #1302
While these logs indicate something is 'off', we've had no reports
of visible 'issues' with entities, and no one is going to take the
time to debug this farther, so just getting rid of the logs so it's
like its never happening!

Ignorance is bliss.
2019-02-23 12:24:23 -05:00
Aikar 17b58d00d8
Unwrap Event Exceptions
This was a useless exception wrapper that ends up making
stack traces harder to read as well as the JVM cutting off
the important parts

Nothing catches this exception, so its safe to just get rid
of it and let the REAL exception bubble down
2019-02-23 12:17:41 -05:00
Aikar ddab622b9a
Load correct chunks for spawn chunk loading - Fixes #1866
logic was loading the wrong x/z in block coords instead of chunk coords
2019-02-22 00:02:37 -05:00
Aikar 13d1abf01e
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly.
This update has only been PARTIALLY tested by PaperMC and as with ANY update, please do your own testing

I've tested basic region file saving as well as our oversized chunks approach.

Bukkit Changes:
e167e549 Clarify MerchantInventory#getSelectedRecipe.
3a1d5b8f Apply default permissions by registration order.
c64cc93f Make tags Keyed
ec037ed7 Added a method to get a list of tags
bfb6ef86 Introduce rotation methods to the Vector class
fc727372 Remove draft API from FluidLevelChangeEvent

CraftBukkit Changes:
6430d9c0 SPIGOT-4632: BlockState location is not fixed
14cd1688 Fix CraftInventoryMerchant#getSelectedRecipe if there is no active merchant recipe.
c24abab7 Load custom permissions after default permissions.
bc99dfe8 Make tags Keyed
6fce004f Added a method to get a list of tags

Spigot Changes:
e5e5c7c6 Allow Saving Large Chunks
e8d3881c Rebuild patches
2019-02-21 22:41:40 -05:00
Aikar 825191f069
Fix loot table restriction when replenish is disabled - Fixes #1860 2019-02-16 18:22:35 -05:00
Aikar 84480114eb
Allow Saving of Oversized Chunks - READ COMMIT DETAILS!!!
Please test this build on a local TEST SERVER before sending to your live server!

PaperMC is not responsible for any data loss to your chunks.

-------------------------------------------------------------------

The Minecraft World Region File format has a hard cap of 1MB per chunk.
This is due to the fact that the header of the file format only allocates
a single byte for sector count, meaning a maximum of 256 sectors, at 4k per sector.

This limit can be reached fairly easily with books, resulting in the chunk being unable
to save to the world. Worse off, is that nothing printed when this occured, and silently
performed a chunk rollback on next load.

This leads to security risk with duplication and is being actively exploited.

This patch catches the too large scenario, falls back and moves any large Entity
or Tile Entity into a new compound, and this compound is saved into a different file.

On Chunk Load, we check for oversized status, and if so, we load the extra file and
merge the Entities and Tile Entities from the oversized chunk back into the level to
then be loaded as normal.

Once a chunk is returned back to normal size, the oversized flag will clear, and no
extra data file will exist.

This fix maintains compatability with all existing Anvil Region Format tools as it
does not alter the save format. They will just not know about the extra entities.

This fix also maintains compatability if someone switches server jars to one without
this fix, as the data will remain in the oversized file. Once the server returns
to a jar with this fix, the data will be restored.
2019-02-15 20:13:38 -05:00
Aikar ed62690821
Catch all exceptions thrown by chunk loading
If anything throwable is thrown, be sure its caught too.

Because I totally did new Error() out of javascript habit...

This ensures that chunk loading process cant get stuck due to uncaught errors
2019-02-15 18:33:45 -05:00
Zach Brown 0ecc1545dd
Update upstream CB
--- work/CraftBukkit
Submodule work/CraftBukkit a2dd0e303..51c118b1d:
  > SPIGOT-4619: Incorrect packet order for villager inventories
  > Fix EntityPickupItemEvent getRemaining / PlayerInventory#canHold
2019-02-13 09:07:12 -05:00
Shane Freeder 60d222d330
Fix newline inconsistencies from libraries 2019-02-10 21:53:53 +00:00
Shane Freeder 3ddcf052ae
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:
a8887389 Make AreaEffectCloudApplyEvent cancellable

CraftBukkit Changes:
a2dd0e30 SPIGOT-4615: Missing target event for withers
b26fb374 Update outdated spigot link
2b1940ae Make AreaEffectCloudApplyEvent cancellable
2019-02-10 21:17:18 +00:00
Zach Brown a5172f8d68
Always run server tests 2019-02-07 00:48:17 -05:00
Aikar 7d5b217d83
Fix logic error in async chunk loading
if a chunk load was cancelled after generating stage started
it would short circuit return with a null.

however this skipped the creation of the loadTask, which some code
would then invoke in requestChunk and trigger an NPE.

This then likely left an incomplete corrupt request in the chunk map
which then crashes servers.

It should fix these isseues
Fixes #1775
Fixes #1743
2019-02-07 00:04:29 -05:00
Shane Freeder 182d4f528f
Fix NPE during server initialization from server list pings 2019-02-06 19:15:46 +00:00
Shane Freeder e952f6ebe2
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:
43b46cbd SPIGOT-4608: Improve quality of MapMeta APIs

CraftBukkit Changes:
c7ba9790 Fix incorrect method descriptor in previous commit
3d19f011 SPIGOT-4608: Improve quality of MapMeta APIs
2019-02-06 02:19:49 +00:00
Zach Brown 8211569c9a
Only enforce CraftPlayer#remove exception on instances of EntityPlayer
Should be more friendly to plugins that dabble in inheriting NMS
entities.
2019-02-05 07:44:36 -05:00
Zach Brown 28cf2696d4
Block Entity#remove from being called on Players
This doesn't result in the same behavior as other entities and causes
several problems. Anyone ever complain about the "Cannot send chat
message" thing? That's one of the issues this causes, among others.

If a plugin developer can come up with a valid reason to call this on a
Player we will look at limiting the scope of this change. It appears to
be unintentional in the few cases we've seen so far.
2019-02-04 23:43:28 -05:00
Aikar 5ae3895105
Fix Async Tab Completion processing
previous logic was super broken and did not truncate your currently typed
part of the input from the suggestions.
2019-02-04 22:39:00 -05:00
Shane Freeder abba3d113b
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:
bb813f6f SPIGOT-4605: Warn against hacking physics

CraftBukkit Changes:
2ced0233 Don't handle sync packets for kicked players
d5e96882 SPIGOT-4602: Cache reflection in decompile error workaround

Spigot Changes:
b0f4c22b SPIGOT-4605: Catch more physics problems
2019-02-03 15:34:04 +00:00
Zach Brown f8058a8187
Fire BlockPistonRetractEvent for all empty pistons
There is an explicit check in the handling code for empty pistons that
prevents sticky pistons from firing the event. However when we look back
at the history we see that this check was originally added so that ONLY
sticky pistons would fire the retract event. I'm not sure why.
1092acbddf

Over the course of several updates, the meaning of that field appears to
have changed from "is NOT sticky" to "is sticky". So now its having the
opposite effect. Only normal pistons fire the retraction event. And like
all things in CB, it's just been carried around since.

If we are to believe the history, the correct fix for this issue is to
flip it so it only fires for sticky pistons, but that puts us in a
bind. It's already firing for non-sticky pistons, changing it now would
likely result in breakage. Furthermore, there is little documentation as
to WHY that was ever intended to be the case.

Instead we opt to remove the check entirely so that the event fires for
all piston types.

Fixes GH-1829
2019-01-31 16:45:43 -05:00
Shane Freeder 7a73ce03e9
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:
3108e64a SPIGOT-4193: API for selecting entities by strings

CraftBukkit Changes:
ad6070df SPIGOT-4193: API for selecting entities by strings
2019-01-31 04:49:52 +00:00
Shane Freeder e87859d8a5
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:
d58803c2 SPIGOT-4597: Make BlockDropItemEvent use a list
d450fdf1 Add note about Maven repository usage to pom.xml

CraftBukkit Changes:
ed274c51 SPIGOT-4597: Make BlockDropItemEvent use a list
1734f378 SPIGOT-4598: Shift click on custom workbench inventory causes crash
a65b73ad Add note about Maven repository usage to pom.xml
2019-01-30 13:26:12 +00:00
Shane Freeder e3f2448ae1
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:
60268ac8 Recipe choice lists should be copied once handed over to Bukkit
7ab335f2 Consistent multiple choice APIs for RecipeChoice.
2b6f3d7f SPIGOT-4586: Change PotionEffectType#value to not include null

CraftBukkit Changes:
2aba349f Need to update item in hand if fish bucket pickup cancelled
b634e059 SPIGOT-4591: Must mark itemstacks as dirty in case the handle itself changed
1748af89 Consistent multiple choice APIs for RecipeChoice.
2019-01-28 22:14:04 +00:00
kashike f238f3a0f4 Force anti-xray chunk edge mode to WAIT 2019-01-25 16:11:42 -08:00
Shane Freeder 40a8c003df
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:
d38ac1be Update compiler
2844ce20 Add CookTimeTotal API to Furnace

CraftBukkit Changes:
13f71402 Update compiler
61c762f4 Add CookTimeTotal API to Furnace
2019-01-24 21:36:24 +00:00
Shane Freeder 88a347c753
Make force actually force a load
While this posed no issues in testing, this is the only behavioral
difference which might explain some increased reports in missing
chunks on the client
2019-01-21 20:48:27 +00:00
Shane Freeder 44e66f7e53
Make anti-xray load chunks async when enabled (fixes #1808) 2019-01-21 07:12:32 +00:00
Shane Freeder 9b05677eef
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:
c64197df SPIGOT-4584: Call events for hatching turtle eggs
f54588bd Add some missing vanilla tags
dacf8f8d Fix stray asterisk in BukkitScheduler javadocs

CraftBukkit Changes:
7fc66b28 Fix minecraft.command.selector permission
47b06d5b SPIGOT-4584: Call events for hatching turtle eggs
2019-01-18 22:34:02 +00:00
Shane Freeder a7f924c2ca
Remove "Don't double add golems to world"
Fixed upstream
2019-01-17 02:02:56 +00:00
Brokkonaut f64dce2719 Remove "Fire EntityCombustEvent for phantoms" patch as it is fixed in Spigot (#1805)
It is fixed here: 438556243d
2019-01-16 18:06:39 +00:00
Shane Freeder 54dd19b818
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:
18cda936 Fix variant of unloadChunkRequest that was incorrectly never deprecated
00763e1b Deprecate some methods
35a83d54 SPIGOT-4572: Make default no permission message clearer
6163343d Fix some misplaced material enum entries
8736469c Fix typo in TechnicalPiston documentation

CraftBukkit Changes:
0c715b32 SPIGOT-4579: Shulker boxes not dropping in creative
50fbc3f1 SPIGOT-4576: Fix attributes in itemstack internal data being lost
8059a937 SPIGOT-4577: Fix loss of int/double custom tags when serialized to yaml
07e504c3 Clarify exception thrown when setting drop chance for player inventory
98b862ad Fix duplicate iron golem add
843cee65 Fix a bunch of duplicate EntityCombustEvent calls
43855624 SPIGOT-4571: EntityCombustEvent not firing for phantoms
2019-01-15 21:12:19 +00:00
Zach Brown 21ba01aaf4
Make anti-xray chunk edge mode LOAD the default
Fixes GH-1749

Setting the new default to load chunk edge neighbors may have unintended
side-effects so feedback will be important. Specifically, if you're not
using the asynchronous chunk loader, you should probably switch to mode
2 (WAIT)

Old users will be migrated automatically if: You're using engine mode 1
(HIDE) and you're using chunk-edge-mode 1 (DEFAULT). Other users will
not be migrated.

Thanks @stonar96
2019-01-12 18:13:53 -05:00
Shane Freeder a5e0335065
Address some issues with book limits (#1798)
The multibyte calculation has been fixed, now we actually work out which
characters take more than a byte.

Diminishing returns has been modified, previously the multiplier would zero
itself out due to floating point limitations
2019-01-12 16:29:15 +00:00
Shane Freeder c42ec4782e
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:
d4e8c8b3 SPIGOT-4570: Add FluidLevelChangeEvent

CraftBukkit Changes:
9dc56581 SPIGOT-4570: Add FluidLevelChangeEvent
b15abb12 SPIGOT-4566: Don't special case NETHER_PORTAL teleport reason from plugins
2019-01-08 16:57:27 +00:00
Zach Brown a6ee4b9965
Add vehicle tracking workaround from 1.12.2 branch 2019-01-07 15:02:11 -06:00
Shane Freeder 797c46bd27
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:
6de6ac4a BlockDropItemEvent should refer to getBlockState rather than getBlockData
2b555a75 Fix BlockDropItemEvent for Skulls and Shulker Boxes

CraftBukkit Changes:
f17d591c Fix BlockDropItemEvent for Skulls and Shulker Boxes

Spigot Changes:
f56e2e78 Catch async recipe add
2019-01-07 18:24:51 +00:00
Shane Freeder c608a94ff7
Use OBFHELPER in previous commit 2019-01-06 17:48:24 +00:00
Michael Himing 5cdbb30e78
Fix PlayerEditBookEvent 2019-01-06 17:33:15 +00:00
Shane Freeder f4e3b4e439
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:
5b680f0b Note maximum objective score length in documentation

CraftBukkit Changes:
5932f8a7 Load default world spawn areas in consistent order
3a5dc78f Fix confusing migration message appearing on fresh server
516a408f Remove redundant CraftBukkit change for secondary world data
73a2c749 Process conversation input on the main thread.
100c3f07 Cap Objective Score Length
6e842759 Cross World Entity Teleportation
7deba1c6 Check for blank OfflinePlayer Names
f2746a5e Descriptive kick reasons instead of Nope!
b0212308 Cap Channel Registrations
a610dcd8 Identify CraftScheduler threads with useful names

Spigot Changes:
19c3c5a5 Rebuild patches
2019-01-06 17:15:21 +00:00
Shane Freeder b9badbf2bc
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:
79f6ba25 Skip tests on default builds
b85cc32f Further discourage World.regenerateChunk

CraftBukkit Changes:
7560d3b5 Skip tests on default builds
d0a9130d SPIGOT-4563: Fix regenerating chunks saved to disk already

Spigot Changes:
8173d06f Remove need for redundant second clone of repositories
8ede0393 Rebuild patches
2019-01-04 19:19:36 +00:00
Shane Freeder ccbeb5c4ed
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:
6ffe5a68 Add RecipeChoice.ExactChoice API for NBT matches on ingredients
ffccf6b7 SPIGOT-4560: Add HumanEntity.sleep and related APIs

CraftBukkit Changes:
917411fd Remove redundant BlockPosition creation from sleep API
756c38d1 Add RecipeChoice.ExactChoice API for NBT matches on ingredients
8e65d8df SPIGOT-4560: Add HumanEntity.sleep and related APIs
a8382862 SPIGOT-4562: reducedDebugInfo not updated on world change
2019-01-02 18:10:14 +00:00
Shane Freeder 5d5e0ad75c
Don't double broadcast movement packets (fixes #1784)
WROOOONG LEEEVERRR....
2019-01-02 16:40:09 +00:00
Zach Brown 9af685abe7
Add APIs to replace OfflinePlayer#getLastPlayed
Currently OfflinePlayer#getLastPlayed could more accurately be described
as "OfflinePlayer#getLastTimeTheirDataWasSaved".

The API doc says it should return the last time the server "witnessed"
the player, whilst also saying it should return the last time they
logged in. The current implementation does neither.

Given this interesting contradiction in the API documentation and the
current defacto implementation, I've elected to deprecate (with no
intent to remove) and replace it with two new methods, clearly named and
documented as to their purpose.
2019-01-02 01:04:11 -06:00
Shane Freeder b68b282439
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

Warning: this commit contains more mapping changes from upstream, As always, ensure that you
have working backups and test this build before deployment; Developers working on paper will,
yet again, need to delete their work/Minecraft/1.13.2 folder

Bukkit Changes:
7fca5fd4 SPIGOT-4558: Preserve user order in the face of copied defaults in configurations
15c9b1eb Ignore spurious slot IDs sent by client, e.g. in enchanting tables
5d2a10c5 SPIGOT-3747: Add API for force loaded chunks
d6dd2bb3 SPIGOT-3538: Add getHitBlockFace for ProjectileHitEvent
771db4aa SPIGOT-794: Call EntityPlaceEvent for Minecart placement
55462509 Add InventoryView#getSlotType
2f3ce5b6 Remove EntityTransformEvent and CustomItemTagContainer from draft API
f04ad7b6 Make ProjectileLaunchEvent extend EntitySpawnEvent
ccb85808 Define EntitySpawnEvent
b8cc3ebe Add PlayerItemDamageEvent
184a495d Ease ClassLoader Deadlocks Where Possible
11ac4728 Expand Boolean Prompt Values in Conversation API
aae62d51 Added getAllSessionData() to the Conversation API.
9290ff91 Add InventoryView#getInventory API
995e530f Add API to get / set base arrow damage

CraftBukkit Changes:
c4a67eed SPIGOT-4556: Fix plugins closing inventory during drop events
5be2ddcb Replace version constants with methods to prevent compiler inlining
a5b9c7b3 Use API method to create offset command completions
2bc7d1df SPIGOT-3747: Add API for force loaded chunks
a408f375 SPIGOT-3538: Add getHitBlockFace for ProjectileHitEvent
b54b9409 SPIGOT-2864: Make Arrow / Item setTicksLived behave like FallingBlock
79ded7a8 SPIGOT-1811: Death message not shown on respawn screen
b4a4f15d SPIGOT-943: InventoryCloseEvent called on death regardless of open inventory
0afed592 SPIGOT-794: Call EntityPlaceEvent for Minecart placement
2b2d084a Add InventoryView#getSlotType
01a9959a Do not use deprecated ItemSpawnEvent constructor
9642498d SPIGOT-4547: Call EntitySpawnEvent as general spawn fallback event
963f4a5f Add PlayerItemDamageEvent
63db0445 Add API to get / set base arrow damage
531c25d7 Add CraftMagicNumbers.MAPPINGS_VERSION for use by NMS plugins
d05c8b14 Mappings Update
bd36e200 SPIGOT-4551: Ignore invalid attribute modifier slots

Spigot Changes:
518206a1 Remove redundant trove depend
1959ad21 MC-11211,SPIGOT-4552: Fix placing double slabs at y = 255
29ab5e43 SPIGOT-3661: Allow arguments in restart-script
7cc46316 SPIGOT-852: Growth modifiers for beetroots, potatoes, carrots
82e117e1 Squelch "fatal: Resolve operation not in progress" message
0a1a68e7 Mappings Update & Patch Rebuild
2019-01-01 03:29:51 +00:00
Shane Freeder 0318e62b45
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:
0969eedc Clarify furnace burn time behaviour as per SPIGOT-844
16453bfd SPIGOT-4503: Add API to insert complete ItemStack into Jukebox

CraftBukkit Changes:
dff66dfc Reduce copying of positions from block states
91cae6ef SPIGOT-4387: Durability looping from cancelled BlockPlaceEvent
24c5e68c SPIGOT-4493: Allow burnt out furnaces to remain lit like Vanilla whilst retaining SPIGOT-844 API
bc943daf Fix Jukebox API not synchronizing playing data with state
fe89a8c1 SPIGOT-4503: Add API to insert complete ItemStack into Jukebox
fc102494 Make CraftBlockState use BlockPosition
89ab4887 SPIGOT-4543: Jukebox playing calls should not use legacy data
6ff5a64c SPIGOT-4541: Cancelled bucket events require inventory update
2018-12-23 17:04:13 +00:00
Shane Freeder ac66acab27
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:
78568d11 Tweak Block.getTemperature to return actual block temperature
9ad459ca SPIGOT-2151: Add support for getting simple bounding box of a block
ad28b19f Add BlockData#getAsString(boolean) to hide unspecified states

CraftBukkit Changes:
1b982fd6 Tweak Block.getTemperature to return actual block temperature
f55c8191 SPIGOT-2151: Add support for getting simple bounding box of a block
4b843638 Add BlockData#getAsString(boolean) to hide unspecified states

Spigot Changes:
573cdf2c BUILDTOOLS-425: Disable commit.gpgSign in applyPatches.sh
667bdd6b Deprecate Spigot version of Entity.isInvulnerable
2018-12-21 16:09:17 +00:00
Shane Freeder b2f6b9f7ea
Prevent Enderman from loading chunks 2018-12-18 02:20:03 +00:00
Shane Freeder 6c34639605
Cleanup Entity add to world fixes 2018-12-18 02:07:05 +00:00
Shane Freeder e293688578
Actually add entities to chunks
Because, you know, vanishing entities is always nice to have
2018-12-18 01:56:54 +00:00
Shane Freeder 1f59f78c6f
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:
bb6f384a SPIGOT-4534: Only call event for new chunks
2018-12-17 23:51:44 +00:00
Shane Freeder 3496f2d7e4
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Developers!: You will need to clean up your work/Minecraft/1.13.2 folder for this

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:
b850a822 SPIGOT-4526: Add conversion time API for Zombie & subclasses

CraftBukkit Changes:
38cf676e SPIGOT-4534: CreatureSpawnEvent not being called for CHUNK_GEN
b446cb5d SPIGOT-4527: Fix sponges with waterlogged blocks
6ec8ea5c SPIGOT-4526: Add conversion time API for Zombie & subclasses
c64fe508 Mappings Update
a3c2ec03 Fix missing ServerListPingEvent call for legacy pings

Spigot Changes:
1dc156ce Rebuild patches
140f654d Mappings Update
2018-12-17 05:19:39 +00:00
Zach Brown 8ed2992da9
Make scan-for-legacy-ender-dragon config work again
Portion of diff was dropped in the mappings update commit.

Also remove the option to remove invalid statistics. The server will
automatically do this now as of... 1.13?, our option wasn't even doing anything.
2018-12-14 20:17:27 -05:00
Spottedleaf fa35d5a102 Disable watchdog early timeout for CraftServer#reload() invocations (#1718)
Fixes GH-1381
2018-12-12 20:41:11 -05:00
Spottedleaf 9cf4eeda47 Add PlayerConnectionCloseEvent (#1552)
* Add PlayerConnectionCloseEvent

This event is invoked when a player has disconnected. It is guaranteed that,
if the server is in online-mode, that the provided uuid and username have been
validated.

The event is invoked for players who have not yet logged into the world, whereas
PlayerQuitEvent is only invoked on players who have logged into the world.

The event is invoked for players who have already logged into the world,
although whether or not the player exists in the world at the time of
firing is undefined. (That is, whether the plugin can retrieve a Player object
using the event parameters is undefined). However, it is guaranteed that this
event is invoked AFTER PlayerQuitEvent, if the player has already logged into
the world.

This event is guaranteed to never fire unless AsyncPlayerPreLoginEvent has
been invoked beforehand, and this event may not be called in parallel with
AsyncPlayerPreLoginEvent for the same connection.

Cancelling the AsyncPlayerPreLoginEvent guarantees the corresponding
PlayerConnectionCloseEvent is never called.

The event may be invoked asynchronously or synchronously. As it stands,
it is never invoked asynchronously. However, plugins should check
Event#isAsynchronous to be future-proof.

On purpose, the deprecated PlayerPreLoginEvent event is left out of the
API spec for this event. Plugins should not be using that event, and
how PlayerPreLoginEvent interacts with PlayerConnectionCloseEvent
is undefined.
2018-12-12 20:17:38 -05:00
Majo 19b4f78b55
Modified Configurable Chunk Inhabited Timer Patch
Replaces the "use-chunk-inhabited-timer" config option with the options
"use-fixed-chunk-inhabited-time" and "fixed-chunk-inhabited-time".

When using "use-fixed-chunk-inhabited-time=false" everything will be the
same like it was with "use-chunk-inhabited-timer=true".

When using "use-fixed-chunk-inhabited-time=true" and
"fixed-chunk-inhabited-time=0" everything will be the same like it was
with "use-chunk-inhabited-timer=false".

Instead of just using 0 when all chunks should be treated equally this
allows to fine-tune vanilla gameplay.
2018-12-12 19:41:37 -05:00
Zach Brown 7b4fe255d8
Lazy init world storage in CraftOfflinePlayer
Allows access to some offline player properties even when there
are no worlds loaded. This is typically a rare occurrence but
probably one that should be covered as best we can.

Fixes GH-1701
2018-12-11 22:32:39 -05:00
Zach Brown a2ad49b22f
Update upstream BD/B/CB/S
Note to other developers: This commit may require you to wipe your
workspace as a result of the changes to BD.

--- work/BuildData
Submodule work/BuildData f527a8ff..d56672db:
  > Mappings Update

--- work/Bukkit
Submodule work/Bukkit 0c1d258bb..db06c80d7:
  > Add list of entities to EntityTransformEvent
  > SPIGOT-4347: Add API to allow storing arbitrary values on ItemStacks

---work/CraftBukkit
Submodule work/CraftBukkit 6a398ac44..068dab5be:
  > Enable optional source JAR shading via profile shadeSourcesJar
  > Use ImmutableList rather than AbstractList for CraftMetaBook
  > Fix setRecipes(List) not setting Knowledge Book recipes.
  > Mappings Update
  > Add list of entities to EntityTransformEvent & move die calls
  > SPIGOT-4347: Add API to allow storing arbitrary values on ItemStacks
  > Add Vanilla help to default permissions

--- work/Spigot
Submodule work/Spigot a1f2566f6..e769fe4d9:
  > Mappings Update
  > Rebuild patches
2018-12-08 05:09:55 -05:00
Zach Brown 684bd2adbc
Upstate upstream B/CB
--- work/Bukkit
Submodule work/Bukkit 9a793cce8..0c1d258bb:
  > Make PigZapEvent extend EntityTransformEvent

--- work/CraftBukkit
Submodule work/CraftBukkit ee6684bba..6a398ac44:
  > SPIGOT-4511: Trident doesn't lose durability
  > Tweak outdated windows
2018-12-02 18:31:09 -05:00
DoNotSpamPls 0c74d4575c Change the reserved channel check to be sensible (#1610) 2018-11-30 19:08:31 -05:00
kashike 3ef68e5f20 nevermind then 2018-11-30 07:40:47 -08:00
Shane Freeder 7d25c57f43
Use Item from PlayerPickupItemEvent when fired (fixes #1717) 2018-11-30 15:15:07 +00:00
kashike 1c8d620e6e Don't fill list with items on startup 2018-11-29 16:32:23 -08:00
Zach Brown b2dbcca4c9
Ensure stopRiding override follows all super calls
Fixes GH-1702
2018-11-27 23:19:01 -05:00
Aikar 0d7513c4a4
Handle Large Packets disconnecting client
If a players inventory is too big to send in a single packet,
split the inventory set into multiple packets instead.
2018-11-27 21:43:25 -05:00
Zach Brown 6c38478e65
Persist ArmorStand canTick API value across restarts 2018-11-27 18:14:57 -05:00
Aikar cbac5b0524
Prevent rayTrace from loading chunks - Fixes #1706
ray tracing into an unloaded chunk should be treated as a miss
this saves a ton of lag for when AI tries to raytrace near unloaded chunks.
2018-11-26 19:41:33 -05:00
Shane Freeder b5184575e6
limit the range at which we'll consider an attackable target
This patch aims to ensure that MCP World#getNearestAttackablePlayer
will not trigger chunk loads due to PathfinderGoalNearestAttackableTarget
performing a ray trace operation by pre-checking the maximum limit;

Given that the implementation shows that the limit should only ever
decrease when set, allowing us to skip further checks earlier on
when looking for an attackable entity
2018-11-26 13:23:49 +00:00
BillyGalbreath 3aa59b3c99 Add more Zombie API (#1547) 2018-11-25 12:51:11 -05:00
Zach Brown dce9007a09
Fix vanilla scoreboard team color support for black
Fixes GH-1703
2018-11-25 12:16:01 -05:00
Shane Freeder 29a01de126
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:
9a793cce Remove no longer applicable caveats to setPlayerListName
7137829e SPIGOT-4496: Undeprecate MapView.getId and make int
de33ade0 Remove some draft API designations
a35fa838 SPIGOT-4472: Add Consumer scheduler methods

CraftBukkit Changes:
8cd538e6 SPIGOT-4498: Crash on startup
b4ee04ba SPIGOT-4496: Undeprecate MapView.getId and make int
ec937d0e SPIGOT-4472: Add Consumer scheduler methods

Spigot Changes:
a1f2566f Use monotonic time for watchdog
bc4adcbf SPIGOT-4498: Crash on startup
bb387e6c Rebuild patches
2018-11-24 05:28:04 +00:00
Zach Brown e73ace252e
Fix thunder sounds not playing properly 2018-11-23 02:23:50 -05:00
Zach Brown aac051e35b
Redo API for vanilla CanPlace and CanDestroy NBT
Now properly serializes and deserializes, is factored into hashcodes and
equality checks, etc

Deprecates the old Material based system and replaces it with a new one
based around NamespacedKeys and NamespacedTags. This allows the API to
extend beyond vanilla and Material enum based properties to datapack
based tags and elements.

Fixes GH-1635
2018-11-21 21:56:52 -05:00
Zach Brown 23a0b8c7bb
Update upstream CB
--- work/CraftBukkit
Submodule work/CraftBukkit e4183e70..f489f0f7:
  > SPIGOT-4494: Remove fix for SPIGOT-3864, better handled by SPIGOT-3879 fix
2018-11-21 21:49:47 -05:00
Shane Freeder 65cc6ba7c4
Fire entity dismount/vehicle events (but supress their cancellation) for player teleportation
Entities must be dismounted before teleportation in order to avoid
multiple issues in the server with regards to teleportation, shamefully,
too many plugins rely on the events firing, which means that not firing
these events caues more issues than it solves;

In order to counteract this, Entity dismount/exit vehicle events have
been modified to supress cancellation (and has a method to allow plugins
to check if this has been set), noting that cancellation will be silently
surpressed given that plugins are not expecting this event to not be cancellable.

This is a far from ideal scenario, however: given the current state of this
event and other alternatives causing issues elsewhere, I believe that
this is going to be the best soultion all around.

Improvements/suggestions welcome!
2018-11-20 22:39:54 +00:00
Aikar 8cd849c64d
[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:
e4183e70 SPIGOT-4491: Fix InventoryMoveItemEvent causing repeated events
2018-11-19 05:01:41 -05:00
Shane Freeder 975491cb8b
Make the default permission message configurable 2018-11-18 19:54:38 +00:00
Shane Freeder b710cc2e82
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:
689f1565 SPIGOT-4487: Clarify PlayerInteractEvent docs
01ffd1c7 Add Player to BlockCanBuildEvent

CraftBukkit Changes:
1cac9d4f Add Player to BlockCanBuildEvent
2018-11-18 16:52:49 +00:00
Aikar aae0c12d39
Specify charset explicitly on getBytes 2018-11-17 00:38:35 -05:00
Aikar d5408369ac
Improvements to Book Size checks
If you downloaded the build before this, delete the settings.book-size
section in paper.yml to get new values.
2018-11-17 00:34:58 -05:00
Aikar 38b6799b58
Book Size Limits
Puts some limits on the size of books.
2018-11-16 23:23:55 -05:00
Aikar a939b01116
[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:
b1d149cf SPIGOT-4489: NOTE_BLOCK incorrectly has BlockStateMeta
2018-11-15 23:21:38 -05:00
Shane Freeder a16e1a2fe7
force entity dismount during teleportation
Entities must be dismounted before teleportation in order to avoid
multiple issues in the server with regards to teleportation, while
we now lose the ability for plugins to monitor this specific case
of entity dismount, the alternative is that we allow a cancellable
event, but silently ignore the cancelled status, which might cause
further issues for plugins tracking state

Given that nobody can be relying on the Cancellable state of those
events during teleportation due to the issues that arise from this,
this is a small trade off
2018-11-15 14:29:04 +00:00
egg82 0b9983dfbc Optimize redstone algorithm (#1494) 2018-11-14 22:09:37 -05:00
Aikar 4cd3e8173c
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-11-13 23:41:46 -05:00
Zach Brown 0ae3b1c14e Update upstream B/CB/S
--- work/Bukkit
Submodule work/Bukkit 3aee9dbd0..0828ce366:
  > Add SpawnReason.SHEARING
  > SPIGOT-4339: Add EntityTransformEvent

--- work/CraftBukkit
Submodule work/CraftBukkit 17ff1e046..c2035aa1d:
  > Add some missing CreatureSpawnEvent.SpawnReason calls
  > SPIGOT-4339: Add EntityTransformEvent

--- work/Spigot
Submodule work/Spigot 947a8e7fd..5696c83c1:
  > Rebuild patches
2018-11-13 23:35:43 -05:00
Shane Freeder 7c8937d0c6
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:
17ff1e04 SPIGOT-4483: Missing EntityInteractEvent call for zombies on eggs
2018-11-12 18:23:24 +00:00
Shane Freeder 64c6597d79
Don't allow digging into unloaded chunks 2018-11-11 21:10:37 +00:00
Zach Brown dcebe229b5
Update upstream B/CB/S
--- work/Bukkit
Submodule work/Bukkit 1627782b..67e91ef7:
  > Fix some incorrectly handled JavaDoc
  > SPIGOT-4478: Update PlayerLoginEvent docs
  > Add API to manipulate boss bar of entities and those created by commands

--- work/CraftBukkit
Submodule work/CraftBukkit ca22de36..3a911828:
  > SPIGOT-4477: Arrows only firing direction of boat
  > SPIGOT-4478: NPE during PlayerLoginEvent recipe manipulation
  > Add API to manipulate boss bar of entities and those created by commands

--- work/Spigot
Submodule work/Spigot 2474d93d..947a8e7f:
  > Rebuild patches
2018-11-11 00:37:59 -05:00
Shane Freeder 8b8e15fb63
Drop extended BlockStateListPopulator and fix SpongeAbsorbEvent handling
This patch, while would have been nice, would just take too much
in order to re-implement it to retain and handle all of the state
changes possible, and complicates retaining state properly

Fix SpongeAbsortEvent handling

Only process drops when the block is actually going to be removed
2018-11-10 05:29:46 +00:00
Shane Freeder 7e59b6e18e
Further extend BlockStateListPopulator
Upon "real world testing", there was needed and unimplemented methods
on BlockStateListPopulator; This commit (which should fix #1663) aims
to improve the coverage of this class.

We should aim to look into expanding this class down the line, or aim to
improve the servers ability to capture these changes
2018-11-09 18:11:32 +00:00
Aikar 2b9a7d9475
Improve Activation Range by running target rules
This restores monster aggression range back to normal when
Activation Range is less than the monsters aggression range.

This allows an entity to try to acquire targets still during
inactive ticks, which will also then let it go into immunity stage.
2018-11-08 22:43:38 -05:00
Aikar de3b813dcf
Use Vanilla Minecart Speeds
CraftBukkit changed the values on flying speed, restore back to vanilla

Might help #1658
2018-11-08 21:35:00 -05:00
Zach Brown 16a6e7ee8b
[CI-SKIP] merge profile fill fix into base patch 2018-11-08 18:50:17 -05:00
Black Hole 83e2208266 Fix PreFillProfileEvent (#1661) 2018-11-08 14:33:19 -05:00
Shane Freeder c6effafca8
Extend BlockStateListPopulator
extends BlockStateListPopulator to suppport checking block types in the
physical world it's representing, allowing for blocks making modifications
to the world to maintain proper state.
2018-11-08 05:45:39 +00:00
Zach Brown 24d5672770
Fix typo in last commit
Woops. db6d9b0522
2018-11-07 23:23:53 -05:00
Zach Brown db6d9b0522
Update armorstand pose and equipment w/ no tick option
This change allows ArmorStands with ticking disabled to visually update
their equipment and pose properly.

Given the wide range of usage of ArmorStands, I have not changed
their tick loop when their tick is enabled as usual. Doing so may
likely gains in the future, though additional testing would be
needed to ensure nothing breaks.

Fixes GH-1593
2018-11-07 21:27:41 -05:00
Zach Brown 335ab110bc
Update upstream B/CB 2018-11-06 20:20:11 -05:00
Aikar 0f455f00ed
Use at minimum 2 threads for Data fixers
Per MC-138093 comments, ForkJoinPool uses unlimited threads if
parallelism is ever 1. A 2 core machine will end up with 1
with the change I had previously made, so bumped the min
to 2 so we will never trigger the unlimited thread situation.

This aligns the min back with Spigot, but allows use of more
threads on systems with more cores.
2018-11-05 17:25:08 -05:00
Shane Freeder f50977c5c4
Restore custom InventoryHolder support
Upstream removed the ability to consistently use a custom InventoryHolder,
However, the implementation does not use an InventoryHolder in any form
outside of custom inventories.

We can take that knowledge and apply some expected behavior, if we're given
an inventory holder, we should use it and return a custom inventory with the
holder, otherwise, create an inventory backed by the intended inventory, as
per upstream behavior.

This provides a "best of both worlds" scenario: plugins with InventoryHolder's
will always work as intended in the past, those without will create implementation
based inventories.
2018-11-05 04:57:31 +00:00
Aikar 88baad1438
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:
e693496c SPIGOT-4467: Improve ExpiringMap
2018-11-03 21:23:08 -04:00
Aikar 1357b23994
Drop Optimize Small Entity Movements patch
Causing too many issues

Fixes #1643
2018-11-03 11:07:24 -04:00
Aikar aaefc4fbbe
[Auto] Updated Upstream (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

Spigot Changes:
2474d93d SPIGOT-4462: Catch async chunk regenerate
2018-11-03 05:31:30 -04:00
Zach Brown b4baf9ce4d
Use empty itemstack, not null in PlayerInteractManager
Introduced in 00a41bca42
Fixes GH-1642
2018-11-03 04:50:42 -04:00
Aikar 00a41bca42
Don't merge player movements (fixes block breaking issues)
Fixes #1640
2018-11-03 00:18:10 -04:00
Aikar 450ed0d75c
Keep players pitch/yaw on vehicle updates - fixes #1628 2018-11-02 23:20:22 -04:00
Aikar 70e091b7d4
Optimize World Time Updates
Splits time updates into incremental updates as well as does
the updates per world, so that we can re-use the same packet
object for every player unless they have per-player time enabled.
2018-11-02 23:14:53 -04:00
Aikar 81e5978088
Many major improvements to Async Chunk Loading
Fixes some bugs with urgent priority, improves priority all
around to optimize blocking chunk requests as much as possible.

fixes casing on the -Dpaper.maxchunkthreads to now be -Dpaper.maxChunkThreads

adds -Dpaper.genThreadPriority=3 -Dpaper.loadThreadPriority=4

lowering thread priorities will help ensure main has more
priority over chunk threads
2018-11-02 23:14:09 -04:00
Shane Freeder 1e39773b53
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:
9d0221aa API to get client side view distance.
9be7f0ea SPIGOT-4395: Additions to PlayerBedEnterEvent.
01e534c6 Minor cosmetic cleanups to imports etc

CraftBukkit Changes:
96c461b3 API to get client side view distance.
e2785f4e Remove note about development build
a8000588 SPIGOT-4395: Additions to PlayerBedEnterEvent.

Spigot Changes:
117d4f7e Rebuild patches
2018-11-03 00:29:57 +00:00
Aikar 6c2709118f
Fix enttiy move merge issues - fixes #1637 2018-11-02 10:08:57 -04:00
Aikar 0b3a5c2669
Revert "Many major improvements to Async Chunk Loading"
This reverts commit dc555f8478.
2018-11-02 09:58:16 -04:00
Aikar 0d2b71039e
Fix compile 2018-11-01 20:16:12 -04:00
Aikar 47b9a5d178
Optimize Small Entity Movement
Optimizes small movements by entities by merging the movement
into the entities next larger movement, until enough movement
velocity has been hit.

This reduces collision detection and able to reduce movement
cpu cost by 5-7%.

The default option of 0.75 seems to provide all the gains without
any noticable behavior change to entity movement.

We have to exclude slimes due to weird jumping animation bugs.
2018-11-01 20:11:31 -04:00
MisterVector 645cfad665
MC-136865: Pass original itemstack for enchantment checks on block break
When an itemstack runs out of durability, the amount is reduced to
0 which then marks the item as invalid. This causes the last unit
of durability to not apply enchantments as the enchantment level
check sees the item as a dud.

keep the clone of the item used to a non empty value so it represents
the item used.
2018-11-01 20:08:18 -04:00
Aikar dc555f8478
Many major improvements to Async Chunk Loading
Fixes some bugs with urgent priority, improves priority all
around to optimize blocking chunk requests as much as possible.

fixes casing on the -Dpaper.maxchunkthreads to now be -Dpaper.maxChunkThreads

adds -Dpaper.genThreadPriority=3 -Dpaper.loadThreadPriority=4

lowering thread priorities will help ensure main has more
priority over chunk threads
2018-11-01 00:00:21 -04:00
Aikar bbfef2d293
[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:
aed3aecb Make natural item dropping mimic Vanilla
2018-10-31 05:21:34 -04:00
Aikar acd334793f
[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:
98d3f031 SPIGOT-4376: Add draft BlockDropItemEvent

CraftBukkit Changes:
1057710a SPIGOT-4376: Add draft BlockDropItemEvent
2018-10-31 05:01:59 -04:00
Shane Freeder fc68e73647
Fix resource pack api (Fixes #1634) 2018-10-29 13:02:56 +00:00
Zach Brown d6033a37e5
Log system info and remove paperclip java 9 warn
Removes the paperclip Java 9+ warning and replaces it with general
JVM and Host OS information that will be more useful in finding issues
for end users and ourselves.

Also removes the "for development only" 1.13 warning that everyone has
been ignoring completely anyway.
2018-10-28 21:07:17 -04:00
Zach Brown ece0b19c59
Update upstream B/CB/S 2018-10-28 18:08:08 -04:00
Shane Freeder e6473fc520 Process chunks blocking main urgently (#1627)
A chunk load on the main thread will be added to the high priority queue, however, due to existing work on this queue, there was no guarantee that the load would occur within a reasonable amount of time, potentially causing a server to crash while waiting for a chunk in the queue

In order to counteract this, a new urgent priority has been added, allowing us to prioritize these tasks over standard chunk gen/loading

(#1625 #1615 #1575 #1558 (and probably more))
2018-10-28 10:40:30 -04:00
Zach Brown c4865a6445
Update upstream B/CB/S 2018-10-27 00:07:20 -04:00
Aikar 6230d632e3
give EAR immunity to piston pushed entities
helps keep vanilla behavior with piston elevators
2018-10-25 23:26:29 -04:00
Shane Freeder 34ee08f240 fix "avoid hopper searches" and make it use an obfhelper 2018-10-25 21:27:54 +01:00
Shane Freeder 0696c672be Revert field order changes in AxisAlignedBB 2018-10-25 17:07:54 +01:00
BillyGalbreath db9e33489b Use EntityTypes for living entities (#1533) 2018-10-24 16:26:00 -04:00
Shane Freeder c6f7877de6
[CI-SKIP] Don't run animal sniffer by default
Changes upstream moved this to a profile a while back, however,
when updating (for some unknown reason) I kept it enabled by default,
however, leaving this enabled breaks building the server in newer
versions of java, which while this wasn't a concern before, is now
an issue for users.
2018-10-24 20:27:31 +01:00
Zach Brown 838a12b72b
\u0020 2018-10-24 15:06:44 -04:00
Zach Brown 719dae9595
Add version to watchdog early warning system
BECAUSE VERSIONING INFO
2018-10-24 15:01:17 -04:00
Zach Brown 4b45701372
Always write dimension NBT, even if we ignore it
DataPacks can use the dimension field for various things, so we should
still write this field to NBT, even if we ignore reading it ourselves.
2018-10-24 14:41:04 -04:00
Aikar 9e795dfe7f
Fix unloaded chunks movement setting 2018-10-24 08:38:34 -04:00
Aikar 5f7c6d0d2a
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 d07f7197f2
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 e9305f96a3
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:11 -04:00
Aikar eb38e51ee0
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 042ccbb9b2
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
Shane Freeder 1387cff4e8
Update for Minecraft 1.13.2 2018-10-23 00:16:21 +01:00
GreenMeanie 9b98a252d6 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 ce7e1c14a6 Add option to prevent players from moving into unloaded chunks (#1608)
Resolves #1551
2018-10-22 15:25:16 -04:00
Aikar 7c5b5ce946
[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 d066d8b926 Remove debug text
resolves #1606
2018-10-21 19:16:54 -04:00
BillyGalbreath 0db94d4fca Fix #1604 (#1605) 2018-10-21 20:39:21 +01:00
Aikar 3fa9c0b5c3
[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