Commit graph

5500 commits

Author SHA1 Message Date
Shane Freeder
084e7e62ad Mitigate effects of WorldCreator#keepSpawnLoaded ret type change
TODO: Remove in 1.21?
2022-09-19 00:13:02 +01:00
Shane Freeder
60026267e3 Configurable chat thread limit
By default, spigot shifts chat over to an unbounded thread pool,
on a normal server, this really offers no gains, the creation of a thread
on submitting to the pool on these servers eats more time vs just running it in
the netty pipeline, however, on servers using plugins which do work in here, there
could be some overall benefits to moving this stuff outside of the pipeline.

In general, this patch does two things:
1) Exposes the core size for the pool, this allows for ensuring that a number of threads
sit around in the pool, mitigating the need for creating new threads; This IS however
caveated, the ThreadPoolExecutor will ONLY create core threads as they're needed, it
just won't allow for us to dip back under the # of core threads, this can potentially
be mitigated by calling prestartCoreThread, however, I'm not sure if there is much justification
for this
2) Exposes a max size for the pool, as stated, by default this is unbounded, for most
servers limiting the size of the pool is going to have 0 effects given how fast chat
is actually processed, this is honestly really just exposed for the misnomers or people
who just wanna ensure that this won't grow over a specific size if chat gets stupidly active
2022-09-18 06:33:17 +01:00
Lulu13022002
a45d2c6068 Add source block to BlockPhysicsEvent 2022-08-07 22:16:36 +02:00
Nex
476de68a14 Added byte array serialization/deserialization for PersistentDataContainers 2022-02-24 16:28:07 +01:00
Lulu13022002
b24b187864 Missing effect cause 2022-08-16 19:44:55 +02:00
Lulu13022002
bde548833e Missing eating regain reason 2022-08-05 12:16:51 +02:00
Jake Potrebic
75c623590f Fire EntityChangeBlockEvent in more places
Co-authored-by: ChristopheG <61288881+chrisgdt@users.noreply.github.com>
Co-authored-by: maxcom1 <46265094+maxcom1@users.noreply.github.com>
2021-08-09 20:45:46 -07:00
MWHunter
2aae5e2218 Stop large look changes from crashing the server
Co-authored-by: Jaren Knodel <Jaren@Knodel.com>
2022-08-24 09:54:11 -04:00
José Miguel Moreno
a72acfb245 Fix plugin loggers on server shutdown 2021-06-05 13:45:15 +02:00
Josh Roy
ebdde69c39 Add NamespacedKey biome methods
Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com>
2022-08-14 12:23:11 -04:00
Andrew Steinborn
a1051ff388 Add Velocity IP Forwarding Support
While Velocity supports BungeeCord-style IP forwarding, it is not secure. Users
have a lot of problems setting up firewalls or setting up plugins like IPWhitelist.
Further, the BungeeCord IP forwarding protocol still retains essentially its original
form, when there is brand new support for custom login plugin messages in 1.13.

Velocity's modern IP forwarding uses an HMAC-SHA256 code to ensure authenticity
of messages, is packed into a binary format that is smaller than BungeeCord's
forwarding, and is integrated into the Minecraft login process by using the 1.13
login plugin message packet.
2018-10-08 14:36:14 -04:00
Owen1212055
63ca8a9302 Block Ticking API 2021-12-26 13:23:46 -05:00
chickeneer
1158ad3a6a Fix suggest command message for brigadier syntax exceptions
This is a bug accidentally introduced in upstream CB
2022-08-01 20:13:02 -05:00
Owen1212055
19d28ade48 Collision API 2021-10-06 20:10:44 -04:00
Owen1212055
dede55eaad Add and fix missing BlockFadeEvents
Beyond calling the BlockFadeEvent in more places, this patch also aims
to pass the proper replacement state to the event, specifically for
potentially waterlogged block states fading.

Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
2022-07-21 12:07:54 -04:00
Owen1212055
44f8b39a2c Custom Chat Completion Suggestions API 2022-07-30 11:23:05 -04:00
Owen1212055
ce7cf07354 Warn on plugins accessing faraway chunks 2022-07-29 12:35:19 -04:00
Owen1212055
8a49cbc3a7 Send block entities after destroy prediction
Minecraft's prediction system does not handle block entities, so if we are manually sending block entities during
block breaking we need to set it after the prediction is finished. This fixes block entities not showing when cancelling the BlockBreakEvent.
2022-06-25 19:45:20 -04:00
Jake Potrebic
103a5ea12b Don't use level random in entity constructors
Paper makes the entity random thread-safe
and constructing an entity off the main thread
should be supported. Some entities (for whatever
reason) use the level's random in some places.
2022-07-10 14:13:22 -07:00
Jake Potrebic
e7c3763785 Add EntityPortalReadyEvent 2021-05-12 04:30:42 -07:00
Owen1212055
8cc67f527e More Teleport API 2021-09-05 12:15:59 -04:00
Jake Potrebic
4be7165c83 Fix Bee flower NPE 2022-07-06 14:59:38 -07:00
Jake Potrebic
ce5660a8e9 Add various missing EntityDropItemEvent calls 2021-07-20 21:35:47 -07:00
Spottedleaf
39156be36a Do not sync load chunk for dynamic game event listener registration
These can be called while an entity is being added to the world,
and if the entity is being added from a chunk load context the
sync load will block indefinitely (because the chunk load context
is for completing the chunk to FULL).

