Commit graph

75 commits

Author SHA1 Message Date
Nassim Jahnke
84993c1413 Add clicked position to PlayerUseUnknownEntityEvent (#9604) 2023-08-16 17:58:07 +10:00
Moulberry
a4dac24ba0 Allow LEFT_CLICK_AIR in 3.0->4.5 range of entity (#9211) 2023-07-16 23:58:25 +08:00
Shane Freeder
3b3cf7f532 Don't allow for supporting block checks to load chunks
I cannot test this due to lack of hardware (took 30 minutes getting paper
updated and loaded into IJ on this machine...), however, this is the easiest
patch for now. Ideally, some form of distance check would probably be added to
improve invalidation of this cache.
2023-07-05 23:13:30 +01:00
Spottedleaf
3cfd74da9e Fix IntegerUtil#getDivisorNumbers
Use unsigned mod operation for initialization of anc

Also includes
- 5a0cefb45e
- acc8ed9634
2023-06-16 09:05:36 -07:00
Jake Potrebic
957d248aff more compile fixes 2023-06-08 13:56:13 -07:00
Jake Potrebic
b7b98b0bd8 fix FullChunkAccess enum move (#9281) 2023-06-08 12:22:12 -07:00
Jake Potrebic
eb4be91142 fix some compile issues 2023-06-07 14:46:56 -07:00
Nassim Jahnke
27f97c0f4e Some compile fixes 2023-06-07 23:35:19 +02:00
Nassim Jahnke
1bda3d4d2a Start working on 1.20 2023-06-07 18:24:39 +02:00
Jake Potrebic
a37ccc7532 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9088)
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:
5efeb7bd Also update compiler version
c13b867a Update some Maven plugin versions
deb28d9f PR-837: Add more bell API
e938d62a PR-819: Allow Player#sendBlockDamage() to specify a source entity
0e75532c PR-818: Add more Guardian API, particularly for its laser
a10155aa PR-839: Add BlockData#rotate and BlockData#mirror
77e690b4 PR-836: Add missing API for explosive minecarts
60722059 PR-832: Allow getting chunks without generating them and optimize chunk data request for ungenerated chunks
0a2c4b4b PR-834: Add Player#sendHurtAnimation()

CraftBukkit Changes:
be8682aa8 Also update compiler version
08e305f5b Update some Maven plugin versions
187bdd463 PR-1160: Add more bell API
2f8e5bc7c PR-1145: Allow Player#sendBlockDamage() to specify a source entity
bcbb61b36 PR-1144: Add more Guardian API, particularly for its laser
722ddff6d PR-1162: Add BlockData#rotate and BlockData#mirror
80998277c PR-1159: Add missing API for explosive minecarts
1fddefce1 PR-1155: Allow getting chunks without generating them and optimize chunk data request for ungenerated chunks
20e8a486f PR-1157: Add Player#sendHurtAnimation()

Spigot Changes:
b31949f2 Rebuild patches
2023-04-07 11:39:13 -07:00
Jake Potrebic
0adc18baf8 [ci skip] rebuild patches 2023-03-23 14:57:03 -07:00
Riley Park
39255145b6 chore: cleanup annotations in api adventure patch 2023-03-23 09:49:24 -07:00
Nassim Jahnke
8ff5a4a679 Update DataConverter 2023-03-15 20:17:42 +01:00
Nassim Jahnke
15ade6f446 More patches 2023-03-14 19:05:23 +01:00
Nassim Jahnke
08ab8edb76 Start working on 1.19.4 2023-03-14 18:11:24 +01:00
Jake Potrebic
f8ba85ffbf Replace ConfiguredStructure api with Structure (#8642) 2023-02-28 08:36:01 -08:00
Nassim Jahnke
5a125e0fc3 Fix getBlockStateIfLoaded world bounds check
Closes #8922
2023-02-28 12:27:38 +01:00
Jake Potrebic
f9e1ad2c2d Updated Upstream (Bukkit/CraftBukkit) (#8832)
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:
37262de8 PR-812: Add Registry#match(String)
d6b40162 SPIGOT-4569: Add more BlockData API
f9691891 PR-809: Throw a more clear error for BlockIterators with zero direction, add Vector#isZero()
91e79e19 PR-804: Added methods to get translation keys for materials, itemstacks and more
426b00d3 PR-795: Add new BiomeParameterPoint passed to BiomeProvider#getBiome
0e91ea52 SPIGOT-7224: Add events for brewing stands and campfires starting their actions

CraftBukkit Changes:
a50301aa5 Fix issues with fluid tag conversion and fluid #isTagged
6aeb5e4c3 SPIGOT-4569: Implement more BlockData API
7dbf862c2 PR-1131: Added methods to get translation keys for materials, itemstacks and more
7167588b1 PR-1117: Add new BiomeParameterPoint passed to BiomeProvider#getBiome
7c44152eb SPIGOT-7224: Add events for brewing stands and campfires starting their actions
2023-02-15 14:10:14 -08:00
Nassim Jahnke
d0386f21e8 First server patches 2022-12-07 18:08:55 +01:00
Nassim Jahnke
b7dd55ce72 API patches 2022-12-07 17:46:46 +01:00
Jake Potrebic
b121c04895 Moving ATs from the at file to individual patches (#8573) 2022-11-19 15:53:20 -08:00
Jason Penilla
b9481cae74 Move classes added to net.minecraft.server to paper packages (#8500) 2022-10-24 12:43:46 -07:00
Jason Penilla
13f7207665 Add stacktrace deobfuscation in more places (#8484) 2022-10-18 19:21:07 -07:00
Nassim Jahnke
bcbb7dae76 Don't print full packages in new chunk system classes
Closes #8391, #8412
2022-09-30 23:19:51 +02:00
Spottedleaf
0f1a8717e8 Rewrite chunk system (#8177)
Patch documentation to come

Issues with the old system that are fixed now:
- World generation does not scale with cpu cores effectively.
- Relies on the main thread for scheduling and maintaining chunk state, dropping chunk load/generate rates at lower tps.
- Unreliable prioritisation of chunk gen/load calls that block the main thread.
- Shutdown logic is utterly unreliable, as it has to wait for all chunks to unload - is it guaranteed that the chunk system is in a state on shutdown that it can reliably do this? Watchdog shutdown also typically failed due to thread checks, which is now resolved.
- Saving of data is not unified (i.e can save chunk data without saving entity data, poses problems for desync if shutdown is really abnormal.
- Entities are not loaded with chunks. This caused quite a bit of headache for Chunk#getEntities API, but now the new chunk system loads entities with chunks so that they are ready whenever the chunk loads in. Effectively brings the behavior back to 1.16 era, but still storing entities in their own separate regionfiles.

The above list is not complete. The patch documentation will complete it.

New chunk system hard relies on starlight and dataconverter, and most importantly the new concurrent utilities in ConcurrentUtil.

Some of the old async chunk i/o interface (i.e the old file io thread reroutes _some_ calls to the new file io thread) is kept for plugin compat reasons. It will be removed in the next major version of minecraft.

The old legacy chunk system patches have been moved to the removed folder in case we need them again.
2022-09-26 01:02:51 -07:00
Spottedleaf
a2df674cc0 Re-add legacy getChunkAtAsynchronously to ChunkProviderServer
Apparently some plugins use it
2022-09-02 04:41:08 -07:00
Spottedleaf
90da9124c5 Re-arrange most chunk system patches to front (#8338)
* Re-arrange most chunk system patches to front

Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
2022-09-01 09:51:59 -07:00
Owen1212055
8d6013b4be Warn on plugins accessing faraway chunks (#8208) 2022-07-29 19:16:26 -04:00
Jake Potrebic
2168417373 Move to configurate for paper.yml (#7609) 2022-06-09 01:51:45 -07:00
Nassim Jahnke
b31be0569d First server patches 2022-06-07 20:12:34 +02:00
Nassim Jahnke
1148687a8d Prepare for 1.19 dev 2022-06-07 18:52:56 +02:00
Spottedleaf
a096540d94 Add per player chunk loading limits
Configurable under "settings.chunk-loading.player-max-chunk-load-rate",
defaults to -1. This commit also changes the chunk loading to be
distributed equally for all players, rather than distance based. This is
to ensure players flying around do not take priority over everyone else.
The exception to this new rule is the min-load-radius, which still has
priority over everything else.
2022-03-31 06:04:23 -07:00
Jake Potrebic
83cd94ea93 Updated Upstream (Bukkit/CraftBukkit) (#7672)
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:
7902647a PR-737: Update WorldCreator#generatorSettings docs
67556a50 PR-736: Update README

CraftBukkit Changes:
10922194 Java 18 support
d53c4fb6 PR-1039: Use correct ops in GeneratorSettings
a567e4ae PR-1038: Removed the no longer needed getChunkUnchecked method from ChunkProviderServer.
4ac8fcce SPIGOT-6980: Since 1.18.2, World#isChunkLoaded returned false for chunks that have just been loaded (e.g. inside ChunkLoadEvent).
e6cc7c70 PR-1035: Update README
3ec79a27 SPIGOT-5140: Call EntityChangeBlockEvent when a ChorusFlower is destroyed by a projectile
2022-03-29 01:32:18 -07:00
Jake Potrebic
d3087536e9 Updated Upstream (Bukkit/CraftBukkit) (#7604)
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:
33a2b476 PR-734: Make PlayerInventory#getItem Nullable

CraftBukkit Changes:
953d3ddc SPIGOT-3034: PlayerKickEvent.setLeaveMessage(String) doesn't actually do anything
2c47af0c SPIGOT-6963: CraftMetaBlockState#getBlockState applied TileEntity ids without the minecraft namespace prefix.
2022-03-16 08:57:51 -07:00
Nassim Jahnke
548f257f50 Updated Upstream (CraftBukkit/Spigot) (#7580)
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:
881e06e5 PR-725: Add Item Unlimited Lifetime APIs

CraftBukkit Changes:
74c08312 SPIGOT-6962: Call EntityChangeBlockEvent when when FallingBlockEntity starts to fall
64db5126 SPIGOT-6959: Make /loot command ignore empty items for spawn
2d760831 Increase outdated build delay
9ed7e4fb SPIGOT-6138, SPIGOT-6415: Don't call CreatureSpawnEvent after cross-dimensional travel
fc4ad813 SPIGOT-6895: Trees grown with applyBoneMeal() don't fire the StructureGrowthEvent
59733a2e SPIGOT-6961: Actually return a copy of the ItemMeta

Spigot Changes:
ffceeae3 SPIGOT-6956: Drop unload queue patch as attempt at fixing stop issue
e19ddabd PR-1011: Add Item Unlimited Lifetime APIs
34d40b0e SPIGOT-2942: give command fires PlayerDropItemEvent, cancelling it causes Item Duplication
2022-03-13 08:47:54 +01:00
Spottedleaf
13a4b2f382 Fix unload stall
Also added required tickets that should not be removed during
shutdown
2022-02-28 18:33:20 -08:00
Nassim Jahnke
da03d4a1bc Initial 1.18 update 2022-02-28 22:43:03 -07:00
Nassim Jahnke
a9e4b937c0 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#7454)
* 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:
8085edde SPIGOT-6918: Add SpawnCategory API and configurations for Axolotls
04c7e13c PR-719: Add Player Profile API
71564210 SPIGOT-6910: Add BlockDamageAbortEvent

CraftBukkit Changes:
febaa1c6 SPIGOT-6918: Add SpawnCategory API and configurations for Axolotls
9dafd109 Don't send updates over large distances
bdac46b0 SPIGOT-6782: EntityPortalEvent should not destroy entity when setTo() uses same world as getFrom()
8f361ece PR-1002: Add Player Profile API
911875d4 Increase outdated build delay
e5f8a767 SPIGOT-6917: Use main scoreboard for /trigger
a672a531 Clean up callBlockDamageEvent
8e1bdeef SPIGOT-6910: Add BlockDamageAbortEvent

Spigot Changes:
6edb62f3 Rebuild patches
7fbc6a1e Rebuild patches

* Updated Upstream (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

CraftBukkit Changes:
de951355 SPIGOT-6927: Fix default value of spawn-limits in Worlds
2022-02-12 14:20:33 +01:00
Jason Penilla
71e9154f02 Add uncaught exception handler using logger to usages of ThreadFactoryBuilder (#7179) 2021-12-23 02:32:26 -08:00
Nassim Jahnke
0e985b7b3b Update to 1.18.1 (#7076) 2021-12-10 15:24:07 +01:00
Jason Penilla
77bed7ff51 Fix empty/null chunk section check in LevelChunk#getBlockData, rename… (#7039)
… patch and methods to make more sense with Mojang mappings
2021-12-05 15:32:02 -08:00
Jake Potrebic
a271feefae Add dropped hunk from mid-tick tasks (#7034) 2021-12-05 13:58:01 -08:00
Jake Potrebic
c9bbb9ab4e Update Optimise chunk tick iteration (#6950) 2021-12-05 06:00:13 -08:00
Jason Penilla
82eff9628d re-inline Goal.Flag iteration 2021-11-30 00:36:30 -08:00
Jake Potrebic
9403115c81 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:
810cb078 Add hideEntity / showEntity API

CraftBukkit Changes:
04f8e7e2 SPIGOT-6814: (Chunk) PersistentData is lost after restart
37fd1917 Add hideEntity / showEntity API
7e2214da Move checkstyle to slightly later compile phase
45c3f826 SPIGOT-6816: Fix ChunkSnapshot#getBiome

Spigot Changes:
b11f318f Rebuild patches
622b2310 SPIGOT-6811: Fix mob spawning mismatch
2b2a3d56 Rebuild patches
2021-11-28 15:46:53 -08:00
Jake Potrebic
7d08c18917 Update paperclip and yarn mappings (#6943) 2021-11-28 00:33:00 -08:00
Josh Roy
04ca580aa6 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:
716b4fce Revert SnakeYAML upgrade
ca6f8942 Update to Minecraft 1.18-rc3
57e7e952 #683: Add Player#showDemoScreen

CraftBukkit Changes:
c98abfb0 Update to Minecraft 1.18-rc3
9b258501 #960: Add Player#showDemoScreen
d9542247 Produce remapped jars after bootstrap jar
99f3ddde SPIGOT-6808: Fix RegionAccessor#getBiome

Spigot Changes:
b7a4222e Update to Minecraft 1.18-rc3
2021-11-26 17:58:39 -05:00
Nassim Jahnke
8c6927e39d More more more more more more more more more more more more more more more more work 2021-11-25 09:54:06 +01:00
Jake Potrebic
60caeea54e 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:
d25437bc Update to Minecraft 1.18-pre8

CraftBukkit Changes:
5a39a236 Update to Minecraft 1.18-pre8

Spigot Changes:
7840c2af Update to Minecraft 1.18-pre8
2021-11-24 14:26:32 -08:00
Jake Potrebic
148ea9dceb even moaar patches 2021-11-24 11:02:36 -08:00