Commit Graph

3750 Commits

Author SHA1 Message Date
Jake Potrebic a264c42314 add more scoreboard API 2023-12-16 14:46:01 -08:00
Jake Potrebic ddbfcd4403 Restore vanilla entity drops behavior
Instead of just tracking the itemstacks, this tracks with it, the
action to take with that itemstack to apply the correct logic
on dropping the item instead of generalizing it for all dropped
items like CB does.
2022-03-22 09:34:41 -07:00
hyper1423 ec3623bcc2 Fix CraftMetaItem#getAttributeModifier duplication check 2023-12-03 07:38:09 +09:00
Jake Potrebic 745260143e Add Structure check API 2023-03-27 10:20:00 -07:00
Jake Potrebic fff5d44a12 Don't fire sync events during worldgen
Fixes EntityPotionEffectEvent
Fixes EntityPoseChangeEvent

Asynchronous chunk generation provides an opportunity for things
to happen async that previously fired synchronous-only events. This
patch is for mitigating those issues by various methods.

Also fixes correctly marking/clearing the entity generation flag.
This patch sets the generation flag anytime an entity is created
via StructureTemplate before loading from NBT to catch uses of
the flag during the loading logic. This patch clears the generation
flag from an entity when added to a ServerLevel for the situation
where generation happened directly to a ServerLevel and the
entity still has the flag set.
2023-11-23 10:33:25 -08:00
booky10 4853ebd729 Fix missing event call for entity teleport API 2023-11-12 05:09:47 +01:00
TonytheMacaroni c29a8dc160 Add UUID attribute modifier API 2023-11-09 20:34:44 -05:00
Tamion cb16d3df2c Fix strikeLightningEffect powers lightning rods and clears copper 2023-09-30 12:36:14 +02:00
TonytheMacaroni 4866ee899b Add predicate for blocks when raytracing 2023-09-06 19:24:16 -04:00
TrollyLoki d30ecac57d Add API to get the collision shape of a block before it's placed 2023-10-11 00:45:53 -04:00
David Scandurra d1685ef68f Allow null itemstack for Player#sendEquipmentChange 2023-10-25 20:36:25 +02:00
booky10 2b6b81bde9 Add player idle duration API
Implements API for getting and resetting a player's idle duration.
2023-10-14 03:11:11 +02:00
LemonCaramel de8998e411 Fix UnsafeValues#loadAdvancement 2023-09-24 20:19:44 +09:00
booky10 efc4457fa1 Update entity data when attaching firework to entity
== AT ==
public net.minecraft.world.entity.projectile.FireworkRocketEntity DATA_ATTACHED_TO_TARGET
2023-08-27 16:11:31 +02:00
Jake Potrebic 48d9ecee25 Fix team sidebar objectives not being cleared
Objectives displayed in team sidebars were not cleared when switching
scoreboards. If a player's scoreboard has a displayed objective for the
'gold' sidebar, and their scoreboard was switched to one where they
still had a 'gold' team, it would still be displayed
2023-09-23 22:31:54 -07:00
Jake Potrebic cfe07dca76 Fix NPE in AdvancementProgress#getDateAwarded 2023-09-23 22:07:15 -07:00
Jake Potrebic 183683ecc5 Add missing InventoryHolders to inventories 2022-01-24 00:09:02 -08:00
Lulu13022002 bf607b1e23 Fix silent equipment change for mobs 2023-08-31 17:32:48 +02:00
Aeltumn 675028a699 Allow proper checking of empty item stacks 2023-08-28 13:44:09 +02:00
Jake Potrebic d300049246 Add titleOverride to InventoryOpenEvent 2022-03-04 12:45:03 -08:00
Aeltumn 1fc4ca9178 Implement OfflinePlayer#isConnected 2023-08-24 13:05:30 +02:00
Jake Potrebic 4527215d8e More DragonBattle API
== AT ==
public net.minecraft.world.level.dimension.end.EndDragonFight GATEWAY_COUNT
public net.minecraft.world.level.dimension.end.EndDragonFight gateways
public net.minecraft.world.level.dimension.end.EndDragonFight respawnCrystals
public net.minecraft.world.level.dimension.end.EndDragonFight spawnNewGateway(Lnet/minecraft/core/BlockPos;)V
2022-12-18 13:40:05 -08:00
SoSeDiK 1cb5b6e838 Expand Pose API 2023-01-11 20:59:01 +02:00
LemonCaramel e39a789ec6 Fix NPE on Boat getStatus
Boat status is null until the entity is added to the world and the tick() method is called.

== AT ==
public net.minecraft.world.entity.vehicle.AbstractBoat getStatus()Lnet/minecraft/world/entity/vehicle/AbstractBoat$Status;
2023-04-10 20:48:26 +09:00
aerulion edb4225d90 Add BlockFace to BlockDamageEvent 2023-08-21 04:36:07 +02:00
Corey Shupe 53fab9663b Add Listing API for Player 2023-01-11 16:40:39 -05:00
Jake Potrebic 597cb633e8 Properly handle BlockBreakEvent#isDropItems
Setting whether a block break dropped items controlled
far more than just whether blocks dropped, like stat increases
food consumption, turtle egg count decreases, ice to water
conversions and beehive releases
2023-03-04 10:52:52 -08:00
Jake Potrebic e46ee8e55e Deprecate and replace methods with old StructureType 2022-12-10 17:52:38 -08:00
Jake Potrebic b690edd273 API for an entity's scoreboard name
Was obtainable through different methods, but you had to use different
methods depending on the implementation of Entity you were working with.
2023-07-09 11:55:02 -07:00
Oliwier Miodun c6e45b313c SculkCatalyst bloom API
== AT ==
public net.minecraft.world.level.block.entity.SculkCatalystBlockEntity$CatalystListener bloom(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/util/RandomSource;)V
2023-07-10 17:59:42 +02:00
Jake Potrebic 8bb902842c Bandaid fix for Effect
Effect or LevelEvent needs to be replaced
but ideally after the enum PR has been merged
upstream. Until then, this test and these fixes
should address all the known issues with them
2023-07-28 15:02:44 -07:00
Noah van der Aa 3b2125b47d Fix custom statistic criteria creation 2023-08-12 15:33:49 +02:00
Jake Potrebic 06b00246a2 API for updating recipes on clients 2021-08-21 17:25:38 -07:00
Florian Schmidt 8a4e4f4066 Use correct seed on api world load 2023-07-28 14:14:35 +02:00
Jake Potrebic d7a197deee Respect randomizeData on more entities when spawning
* ItemEntity
* PrimedTNT
* FireworkRocketEntity
* ExperienceOrb
2023-07-13 16:10:07 -07:00
Jake Potrebic 36ae0bcfea Only capture actual tree growth 2021-08-21 18:53:03 -07:00
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