Commit graph

719 commits

Author SHA1 Message Date
Nassim Jahnke
aba531dd60 Fix Paper comments 2021-11-24 10:20:21 +01:00
Nassim Jahnke
1f77146c5c More more more more more more more more more more work 2021-11-24 10:01:27 +01:00
MiniDigger | Martin
bd2d33ccb1 hey, look ma, am doing my part! 2021-11-24 08:37:09 +01:00
Jason Penilla
3039146dc3 Fixup indent in async chunk io patch 2021-11-23 22:30:31 -08:00
Jake Potrebic
cc3b3eba50 a bunch more patches 2021-11-23 21:44:21 -08:00
Jake Potrebic
f629237348 more patches updated 2021-11-23 20:25:34 -08:00
Jason Penilla
2b25404eca Patches 2021-11-23 19:42:31 -08:00
Jason Penilla
64f780c26d Squash annotation test changes patches 2021-11-23 19:07:05 -08:00
Jake Potrebic
25d42423af more work 2021-11-23 18:05:49 -08:00
Jake Potrebic
488ad68f0f and here's some more patches 2021-11-23 17:53:24 -08:00
Jake Potrebic
7ff10ba09a move mojang api server patches up 2021-11-23 17:16:01 -08:00
Jake Potrebic
e4d9502512 move extra plugins patch up & more work 2021-11-23 17:09:49 -08:00
Jason Penilla
9a23891fe5 Update runServer gradle properties 2021-11-23 17:09:12 -08:00
Jake Potrebic
2b17f5cc15 and some more patches 2021-11-23 16:44:41 -08:00
Jason Penilla
ddf004bd5e Fix issues with IntIdentityHashBiMiap 2021-11-23 16:43:50 -08:00
Jake Potrebic
c03b8b99e3 even more patches 2021-11-23 16:20:31 -08:00
Jake Potrebic
3f5a9d4a29 several more patches 2021-11-23 15:56:42 -08:00
Jason Penilla
cbb86f2753 Update ticklist saving 2021-11-23 15:23:41 -08:00
Josh Roy
91961de7c2 More more more more more more more more more work 2021-11-23 18:06:05 -05:00
Josh Roy
11f73c13b5 More more more more more more more more work 2021-11-23 16:40:37 -05:00
Josh Roy
7b4162e1f2 these aren't needed 2021-11-23 16:24:26 -05:00
Josh Roy
cd161c51c5 Updated Upstream (Bukkit/CraftBukkit/Spigot)
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:
ea30a299 Add docs in ServerListPingEvent based on changes from 1.18

CraftBukkit Changes:
03f249f0 Generate bootstrap jar separately
3b214b5a SPIGOT-6803: Fix ServerPing not using the new logic for show players in 1.18

