Commit graph

3708 commits

Author SHA1 Message Date
Flo0
35f6f25e78 API for checking sent chunks 2024-04-08 16:43:16 +02:00
Doc
e95dccb515 Add AnvilView#bypassEnchantmentLevelRestriction
Anvils, by default, limit applied enchantment levels to their respective
maximum level. The added API enables plugins to disable this behaviour,
allowing enchantments that are overleveled to be applied via the anvil.
2024-10-06 16:46:36 -03:00
Lulu13022002
f207099765 Add Offline PDC API 2022-07-09 17:28:42 +02:00
Axionize
66e26ebe48 Void damage configuration API 2024-09-29 14:20:42 -07:00
Tamion
8b8acbb898 Add recipeBrewTime
== AT ==
public net.minecraft.world.inventory.BrewingStandMenu brewingStandData
2024-09-15 19:17:12 +02:00
Jake Potrebic
cea3e6b65b Improve entity effect API 2024-09-27 17:13:16 -07:00
masmc05
da18fc4d93 Add enchantWithLevels with enchantment registry set 2024-09-25 16:26:04 +03:00
strnq
883f50eb19 Validate slot in PlayerInventory#setSlot
The CraftPlayerInventory implementation sends a container_set_slot
packet to the client which will error if an invalid slot is passed to
the setSlot method, making a validation necessary over simply silently
ignoring invalid slot values.
2024-09-14 12:53:13 +03:00
masmc05
1cd7fd4eec Item serialization as json 2024-08-11 03:01:52 +03:00
Jake Potrebic
90bc5f1e0b Add FeatureFlag API 2024-05-29 19:50:21 -07:00
okx-code
ad8ae89c95 Add enchantment seed update API 2024-08-17 13:02:45 +01:00
Lulu13022002
52acc18e4f Leashable API 2024-06-22 21:17:54 +02:00
Jake Potrebic
d72defffba Add even more Enchantment API
In a separate patch because RegistryKeySet is used
and the previous "more enchant api" patch is before that.
2024-07-19 08:42:45 -07:00
Jake Potrebic
f6f6664716 Add API for CanPlaceOn and CanDestroy NBT values 2018-09-12 18:53:55 +03:00
Tamion
92fa922afd Fix PickupStatus getting reset 2024-07-21 19:11:22 +02:00
Jason Penilla
91b690c240 Add plugin info at startup 2024-07-18 18:44:28 -07:00
Jake Potrebic
4ef8b976c9 Add ItemType#getItemRarity 2024-07-09 18:37:37 -07:00
Jake Potrebic
471be1b4da fix horse inventories
Horse inventories now combine 2 inventories (like
result inventories).

== AT ==
public net/minecraft/world/inventory/HorseInventoryMenu SLOT_BODY_ARMOR
2024-07-06 13:57:10 -07:00
Jake Potrebic
9f2cf09ec5 Make a PDC view accessible directly from ItemStack 2024-06-12 10:29:40 -07:00
Jake Potrebic
c441981c54 Proxy ItemStack to CraftItemStack 2024-05-14 11:57:43 -07:00
Jake Potrebic
9d89ebb121 Properly remove the experimental smithing inventory type 2023-06-08 14:45:18 -07:00
Jake
d7b5168a81 Fix removing recipes from RecipeIterator
== AT ==
public net.minecraft.world.item.crafting.RecipeMap byKey
2024-06-15 18:50:18 +01:00
Owen1212055
84d07ca942 Suspicious Effect Entry API
Exposes a new suspicious effect entry type that properly represents
storable effects in the context of suspicious effects as they only
define the potion effect type and duration.

This differentiates them from the existing PotionEffect API found in
bukkit and hence clarifies that storable values in the parts of the API
in which it replaces PotionEffect.

Co-authored-by: Yannick Lamprecht <yannicklamprecht@live.de>
2024-03-03 19:43:40 +01:00
Bjarne Koll
99cd3b6813 Adopt MaterialRerouting
Adopts the paper-api to the material rerouting infrastructure introduced
by upstream.
2024-06-13 11:02:36 +02:00
Nassim Jahnke
c6f962ba54 Prevent sending oversized item data in equipment and metadata
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2021-12-01 12:36:25 +01:00
Jason Penilla
ce6fd58a5e Allow Bukkit plugin to use Paper PluginLoader API 2024-05-21 13:18:15 -07:00
Jake Potrebic
e1b7819229 Fix equipment slot and group API
Adds the following:
- Add test for EquipmentSlotGroup
- Expose LivingEntity#canUseSlot

Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
2024-05-22 10:01:19 -07:00
Jake Potrebic
5d843f3120 Fix issues with Recipe API 2024-05-12 15:49:36 -07:00
Owen1212055
977543c545 Brigadier based command API
== AT ==
public net.minecraft.commands.arguments.blocks.BlockInput tag
public net.minecraft.commands.arguments.DimensionArgument ERROR_INVALID_VALUE
public net.minecraft.server.ReloadableServerResources registryLookup
public net.minecraft.server.ReloadableServerResources

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Marc Baloup <marc.baloup@laposte.net>
2022-08-01 22:50:34 -04:00
SoSeDiK
b50682ab2b More Chest Block API
== AT ==
public net.minecraft.world.level.block.ChestBlock isBlockedChestByBlock(Lnet/minecraft/world/level/BlockGetter;Lnet/minecraft/core/BlockPos;)Z
2024-05-01 08:22:13 +03:00
Jake Potrebic
31725bc039 General ItemMeta fixes
== AT ==
private-f net/minecraft/world/item/ItemStack components
public net/minecraft/world/food/FoodProperties DEFAULT_EAT_SECONDS
public org/bukkit/craftbukkit/block/CraftBlockStates getBlockState(Lorg/bukkit/World;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/block/entity/BlockEntity;)Lorg/bukkit/craftbukkit/block/CraftBlockState;
public net/minecraft/world/level/block/entity/BlockEntity saveId(Lnet/minecraft/nbt/CompoundTag;)V

