Commit Graph

3814 Commits

Author SHA1 Message Date
Gameoholic 1754e3426c Fix rotation when spawning display entities 2023-07-30 13:30:34 +03:00
Spottedleaf a13bff4a5f Folia scheduler and owned region API
Pulling Folia API to Paper is primarily intended for plugins
that want to target both Paper and Folia without unnecessary
compatibility layers.

Add both a location based scheduler, an entity based scheduler,
and a global region scheduler.

Owned region API may be useful for plugins which want to perform
operations over large areas outside of the buffer zone provided
by the regionaliser, as it is not guaranteed that anything
outside of the buffer zone is owned. Then, the plugins may use
the schedulers depending on the result of the ownership check.
2023-06-17 11:52:52 +02:00
Golfing8 9fe671127a ExperienceOrb should call EntitySpawnEvent 2023-05-08 09:18:17 -04:00
Jake Potrebic 90366d505a Fix possible NPE on painting creation 2023-06-24 09:42:53 -07:00
Jake Potrebic 5b7b25844e Fix BanList API 2023-07-04 11:27:10 -07:00
Jake Potrebic 61ff05d0d5 fix item meta for tadpole buckets 2023-07-11 11:22:30 -07:00
Jake Potrebic 5b97ae9832 More Sign Block API
Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
2023-06-23 12:16:28 -07:00
Lulu13022002 8bf9982317 Call missing BlockDispenseEvent 2022-10-29 15:41:56 +02:00
by77er 6702fe7546 Add event for player editing sign 2023-06-12 12:56:46 -04:00
Jake Potrebic bd6baf7618 Add method to remove all active potion effects 2023-06-17 13:17:25 -07:00
Lulu13022002 d22d2a19de Fix sniffer removeExploredLocation
Add support to remove explored location in different world
2023-06-11 19:02:46 +02:00
TheMeinerLP a652ca1f5c Don't enforce icanhasbukkit default if alias block exists 2023-06-13 16:10:59 +02:00
Malfrador 6c30e5b15b Add transient modifier API 2023-05-31 23:30:00 +02:00
Jake Potrebic e48a6a04cc Refresh ProjectileSource for projectiles
Makes sure the value returned by Projectile#getShooter in
the API matches the owner UUID specified in the entity nbt.
Previously, after the entity reloaded, Projectile#getShooter
would return null, while the entity still had an owner.

Also fixes setting the shooter/owner to null actually
clearing the owner.

Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
2023-05-30 12:59:10 -07:00
Jake Potrebic 79ffc3e056 Expand PlayerItemMendEvent 2022-01-20 18:11:20 -08:00
Warrior 605fb41674 More accurate isInOpenWater impl
For fishing hooks, the openWater field is true by default, and only calculated when a "fish" is approaching the bobber.
This patch changes the API impl to calculate the open water state itself instead of returning this field.

Relevant link: https://github.com/PaperMC/Paper/issues/9131

== AT ==
public net.minecraft.world.entity.projectile.FishingHook calculateOpenWater(Lnet/minecraft/core/BlockPos;)Z
public net.minecraft.world.entity.projectile.FishingHook outOfWaterTime
2023-05-07 22:33:50 +02:00
GodOfPro 3079b71627 Add Mob Experience reward API 2023-04-11 16:31:39 +04:30
Jake Potrebic 71e08c0a8d Fix SpawnEggMeta#get/setSpawnedType 2023-02-23 13:19:13 -08:00
Owen1212055 2e77028ed4 Add Shearable API 2021-10-17 15:39:48 -04:00
Jake Potrebic 6e85945a4b Correctly handle ArmorStand invisibility 2023-03-05 14:38:21 -08:00
Jake Potrebic 006e8346e9 Fix HumanEntity#drop not updating the client inv
== AT ==
public net.minecraft.server.level.ServerPlayer containerSynchronizer
2021-10-10 18:18:01 -07:00
Lulu13022002 ab040d534d Add EntityFertilizeEggEvent 2022-06-24 12:39:34 +02:00
TheTuso d1abd737aa Add Entity Body Yaw API 2023-02-02 16:40:41 +01:00
Jake Potrebic db1df52d4c Fix force-opening enchantment tables 2023-01-26 16:19:26 -08:00
Josh Roy 933e2e1efa Remove CraftItemStack#setAmount null assignment
This creates a problem with Paper's item serialization
api where deserialized items, which are internally
created as a CraftItemStack, will be completely lost if
#setAmount(0) is invoked (since the underlying handle
is set to null), while a regular Bukkit ItemStack
simply sets the amount field to zero, retaining the
item's data.

