Lulu13022002
d4a957849c
Experimental annotation changes ( #12028 )
2025-01-30 20:02:14 +01:00
masmc05
e82f7e6bb6
[ci skip] Fix Inventory#setMaxStackSize jd ( #11968 )
2025-01-14 13:43:28 +01:00
Miles
c94922514a
MenuType API addition InventoryView Builders ( #11816 )
2025-01-11 20:21:24 +01:00
Jake Potrebic
ac3aaa248b
Don't use delayed registries in impl anywhere ( #11918 )
2025-01-11 20:02:28 +01:00
Jake Potrebic
ca8709b30f
Fix more incorrect array nullability annotations ( #11836 )
2024-12-27 22:24:16 +01:00
masmc05
a07cec16f8
Add effective name to ItemStack ( #11770 )
2024-12-25 21:56:24 +01:00
masmc05
62d4130bba
[ci skip] Fix Inventory#addItem javadoc mismatch with behaviour ( #11782 )
2024-12-23 16:20:12 +01:00
Lulu13022002
5922e6334b
fix allowPermanentBlockBreakExploits config
2024-12-18 23:35:47 +01:00
Owen1212055
30b4dedabb
DataComponent API
...
Exposes the data component logic used by vanilla ItemStack to API
consumers as a version-specific API.
The types and methods introduced by this patch do not follow the general
API deprecation contracts and will be adapted to each new minecraft
release without backwards compatibility measures.
2024-04-28 19:53:06 -04:00
Doc
65f5b7a4b7
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:45:20 -03:00
Tamion
7b11ab058b
Add recipeBrewTime
2024-09-20 17:39:22 +02:00
masmc05
4a86a6e4ee
Add enchantWithLevels with enchantment registry set
2024-09-25 16:26:04 +03:00
Jake Potrebic
0f47ed5252
Add FeatureFlag API
2023-03-09 11:24:43 -08:00
okx-code
c3bccfb1d6
Add enchantment seed update API
2024-08-17 13:02:56 +01:00
Mark Vainomaa
f14d6e62da
Add an API for CanPlaceOn and CanDestroy NBT values
2018-09-12 18:53:35 +03:00
Jake Potrebic
cb339661cc
Make a PDC view accessible directly from ItemStack
2024-06-12 10:29:30 -07:00
Jake Potrebic
9e5e007003
Proxy ItemStack to CraftItemStack
2024-05-14 11:57:51 -07:00
Bjarne Koll
fcc777a0a8
Introduce registry entry and builders
...
Co-authored-by: kokiriglade <git@kokirigla.de >
2024-06-13 22:35:05 +02:00
Jake Potrebic
f09feba0f4
General ItemMeta fixes
2024-05-28 19:59:01 -07:00
Jake Potrebic
962554a0de
Fix equipment slot and group API
...
Adds the following:
- Add missing 'body' slot group
- Expose LivingEntity#canUseSlot
Co-authored-by: SoSeDiK <mrsosedik@gmail.com >
2024-05-22 10:00:19 -07:00
Jake Potrebic
953ba33fc1
Fix issues with recipe API
...
Improves the validation when creating recipes
and RecipeChoices to closer match what is
allowed by the Codecs and StreamCodecs internally.
Adds RecipeChoice#empty which is allowed in specific
recipes and ingredient slots.
Also fixes some issues regarding mutability of both ItemStack
and implementations of RecipeChoice.
Also adds some validation regarding Materials passed to RecipeChoice
being items.
2024-05-12 10:42:42 -07:00
SoSeDiK
5e1dc7cf47
Expose #hasColor to leather armor
2024-05-01 10:58:50 +03:00
Jake Potrebic
b0a676ba62
Fix ItemFlags
...
Adds new flag in HIDE_STORED_ENCHANTS which was split
from HIDE_ADDITIONAL_INFO. Adds a migration to account for
this, adding the new flag if the itemstack is old and had the
old flag.
2024-04-27 13:28:17 -07:00
Owen1212055
4092b60fa0
Deprecate ItemStack#setType
2024-02-29 17:54:26 -05:00
Owen1212055
1725de0232
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:45:52 +01:00
Yannick Lamprecht
de70580ea9
ItemStack Tooltip API
2024-01-22 13:27:18 +01:00
Jake Potrebic
17df649613
Add BlockStateMeta#clearBlockState
2024-01-11 12:41:54 -08:00
Jake Potrebic
d513222b59
Improve Registry
...
Adds Registry#getKey(Object) which should be the
primary way people get the key for an object. Registry
items need to exist without having a key and so
getKey() methods on Keyed objects that have a registry
are marked as Deprecated or Obsolete.
2023-12-20 02:03:10 -08:00
Jake Potrebic
1ab1d0f10a
Experimental annotations change
2023-12-09 11:47:53 -08:00
MrPowerGamerBR
41ca517939
Remove unnecessary durability check in "ItemStack#isSimilar(...)"
...
By removing this check we avoid unnecessarily allocating useless `ItemMeta` objects if we are comparing two items, or one of the two items, that don't have any durability. Don't worry, the durability of the item is checked when it checks if both item metas are equal.
This is a leftover from when checking for the item's durability was "free" because the durability was stored in the `ItemStack` itself, this [was changed in Minecraft 1.13](https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/f8b2086d60942eb2cd7ac25a2a1408cb790c222c#src/main/java/org/bukkit/inventory/ItemStack.java ).
2023-11-26 20:00:50 -03:00
Aeltumn
b7bb062734
Allow proper checking of empty item stacks
...
This adds a method to check if an item stack is empty or not. This mirrors vanilla's implementation of the same method.
2023-08-28 13:41:09 +02:00
Joo200
8fb0d8f90a
MerchantRecipe: add copy constructor
2022-12-20 15:26:36 +01:00
Jake Potrebic
26780d3ac6
Fix SpawnEggMeta#get/setSpawnedType
2023-02-26 07:14:19 -08:00
Nassim Jahnke
e03e924177
Replace ItemFlag.HIDE_POTION_EFFECTS
2023-01-05 10:45:20 +01:00
Jake Potrebic
c189c3ba5b
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
2022-05-08 13:35:58 -07:00
SoSeDiK
d533ea2226
Add EquipmentSlot convenience methods
2022-10-16 15:28:49 +03:00
Jason Penilla
a0b5bad27f
Add enchantWithLevels API
...
Deprecate upstream's newer and poorly implemented similar
API.
2022-03-16 20:35:13 -07:00
BillyGalbreath
1fa51dd469
Expose isFuel and canSmelt methods to FurnaceInventory
2021-12-23 15:32:40 -06:00
Jake Potrebic
c8e36cb205
Option to prevent data components copy in smithing recipes
2021-09-26 12:57:35 -07:00
Jake Potrebic
00ebe90031
Improve item default attribute API
2021-05-08 15:02:00 -07:00
Riley Park
482d7e4984
ItemStack#editMeta
2021-05-23 05:04:28 -07:00
Jake Potrebic
fce24f3b52
ItemStack repair check API
2021-05-15 22:10:50 -07:00
Jake Potrebic
07e76ccd5b
Inventory#close
2021-05-11 14:54:20 -07:00
Jake Potrebic
411f1ddea7
add get-set drop chance to EntityEquipment
2021-04-22 00:28:20 -07:00
Jake Potrebic
83c4827433
Improve Item Rarity API
2021-03-12 17:09:40 -08:00
Mariell Hoversholm
9c8829553b
Add ignore discounts API
2020-11-09 20:33:38 +01:00
ysl3000
124e1f8619
Create HoverEvent from ItemStack Entity
2020-07-06 22:17:37 +02:00
Jake Potrebic
f610d0b477
Add methods to get translation keys
...
Co-authored-by: MeFisto94 <MeFisto94@users.noreply.github.com >
2020-08-11 19:17:46 +02:00
MiniDigger | Martin
53d5aca783
Support components in ItemMeta
2020-06-06 18:13:16 +02:00
Phoenix616
78acda62f2
Inventory getHolder method without block snapshot
2020-06-10 23:55:16 +01:00