25
paper-api/src/main/java/org/bukkit/block/Beehive.java
Normal file
25
paper-api/src/main/java/org/bukkit/block/Beehive.java
Normal file
@@ -0,0 +1,25 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a bee hive.
|
||||
*/
|
||||
public interface Beehive extends TileState {
|
||||
|
||||
/**
|
||||
* Get the hive's flower location.
|
||||
*
|
||||
* @return flower location or null
|
||||
*/
|
||||
@Nullable
|
||||
Location getFlower();
|
||||
|
||||
/**
|
||||
* Set the hive's flower location.
|
||||
*
|
||||
* @param location or null
|
||||
*/
|
||||
void setFlower(@Nullable Location location);
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.material.MaterialData;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a flower pot.
|
||||
* @deprecated not a tile entity in future versions of Minecraft
|
||||
*/
|
||||
@Deprecated
|
||||
public interface FlowerPot extends BlockState {
|
||||
|
||||
/**
|
||||
* Gets the item present in this flower pot.
|
||||
*
|
||||
* @return item present, or null for empty.
|
||||
*/
|
||||
@Nullable
|
||||
MaterialData getContents();
|
||||
|
||||
/**
|
||||
* Sets the item present in this flower pot.
|
||||
*
|
||||
* NOTE: The Vanilla Minecraft client will currently not refresh this until
|
||||
* a block update is triggered.
|
||||
*
|
||||
* @param item new item, or null for empty.
|
||||
*/
|
||||
void setContents(@Nullable MaterialData item);
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.Instrument;
|
||||
import org.bukkit.Note;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a note block.
|
||||
* @deprecated not a tile entity in future versions of Minecraft
|
||||
*/
|
||||
@Deprecated
|
||||
public interface NoteBlock extends BlockState {
|
||||
|
||||
/**
|
||||
* Gets the note.
|
||||
*
|
||||
* @return The note.
|
||||
*/
|
||||
public Note getNote();
|
||||
|
||||
/**
|
||||
* Gets the note.
|
||||
*
|
||||
* @return The note ID.
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public byte getRawNote();
|
||||
|
||||
/**
|
||||
* Set the note.
|
||||
*
|
||||
* @param note The note.
|
||||
*/
|
||||
public void setNote(Note note);
|
||||
|
||||
/**
|
||||
* Set the note.
|
||||
*
|
||||
* @param note The note ID.
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public void setRawNote(byte note);
|
||||
|
||||
/**
|
||||
* Attempts to play the note at the block.
|
||||
* <p>
|
||||
* If the block represented by this block state is no longer a note block,
|
||||
* this will return false.
|
||||
*
|
||||
* @return true if successful, otherwise false
|
||||
* @throws IllegalStateException if this block state is not placed
|
||||
*/
|
||||
public boolean play();
|
||||
|
||||
/**
|
||||
* Plays an arbitrary note with an arbitrary instrument at the block.
|
||||
* <p>
|
||||
* If the block represented by this block state is no longer a note block,
|
||||
* this will return false.
|
||||
*
|
||||
* @param instrument Instrument ID
|
||||
* @param note Note ID
|
||||
* @return true if successful, otherwise false
|
||||
* @throws IllegalStateException if this block state is not placed
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean play(byte instrument, byte note);
|
||||
|
||||
/**
|
||||
* Plays an arbitrary note with an arbitrary instrument at the block.
|
||||
* <p>
|
||||
* If the block represented by this block state is no longer a note block,
|
||||
* this will return false.
|
||||
*
|
||||
* @param instrument The instrument
|
||||
* @param note The note
|
||||
* @return true if successful, otherwise false
|
||||
* @throws IllegalStateException if this block state is not placed
|
||||
* @see Instrument Note
|
||||
*/
|
||||
public boolean play(Instrument instrument, Note note);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
|
||||
/**
|
||||
* 'honey_level' represents the amount of honey stored in the hive.
|
||||
*/
|
||||
public interface Beehive extends Directional {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'honey_level' property.
|
||||
*
|
||||
* @return the 'honey_level' value
|
||||
*/
|
||||
int getHoneyLevel();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'honey_level' property.
|
||||
*
|
||||
* @param honeyLevel the new 'honey_level' value
|
||||
*/
|
||||
void setHoneyLevel(int honeyLevel);
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'honey_level' property.
|
||||
*
|
||||
* @return the maximum 'honey_level' value
|
||||
*/
|
||||
int getMaximumHoneyLevel();
|
||||
}
|
||||
Reference in New Issue
Block a user