mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-31 21:37:39 +01:00
SPIGOT-6273: Expose ItemFrame ItemDropChance through API
By: md_5 <git@md-5.net>
This commit is contained in:
parent
95c9d5945f
commit
48294447ad
@ -33,6 +33,31 @@ public interface ItemFrame extends Hanging {
|
||||
*/
|
||||
public void setItem(@Nullable ItemStack item, boolean playSound);
|
||||
|
||||
/**
|
||||
* Gets the chance of the item being dropped upon this frame's destruction.
|
||||
*
|
||||
* <ul>
|
||||
* <li>A drop chance of 0.0F will never drop
|
||||
* <li>A drop chance of 1.0F will always drop
|
||||
* </ul>
|
||||
*
|
||||
* @return chance of the off hand item being dropped
|
||||
*/
|
||||
float getItemDropChance();
|
||||
|
||||
/**
|
||||
* Sets the chance of the off hand item being dropped upon this frame's
|
||||
* destruction.
|
||||
*
|
||||
* <ul>
|
||||
* <li>A drop chance of 0.0F will never drop
|
||||
* <li>A drop chance of 1.0F will always drop
|
||||
* </ul>
|
||||
*
|
||||
* @param chance the chance of off hand item being dropped
|
||||
*/
|
||||
void setItemDropChance(float chance);
|
||||
|
||||
/**
|
||||
* Get the rotation of the frame's item
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user