mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-26 19:07:40 +01:00
Add missing block data API
General purpose patch adding missing getters/setters to BlockData and its child types. Co-authored-by: SoSeDiK <mrsosedik@gmail.com> Co-authored-by: Fabrizio La Rosa <lr.fabrizio@gmail.com>
This commit is contained in:
parent
585c6710fd
commit
64f342f5fb
@ -36,4 +36,13 @@ public interface Levelled extends BlockData {
|
||||
* @return the maximum 'level' value
|
||||
*/
|
||||
int getMaximumLevel();
|
||||
|
||||
// Paper start
|
||||
/**
|
||||
* Gets the minimum allowed value of the 'level' property.
|
||||
*
|
||||
* @return the minimum 'level' value
|
||||
*/
|
||||
int getMinimumLevel();
|
||||
// Paper end
|
||||
}
|
||||
|
@ -35,6 +35,15 @@ public interface Bed extends Directional {
|
||||
*/
|
||||
boolean isOccupied();
|
||||
|
||||
// Paper start
|
||||
/**
|
||||
* Sets the value of the 'occupied' property.
|
||||
*
|
||||
* @param occupied the new 'occupied' value
|
||||
*/
|
||||
void setOccupied(boolean occupied);
|
||||
// Paper end
|
||||
|
||||
/**
|
||||
* Horizontal half of a bed.
|
||||
*/
|
||||
|
@ -28,4 +28,13 @@ public interface Candle extends Lightable, Waterlogged {
|
||||
* @return the maximum 'candles' value
|
||||
*/
|
||||
int getMaximumCandles();
|
||||
|
||||
// Paper start
|
||||
/**
|
||||
* Gets the minimum allowed value of the 'candles' property.
|
||||
*
|
||||
* @return the minimum 'candles' value
|
||||
*/
|
||||
int getMinimumCandles();
|
||||
// Paper end
|
||||
}
|
||||
|
@ -4,4 +4,17 @@ import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
public interface DecoratedPot extends Directional, Waterlogged {
|
||||
// Paper start - add missing block data api
|
||||
/**
|
||||
* @return whether the pot is cracked
|
||||
*/
|
||||
public boolean isCracked();
|
||||
|
||||
/**
|
||||
* Set whether the pot is cracked.
|
||||
*
|
||||
* @param cracked whether the pot is cracked
|
||||
*/
|
||||
public void setCracked(boolean cracked);
|
||||
// Paper end - add missing block data api
|
||||
}
|
||||
|
@ -39,4 +39,20 @@ public interface Leaves extends Waterlogged {
|
||||
* @param distance the new 'distance' value
|
||||
*/
|
||||
void setDistance(int distance);
|
||||
|
||||
// Paper start
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'distance' property.
|
||||
*
|
||||
* @return the maximum 'distance' value
|
||||
*/
|
||||
int getMaximumDistance();
|
||||
|
||||
/**
|
||||
* Gets the minimum allowed value of the 'distance' property.
|
||||
*
|
||||
* @return the minimum 'distance' value
|
||||
*/
|
||||
int getMinimumDistance();
|
||||
// Paper end
|
||||
}
|
||||
|
@ -21,6 +21,15 @@ public interface PinkPetals extends Directional {
|
||||
*/
|
||||
void setFlowerAmount(int flower_amount);
|
||||
|
||||
// Paper start
|
||||
/**
|
||||
* Gets the minimum allowed value of the 'flower_amount' property.
|
||||
*
|
||||
* @return the minimum 'flower_amount' value
|
||||
*/
|
||||
int getMinimumFlowerAmount();
|
||||
// Paper end
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'flower_amount' property.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user