Commit Graph

401 Commits

Author SHA1 Message Date
Jason 6e9f38ea91
[ci skip] Cleanup Timings v2 diff (#6523) 2021-08-30 00:02:24 -07:00
Jason cf27619809
Log error for invalid entity-per-chunk-save-limit configs (#6522) 2021-08-29 21:19:43 -07:00
Nassim Jahnke be269d1cf0
Move ProtoWorld methods to LimitedRegion (#6486) 2021-08-28 13:43:26 +00:00
Jason 411a5eed18
Fix and optimize legacy world conversion (#6473)
CraftBukkit breaks legacy world conversion in three ways:
- Writes userdata to the path of the userdata folder rather than to
  the correct file inside the aforementioned folder. This causes the
  userdata folder to fail to be created as a file already exists at
  its path.
- Makes changes to how multiworld works, without modifying
  McRegionUpgrader to be aware of these changes.
- Calls methods on Bukkit before the server is initialized.

This patch fixes all of these issues, and also threads the
McRegionUpgrader to improve performance.
2021-08-27 22:07:12 -07:00
Spottedleaf 1c4f87a258
Ensure priority updates are determined by current level, not deferred level (#6507)
* Ensure priority updates are determined by current level, not deferred level

Deferral could cause an infinite loop to occur.

Also, re-add the light engine priority logic.

* Rebase

Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
2021-08-27 19:20:31 -07:00
Owen1212055 159112ef41
Add Missing Entity API: Cat (#5744) 2021-08-27 18:16:41 +00:00
Nassim Jahnke f44d237de9
Updated Upstream (CraftBukkit) (#6504)
Upstream has released updates that appear 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:
5be41fb8 SPIGOT-6720: Fix bed explosion checks
09b99daf SPIGOT-6722: Close entity manager when unloading world
3a9561bf SPIGOT-6686: Changes in MaximumRepairCost for Anvil Rename cause inconsistency
2021-08-27 11:51:18 +02:00
Jake Potrebic 8b793ed52c
[ci skip] Remove this file that got created somehow (#6489) 2021-08-26 09:49:32 -07:00
Jason 0205b902c2
[ci skip] Cleanup diff in Async command map building (#6492) 2021-08-26 09:41:22 -07:00
Nassim Jahnke 0a6d320410
Sanitize ResourceLocation error logging (#6495) 2021-08-26 10:25:23 +00:00
Spottedleaf e763a3dc95
Log when the async catcher is tripped (#6493)
The chunk system can swallow the exception given it's all
built with completablefuture, so ensure it is at least printed.

Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
2021-08-25 20:35:35 -07:00
Spottedleaf ba4cf68774
Readd chunk priority patch, including many chunk system fixes from tuinity (#6488) 2021-08-26 02:16:27 +00:00
Jason 3773df24ce
Vanilla command permission fixes (fixes #6085) (#6490)
Fixes permission checks for vanilla commands which don't have a
requirement, as well as for namespaced vanilla commands.
2021-08-25 15:20:24 -07:00
Jason b4ef78556c
Use configured no permission message in PaperCommand (#6484) 2021-08-25 13:34:15 -07:00
Nassim Jahnke 789bc79280
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6457)
Upstream has released updates that appear 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:
c9a46ebf #653: Add World#spawn with randomizeData parameter
e49c2e3a Damageable should extend ItemMeta
01ff04f4 SPIGOT-5880, SPIGOT-5567: New ChunkGenerator API
ca5b4b1a SPIGOT-6697: Deprecate generateTree with BlockChangeDelegate as it does not handle tiles

CraftBukkit Changes:
7c8bbcbe SPIGOT-6716: Preserve the order of stored enchantments of enchanted books.
18027d02 #914: Add World#spawn with randomizeData parameter
3cad0316 SPIGOT-6714: Don't fire PlayerBucketEvent when empty
8c6d60cf Fix server crash with BlockPopulator when entities are at a negative chunk border
4f6bcc84 SPIGOT-5880, SPIGOT-5567: New ChunkGenerator API
78d5b35b SPIGOT-6697: Restore generateTree with BlockChangeDelegate behaviour
15792f0d Rebuild patch
c949675e SPIGOT-6713: Cancelling EntityTransformEvent Causes Deceased Slimes To Not Despawn
a955f15c Fix issues with new ChunkGenerator API
a0a37f41 SPIGOT-6630: Replacing an enchantment on an item creates a conflict error

Spigot Changes:
b166a49b Rebuild patches
3c1fc60a SPIGOT-6693: Composters only take in one item at custom hopper speeds
2021-08-25 09:59:26 +02:00
Jake Potrebic 61a09c5102
Add BlockBreakBlockEvent (#4989) 2021-08-25 01:42:23 +00:00
Jason ff3f449b33
Squash "Clear SyncLoadInfo" into "Add debug for sync chunk loads" and add tab completion for the clear argument (#6483) 2021-08-24 16:45:40 -07:00
Jake Potrebic b74e691256
[ci skip] clean up diff from 1.17 update (#6462) 2021-08-24 23:30:26 +00:00
Pedro 182f56cdd5
Fix bed explosions in custom worlds (#6345) 2021-08-24 20:03:58 +00:00
Jake Potrebic 98fa136099
Fix CB lib relocation (#6454) 2021-08-22 17:22:57 +00:00
Jake Potrebic b37fbbca3d
Add API to change EnderEye target without other nonsense (#6460) 2021-08-22 15:19:42 +00:00
Jake Potrebic 4b7fa94010
Prevent NPE when removing enchantment with no ItemMeta (#6459) 2021-08-22 15:13:51 +00:00
Jake Potrebic cf037fbd3e
Better docs for PlayerGameModeChangeEvent (#6461) 2021-08-22 15:10:33 +00:00
Maddy Miller 49c7564283
Fix BlockPistonRetractEvent firing multiple times (#6467) 2021-08-22 23:54:55 +10:00
MiniDigger | Martin 18284cdf66
Fix Mob Goal Leak (#6394) 2021-08-22 14:19:45 +10:00
Octavia Togami e25557464f
Replace ThreadLocal with ConcurrentHashMap in CommandSourceStack (#6325)
This object is created so often that it likely creates problems with the
ThreadLocalMap because the weak references can't be cleaned up fast
enough. This has manifest as lag seemingly caused by WorldEdit:
https://github.com/EngineHub/WorldEdit/issues/1668
2021-08-22 03:45:40 +00:00
Mariell Hoversholm 2406634ed8
Add timeout & interval to sysout catcher (#6383) 2021-08-21 17:01:42 +02:00
Bjarne Koll 5edda39cc5
Add deepslate as xray engine 2 replacement default (#6362)
Fixes: #6350
2021-08-21 14:34:58 +00:00
Noah van der Aa 0b46fb1e5a
Respect despawn rate in merge check (#6428) 2021-08-21 14:32:07 +00:00
Jake Potrebic 18d1602724
Add API to send game events (#6444) 2021-08-21 14:26:42 +00:00
petersv5 ccbb51078a
Fix entities glitching through blocks pushed by pistons (#6308)
Fixes #5189
2021-08-21 14:15:29 +00:00
Jason 59d449d880
Set AsyncAppender dispatch thread to be a daemon thread (#6424) 2021-08-18 18:47:29 +00:00
Jason fa184f7429
Setup dev bundle publishing (#6163) 2021-08-17 17:11:04 -05:00
Shane Freeder f2471d20b4
Do not fire PlayerBucketFillEvent when no fluid (Fixes #4611) 2021-08-17 15:43:01 +01:00
Jake Potrebic 6dfd1d9a71
Fix yaw on player spawn (#6409) 2021-08-16 14:46:25 -07:00
Noah van der Aa 934c694efd
Don't fire entitymovevent for players. (#6402) 2021-08-15 18:37:42 +01:00
Jake Potrebic 72ce684679
Fix possible divide by 0 error with cursor updates (#6398) 2021-08-14 17:44:31 +00:00
Shane Freeder 8d182e8639
Revert "Revert "Remove "Implement-Chunk-Priority-Urgency-System-for-Chunks" (Fixes #5980)""
This reverts commit 622598f1dd.
2021-08-14 15:29:22 +01:00
Shane Freeder 622598f1dd
Revert "Remove "Implement-Chunk-Priority-Urgency-System-for-Chunks" (Fixes #5980)"
This reverts commit aa52bf9e33.
2021-08-14 15:22:21 +01:00
Shane Freeder aa52bf9e33
Remove "Implement-Chunk-Priority-Urgency-System-for-Chunks" (Fixes #5980)
Mojang made some changes to priorities in 1.17 and it seems that these changes
conflict with the changes made in this patch, which in some cases appears to
cause excessive rescheduling of tasks.

This, however, is not confirmed as such but seems to be the behavior that we're
seeing to cause this issue, if mojang has adopted the changes we suggested,
then a good chunk of this patch may be unneeded, but, this needs a much better
look than I'm currently able to do
2021-08-14 14:55:55 +01:00
Jason 565cd3306c
[ci skip] Add some helper methods to the `ObfHelper` util class (#6374) 2021-08-14 10:06:17 +00:00
Jason 4dd33cb8b6
[ci skip] Drop "Fix CME on adding a passenger in CreatureSpawnEvent" (#6384)
This is no longer needed as Entity#passengers is an ImmutableList as of 1.17
2021-08-14 03:01:07 -07:00
Jake Potrebic f12a7f57e1
Clear bucket NBT after dispense (#6391) 2021-08-14 02:51:03 -07:00
Jake Potrebic c2f47a76ae
Implement Translatable in appropriate places (#6248) 2021-08-13 21:11:12 -07:00
Jason e9aa9ce66b
Add config migration for named entity death logging option (#6390) 2021-08-13 13:24:25 -07:00
Warrior 591cac3685
Configurable item frame map cursor interval (#6385) 2021-08-13 12:14:44 -07:00
Jake Potrebic ce43ce8265
Make EntityUnleashEvent cancellable (#4993) 2021-08-13 11:15:43 -07:00
Jake Potrebic e942509e73
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6379)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2021-08-13 10:08:34 -07:00
Jason 80836709e7
Fix block drops position losing precision millions of blocks out (#6387) 2021-08-12 21:46:55 -07:00
Andrew Steinborn 370b60de14
Optimize indirect passenger iteration (#6366) 2021-08-12 15:55:41 -07:00
Jason 4d9b14efa4
Use AsyncAppender instead of AsyncLoggerContextSelector to keep loggging IO off main thread (#6381) 2021-08-12 10:55:20 -07:00
Jason Penilla 5c65546f5c rebase 2021-08-11 07:01:11 +02:00
Mariell Hoversholm 415f7ca165 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
e0598aa2 SPIGOT-6692: Add sendSignChange overload with a hasGlowingText parameter

CraftBukkit Changes:
2cdc6b1e4 SPIGOT-6692: Add sendSignChange overload with a hasGlowingText parameter
2021-08-11 07:01:11 +02:00
Jake Potrebic 80650e8936
Added EntityItemDamageEvent (#4928) 2021-08-10 05:04:44 +00:00
Jason 25cd8aba9f
Config option for Piglins guarding chests (#4829) 2021-08-10 02:13:58 +00:00
Andrew Steinborn bfb3d42b44
Optimize entity tracker passenger checks (#6361)
When a ServerEntity instance is first constructed, it uses a pre-Java 9 empty collection,
but passengers use Guava ImmutableList. When comparing the two collections via Object#equals
we miss out on an opportunity to reduce the check to little more than a reference equality
check (which is very fast).
2021-08-09 11:36:45 -07:00
Bjarne Koll b33b63908e
Support complex components in written book builder (#6337)
The previously existing toBuilder method defined on the CraftMetaBook
would, no matter if called on a writable or written book, return a
builder targetting a writable book, in which complex components, such as
hover or click text are not allowed.

The builer hence serializes the page components using LEGACY_UXRC to
ensure only colour may be passed. While this works as intented for
writable books, the builder fails to fully support the complex
components that may be used in a written book.

This commit implemements a child class of the CraftMetaBookBuilder, the
CraftMetaBookSignedBuilder, which builds to a CraftMetaBookSigned
instance and hence serializes the pages to json.
This builder instance is automatically supplied when calling toBuilder
on a CraftMetaBookSigned instance.

Resolves: #6296
2021-08-08 15:57:20 -07:00
Jake Potrebic f261419fd5
clone itemstack to return remaining stack (#6353) 2021-08-06 23:55:16 -07:00
Jake Potrebic 4a2f53c6e8
Add missing DamageCause for EntityDamageByBlockEvent (#6352) 2021-08-07 06:03:50 +00:00
Jake Potrebic a178fb895e
Make hoppers respect inventory max stack size (#4838) 2021-08-07 00:35:42 +00:00
Kacper Płażewski 9b4a46f704
[ci skip] add vs code files to .gitignore (#5663) 2021-08-07 00:27:45 +00:00
Jake Potrebic 00028d57cf
call EntityDamageByBlockEvent for campfires (#6244) 2021-08-07 00:20:39 +00:00
Jake Potrebic 23e3a0ccb6
Add PlayerSetSpawnEvent (#5690) 2021-08-06 20:37:38 +00:00
thamid-gamer 9a125eecb8
Fix Incorrectly Typed Goals (#6200) 2021-08-06 17:05:53 +00:00
Noah van der Aa c815948b6d
Fix ITEM_DROPPED stat not working properly (#6331) 2021-08-06 16:46:25 +00:00
Shane Freeder f521a18a17
Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
75a0ee4f SPIGOT-6691: Material.LAVA_CAULDRON is not Levelled

CraftBukkit Changes:
e1c96e50 SPIGOT-6682: Blocking with shield not reset after die
97f629b6 SPIGOT-6220: Structures in the world with custom generator not work
85379258 Increase outdated build delay
f7f8dce4 SPIGOT-6552: Some inventory types reset cursor on switch
2021-08-04 16:26:56 +01:00
Prof-Bloodstone d239eca9dd
Fix writing server.properties with wrong encoding (#6322)
Fixes #6321
2021-08-04 00:48:15 -07:00
Shane Freeder 6226208d64
Fix SysoutCatcher when plugins log before initialisation (Fixes #6323) 2021-08-04 04:04:12 +01:00
Mariell Hoversholm 9a74e70cc0
fix: boats' bounding boxes must be deflated, not inflated (#6314)
Fixes GH-6312.

Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-08-03 12:13:43 +02:00
Emilia Dreamer aec9781f52
Fix incorrect colors in ConsoleCommandSender messages with TranslatableComponents (#6287) 2021-08-03 07:48:34 +00:00
Prof-Bloodstone 0fc6213f9c
Allow skipping writing of comments to server.properties (#6251)
Makes less git noise, as it won't update the date every single time

Use -DPaper.skipServerPropertiesComments=true flag to disable writing it
2021-08-03 00:35:02 -07:00
Noah van der Aa 6e7f9aafd6
Prevent AFK kick while watching end credits (#6239). (#6265) 2021-08-02 08:43:56 +00:00
Hannes Greule 0e978ea45e
Rewrite LogEvents to contain information about the source jar of stacktrace elements (#6142) 2021-08-02 10:32:53 +02:00
Nassim Jahnke 8c28a33d4e
Don't not shuffle visible chunks (#6283) 2021-08-02 10:00:31 +02:00
Underscore11 ed1dc272e6
Add System.out.println catcher (#6278) 2021-08-02 07:07:48 +00:00
Shane Freeder 6855505490
Fix some inconsistency issues with empty map items (#6304) 2021-08-01 16:55:25 +01:00
Shane Freeder 8bebf48495
Mark sensor and behavior timings as verbose 2021-08-01 10:22:55 +01:00
PaulBGD 81a7559b41
Correct handling of invalid maps (#6302) 2021-07-31 22:47:01 +02:00
Nassim Jahnke 7a5025d461
Fix closeInventory shenanigans (#6292) 2021-07-30 11:37:11 +02:00
Owen1212055 a67959e131
Add bee stinger API (#5962) 2021-07-29 00:36:53 +00:00
Nassim Jahnke 0e230a1bee
Updated Upstream (CraftBukkit) (#6279)
Upstream has released updates that appear 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:
6788550f SPIGOT-6678: ChunkSnapshot#isSectionEmpty() not working as intended.
3ad0fb1c #901: Fix PlayerStatisticIncrementEvent spam
2021-07-28 09:39:14 +02:00
Jason b32a3b147c
Call EntityKnockbackByEntityEvent for RamTarget Behavior (#6273) 2021-07-26 18:41:26 +02:00
MeFisto94 efd7e5182c
Move "use-display-name-in-quit-message" to settings namespace (#6257) 2021-07-25 23:11:44 +00:00
Max Lee 2f1f1b7f0c
Add config option to specify timings url (#6256) 2021-07-25 07:10:30 +00:00
TwoLeggedCat e905eb1986
Add fireball to default max load config (#6252) 2021-07-25 07:00:54 +00:00
Max Lee 9b0a0d896c
Add the default tick rate of the sensor to the timings (#6242) 2021-07-25 06:50:36 +00:00
Jake Potrebic 9b828509cd
Updated Upstream (CraftBukkit) (#6260) 2021-07-24 03:33:05 +01:00
Jake Potrebic b173db6231
Fix flat bedrock (#6255) 2021-07-23 14:18:10 -07:00
Jake Potrebic 170382fe35
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6245)
Upstream has released updates that appear 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:
e7b0f8d6 #642: Add Crafting methods to API
9e58831e SPIGOT-6641: Use varargs in sendMessage
e409fe49 SPIGOT-6545: Unable to set Guardian target via API while awareness is disabled
6997c726 SPIGOT-6661: Fix missing radius from GenericGameEvent
02d03f35 SPIGOT-6369: Add ItemStack to HangingPlaceEvent

CraftBukkit Changes:
0abf420c SPIGOT-6665: Shearing a Snowman does not drop a carved pumpkin
e8e3cbcc #893: Add Crafting methods to API
879acfee Fix missing varargs from previous commit
6572b9c3 SPIGOT-6641: Use varargs in sendMessage
9e06bb2a SPIGOT-6663: Chicken Jockeys chickens don't despawn
699f2d36 SPIGOT-6545: Unable to set Guardian target via API while awareness is disabled
8ffa54ba SPIGOT-6369: Add ItemStack to HangingPlaceEvent
c851639c SPIGOT-6645: Call EntityChangeBlockEvent before PlayerHarvestBlockEvent
8d244b0b SPIGOT-3725, SPIGOT-6638, MC-136917: Properly clear tile entities before replacing

Spigot Changes:
18c71bf4 Rebuild patches
2021-07-22 18:11:56 +00:00
Jake Potrebic 3801a3951c
Add ItemRarity test (#6247) 2021-07-22 06:48:24 +02:00
Jake Potrebic 2961b2adab
Fix various mob drops being captured as death drops (#5675) 2021-07-22 02:58:24 +00:00
Jake Potrebic b854e7e802
Drop unneeded patch (#6240) 2021-07-21 18:18:54 +00:00
Nassim Jahnke 2780e94901
Fix PaperTickList (#6241)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2021-07-21 19:12:24 +02:00
Jason 44516b1d8a
[ci skip] Put mappings util in a separate class to the stacktrace deobfuscator (#6230) 2021-07-19 19:22:18 -07:00
Kyle Wood f25facb302
Update email & name (DenWav)
Also I think I prefer my few tiny patches to be GPL.
2021-07-19 21:07:53 -05:00
zml c225bf97d6
Fix book title and author being improperly serialized as components (#6190)
They are kept as plain strings
Additional validation has been added to prevent invalid books from being
sent to the client.
2021-07-19 23:11:06 +00:00
Nassim Jahnke c75a8378a2
Don't expose ASM in API (#6229)
ASM was not meant to exposed to API consumers in the first place, and for the duration of time it has been exposed, it has also been relocated.

Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2021-07-19 22:58:48 +00:00
Nassim Jahnke fc478727d5
Use mapped names for sensor and behavior timings/config (#6228) 2021-07-19 11:07:49 +00:00
Max Lee 12942dc94b
Add rate options and timings for sensors and behaviors (#6027) 2021-07-19 11:47:33 +02:00
Max Lee d6c81c8189
Don't apply cramming damage to players (#5903) 2021-07-19 09:31:03 +00:00