This does raise questions about the current system for these
dynamic registrations, as it looks like there is _zero_ logic
to account for the case where the chunk is _not_ currently loaded
and then later loaded.
2022-07-03 22:31:37 -07:00
u9g
78f9a96605 Add Player#getFishHook 2022-06-14 19:36:10 -04:00
Jake Potrebic
7cee8d5e02 Fix CCE for SplashPotion and LingeringPotion spawning
Remove in 1.19 along with the SplashPotion and
LingeringPotion interfaces
2022-04-21 18:18:02 -07:00
Owen1212055
dd19a41799 Prevent empty items from being added to world
The previous solution caused a bunch of bandaid fixes inorder to resolve edge cases where minecraft/the api might spawn items that are air.
Just simply prevent them from being added to the world instead.
2022-06-15 21:52:57 -04:00
Jake Potrebic
5cf40e45af Don't broadcast messages to command blocks
Previously the broadcast method would update the last output
in command blocks, and if called asynchronously, would throw
an error
2022-06-16 14:22:56 -07:00
Owen1212055
1f68916ac9 Nameable Banner API 2022-04-07 17:49:25 -04:00
Owen1212055
24d356944c Add missing important BlockStateListPopulator methods
Without these methods it causes exceptions due to these being used by certain feature generators.
2022-06-12 13:25:52 -04:00
Jake Potrebic
f2dcecf4d9 Add option for strict advancement dimension checks
Craftbukkit attempts to translate worlds that use the
same generation as the Overworld, The Nether, or The End
to use those dimensions when checking the `changed_dimension`
criteria trigger, or whether to trigger the `NETHER_TRAVEL`
distance trigger. This adds a config option to ignore that
and use the exact dimension key of the worlds involved.
2022-06-12 11:47:24 -07:00
nopjar
97cab1d4a4 Add WardenAngerChangeEvent 2022-06-12 02:26:04 +02:00
Owen1212055
edcdf97059 Dont resent entity on art update 2022-06-08 11:04:47 -04:00
Jake Potrebic
6a51d13dbf Throw exception on world create while being ticked
There are no plans to support creating worlds while worlds are
being ticked themselvess.
2022-03-22 12:44:30 -07:00
Owen1212055
4c16855bdd Prevent entity loading causing async lookups 2022-03-06 11:09:09 -05:00
Nassim Jahnke
1be6fca1f1 Disable component selector resolving in books by default 2022-06-02 20:35:58 +02:00
Owen1212055
37bf078394 Sanitize sent BlockEntity NBT 2021-12-03 16:55:50 -05:00
Jake Potrebic
01eab6be00 Fix FurnaceInventory for smokers and blast furnaces 2022-01-01 23:11:26 -08:00
Jake Potrebic
c3224863eb Fix OfflinePlayer#getBedSpawnLocation
When calling getBedSpawnLocation on an
instance of CraftOfflinePlayer the world was incorrect
due to the logic for reading the NBT not being up-to-date.
2022-05-30 16:03:36 -07:00
PanSzelescik
01cb81413b Add support for Proxy Protocol 2022-04-07 16:13:39 +02:00
Owen1212055
dedddea65d Expand FallingBlock API
- add auto expire setting
- add setter for block data
- add accessors for block state

== AT ==
public net.minecraft.world.entity.item.FallingBlockEntity blockState

Co-authored-by: Lukas Planz <lukas.planz@web.de>
2021-12-05 14:58:17 -05:00
Noah van der Aa
8c8e7968ab Don't tick markers
Fixes https://github.com/PaperMC/Paper/issues/7276 and https://github.com/PaperMC/Paper/issues/8118
by using a config option that, when set to false, does not add markers to the entity
tick list at all and ignores them in Spigot's activation range checks. The entity tick
list is only used in the tick and tickPassenger methods, so we can safely not add the
markers to it. When the config option is set to true, markers are ticked as normal.
2022-01-07 11:58:26 +01:00
u9g
2082797618 Add PlayerStopUsingItemEvent 2022-05-03 20:41:37 -04:00
Jake Potrebic
954f57e596 fix powder snow cauldrons not turning to water
Powder snow cauldrons should turn to water when
extinguishing an entity
2021-12-30 14:02:13 -08:00
Jake Potrebic
f40a8e5f0c Fire CauldronLevelChange on initial fill
Also don't fire level events or game events if stalactite
drip is cancelled
2022-03-29 13:46:23 -07:00
Jake Potrebic
2e86b22228 Add EntityDyeEvent and CollarColorable interface 2022-03-18 21:15:55 -07:00
Jake Potrebic
fc19bf4dc5 Trigger bee_nest_destroyed trigger in the correct place 2022-02-02 13:50:06 -08:00
Gero
e80bb1adca Fix CME in CraftPersistentDataTypeRegistry 2021-10-02 20:08:30 +02:00
Shane Freeder
2bf4b6e53d WorldCreator#keepSpawnLoaded 2021-07-03 21:18:28 +01:00
HexedHero
bc02501cc2 Expand PlayerItemDamageEvent 2022-04-10 06:26:32 +01:00