Co-authored-by: GhastCraftHD <julius.gruenberg@leghast.de>
2024-04-27 20:56:17 -07:00
nostalfinals
445e9a65fb Added API to get player ha proxy address 2024-04-08 23:24:38 +08:00
SoSeDiK
d5b93a0167 Expose #hasColor to leather armor 2024-05-01 10:58:50 +03:00
Jake Potrebic
ae4acc6aeb improve checking handled tags in itemmeta 2023-07-10 16:10:15 -07:00
Lulu13022002
ee130088cc Fix damage modifier inconsistencies
Affect the falling stalactite damage type where the
reduction is not applied like in Vanilla.
Additionally fix the "is_freezing" damage type tag.
2024-04-27 21:51:58 +02:00
Jake Potrebic
97a4aeda2d Fix ItemFlags
Re-adds missing functionality for HIDE_DESTROYS and
HIDE_PLACED_ON. Also adds new flag in HIDE_STORED_ENCHANTS
which was split from HIDE_ADDITIONAL_TOOLTIP.

== AT ==
public net.minecraft.world.item.AdventureModePredicate predicates
2024-04-27 12:16:38 -07:00
SoSeDiK
4c8c367eee Deep clone nbt tags in PDC 2022-05-26 03:30:05 +03:00
Nassim Jahnke
3758965f88 Improve tag parser handling 2024-02-05 11:54:04 +01:00
Jake Potrebic
6c400a907b Fix possible StackOverflowError and NPE for some dispenses
For saddles, carpets, horse armor, and chests for horse-likes
a BlockDispenseEvent handler that always mutated the item without
changing the type would result in a SO error because when it went
to find the replacement dispense behavior (since the item "changed")
it didn't properly handle if the replacement was the same instance
of dispense behavior.

Additionally equippable mob heads, wither skulls, and carved pumpkins
are subject to the same possible error.

Furthermore since 1.21.2, the DISPENSER_REGISTRY map doesn't have a default
return value anymore and some dispense behaviors like equippable and
regular items will not have a defined behavior in that map and might throw
a NPE in that case.
2022-10-29 17:02:42 -07:00
Jake Potrebic
d42ef390ea Fix DamageSource API
Uses the correct entity in the EntityDamageByEntity event
Returns the correct entity for API's DamageSource#getCausingEntity
2024-03-09 14:13:04 -08:00
leguan
046fc5171f Add onboarding message for initial server start 2024-03-10 20:10:41 +01:00
Jake Potrebic
e06fe76018 More Raid API
== AT ==
public net.minecraft.world.entity.raid.Raid raidEvent
2022-03-04 09:46:33 -08:00
Owen1212055
70cd7cfb23 Deprecate ItemStack#setType 2024-03-26 21:42:23 -04:00
vicisacat
93c49bbe31 Expanded Hopper API
== AT ==
public net.minecraft.world.level.block.entity.HopperBlockEntity setCooldown(I)V
public net.minecraft.world.level.block.entity.HopperBlockEntity cooldownTime
2024-03-15 17:35:40 +01:00
Yannick Lamprecht
61c73ee83e improve BanList types 2024-02-10 20:50:01 +01:00
David Mayr
10a15650f1 add number format api
== AT ==
public net.minecraft.network.chat.numbers.FixedFormat value
public net.minecraft.network.chat.numbers.StyledFormat style
2023-12-16 10:40:29 +01:00
vicisacat
380cb52e43 Add FluidState API 2023-11-17 20:22:43 +01:00
Warrior
b5cda1d98f Add getChunkSnapshot includeLightData parameter 2024-02-10 10:03:48 +01:00
Yannick Lamprecht
a2bbaf6744 ItemStack Tooltip API 2024-01-22 13:27:30 +01:00
Jake Potrebic
ef5bac21b2 Add Lifecycle Event system
This event system is separate from Bukkit's event system and is
meant for managing resources across reloads and from points in the
PluginBootstrap.
2023-07-18 17:49:38 -07:00
Luis
e5c2af7f5e Add api for spawn egg texture colors 2024-01-11 19:58:23 +01:00
Jake Potrebic
597ce940a4 Add PlayerTradeEvent and PlayerPurchaseEvent
Co-authored-by: Alexander <protonull@protonmail.com>
2020-07-02 16:12:10 -07:00
FireInstall
0449ede4a6 Expose LootTable of DecoratedPot 2024-01-20 16:20:06 +01:00
Nassim Jahnke
898bf90054 Fixup NamespacedKey handling 2024-01-06 14:31:00 +01:00
Owen1212055
21837e419b Properly handle experience dropping on block break
This causes spawnAfterBreak to spawn xp by default, removing the need to manually add xp wherever this method is used.
For classes that use custom xp amounts, they can drop the resources with disabling
2023-12-30 15:00:06 -05:00
Jake Potrebic
66ed50064c Add drops to shear events 2021-05-18 12:32:02 -07:00
Lukas Planz
57894618cf Add experience points API 2023-09-05 20:34:20 +02:00
Jake Potrebic
5b1ab02f39 Improve Registry 2023-12-20 02:03:05 -08:00
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