Vanilla treats items with zero amounts the same as items
with less than zero amounts, so this code doesn't create
a problem with operations on the vanilla ItemStack.
2023-01-23 19:19:01 -05:00
Lama06 b8ad599ceb Win Screen API
== AT ==
public net.minecraft.server.level.ServerPlayer seenCredits
2023-01-21 13:53:23 +01:00
TreyRuffy 602506fa98 Flying Fall Damage 2022-05-27 02:26:08 -06:00
NonSwag d9107f8c61 Fix NPE on Allay#stopDancing while not dancing 2022-12-06 23:04:21 +01:00
Jake Potrebic b141cd3d99 Improve logging and errors
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2022-12-14 15:52:11 -08:00
dawon f64904e777 Add Sneaking API for Entities 2022-10-19 23:31:53 +02:00
Jake Potrebic 2b90721a45 fix Instruments
properly handle Player#playNote
2022-12-09 01:47:23 -08:00
Shane Freeder 26fe3d0cff Fix premature player kicks on shutdown
When the server is stopping, the default execution handler method will throw a
RejectedExecutionException in order to prevent further execution, this causes
us to lose the actual kick reason. To mitigate this, we'll use a seperate marked
class in order to gracefully ignore these.
2024-04-11 16:37:44 +01:00
Noah van der Aa e151b6fc3f Friction API 2021-09-15 20:44:22 +02:00
Jake Potrebic 4a416ca85a ItemStack damage API
Adds methods notify clients about item breaks and
to simulate damage done to an itemstack and all
the logic associated with damaging them

== AT ==
public net.minecraft.world.entity.LivingEntity entityEventForEquipmentBreak(Lnet/minecraft/world/entity/EquipmentSlot;)B
2022-05-08 13:35:45 -07:00
Jake Potrebic 0e9f28fe68 Fix async entity add due to fungus trees 2022-03-18 21:30:00 -07:00
Warrior ba6112b959 Add /paper dumplisteners command
Co-authored-by: TwoLeggedCat <80929284+TwoLeggedCat@users.noreply.github.com>
2022-10-25 21:15:37 +02:00
Lulu13022002 533bc0c468 More vanilla friendly methods to update trades 2022-10-16 16:12:49 +02:00
dawon 9db4bb7ac6 Add Player Warden Warning API
== AT ==
public net.minecraft.server.level.ServerPlayer wardenSpawnTracker
public net.minecraft.world.entity.monster.warden.WardenSpawnTracker ticksSinceLastWarning
public net.minecraft.world.entity.monster.warden.WardenSpawnTracker cooldownTicks
public net.minecraft.world.entity.monster.warden.WardenSpawnTracker increaseWarningLevel()V
2022-10-15 00:46:57 +02:00
Owen1212055 7c891287ed Add Moving Piston API 2021-12-04 13:29:36 -05:00
Noah van der Aa 5c260c7e51 Detect headless JREs
Crashes caused by the missing AWT dependency come up in the support channels fairly often.
This patch detects the missing dependency and stops the server with a clear error message,
containing a link to instructions on how to install a non-headless JRE.
2022-10-22 14:47:45 +02:00
MelnCat 95a2e4ed32 Add entity knockback API 2022-10-16 12:10:17 -07:00
SoSeDiK 7224eecfb1 Elder Guardian appearance API 2022-10-11 20:38:47 +03:00
Jake Potrebic e56f757b1c Correctly handle interactions with items on cooldown 2022-06-16 21:57:02 -07:00
MelnCat 492ebf1459 Add getDrops to BlockState
Originally added isPreferredTool to BlockData but
upstream added that.
2022-08-12 23:24:37 -07:00
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
Nex 476de68a14 Added byte array serialization/deserialization for PersistentDataContainers 2022-02-24 16:28:07 +01: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
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