Spigot Changes:
c07753b0 Rebuild patches
2021-11-23 16:11:33 -05:00
Jake Potrebic
ddaf1cb4e2 async chunk patch progress (#6930) 2021-11-23 12:34:20 -08:00
Nassim Jahnke
682bb3f9c0 Fix mappingregistry, readd an async chunk hunk 2021-11-23 21:07:19 +01:00
Nassim Jahnke
c36c2d46d3 More more more more more more more work 2021-11-23 16:50:18 +01:00
Nassim Jahnke
82f6e6bb0e More more more more more more work 2021-11-23 16:04:41 +01:00
Nassim Jahnke
d8709b6bf1 More more more more more work 2021-11-23 15:03:50 +01:00
Nassim Jahnke
91fcee0c04 More more more more work 2021-11-23 14:22:49 +01:00
Nassim Jahnke
979f2cdf25 More more more work 2021-11-23 13:15:10 +01:00
Nassim Jahnke
10a1f0313f More more work 2021-11-23 12:47:17 +01:00
Nassim Jahnke
e70c4bc478 More work 2021-11-23 12:27:39 +01:00
Nassim Jahnke
c46b20492e Work 2021-11-23 11:51:25 +01:00
Jason Penilla
ed6d43ddb0 Prepare for updating server patches 2021-11-23 00:57:41 -08:00
MiniDigger | Martin
cb95469f99 Updated Upstream (Bukkit/CraftBukkit/Spigot)
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:
64c8bd39 #679: Add getHideOnlinePlayers
b991b6c7 #677: Add "Allow Server Listings" API
4e9f199a SPIGOT-6801: Wrong BlockData classes in Material enum for SOUL_FIRE and SOUL_TORCH

CraftBukkit Changes:
37e63e63 Fix loading / creating secondary worlds (nether/end)
4bf7f33c #956: Add getHideOnlinePlayers
d181e1ed Fix serializing unhandled NBT + add unit test with unhandled NBT
aebb79e3 #954: Add "Allow Server Listings" API
7c4707e4 #955: Add test for BlockData class of Material

Spigot Changes:
16c0cb41 Rebuild patches
2021-11-23 06:49:33 +01:00
Nassim Jahnke
ddcbe17388 Remove Fix reducedDebugInfo not initialized on client patch
Hasn't been needed for a while now, see #6733
2021-11-22 12:56:55 +01:00
Nassim Jahnke
e626639338 Fix adventure patch 2021-11-22 10:35:00 +01:00
Nassim Jahnke
ce4697f704 Fix view distance api patch 2021-11-22 10:24:13 +01:00
Jason Penilla
0d44fec1fb Update API patches 2021-11-21 21:21:37 -08:00
Josh Roy
01d9107641 Add config option to enable hopper occluding blocks (#6896)
Co-authored-by: zombachu <zombachu@gmail.com>
2021-11-20 14:15:36 -05:00
Josh Roy
b119833e39 Fix AnvilPrepareEvent not working with zero xp (#6895)
Co-authored-by: Jan Tuck <jan@tuck.dk>
2021-11-20 14:09:19 -05:00
Nassim Jahnke
72abd4fb7a Fix more namespacedkey parsing (#6903) 2021-11-17 10:53:41 +01:00
Jason Penilla
a9214f2d63 Update paperweight to 1.2.0 (#6901) 2021-11-16 21:00:14 -08:00
booky10
63c3c76ad0 Add API for resetting a single score (#6873) 2021-11-16 00:08:50 +01:00
Jake Potrebic
023b612f62 cleanup: Add hand to bucket events patch (#6881) 2021-11-15 11:01:19 -08:00
Jake Potrebic
f68505286b Call onRemove logic for breakNaturally (#6854) 2021-11-12 18:28:08 -08:00
Haley Kell
5e6e4845a0 Extend Entity by Sound.Emitter (#6890) 2021-11-12 18:58:46 -05:00
Jason Penilla
66e3cb1837 Partially fix #6880 (#6888) 2021-11-12 14:27:26 -08:00
Josh Roy
d19cd1ac56 Add Raw Byte Entity Serialization (#6826) 2021-11-10 21:53:27 -05:00
Seggan
5dc93227ab Goat ram API (#6336) 2021-11-09 03:48:22 -05:00
Jake Potrebic
986f5e5d12 Make despawn distance configs per-category, improve per category spawn limit config (#6717)
Also adds per-world spawn limit config in paper.yml for `underground_water_creature`, and migrates existing spawn limit config options to their Mojang names.
2021-11-08 23:59:15 -08:00
Owen1212055
1f7df1832f Move getTrackedPlayers up from Player to Entity (#6569) 2021-11-08 16:39:42 -05:00
Bjarne Koll
c23b1138fb Fix setPatternColor on tropical fish bucket meta (#6877) 2021-11-08 20:20:07 +01:00
Jake Potrebic
0f52610a18 Add isCollidable methods to various places (#6870) 2021-11-06 12:43:24 -07:00
Jake Potrebic
6197315429 Add API for checking if a zombie has the option to break doors (#6855) 2021-11-05 17:17:12 -07:00
Jake Potrebic
a8448bef56 Fix issues with mob conversion (#6831) 2021-11-05 17:06:19 -07:00
HexedHero
0b77f9e66b Add PlayerDeathEvent#getPlayer for clarity (#6859) 2021-11-05 16:30:44 +00:00
Nassim Jahnke
97ece388a9 Fix CraftNamespacedKey shenanigans (#6825) 2021-11-05 16:01:40 +01:00
Bjarne Koll
7deb2b0f26 Expose the potential player cause of a lightning (#6782) 2021-11-05 15:54:37 +01:00
PaulBGD
4b68f08fe5 Cache palette array (#6767)
Instead of allocating the 4KB for every chunk section, cache it locally and
reuse it for other chunk sections to save on allocations. These allocations add
up very quickly when saving chunks frequently.

For example, with 30,000 chunks and 16 chunk sections per chunk (which will
actually get larger in 1.18) it allocates nearly 2GB, which this patch
eliminates entirely.
2021-11-05 10:52:32 -04:00
Nassim Jahnke
f79445fff5 Updated Upstream (Bukkit/CraftBukkit) (#6872)
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:
cfd18bd0 SPIGOT-6436: Add Player#stopAllSounds

CraftBukkit Changes:
b58f4299 SPIGOT-6436: Add Player#stopAllSounds
eb191612 SPIGOT-6783: Items do not appear in custom anvil inventories
376edf4f SPIGOT-6779: Fix LivingEntity#attack for Player entities
747a73ec SPIGOT-6772: Use entity mailbox and re-schedule entities if they get unloaded
2021-11-05 15:08:24 +01:00
Jason Penilla
130e21da7e Deduplicate strings in ObfHelper (#6841) 2021-11-04 17:23:06 -07:00
Jake Potrebic
280cf8d8db Move async catches back to where they were (#6869) 2021-11-04 11:20:14 -07:00
Jake Potrebic
546ba82ea7 Added missing mappings (#6810) 2021-11-04 07:08:53 -07:00
Jason Penilla
4da74a5419 Remove redundant and unneeded repos, reorder repos (#6867) 2021-11-03 19:42:18 -07:00
Jason Penilla
ed5400a823 Update paperweight to 1.1.13 (#6866) 2021-11-03 17:54:11 -07:00
Shane Freeder
edc8a389fc Update jline and TCA (#6829)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>

updates jline to 3.21.0, and TCA to 1.3.0
2021-11-02 18:02:16 +00:00
Spottedleaf
32f6f4a8cd Async catch modifications to critical entity state
These used to be here from Spigot, but were dropped with 1.17.
Now in 1.17, this state is _even more_ critical than it was before,
so these must exist to catch stupid plugins.
2021-10-31 21:35:47 -07:00
Jake Potrebic
8cd49fef6b Fix dupe uuid check on entity add (#6735) 2021-10-31 15:09:39 -07:00
HexedHero
e0cac960b1 Allow spawners to be disabled without adding a stupid high tick rate (#6837) 2021-10-31 07:51:57 +00:00
Finn Künstner
fed4fa20ae Updated Upstream (Bukkit/CraftBukkit) (#6848)
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:
9b45fa2f #667: Allow setting BrewEvent results
8c776ddc SPIGOT-6762: ChatPaginator.wordWrap only transfers one modifier
da372966 SPIGOT-4590, SPIGOT-6769: Clarify DamageCause documentation

CraftBukkit Changes:
cef1fda3 #947: Add missing spawn eggs for SpawnEggMeta
eb9a0f34 #945: Allow setting BrewEvent results
2021-10-31 08:34:10 +01:00
Jason Penilla
c2fa1aff89 Update Adventure to 4.9.3 (#6851) 2021-10-31 00:05:16 -07:00
Jason Penilla
15350e1273 [ci skip] Resolve apiAndDocs sources during Javadoc task execution rather than during configuration time (#6836) 2021-10-26 19:45:45 -07:00
Jake Potrebic
399444abda Don't fire EntityZapEvent twice (#6830) 2021-10-25 02:54:21 -07:00
sulu5890
58e4f8acf4 don't attempt to teleport dead entities (#6832) 2021-10-25 04:38:43 -05:00
Nassim Jahnke
0050f4edf4 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6823)
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:
58c2d3c7 SPIGOT-6771: Help command tab completion does not respect permissions

CraftBukkit Changes:
fd50041d SPIGOT-6768: Remove upper bound on setFreezeTicks

Spigot Changes:
38929296 SPIGOT-6767: Configurable Thunder Chance
2021-10-24 19:38:23 +02:00
Pedro
61a906f4c8 Fix method name for Critical damage (#6813) 2021-10-21 11:11:19 -03:00
stonar96
f024b4b48a Fix command suggestion leak (#6592)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2021-10-21 11:15:18 +02:00
Jason Penilla
8723ed4810 AT & Mapping fixes (#6809) 2021-10-21 03:16:31 -05:00
Owen1212055
c033fef26d Add Horse Animation API (#5599) 2021-10-20 21:09:42 -04:00
Kacper Płażewski
34010d648f Add critical damage API (#6275) 2021-10-21 00:15:28 +02:00
Jake Potrebic
c855cebeee rename method to getSpawnEgg 2021-10-20 14:41:54 -07:00
BillyGalbreath
03f31b993b Add ItemFactory#getMonsterEgg API (#6772) 2021-10-20 14:35:52 -07:00
syldium
ea9b20ce59 Add advancement display API (#6175) 2021-10-20 21:59:13 +02:00
BillyGalbreath
2969d4224f Left handed API (#6775) 2021-10-19 20:46:52 -07:00
Bjarne Koll
89b449e9e6 Correctly inflate villager activation bounding box (#6798) 2021-10-20 05:14:30 +02:00
Jake Potrebic
637b466c2d Get entity default attributes (#6449) 2021-10-19 18:55:05 -07:00
Shane Freeder
4fe89b58d2 Upgrade gson to 2.8.8 (Closes #6370) 2021-10-19 15:32:18 +01:00
Shane Freeder
82418e3a71 create random seeds for features using SecureRandom 2021-10-19 15:25:04 +01:00
Jason Penilla
3260e035ab Use correct LevelStem registry when loading default end/nether (#6789) 2021-10-17 12:10:03 -05:00
Jake Potrebic
2943a22d37 Fix/improve the last upstream update (#6780) 2021-10-16 11:57:05 -07:00
Spottedleaf
0339e8a094 Do not overload I/O threads with chunk data while flush saving
If the chunk count is high, then the memory used by the
chunks adds up and could cause problems. By flushing
every so many chunks, the server will not become
stressed for memory. It will also not increase the total
time to save, as flush saving performs a full flush at
the end anyways.
2021-10-16 02:22:11 -07:00
Jake Potrebic
e25e063bc9 Fix merchant inventories not closing on entity removal (#6544) 2021-10-15 20:19:08 -07:00
Spottedleaf
9ba1f65d29 Fix off by one for determining server view distance
It was 1 greater than it should've been. lvar renaming
caused the field viewDistance to be read when it should've
been reading the watchDistance
2021-10-15 19:20:32 -07:00
Hannes Greule
25181bebe6 Unlimited chunk load rate (#6768) 2021-10-16 03:54:46 +02:00
Shane Freeder
38d5d85fe4 Clean plugin folder logic in extra-jars patch (Fixes #6347) (#6619) 2021-10-15 22:54:22 +01:00
Shane Freeder
26639f1397 Updated Upstream (Bukkit/CraftBukkit/Spigot)
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:
9590b610 SPIGOT-6749: Library Loader does not correctly isolate dependencies

CraftBukkit Changes:
11c9299f #940: Fixed a NPE during CraftBlockEntityState#update.
960f3109 #937: Fixes related to unplaced BlockStates and the recent world generation changes.
4faf479e SPIGOT-6754: We ignore any still present TileEntity now when we create a BlockState for a block of type AIR.
a72d5404 SPIGOT-6754: Temporarily restore previous behaviour for tile entities with removed blocks

Spigot Changes:
dc75aca8 Remove redundant 'Log null TileEntity Owner' patch
2021-10-15 12:43:19 +01:00
Jason Penilla
871bc4e895 Use ChatRenderer.defaultRenderer() when legacy events have not modified the format (#6104) 2021-10-13 04:00:40 -05:00
Spottedleaf
55ca8ebefe Null check isApplicable for CraftBlockEntityState#update
If the update call removed the TE, then isApplicable would
have NPE'd.
2021-10-12 13:35:29 -07:00
Jason Penilla
5eb18765ee [ci skip] Misc gradle updates (#6763) 2021-10-11 16:31:53 -05:00
Owen1212055
f5b2d0cfce Always allow item changing in EntityFireball (#5493) 2021-10-09 17:04:22 -04:00
Noah van der Aa
6a642c3f47 Re-readd root/admin user detection (#6703)
* Re-readd root/admin user detection

* I am dum

* Only run id command if needed

* Use ProcessBuilder

* Link to issue

* Rebase

Co-authored-by: Madeline Miller <mnmiller1@me.com>
2021-10-09 11:29:05 +02:00
Jake Potrebic
519305c276 VanillaCommandWrapper didnt account for entity senders (#6586) 2021-10-08 20:44:45 -07:00
Jake Potrebic
38aa835018 Fix loading cmds in datapacks (#6641) 2021-10-08 20:39:59 -07:00
Jake Potrebic
4675996335 Fix unplaced block states after new chunk gen API (#6747) 2021-10-08 12:06:28 -07:00
Jakub Žáček
2708960eba Add methods to find targets for lightning strikes (#6712) 2021-10-08 12:00:03 +02:00
Jake Potrebic
1dd5b0ab8e Filter ip address on join if setting is true (#6748) 2021-10-08 00:30:52 -07:00
Noah van der Aa
1bd2f3e523 Fix kicking ops when whitelist is reloaded (MC-171420) (#6742) 2021-10-07 20:11:15 +02:00
Irmo van den Berge
7241ee9bc1 Add getChangedBlockData() property to BlockPhysicsEvent to expose BlockData (#6743)
Signed-off-by: Irmo van den Berge <irmo.vandenberge@ziggo.nl>
2021-10-07 20:03:30 +02:00
Noah van der Aa
9cdeca64b8 Add config setting for logging player ip addresses. (#6342) 2021-10-07 20:02:40 +02:00
Spottedleaf
0981bf8e38 Discard out of bounds chunks during regionfile header recalc
The logic cannot even determine what local chunk they should be,
and out of bounds chunks can only occur from external modifications
to the regionfile.

If regionfile recalculation cannot occur, then do not attempt
to retry read actions.

Fixes https://github.com/PaperMC/Paper/issues/6718
2021-10-07 05:50:38 -07:00
Nassim Jahnke
c932582273 Fix EntityPortalExitEvent target location
Now uses the proper position and world as well as correct pitch
Fixes #6739

Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2021-10-07 11:05:49 +02:00
Jake Potrebic
aca1516fc3 Fix upstream block state factories (#6738) 2021-10-06 21:11:20 -07:00
Jason Penilla
20feb576da Deprecate API methods added by 'Close Plugin Class Loaders on Disable' (#6737) 2021-10-06 23:00:32 -05:00
HexedHero
16088745e1 Add download link to the /version command (#6482)
* Add download link to /version command

* Change colors
2021-10-06 16:14:03 +01:00
Nassim Jahnke
8596d6dad5 Remove unnecessary Velocity repo from server (#6730) 2021-10-06 11:28:35 +02:00
Jake Potrebic
31f57a86a6 Update adventure and fix command perm serialization NPE (#6729) 2021-10-06 01:05:39 -07:00
Jake Potrebic
5f9ed411df Fix EntityPortalExitEvent not being called (#5617) 2021-10-05 14:19:27 -07:00
Jake Potrebic
faa6373f4a Support components in command permission msgs (#6676) 2021-10-05 13:52:03 -07:00
Jake Potrebic
a0cb2fd31d Fix CraftCriteria defaults map (#6723) 2021-10-05 10:24:36 -07:00
Jason Penilla
0d074fcfc9 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6722) 2021-10-04 22:14:11 -05:00
Jake Potrebic
3680f9addc Add missing team sidebar display slots (#6690) 2021-10-04 02:31:26 -07:00
chickeneer
0a8f478543 Handle missing Spawn Egg item meta for 1.17 mobs (#6700) 2021-10-04 03:13:19 -05:00
Jason Penilla
c57aa25ca2 Start console thread after PaperConfig & MinecraftServer.console are initialized (#6716) 2021-10-03 17:12:04 -05:00
Jake Potrebic
89b1be105e Don't count named piglins and hoglins towards mob cap (#6452) 2021-10-03 09:54:54 -07:00
Jason Penilla
a91e5803cd Update paperweight to 1.1.12 (#6653) 2021-10-02 20:42:30 -05:00
Jason Penilla
61252d4a4b Make legacyRenderer a ViewerUnaware renderer (#6691) 2021-10-02 13:43:03 -05:00
Jake Potrebic
6ef714345f Updated Upstream (Bukkit/CraftBukkit) (#6638) 2021-10-02 10:21:49 -07:00
sulu5890
2712aae889 Revert "Readd root/admin user detection (#6593)" (#6699)
This reverts commit 283bda4234.
2021-10-02 10:09:50 -05:00
Noah van der Aa
283bda4234 Readd root/admin user detection (#6593)
* Readd root/admin user detection

* Use original test for Windows, use UID for unix and add co-author

* Move logging and remove unnecessary reader

* try with resources

* Use Windows security identifiers + reduce size of Unix check

* Remove extra newline at the bottom of the message

* Change wording

* Address comments

* Link to Maddy's article

* Use warning log level
2021-10-02 11:34:07 +02:00
Jake Potrebic
fd237f88f0 Prevent unintended light block manipulation (#6601) 2021-10-01 04:07:59 -07:00
Nassim Jahnke
714dbcc8e2 Fix plugin provides load order (#6687) 2021-10-01 12:53:24 +02:00
thamid-gamer
a1e5453e61 Use null for null resource pack prompts (#6572) 2021-09-30 20:56:22 -04:00
Owen1212055
5d7651e1b8 Update head rotation in missing places (#5481) 2021-09-30 20:50:00 -04:00
thamid-gamer
2b0d4da807 Make Levels Use Correct Spawn Settings (#6419) 2021-09-30 20:46:37 -04:00
Lexi
88b2f00a03 Preserve overstacked loot (#5943) 2021-09-30 20:39:17 -04:00
Jake Potrebic
7f7961ea23 Improve ItemStack#editMeta (#6502) 2021-09-30 17:32:25 -07:00
Jake Potrebic
150389bf71 More CommandBlock API (#5746) 2021-09-30 14:28:02 -07:00
Jason Penilla
4ee912fbfd Fix click event when vanilla scoreboard name coloring is enabled (#6652) 2021-09-30 13:33:19 -05:00
Jake Potrebic
1264c08ef8 Option to prevent NBT copy in smithing recipes (#6671) 2021-09-30 11:27:25 -07:00
Jason Penilla
019c768488 Fix stacktrace deobf where thrownProxy got initialized before rewriting (#6684) 2021-09-30 13:05:51 -05:00
booky10
e3ec51968c Fix nullability on Block#breakNaturally (#6651) 2021-09-30 19:42:44 +02:00
Jake Potrebic
7e3620fce5 Suggest PlayerPostRespawnEvent if changing player state (#6679) 2021-09-29 11:55:34 -07:00
Jason Penilla
bcf4a2e70d Fix jline relocation (#6677) 2021-09-29 11:34:16 -05:00
Shane Freeder
3f3377a1eb Revert "Legacy data should look for legacy materials (Fixes #6618)" (Fixes #6664)
This reverts commit 3ce522545b.
2021-09-29 03:12:40 +01:00
Nassim Jahnke
7a09beac96 Ensure valid vehicle status (#6673) 2021-09-28 10:24:25 +02:00
Jake Potrebic
e62fd64c62 Fix player death kept items not being in same slot (#6663) 2021-09-25 12:06:37 -07:00
Gaider10
90cb93d691 Fix interaction pos in range check (#6654) 2021-09-24 11:02:14 +03:00
Kezz
cff53e785d Adventure 4.9.1 (#6634)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2021-09-23 22:07:44 +01:00
Jake Potrebic
7df16b7b62 fixes cancelling PlayerTradeEvent (#5612) 2021-09-22 21:10:35 -07:00
Jake Potrebic
3212afeed6 Fix anvil inventory events (#6157) 2021-09-22 15:52:43 -07:00
Bjarne Koll
403d07e954 Apply furnace cook speed multiplier through event (#6378)
Previously the upstream FurnaceStartSmeltEvent would default to the
recipes cooking time, ignoring any modifications from the furnace speed
multiplier.
While this works correctly for upstream, paper introduces the speed
multiplier API, which allows a different cook time from the one provided
by the recipe.

This commit now passes the modified cooktime to the furnace start smelt
event explicitly, instead of allowing the event to default to the
recipes cooking time, thus ensuring that the speed modifier is
respected.

Resolves: #6376
2021-09-22 21:46:15 +02:00
Jake Potrebic
7ab005b9c2 Add more component name methods (#6578) 2021-09-22 11:34:40 -07:00
Jake Potrebic
3e736b8525 Include slot when constructing the bukkit Attribute Modifiers (#6537) 2021-09-22 10:48:03 -07:00
Jake Potrebic
bf6067cabf Fix upstreams fix for composters and variable hoppers (#6563) 2021-09-22 10:40:45 -07:00
Jake Potrebic
ac4b9756ce Fix upstream nullability on entity equipment getters (#6519) 2021-09-22 10:23:21 -07:00
Nassim Jahnke
35ff5adaa2 Fix axolotl/fish persistence
Fixes #6643
2021-09-22 13:40:13 +02:00
Jake Potrebic
baca7d3685 Mark fish and axolotls from buckets as persistent (#6392) 2021-09-21 21:59:19 -07:00
Jake Potrebic
28bc1df590 Implement Translatable on villager Profession (#6542) 2021-09-21 21:45:01 -07:00
Maddy Miller
9b68f27212 [ci skip] Update my name in author field (#6625) 2021-09-20 19:30:04 +10:00
Shane Freeder
3ce522545b Legacy data should look for legacy materials (Fixes #6618) 2021-09-17 09:35:02 +01:00
cs8425
49fabba8b5 fix per-player-mob-spawns cause total limit cap by Bukkit's spawn limit (#6574) 2021-09-17 08:40:34 +08:00
Jason Penilla
667baeed68 Fix global limit display for MISC mob category (#6612) 2021-09-16 16:40:11 -05:00
PureGero
76a6ed89c7 Fix tick rates map being stored with upper case values instead of lower case (#6587) 2021-09-15 17:03:09 +10:00
Jason Penilla
0767b6966e Fix log message formatting when classes not owned by plugins use sysout (#6604) 2021-09-14 12:23:56 -05:00
Noah van der Aa
054854471c Don't log if debug logging isn't enabled. (#6603) 2021-09-14 16:44:06 +02:00
Nassim Jahnke
54cfbcd139 Hide feature seeds in Timings 2021-09-14 15:31:45 +02:00
Nassim Jahnke
325ba14ca5 Improve interact distance check (#6591) 2021-09-11 22:18:44 +02:00
Nassim Jahnke
0d34a95f8f Updated Upstream (Bukkit/CraftBukkit) (#6589)
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:
44cfe143 SPIGOT-6249: Add Missing Effect Constants

CraftBukkit Changes:
14928261 SPIGOT-6249: Add Missing Effect Constants
332335e1 SPIGOT-6731: "Nag author" message in CraftServer lists one author only
6cd975d0 SPIGOT-5732, SPIGOT-6387: Overhaul Hanging entities
2021-09-11 19:27:48 +02:00
Finn Künstner
e50f4aef68 [ci skip] Fix typos in Paper comments (#6588)
* //Paper -> // Paper

* // Tuiniy -> // Paper
2021-09-11 13:22:51 +03:00
Jason Penilla
d3dab2f22c Remove method rename and fix reobf for Goal#getFlags (#6528) 2021-09-09 12:12:22 -05:00
Jason Penilla
df51228b73 Fix VanillaGoals when in reobfuscated environment (#6580) 2021-09-09 11:57:16 -05:00
Spottedleaf
36e77c4c63 Do not create nether portals that delete undestroyable blocks
Fixes https://github.com/PaperMC/Paper/issues/5773
2021-09-07 15:10:48 -07:00
Shane Freeder
92c68e2367 Fixup enderpearl patch 2021-09-07 22:33:28 +01:00
Shane Freeder
eca2f8fdd0 Fix CocaoDecorator causing a crash during generation (Fixes #6028) 2021-09-07 21:41:54 +01:00
Omer Uddin
36a14149e6 Disable enderpearls when they hit non-ticking chunk if disableEnderpearlExploit is enabled 2021-01-28 20:32:58 -05:00
Jason Penilla
d1043a7236 Add '/paper mobcaps' and '/paper playermobcaps' commands (#6470)
Add commands to get the mobcaps for a world, as well as the mobcaps for
each player when per-player mob spawning is enabled.

Also has a hover text on each mob category listing what entity types are
in said category
2021-09-05 16:29:02 -05:00
Nassim Jahnke
1d26ff2269 Use BlockPost#atY in end portal softlock fix 2021-09-03 20:14:29 +02:00
Noah van der Aa
3436b6780a Prevent softlocked end exit portal generation (#6525) 2021-09-03 20:05:01 +02:00
Nassim Jahnke
48d72eb439 Remove "Auto fix bad Y levels on player login" patch
Fixes #6357
Closes #6508
Closes #6358
2021-09-03 19:57:21 +02:00
Jake Potrebic
4433d23cc1 Prevent an infinite recursion error while rendering translatables (Fixes #6551) (#6555) 2021-09-03 10:01:05 -07:00
Shane Freeder
20e45f7315 Do not process entity loads in CraftChunk#getEntities (Fixes #6543)
This re-introduces the issue behind #5872 but fixes #6543
The logic here is generally flawed however somewhat of a nuance,
upstream uses managedBlock which is basically needed to process
the posted entity adds, but, has the side-effect of processing any
chunk loads which has the naunce of stacking up and either causing a
massive performance hit, or can potentially lead the server to crash.

This issue is particularly noticable on paper due to the cumulative efforts
to drastically improve chunk loading speeds which means that there is much more
of a chance that we're about to eat a dirtload of chunk load callbacks, thus
making this issue much more of an issue
2021-09-03 15:55:22 +01:00
Spottedleaf
3e7769feae Fixed layers from V2550 not being added to list (#6541)
Note from Spottedleaf:
Please note that this doesn't fix any problems using dataconverter
because dataconverter does not re-route world gen settings conversion.

Co-authored-by: Callum Seabrook <callum.seabrook@prevarinite.com>
2021-09-01 14:25:25 -07:00
Jake Potrebic
fa43132643 flattener should try to render custom translations (#6540) 2021-09-01 14:03:00 -07:00
Nassim Jahnke
8efc0a0cc6 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6539)
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:
ed7bba95 SPIGOT-6547: Chunk#getEntities() doesn't return all entities immediately after chunk load
d99a585c SPIGOT-6719: Add getTileEntities() to LimitedRegion

CraftBukkit Changes:
422cec08 Rebuild patch
15f27fc7 SPIGOT-6547: Chunk#getEntities() doesn't return all entities immediately after chunk load
cbd747af SPIGOT-6719: Add getTileEntities() to LimitedRegion

Spigot Changes:
6c1c1b26 Rebuild patches
2021-09-01 14:03:36 +02:00
Nassim Jahnke
8a37b1fc5f Configurable feature seeds (#6531)
Co-authored-by: Thonk 30448663+ExcessiveAmountsOfZombies@users.noreply.github.com

Also includes an option to auto-generate random seeds for all features and add them to the config.
2021-09-01 11:54:41 +02:00
Spottedleaf
25134061a8 Remove the old updatingChunks and visibleChunks fields (#6535)
Just in case they cause problems again.

Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
2021-08-31 19:33:14 -07:00
Jason Penilla
fbedd625a2 Always use updatingChunks for saveAllChunks (#6534) 2021-08-31 19:53:56 -05:00
Jason Penilla
887ccc412a Use updatingChunks for flush saving (#6533) 2021-08-31 19:23:22 -05:00
Nassim Jahnke
77026633f4 Fix distance map contains (#6530) 2021-08-31 14:47:00 +02:00
Spottedleaf
bc2890b955 Merge tuinity (#6413)
This PR contains all of Tuinity's patches. Very notable ones are:

- Highly optimised collisions
- Optimised entity lookups by bounding box (Mojang made regressions in 1.17, this brings it back to 1.16)
- Starlight https://github.com/PaperMC/Starlight
- Rewritten dataconverter system https://github.com/PaperMC/DataConverter
- Random block ticking optimisation (wrongly dropped from Paper 1.17)
- Chunk ticking optimisations
- Anything else I've forgotten in the 60 or so patches

If you are a previous Tuinity user, your config will not migrate. You must do it yourself. The config options have simply been moved into paper.yml, so it will be an easy migration. However, please note that the chunk loading options in tuinity.yml are NOT compatible with the options in paper.yml. 

* Port tuinity, initial patchset

* Update gradle to 7.2

jmp said it fixes rebuildpatches not working for me. it fucking better

* Completely clean apply

* Remove tuinity config, add per player api patch

* Remove paper reobf mappings patch

* Properly update gradlew

* Force clean rebuild

* Mark fixups

Comments and ATs still need to be done

* grep -r "Tuinity"

* Fixup

* Ensure gameprofile lastaccess is written only under the state lock

* update URL for dataconverter

* Only clean rebuild tuinity patches

might fix merge conflicts

* Use UTF-8 for gradlew

* Clean rb patches again

* Convert block ids used as item ids

Neither the converters of pre 1.13 nor DFU handled these cases,
as by the time they were written the game at the time didn't
consider these ids valid - they would be air. Because of this,
some worlds have logspam since only DataConverter (not DFU or
legacy converters) will warn when an invalid id has been
seen.

While quite a few do need to now be considered as air, quite a lot
do not. So it makes sense to add conversion for these items, instead
of simply suppressing or ignoring the logs. I've now added id -> string conversion
for all block ids that could be used as items that existed in the game
before 1.7.10 (I have no interest in tracking down the
exact version block ids stopped working) that were on
https://minecraft-ids.grahamedgecombe.com/

Items that did not directly convert to new items will
be instead converted to air: stems, wheat crops, piston head,
tripwire wire block

* Fix LightPopulated parsing in V1466

The DFU code was checking if the number existed, not if it
didn't exist. I misread the original code.

* Always parse protochunk light sources unless it is marked as non-lit

Chunks not marked as lit will always go through the light engine,
so they should always have their block sources parsed.

* Update custom names to JSON for players

Missed this fix from CB, as it was inside
the DataFixers class.

I decided to double check all of the CB changes again:

DataFixers.java was the only area I missed, as I had inspected all
datafixer diffs and implemented them all into DataConverter. I also
checked Bootstrap.java again, and re-evaluated their changes. I had
previously done this, but determined that they were all bad.

The changes to make standing_sign block map to oak_sign block in
V1450 is bad, because that's not the item id V1450 accepts. Only
in 1.14 did oak_sign even exist, and as expected there is a converter
to rename all existing sign items/blocks.

The fix to register the portal block under id 1440 is useless, as
the flattenning logic will default to the lowest registered id - which
is the exact blockstate that CB registers into 1440. So it just
doesn't do anything.

The extra item ids in the id -> string converter are already added,
but I found this from EMC originally.

The change for the spawn egg id 23 -> Arrow is just wrong,
that id DOES correspond to TippedArrow, NOT Arrow. As
expected, the spawn egg already has a dedicated mapping for
Arrow, which is id 10 - which was Arrow's entity id.

I also ported a fix for the cooked_fished id update. This doesn't
really matter since there is already a dataconverter to fix this,
but the game didn't accept cooked_fished at the time. So I see
no harm.

* Review all converters and walkers

- Refactor V99 to have helper methods for defining entity/tile
  entity types
- Automatically namespace all ids that should be namespaced.
  While vanilla never saved non-namespaced data for things that
  are namespaced, plugins/users might have.
- Synchronised the identity ensure map in HelperBlockFlatteningV1450
- Code style consistency
- Add missing log warning in V102 for ITEM_NAME type conversion
- Use getBoolean instead of getByte
- Use ConverterAbstractEntityRename for V143 TippedArrow -> Arrow
  rename, as it will affect ENTITY_NAME type
- Always set isVillager to false in V502 for Zombie
- Register V808's converter under subversion 1 like DFU
- Register a breakpoint for V1.17.1. In the future, all final
  versions of major releases will have a breakpoint so that
  the work required to determine if a converter needs a breakpoint
  is minimal
- Validate that a dataconverter is only registered for a version
  that is registered
- ConverterFlattenTileEntity is actually ConverterFlattenEntity
  It even registered the converters under TILE_ENTITY, instead of
  ENTITY.
- Fix id comparison in V1492 STRUCTURE_FEATURE renamer
- Use ConverterAbstractStatsRename for V1510 stats renamer
  At the time I had written that class, the abstract renamer didn't
  exist.
- Ensure OwnerUUID is at least set to empty string in
  V1904 if the ocelot is converted to a cat (this is
  likely so that it retains a collar)
- Use generic read/write for Records in V1946
  Records is actually a list, not a map. So reading map was
  invalid.

* Always set light to zero when propagating decrease

This fixes an almost infinite loop where light values
would be spam queued on a very small subset on blocks.

This also likely fixes the memory issues people were
seeing.

* re-organize patches

* Apply and fix conflicts

* Revert some patches

getChunkAt retains chunks so that plugins don't spam loads
revert mc-4 fix will remain unless issues pop up

* Shuffle iterated chunks if per player is not enabled

Can help with some mob spawning stacking up at locations

* Make per player default, migrate all configs

* Adjust comments in fixups

* Rework config for player chunk loader

Old config is not compatible. Move all configs to be
under `settings` in paper.yml

The player chunk loader has been modified to
less aggressively load chunks, but to send
chunks at higher rates compared to tuinity. There are
new config entries to tune this behavior.

* Add back old constructor to CompressionEncoder/Decoder (fixes
 Tuinity #358)

* Raise chunk loading default limits

* Reduce worldgen thread workers for lower core count cpus

* Raise limits for chunk loading config

Also place it under `chunk-loading`

* Disable max chunk send rate by default

* Fix conflicts and rebuild patches

* Drop default send rate again

Appears to be still causing problems for no known reason

* Raise chunk send limits to 100 per player

While a low limit fixes ping issues for some people, most people
do not suffer from this issue and thus should not suffer from
an extremely slow load-in rate.

* Rebase part 1

Autosquash the fixups

* Move not implemented up

* Fixup mc-dev fixes

Missed this one

* Rebase per player viewdistance api into the original api patch

* Remove old light engine patch part 1

The prioritisation must be kept from it, so that part
has been rebased into the priority patch.
Part 2 will deal with rebasing all of the patches _after_

* Rebase remaining patches for old light patch removal

* Remove other mid tick patch

* Remove Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch

Replaced by `Do not copy visible chunks`

* Revert AT for Vec3i setX/Y/Z

The class is immutable. set should not be exposed

* Remove old IntegerUtil class

* Replace old CraftChunk#getEntities patch

* Remove import for SWMRNibbleArray in ChunkAccess

* Finished merge checklist

* Remove ensureTickThread impl in urgency patch

Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2021-08-31 04:02:11 -07:00
HexedHero
2a4afe1f6b Add MaterialTags for raw ores and raw ore blocks (#6516) 2021-08-30 15:55:11 +01:00
Jason Penilla
bd48009917 Undeprecate Enchantment#isCursed (#6524) 2021-08-30 09:49:28 -05:00
Jason Penilla
7fda985a9c [ci skip] Cleanup Timings v2 diff (#6523) 2021-08-30 02:02:24 -05:00
Jason Penilla
0294b31e13 Log error for invalid entity-per-chunk-save-limit configs (#6522) 2021-08-29 23:19:43 -05:00
Maddy Miller
e0125b21b7 Fix poor action helpers API name (#6518) 2021-08-29 17:20:14 +10:00
Maddy Miller
6f94f00f7b Add helpers for left/right hand to Action (#6517)
* Add helpers for left/right hand to Action

* Diff starts here technically
2021-08-29 16:29:36 +10:00
Nassim Jahnke
dc84fb336e Move ProtoWorld methods to LimitedRegion (#6486) 2021-08-28 15:43:26 +02:00
Jason Penilla
aa0de8d4b5 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-28 00:07:12 -05:00
Spottedleaf
6522a6eed1 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
0f34801f3d Add Missing Entity API: Cat (#5744) 2021-08-27 14:16:41 -04:00