@@ -4,5 +4,7 @@ import org.bukkit.material.Colorable;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a bed.
|
||||
* @deprecated does not provide useful information beyond the material itself
|
||||
*/
|
||||
@Deprecated
|
||||
public interface Bed extends BlockState, Colorable { }
|
||||
|
||||
@@ -7,63 +7,74 @@ public enum Biome {
|
||||
OCEAN,
|
||||
PLAINS,
|
||||
DESERT,
|
||||
EXTREME_HILLS,
|
||||
MOUNTAINS,
|
||||
FOREST,
|
||||
TAIGA,
|
||||
SWAMPLAND,
|
||||
SWAMP,
|
||||
RIVER,
|
||||
HELL,
|
||||
SKY,
|
||||
NETHER,
|
||||
THE_END,
|
||||
FROZEN_OCEAN,
|
||||
FROZEN_RIVER,
|
||||
ICE_FLATS,
|
||||
ICE_MOUNTAINS,
|
||||
MUSHROOM_ISLAND,
|
||||
MUSHROOM_ISLAND_SHORE,
|
||||
BEACHES,
|
||||
SNOWY_TUNDRA,
|
||||
SNOWY_MOUNTAINS,
|
||||
MUSHROOM_FIELDS,
|
||||
MUSHROOM_FIELD_SHORE,
|
||||
BEACH,
|
||||
DESERT_HILLS,
|
||||
FOREST_HILLS,
|
||||
WOODED_HILLS,
|
||||
TAIGA_HILLS,
|
||||
SMALLER_EXTREME_HILLS,
|
||||
MOUNTAIN_EDGE,
|
||||
JUNGLE,
|
||||
JUNGLE_HILLS,
|
||||
JUNGLE_EDGE,
|
||||
DEEP_OCEAN,
|
||||
STONE_BEACH,
|
||||
COLD_BEACH,
|
||||
STONE_SHORE,
|
||||
SNOWY_BEACH,
|
||||
BIRCH_FOREST,
|
||||
BIRCH_FOREST_HILLS,
|
||||
ROOFED_FOREST,
|
||||
TAIGA_COLD,
|
||||
TAIGA_COLD_HILLS,
|
||||
REDWOOD_TAIGA,
|
||||
REDWOOD_TAIGA_HILLS,
|
||||
EXTREME_HILLS_WITH_TREES,
|
||||
DARK_FOREST,
|
||||
SNOWY_TAIGA,
|
||||
SNOWY_TAIGA_HILLS,
|
||||
GIANT_TREE_TAIGA,
|
||||
GIANT_TREE_TAIGA_HILLS,
|
||||
WOODED_MOUNTAINS,
|
||||
SAVANNA,
|
||||
SAVANNA_ROCK,
|
||||
MESA,
|
||||
MESA_ROCK,
|
||||
MESA_CLEAR_ROCK,
|
||||
VOID,
|
||||
MUTATED_PLAINS,
|
||||
MUTATED_DESERT,
|
||||
MUTATED_EXTREME_HILLS,
|
||||
MUTATED_FOREST,
|
||||
MUTATED_TAIGA,
|
||||
MUTATED_SWAMPLAND,
|
||||
MUTATED_ICE_FLATS,
|
||||
MUTATED_JUNGLE,
|
||||
MUTATED_JUNGLE_EDGE,
|
||||
MUTATED_BIRCH_FOREST,
|
||||
MUTATED_BIRCH_FOREST_HILLS,
|
||||
MUTATED_ROOFED_FOREST,
|
||||
MUTATED_TAIGA_COLD,
|
||||
MUTATED_REDWOOD_TAIGA,
|
||||
MUTATED_REDWOOD_TAIGA_HILLS,
|
||||
MUTATED_EXTREME_HILLS_WITH_TREES,
|
||||
MUTATED_SAVANNA,
|
||||
MUTATED_SAVANNA_ROCK,
|
||||
MUTATED_MESA,
|
||||
MUTATED_MESA_ROCK,
|
||||
MUTATED_MESA_CLEAR_ROCK
|
||||
SAVANNA_PLATEAU,
|
||||
BADLANDS,
|
||||
WOODED_BADLANDS_PLATEAU,
|
||||
BADLANDS_PLATEAU,
|
||||
SMALL_END_ISLANDS,
|
||||
END_MIDLANDS,
|
||||
END_HIGHLANDS,
|
||||
END_BARRENS,
|
||||
WARM_OCEAN,
|
||||
LUKEWARM_OCEAN,
|
||||
COLD_OCEAN,
|
||||
DEEP_WARM_OCEAN,
|
||||
DEEP_LUKEWARM_OCEAN,
|
||||
DEEP_COLD_OCEAN,
|
||||
DEEP_FROZEN_OCEAN,
|
||||
THE_VOID,
|
||||
SUNFLOWER_PLAINS,
|
||||
DESERT_LAKES,
|
||||
GRAVELLY_MOUNTAINS,
|
||||
FLOWER_FOREST,
|
||||
TAIGA_MOUNTAINS,
|
||||
SWAMP_HILLS,
|
||||
ICE_SPIKES,
|
||||
MODIFIED_JUNGLE,
|
||||
MODIFIED_JUNGLE_EDGE,
|
||||
TALL_BIRCH_FOREST,
|
||||
TALL_BIRCH_HILLS,
|
||||
DARK_FOREST_HILLS,
|
||||
SNOWY_TAIGA_MOUNTAINS,
|
||||
GIANT_SPRUCE_TAIGA,
|
||||
GIANT_SPRUCE_TAIGA_HILLS,
|
||||
MODIFIED_GRAVELLY_MOUNTAINS,
|
||||
SHATTERED_SAVANNA,
|
||||
SHATTERED_SAVANNA_PLATEAU,
|
||||
ERODED_BADLANDS,
|
||||
MODIFIED_WOODED_BADLANDS_PLATEAU,
|
||||
MODIFIED_BADLANDS_PLATEAU
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import org.bukkit.Chunk;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.metadata.Metadatable;
|
||||
|
||||
@@ -14,6 +15,11 @@ import org.bukkit.metadata.Metadatable;
|
||||
* any given location in a world. The state of the block may change
|
||||
* concurrently to your own handling of it; use block.getState() to get a
|
||||
* snapshot state of a block which will not be modified.
|
||||
*
|
||||
* <br>
|
||||
* Note that parts of this class which require access to the world at large
|
||||
* (i.e. lighting and power) may not be able to be safely accessed during world
|
||||
* generation when used in cases like BlockPhysicsEvent!!!!
|
||||
*/
|
||||
public interface Block extends Metadatable {
|
||||
|
||||
@@ -26,6 +32,13 @@ public interface Block extends Metadatable {
|
||||
@Deprecated
|
||||
byte getData();
|
||||
|
||||
/**
|
||||
* Gets the complete block data for this block
|
||||
*
|
||||
* @return block specific data
|
||||
*/
|
||||
BlockData getBlockData();
|
||||
|
||||
/**
|
||||
* Gets the block at the given offsets
|
||||
*
|
||||
@@ -72,15 +85,6 @@ public interface Block extends Metadatable {
|
||||
*/
|
||||
Material getType();
|
||||
|
||||
/**
|
||||
* Gets the type-id of this block
|
||||
*
|
||||
* @return block type-id
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
int getTypeId();
|
||||
|
||||
/**
|
||||
* Gets the light level between 0-15
|
||||
*
|
||||
@@ -179,6 +183,21 @@ public interface Block extends Metadatable {
|
||||
@Deprecated
|
||||
void setData(byte data, boolean applyPhysics);
|
||||
|
||||
/**
|
||||
* Sets the complete data for this block
|
||||
*
|
||||
* @param data new block specific data
|
||||
*/
|
||||
void setBlockData(BlockData data);
|
||||
|
||||
/**
|
||||
* Sets the complete data for this block
|
||||
*
|
||||
* @param data new block specific data
|
||||
* @param applyPhysics false to cancel physics from the changed block
|
||||
*/
|
||||
void setBlockData(BlockData data, boolean applyPhysics);
|
||||
|
||||
/**
|
||||
* Sets the type of this block
|
||||
*
|
||||
@@ -194,39 +213,6 @@ public interface Block extends Metadatable {
|
||||
*/
|
||||
void setType(Material type, boolean applyPhysics);
|
||||
|
||||
/**
|
||||
* Sets the type-id of this block
|
||||
*
|
||||
* @param type Type-Id to change this block to
|
||||
* @return whether the block was changed
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
boolean setTypeId(int type);
|
||||
|
||||
/**
|
||||
* Sets the type-id of this block
|
||||
*
|
||||
* @param type Type-Id to change this block to
|
||||
* @param applyPhysics False to cancel physics on the changed block.
|
||||
* @return whether the block was changed
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
boolean setTypeId(int type, boolean applyPhysics);
|
||||
|
||||
/**
|
||||
* Sets the type-id of this block
|
||||
*
|
||||
* @param type Type-Id to change this block to
|
||||
* @param data The data value to change this block to
|
||||
* @param applyPhysics False to cancel physics on the changed block
|
||||
* @return whether the block was changed
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
boolean setTypeIdAndData(int type, byte data, boolean applyPhysics);
|
||||
|
||||
/**
|
||||
* Gets the face relation of this block compared to the given block.
|
||||
* <p>
|
||||
@@ -330,8 +316,7 @@ public interface Block extends Metadatable {
|
||||
* Checks if this block is liquid.
|
||||
* <p>
|
||||
* A block is considered liquid when {@link #getType()} returns {@link
|
||||
* Material#WATER}, {@link Material#STATIONARY_WATER}, {@link
|
||||
* Material#LAVA} or {@link Material#STATIONARY_LAVA}.
|
||||
* Material#WATER} or {@link Material#LAVA}.
|
||||
*
|
||||
* @return true if this block is liquid
|
||||
*/
|
||||
|
||||
@@ -4,6 +4,7 @@ import org.bukkit.Chunk;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.material.MaterialData;
|
||||
import org.bukkit.metadata.Metadatable;
|
||||
|
||||
@@ -33,6 +34,13 @@ public interface BlockState extends Metadatable {
|
||||
*/
|
||||
MaterialData getData();
|
||||
|
||||
/**
|
||||
* Gets the data for this block state.
|
||||
*
|
||||
* @return block specific data
|
||||
*/
|
||||
BlockData getBlockData();
|
||||
|
||||
/**
|
||||
* Gets the type of this block state.
|
||||
*
|
||||
@@ -40,15 +48,6 @@ public interface BlockState extends Metadatable {
|
||||
*/
|
||||
Material getType();
|
||||
|
||||
/**
|
||||
* Gets the type-id of this block state.
|
||||
*
|
||||
* @return block type-id
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
int getTypeId();
|
||||
|
||||
/**
|
||||
* Gets the current light level of the block represented by this block state.
|
||||
*
|
||||
@@ -123,6 +122,13 @@ public interface BlockState extends Metadatable {
|
||||
*/
|
||||
void setData(MaterialData data);
|
||||
|
||||
/**
|
||||
* Sets the data for this block state.
|
||||
*
|
||||
* @param data New block specific data
|
||||
*/
|
||||
void setBlockData(BlockData data);
|
||||
|
||||
/**
|
||||
* Sets the type of this block state.
|
||||
*
|
||||
@@ -130,16 +136,6 @@ public interface BlockState extends Metadatable {
|
||||
*/
|
||||
void setType(Material type);
|
||||
|
||||
/**
|
||||
* Sets the type-id of this block state.
|
||||
*
|
||||
* @param type Type-Id to change this block state to
|
||||
* @return Whether it worked?
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
boolean setTypeId(int type);
|
||||
|
||||
/**
|
||||
* Attempts to update the block represented by this state, setting it to
|
||||
* the new values as defined by this state.
|
||||
|
||||
6
paper-api/src/main/java/org/bukkit/block/Conduit.java
Normal file
6
paper-api/src/main/java/org/bukkit/block/Conduit.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a conduit.
|
||||
*/
|
||||
public interface Conduit extends BlockState { }
|
||||
@@ -4,7 +4,9 @@ import org.bukkit.material.MaterialData;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a flower pot.
|
||||
* @deprecated not a tile entity in future versions of Minecraft
|
||||
*/
|
||||
@Deprecated
|
||||
public interface FlowerPot extends BlockState {
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,7 +5,9 @@ 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 {
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.SkullType;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a skull block.
|
||||
@@ -57,27 +59,35 @@ public interface Skull extends BlockState {
|
||||
* Gets the rotation of the skull in the world
|
||||
*
|
||||
* @return the rotation of the skull
|
||||
* @deprecated use {@link BlockData}
|
||||
*/
|
||||
@Deprecated
|
||||
public BlockFace getRotation();
|
||||
|
||||
/**
|
||||
* Sets the rotation of the skull in the world
|
||||
*
|
||||
* @param rotation the rotation of the skull
|
||||
* @deprecated use {@link BlockData}
|
||||
*/
|
||||
@Deprecated
|
||||
public void setRotation(BlockFace rotation);
|
||||
|
||||
/**
|
||||
* Gets the type of skull
|
||||
*
|
||||
* @return the type of skull
|
||||
* @deprecated check {@link Material} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public SkullType getSkullType();
|
||||
|
||||
/**
|
||||
* Sets the type of skull
|
||||
*
|
||||
* @param skullType the type of skull
|
||||
* @deprecated check {@link Material} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public void setSkullType(SkullType skullType);
|
||||
}
|
||||
|
||||
33
paper-api/src/main/java/org/bukkit/block/data/Ageable.java
Normal file
33
paper-api/src/main/java/org/bukkit/block/data/Ageable.java
Normal file
@@ -0,0 +1,33 @@
|
||||
package org.bukkit.block.data;
|
||||
|
||||
/**
|
||||
* 'age' represents the different growth stages that a crop-like block can go
|
||||
* through.
|
||||
* <br>
|
||||
* A value of 0 indicates that the crop was freshly planted, whilst a value
|
||||
* equal to {@link #getMaximumAge()} indicates that the crop is ripe and ready
|
||||
* to be harvested.
|
||||
*/
|
||||
public interface Ageable extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'age' property.
|
||||
*
|
||||
* @return the 'age' value
|
||||
*/
|
||||
int getAge();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'age' property.
|
||||
*
|
||||
* @param age the new 'age' value
|
||||
*/
|
||||
void setAge(int age);
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'age' property.
|
||||
*
|
||||
* @return the maximum 'age' value
|
||||
*/
|
||||
int getMaximumAge();
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package org.bukkit.block.data;
|
||||
|
||||
/**
|
||||
* 'power' represents the redstone power level currently being emitted or
|
||||
* transmitted via this block.
|
||||
* <br>
|
||||
* May not be over 9000 or {@link #getMaximumPower()} (usually 15).
|
||||
*/
|
||||
public interface AnaloguePowerable extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'power' property.
|
||||
*
|
||||
* @return the 'power' value
|
||||
*/
|
||||
int getPower();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'power' property.
|
||||
*
|
||||
* @param power the new 'power' value
|
||||
*/
|
||||
void setPower(int power);
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'power' property.
|
||||
*
|
||||
* @return the maximum 'power' value
|
||||
*/
|
||||
int getMaximumPower();
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package org.bukkit.block.data;
|
||||
|
||||
/**
|
||||
* 'attached' denotes whether a tripwire hook or string forms a complete
|
||||
* tripwire circuit and is ready to trigger.
|
||||
* <br>
|
||||
* Updating the property on a tripwire hook will change the texture to indicate
|
||||
* a connected string, but will not have any effect when used on the tripwire
|
||||
* string itself. It may however still be used to check whether the string forms
|
||||
* a circuit.
|
||||
*/
|
||||
public interface Attachable extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'attached' property.
|
||||
*
|
||||
* @return the 'attached' value
|
||||
*/
|
||||
boolean isAttached();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'attached' property.
|
||||
*
|
||||
* @param attached the new 'attached' value
|
||||
*/
|
||||
void setAttached(boolean attached);
|
||||
}
|
||||
37
paper-api/src/main/java/org/bukkit/block/data/Bisected.java
Normal file
37
paper-api/src/main/java/org/bukkit/block/data/Bisected.java
Normal file
@@ -0,0 +1,37 @@
|
||||
package org.bukkit.block.data;
|
||||
|
||||
/**
|
||||
* 'half' denotes which half of a two block tall material this block is.
|
||||
* <br>
|
||||
* In game it may be referred to as either (top, bottom) or (upper, lower).
|
||||
*/
|
||||
public interface Bisected extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'half' property.
|
||||
*
|
||||
* @return the 'half' value
|
||||
*/
|
||||
Half getHalf();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'half' property.
|
||||
*
|
||||
* @param half the new 'half' value
|
||||
*/
|
||||
void setHalf(Half half);
|
||||
|
||||
/**
|
||||
* The half of a vertically bisected block.
|
||||
*/
|
||||
public enum Half {
|
||||
/**
|
||||
* The top half of the block, normally with the higher y coordinate.
|
||||
*/
|
||||
TOP,
|
||||
/**
|
||||
* The bottom half of the block, normally with the lower y coordinate.
|
||||
*/
|
||||
BOTTOM;
|
||||
}
|
||||
}
|
||||
30
paper-api/src/main/java/org/bukkit/block/data/BlockData.java
Normal file
30
paper-api/src/main/java/org/bukkit/block/data/BlockData.java
Normal file
@@ -0,0 +1,30 @@
|
||||
package org.bukkit.block.data;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Server;
|
||||
|
||||
public interface BlockData extends Cloneable {
|
||||
|
||||
/**
|
||||
* Get the Material represented by this block data.
|
||||
*
|
||||
* @return the material
|
||||
*/
|
||||
Material getMaterial();
|
||||
|
||||
/**
|
||||
* Gets a string, which when passed into a method such as
|
||||
* {@link Server#createBlockData(java.lang.String)} will unambiguously
|
||||
* recreate this instance.
|
||||
*
|
||||
* @return serialized data string for this block
|
||||
*/
|
||||
String getAsString();
|
||||
|
||||
/**
|
||||
* Returns a copy of this BlockData.
|
||||
*
|
||||
* @return a copy of the block data
|
||||
*/
|
||||
BlockData clone();
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package org.bukkit.block.data;
|
||||
|
||||
import java.util.Set;
|
||||
import org.bukkit.block.BlockFace;
|
||||
|
||||
/**
|
||||
* 'facing' represents the face towards which the block is pointing.
|
||||
* <br>
|
||||
* Some blocks may not be able to face in all directions, use
|
||||
* {@link #getFaces()} to get all possible directions for this block.
|
||||
*/
|
||||
public interface Directional extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'facing' property.
|
||||
*
|
||||
* @return the 'facing' value
|
||||
*/
|
||||
BlockFace getFacing();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'facing' property.
|
||||
*
|
||||
* @param facing the new 'facing' value
|
||||
*/
|
||||
void setFacing(BlockFace facing);
|
||||
|
||||
/**
|
||||
* Gets the faces which are applicable to this block.
|
||||
*
|
||||
* @return the allowed 'facing' values
|
||||
*/
|
||||
Set<BlockFace> getFaces();
|
||||
}
|
||||
31
paper-api/src/main/java/org/bukkit/block/data/Levelled.java
Normal file
31
paper-api/src/main/java/org/bukkit/block/data/Levelled.java
Normal file
@@ -0,0 +1,31 @@
|
||||
package org.bukkit.block.data;
|
||||
|
||||
/**
|
||||
* 'level' represents the amount of fluid contained within this block, either by
|
||||
* itself or inside a cauldron.
|
||||
* <br>
|
||||
* May not be higher than {@link #getMaximumLevel()}.
|
||||
*/
|
||||
public interface Levelled extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'level' property.
|
||||
*
|
||||
* @return the 'level' value
|
||||
*/
|
||||
int getLevel();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'level' property.
|
||||
*
|
||||
* @param level the new 'level' value
|
||||
*/
|
||||
void setLevel(int level);
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'level' property.
|
||||
*
|
||||
* @return the maximum 'level' value
|
||||
*/
|
||||
int getMaximumLevel();
|
||||
}
|
||||
22
paper-api/src/main/java/org/bukkit/block/data/Lightable.java
Normal file
22
paper-api/src/main/java/org/bukkit/block/data/Lightable.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package org.bukkit.block.data;
|
||||
|
||||
/**
|
||||
* 'lit' denotes whether this block (either a redstone torch or furnace) is
|
||||
* currently lit - that is not burned out.
|
||||
*/
|
||||
public interface Lightable extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'lit' property.
|
||||
*
|
||||
* @return the 'lit' value
|
||||
*/
|
||||
boolean isLit();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'lit' property.
|
||||
*
|
||||
* @param lit the new 'lit' value
|
||||
*/
|
||||
void setLit(boolean lit);
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package org.bukkit.block.data;
|
||||
|
||||
import java.util.Set;
|
||||
import org.bukkit.block.BlockFace;
|
||||
|
||||
/**
|
||||
* This class encompasses the 'north', 'east', 'south', 'west', 'up', 'down'
|
||||
* boolean flags which are used to set which faces of the block textures are
|
||||
* displayed on.
|
||||
* <br>
|
||||
* Some blocks may not be able to have faces on all directions, use
|
||||
* {@link #getAllowedFaces()} to get all possible faces for this block.
|
||||
*/
|
||||
public interface MultipleFacing extends BlockData {
|
||||
|
||||
/**
|
||||
* Checks if this block has the specified face enabled.
|
||||
*
|
||||
* @param face to check
|
||||
* @return if face is enabled
|
||||
*/
|
||||
boolean hasFace(BlockFace face);
|
||||
|
||||
/**
|
||||
* Set whether this block has the specified face enabled.
|
||||
*
|
||||
* @param face to set
|
||||
* @param has the face
|
||||
*/
|
||||
void setFace(BlockFace face, boolean has);
|
||||
|
||||
/**
|
||||
* Get all of the faces which are enabled on this block.
|
||||
*
|
||||
* @return all faces enabled
|
||||
*/
|
||||
Set<BlockFace> getFaces();
|
||||
|
||||
/**
|
||||
* Gets all of this faces which may be set on this block.
|
||||
*
|
||||
* @return all allowed faces
|
||||
*/
|
||||
Set<BlockFace> getAllowedFaces();
|
||||
}
|
||||
21
paper-api/src/main/java/org/bukkit/block/data/Openable.java
Normal file
21
paper-api/src/main/java/org/bukkit/block/data/Openable.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package org.bukkit.block.data;
|
||||
|
||||
/**
|
||||
* 'open' denotes whether this door-like block is currently opened.
|
||||
*/
|
||||
public interface Openable extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'open' property.
|
||||
*
|
||||
* @return the 'open' value
|
||||
*/
|
||||
boolean isOpen();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'open' property.
|
||||
*
|
||||
* @param open the new 'open' value
|
||||
*/
|
||||
void setOpen(boolean open);
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package org.bukkit.block.data;
|
||||
|
||||
import java.util.Set;
|
||||
import org.bukkit.Axis;
|
||||
|
||||
/**
|
||||
* 'axis' represents the axis along whilst this block is oriented.
|
||||
* <br>
|
||||
* Some blocks such as the portal block may not be able to be placed in all
|
||||
* orientations, use {@link #getAxes()} to retrieve all possible such
|
||||
* orientations.
|
||||
*/
|
||||
public interface Orientable extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'axis' property.
|
||||
*
|
||||
* @return the 'axis' value
|
||||
*/
|
||||
Axis getAxis();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'axis' property.
|
||||
*
|
||||
* @param axis the new 'axis' value
|
||||
*/
|
||||
void setAxis(Axis axis);
|
||||
|
||||
/**
|
||||
* Gets the axes which are applicable to this block.
|
||||
*
|
||||
* @return the allowed 'axis' values
|
||||
*/
|
||||
Set<Axis> getAxes();
|
||||
}
|
||||
22
paper-api/src/main/java/org/bukkit/block/data/Powerable.java
Normal file
22
paper-api/src/main/java/org/bukkit/block/data/Powerable.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package org.bukkit.block.data;
|
||||
|
||||
/**
|
||||
* 'powered' indicates whether this block is in the powered state or not, i.e.
|
||||
* receiving a redstone current of power > 0.
|
||||
*/
|
||||
public interface Powerable extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'powered' property.
|
||||
*
|
||||
* @return the 'powered' value
|
||||
*/
|
||||
boolean isPowered();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'powered' property.
|
||||
*
|
||||
* @param powered the new 'powered' value
|
||||
*/
|
||||
void setPowered(boolean powered);
|
||||
}
|
||||
84
paper-api/src/main/java/org/bukkit/block/data/Rail.java
Normal file
84
paper-api/src/main/java/org/bukkit/block/data/Rail.java
Normal file
@@ -0,0 +1,84 @@
|
||||
package org.bukkit.block.data;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 'shape' represents the current layout of a minecart rail.
|
||||
* <br>
|
||||
* Some types of rail may not be able to be laid out in all shapes, use
|
||||
* {@link #getShapes()} to get those applicable to this block.
|
||||
*/
|
||||
public interface Rail extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'shape' property.
|
||||
*
|
||||
* @return the 'shape' value
|
||||
*/
|
||||
Shape getShape();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'shape' property.
|
||||
*
|
||||
* @param shape the new 'shape' value
|
||||
*/
|
||||
void setShape(Shape shape);
|
||||
|
||||
/**
|
||||
* Gets the shapes which are applicable to this block.
|
||||
*
|
||||
* @return the allowed 'shape' values
|
||||
*/
|
||||
Set<Shape> getShapes();
|
||||
|
||||
/**
|
||||
* The different types of shapes a rail block can occupy.
|
||||
*/
|
||||
public enum Shape {
|
||||
|
||||
/**
|
||||
* The rail runs flat along the north/south (Z) axis.
|
||||
*/
|
||||
NORTH_SOUTH,
|
||||
/**
|
||||
* The rail runs flat along the east/west (X) axis.
|
||||
*/
|
||||
EAST_WEST,
|
||||
/**
|
||||
* The rail ascends in the east (positive X) direction.
|
||||
*/
|
||||
ASCENDING_EAST,
|
||||
/**
|
||||
* The rail ascends in the west (negative X) direction.
|
||||
*/
|
||||
ASCENDING_WEST,
|
||||
/**
|
||||
* The rail ascends in the north (negative Z) direction.
|
||||
*/
|
||||
ASCENDING_NORTH,
|
||||
/**
|
||||
* The rail ascends in the south (positive Z) direction.
|
||||
*/
|
||||
ASCENDING_SOUTH,
|
||||
/**
|
||||
* The rail forms a curve connecting the south and east faces of the
|
||||
* block.
|
||||
*/
|
||||
SOUTH_EAST,
|
||||
/**
|
||||
* The rail forms a curve connecting the south and west faces of the
|
||||
* block.
|
||||
*/
|
||||
SOUTH_WEST,
|
||||
/**
|
||||
* The rail forms a curve connecting the north and west faces of the
|
||||
* block.
|
||||
*/
|
||||
NORTH_WEST,
|
||||
/**
|
||||
* The rail forms a curve connecting the north and east faces of the
|
||||
* block.
|
||||
*/
|
||||
NORTH_EAST;
|
||||
}
|
||||
}
|
||||
23
paper-api/src/main/java/org/bukkit/block/data/Rotatable.java
Normal file
23
paper-api/src/main/java/org/bukkit/block/data/Rotatable.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package org.bukkit.block.data;
|
||||
|
||||
import org.bukkit.block.BlockFace;
|
||||
|
||||
/**
|
||||
* 'rotation' represents the current rotation of this block.
|
||||
*/
|
||||
public interface Rotatable extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'rotation' property.
|
||||
*
|
||||
* @return the 'rotation' value
|
||||
*/
|
||||
BlockFace getRotation();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'rotation' property.
|
||||
*
|
||||
* @param rotation the new 'rotation' value
|
||||
*/
|
||||
void setRotation(BlockFace rotation);
|
||||
}
|
||||
22
paper-api/src/main/java/org/bukkit/block/data/Snowable.java
Normal file
22
paper-api/src/main/java/org/bukkit/block/data/Snowable.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package org.bukkit.block.data;
|
||||
|
||||
/**
|
||||
* 'snowy' denotes whether this block has a snow covered side and top texture
|
||||
* (normally because the block above is snow).
|
||||
*/
|
||||
public interface Snowable extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'snowy' property.
|
||||
*
|
||||
* @return the 'snowy' value
|
||||
*/
|
||||
boolean isSnowy();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'snowy' property.
|
||||
*
|
||||
* @param snowy the new 'snowy' value
|
||||
*/
|
||||
void setSnowy(boolean snowy);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.bukkit.block.data;
|
||||
|
||||
/**
|
||||
* 'waterlogged' denotes whether this block has fluid in it.
|
||||
*/
|
||||
public interface Waterlogged extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'waterlogged' property.
|
||||
*
|
||||
* @return the 'waterlogged' value
|
||||
*/
|
||||
boolean isWaterlogged();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'waterlogged' property.
|
||||
*
|
||||
* @param waterlogged the new 'waterlogged' value
|
||||
*/
|
||||
void setWaterlogged(boolean waterlogged);
|
||||
}
|
||||
50
paper-api/src/main/java/org/bukkit/block/data/type/Bed.java
Normal file
50
paper-api/src/main/java/org/bukkit/block/data/type/Bed.java
Normal file
@@ -0,0 +1,50 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Bisected;
|
||||
import org.bukkit.block.data.Directional;
|
||||
|
||||
/**
|
||||
* Similar to {@link Bisected}, 'part' denotes which half of the bed this block
|
||||
* corresponds to.
|
||||
* <br>
|
||||
* 'occupied' property is a quick flag to check if a player is currently
|
||||
* sleeping in this bed block.
|
||||
*/
|
||||
public interface Bed extends Directional {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'part' property.
|
||||
*
|
||||
* @return the 'part' value
|
||||
*/
|
||||
Part getPart();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'part' property.
|
||||
*
|
||||
* @param part the new 'part' value
|
||||
*/
|
||||
void setPart(Part part);
|
||||
|
||||
/**
|
||||
* Gets the value of the 'occupied' property.
|
||||
*
|
||||
* @return the 'occupied' value
|
||||
*/
|
||||
boolean isOccupied();
|
||||
|
||||
/**
|
||||
* Horizontal half of a bed.
|
||||
*/
|
||||
public enum Part {
|
||||
|
||||
/**
|
||||
* The head is the upper part of the bed containing the pillow.
|
||||
*/
|
||||
HEAD,
|
||||
/**
|
||||
* The foot is the lower half of the bed.
|
||||
*/
|
||||
FOOT;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import java.util.Set;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* Interface to the 'has_bottle_0', 'has_bottle_1', 'has_bottle_2' flags on a
|
||||
* brewing stand which indicate which bottles are rendered on the outside.
|
||||
* <br>
|
||||
* Stand may have 0, 1... {@link #getMaximumBottles()}-1 bottles.
|
||||
*/
|
||||
public interface BrewingStand extends BlockData {
|
||||
|
||||
/**
|
||||
* Checks if the stand has the following bottle
|
||||
*
|
||||
* @param bottle to check
|
||||
* @return if bottle is present
|
||||
*/
|
||||
boolean hasBottle(int bottle);
|
||||
|
||||
/**
|
||||
* Set whether the stand has this bottle present.
|
||||
*
|
||||
* @param bottle to set
|
||||
* @param has bottle
|
||||
*/
|
||||
void setBottle(int bottle, boolean has);
|
||||
|
||||
/**
|
||||
* Get the indexes of all the bottles present on this block.
|
||||
*
|
||||
* @return set of all bottles
|
||||
*/
|
||||
Set<Integer> getBottles();
|
||||
|
||||
/**
|
||||
* Get the maximum amount of bottles present on this stand.
|
||||
*
|
||||
* @return maximum bottle count
|
||||
*/
|
||||
int getMaximumBottles();
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* 'drag' indicates whether a force will be applied on entities moving through
|
||||
* this block.
|
||||
*/
|
||||
public interface BubbleColumn extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'drag' property.
|
||||
*
|
||||
* @return the 'part' value
|
||||
*/
|
||||
boolean isDrag();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'drag' property.
|
||||
*
|
||||
* @param drag the new 'drag' value
|
||||
*/
|
||||
void setDrag(boolean drag);
|
||||
|
||||
}
|
||||
34
paper-api/src/main/java/org/bukkit/block/data/type/Cake.java
Normal file
34
paper-api/src/main/java/org/bukkit/block/data/type/Cake.java
Normal file
@@ -0,0 +1,34 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* 'bites' represents the amount of bites which have been taken from this slice
|
||||
* of cake.
|
||||
* <br>
|
||||
* A value of 0 indicates that the cake has not been eaten, whilst a value of
|
||||
* {@link #getMaximumBites()} indicates that it is all gone :(
|
||||
*/
|
||||
public interface Cake extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'bites' property.
|
||||
*
|
||||
* @return the 'bites' value
|
||||
*/
|
||||
int getBites();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'bites' property.
|
||||
*
|
||||
* @param bites the new 'bites' value
|
||||
*/
|
||||
void setBites(int bites);
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'bites' property.
|
||||
*
|
||||
* @return the maximum 'bites' value
|
||||
*/
|
||||
int getMaximumBites();
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
/**
|
||||
* 'type' represents which part of a double chest this block is, or if it is a
|
||||
* single chest.
|
||||
*/
|
||||
public interface Chest extends Directional, Waterlogged {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'type' property.
|
||||
*
|
||||
* @return the 'type' value
|
||||
*/
|
||||
Type getType();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'type' property.
|
||||
*
|
||||
* @param type the new 'type' value
|
||||
*/
|
||||
void setType(Type type);
|
||||
|
||||
/**
|
||||
* Type of this chest block.
|
||||
*/
|
||||
public enum Type {
|
||||
/**
|
||||
* The chest is not linked to any others and contains only one 27 slot
|
||||
* inventory.
|
||||
*/
|
||||
SINGLE,
|
||||
/**
|
||||
* The chest is the left hand side of a double chest and shares a 54
|
||||
* block inventory with the chest to its right.
|
||||
*/
|
||||
LEFT,
|
||||
/**
|
||||
* The chest is the right hand side of a double chest and shares a 54
|
||||
* block inventory with the chest to its left.
|
||||
*/
|
||||
RIGHT;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Ageable;
|
||||
import org.bukkit.block.data.Directional;
|
||||
|
||||
public interface Cocoa extends Ageable, Directional {
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
|
||||
/**
|
||||
* 'conditional' denotes whether this command block is conditional or not, i.e.
|
||||
* will only execute if the preceeding command block also executed successfully.
|
||||
*/
|
||||
public interface CommandBlock extends Directional {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'conditional' property.
|
||||
*
|
||||
* @return the 'conditional' value
|
||||
*/
|
||||
boolean isConditional();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'conditional' property.
|
||||
*
|
||||
* @param conditional the new 'conditional' value
|
||||
*/
|
||||
void setConditional(boolean conditional);
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
|
||||
/**
|
||||
* 'mode' indicates what mode this comparator will operate in.
|
||||
*/
|
||||
public interface Comparator extends Directional, Powerable {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'mode' property.
|
||||
*
|
||||
* @return the 'mode' value
|
||||
*/
|
||||
Mode getMode();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'mode' property.
|
||||
*
|
||||
* @param mode the new 'mode' value
|
||||
*/
|
||||
void setMode(Mode mode);
|
||||
|
||||
/**
|
||||
* The mode in which a comparator will operate in.
|
||||
*/
|
||||
public enum Mode {
|
||||
|
||||
/**
|
||||
* The default mode, similar to a transistor. The comparator will turn
|
||||
* off if either side input is greater than the rear input.
|
||||
*/
|
||||
COMPARE,
|
||||
/**
|
||||
* Alternate subtraction mode. The output signal strength will be equal
|
||||
* to max(rear-max(left,right),0).
|
||||
*/
|
||||
SUBTRACT;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.AnaloguePowerable;
|
||||
|
||||
/**
|
||||
* 'inverted' denotes whether this daylight detector is in the inverted mode,
|
||||
* i.e. activates in the absence of light rather than presence."
|
||||
*/
|
||||
public interface DaylightDetector extends AnaloguePowerable {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'inverted' property.
|
||||
*
|
||||
* @return the 'inverted' value
|
||||
*/
|
||||
boolean isInverted();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'inverted' property.
|
||||
*
|
||||
* @param inverted the new 'inverted' value
|
||||
*/
|
||||
void setInverted(boolean inverted);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
|
||||
/**
|
||||
* Similar to {@link Powerable}, 'triggered' indicates whether or not the
|
||||
* dispenser is currently activated.
|
||||
*/
|
||||
public interface Dispenser extends Directional {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'triggered' property.
|
||||
*
|
||||
* @return the 'triggered' value
|
||||
*/
|
||||
boolean isTriggered();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'triggered' property.
|
||||
*
|
||||
* @param triggered the new 'triggered' value
|
||||
*/
|
||||
void setTriggered(boolean triggered);
|
||||
}
|
||||
41
paper-api/src/main/java/org/bukkit/block/data/type/Door.java
Normal file
41
paper-api/src/main/java/org/bukkit/block/data/type/Door.java
Normal file
@@ -0,0 +1,41 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Bisected;
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Openable;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
|
||||
/**
|
||||
* 'hinge' indicates which hinge this door is attached to and will rotate around
|
||||
* when opened.
|
||||
*/
|
||||
public interface Door extends Bisected, Directional, Openable, Powerable {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'hinge' property.
|
||||
*
|
||||
* @return the 'hinge' value
|
||||
*/
|
||||
Hinge getHinge();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'hinge' property.
|
||||
*
|
||||
* @param hinge the new 'hinge' value
|
||||
*/
|
||||
void setHinge(Hinge hinge);
|
||||
|
||||
/**
|
||||
* The hinge of a door.
|
||||
*/
|
||||
public enum Hinge {
|
||||
/**
|
||||
* Door is attached to the left side.
|
||||
*/
|
||||
LEFT,
|
||||
/**
|
||||
* Door is attached to the right side.
|
||||
*/
|
||||
RIGHT;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
|
||||
/**
|
||||
* 'eye' denotes whether this end portal frame has been activated by having an
|
||||
* eye of ender placed in it.
|
||||
*/
|
||||
public interface EndPortalFrame extends Directional {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'eye' property.
|
||||
*
|
||||
* @return the 'eye' value
|
||||
*/
|
||||
boolean hasEye();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'eye' property.
|
||||
*
|
||||
* @param eye the new 'eye' value
|
||||
*/
|
||||
void setEye(boolean eye);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
public interface EnderChest extends Directional, Waterlogged {
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* The 'moisture' level of farmland indicates how close it is to a water source
|
||||
* (if any).
|
||||
* <br>
|
||||
* A higher moisture level leads, to faster growth of crops on this block, but
|
||||
* cannot be higher than {@link #getMaximumMoisture()}.
|
||||
*/
|
||||
public interface Farmland extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'moisture' property.
|
||||
*
|
||||
* @return the 'moisture' value
|
||||
*/
|
||||
int getMoisture();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'moisture' property.
|
||||
*
|
||||
* @param moisture the new 'moisture' value
|
||||
*/
|
||||
void setMoisture(int moisture);
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'moisture' property.
|
||||
*
|
||||
* @return the maximum 'moisture' value
|
||||
*/
|
||||
int getMaximumMoisture();
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.MultipleFacing;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
public interface Fence extends MultipleFacing, Waterlogged {
|
||||
}
|
||||
10
paper-api/src/main/java/org/bukkit/block/data/type/Fire.java
Normal file
10
paper-api/src/main/java/org/bukkit/block/data/type/Fire.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Ageable;
|
||||
import org.bukkit.block.data.MultipleFacing;
|
||||
|
||||
/**
|
||||
* md_5's mixtape.
|
||||
*/
|
||||
public interface Fire extends Ageable, MultipleFacing {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Lightable;
|
||||
|
||||
public interface Furnace extends Directional, Lightable {
|
||||
}
|
||||
26
paper-api/src/main/java/org/bukkit/block/data/type/Gate.java
Normal file
26
paper-api/src/main/java/org/bukkit/block/data/type/Gate.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Openable;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
|
||||
/**
|
||||
* 'in_wall" indicates if the fence gate is attached to a wall, and if true the
|
||||
* texture is lowered by a small amount to blend in better.
|
||||
*/
|
||||
public interface Gate extends Directional, Openable, Powerable {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'in_wall' property.
|
||||
*
|
||||
* @return the 'in_wall' value
|
||||
*/
|
||||
boolean isInWall();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'in_wall' property.
|
||||
*
|
||||
* @param inWall the new 'in_wall' value
|
||||
*/
|
||||
void setInWall(boolean inWall);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.MultipleFacing;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
public interface GlassPane extends MultipleFacing, Waterlogged {
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
|
||||
/**
|
||||
* Similar to {@link Powerable}, 'enabled' indicates whether or not the hopper
|
||||
* is currently activated.
|
||||
* <br>
|
||||
* Unlike most other blocks, a hopper is only enabled when it is <b>not</b>
|
||||
* receiving any power.
|
||||
*/
|
||||
public interface Hopper extends Directional {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'enabled' property.
|
||||
*
|
||||
* @return the 'enabled' value
|
||||
*/
|
||||
boolean isEnabled();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'enabled' property.
|
||||
*
|
||||
* @param enabled the new 'enabled' value
|
||||
*/
|
||||
void setEnabled(boolean enabled);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* 'has_record' is a quick flag to check whether this jukebox has a record
|
||||
* inside it.
|
||||
*/
|
||||
public interface Jukebox extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'has_record' property.
|
||||
*
|
||||
* @return the 'has_record' value
|
||||
*/
|
||||
boolean hasRecord();
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
public interface Ladder extends Directional, Waterlogged {
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* 'persistent' indicates whether or not leaves will be checked by the server to
|
||||
* see if they are subject to decay or not.
|
||||
* <br>
|
||||
* 'distance' denotes how far the block is from a tree and is used in
|
||||
* conjunction with 'persistent' flag to determine if the leaves will decay or
|
||||
* not.
|
||||
*/
|
||||
public interface Leaves extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'persistent' property.
|
||||
*
|
||||
* @return the persistent value
|
||||
*/
|
||||
boolean isPersistent();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'persistent' property.
|
||||
*
|
||||
* @param persistent the new 'persistent' value
|
||||
*/
|
||||
void setPersistent(boolean persistent);
|
||||
|
||||
/**
|
||||
* Gets the value of the 'distance' property.
|
||||
*
|
||||
* @return the 'distance' value
|
||||
*/
|
||||
int getDistance();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'distance' property.
|
||||
*
|
||||
* @param distance the new 'distance' value
|
||||
*/
|
||||
void setDistance(int distance);
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.Instrument;
|
||||
import org.bukkit.Note;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
|
||||
/**
|
||||
* 'instrument' is the type of sound made when this note block is activated.
|
||||
* <br>
|
||||
* 'note' is the specified tuned pitch that the instrument will be played in.
|
||||
*/
|
||||
public interface NoteBlock extends Powerable {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'instrument' property.
|
||||
*
|
||||
* @return the 'instrument' value
|
||||
*/
|
||||
Instrument getInstrument();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'instrument' property.
|
||||
*
|
||||
* @param instrument the new 'instrument' value
|
||||
*/
|
||||
void setInstrument(Instrument instrument);
|
||||
|
||||
/**
|
||||
* Gets the value of the 'note' property.
|
||||
*
|
||||
* @return the 'note' value
|
||||
*/
|
||||
Note getNote();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'note' property.
|
||||
*
|
||||
* @param note the new 'note' value
|
||||
*/
|
||||
void setNote(Note note);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
|
||||
public interface Observer extends Directional, Powerable {
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
|
||||
/**
|
||||
* 'extended' denotes whether the piston head is currently extended or not.
|
||||
*/
|
||||
public interface Piston extends Directional {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'extended' property.
|
||||
*
|
||||
* @return the 'extended' value
|
||||
*/
|
||||
boolean isExtended();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'extended' property.
|
||||
*
|
||||
* @param extended the new 'extended' value
|
||||
*/
|
||||
void setExtended(boolean extended);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
/**
|
||||
* 'short' denotes this piston head is shorter than the usual amount because it
|
||||
* is currently retracting.
|
||||
*/
|
||||
public interface PistonHead extends TechnicalPiston {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'short' property.
|
||||
*
|
||||
* @return the 'short' value
|
||||
*/
|
||||
boolean isShort();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'short' property.
|
||||
*
|
||||
* @param _short the new 'short' value
|
||||
*/
|
||||
void setShort(boolean _short);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Powerable;
|
||||
import org.bukkit.block.data.Rail;
|
||||
|
||||
/**
|
||||
* A type of minecart rail which interacts with redstone in one way or another.
|
||||
*/
|
||||
public interface RedstoneRail extends Powerable, Rail {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Lightable;
|
||||
|
||||
public interface RedstoneWallTorch extends Directional, Lightable {
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import java.util.Set;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.block.data.AnaloguePowerable;
|
||||
|
||||
/**
|
||||
* 'north', 'east', 'south', 'west' represent the types of connections this
|
||||
* redstone wire has to adjacent blocks.
|
||||
*/
|
||||
public interface RedstoneWire extends AnaloguePowerable {
|
||||
|
||||
/**
|
||||
* Checks the type of connection on the specified face.
|
||||
*
|
||||
* @param face to check
|
||||
* @return connection type
|
||||
*/
|
||||
Connection getFace(BlockFace face);
|
||||
|
||||
/**
|
||||
* Sets the type of connection on the specified face.
|
||||
*
|
||||
* @param face to set
|
||||
* @param connection the connection type
|
||||
*/
|
||||
void setFace(BlockFace face, Connection connection);
|
||||
|
||||
/**
|
||||
* Gets all of this faces which may be set on this block.
|
||||
*
|
||||
* @return all allowed faces
|
||||
*/
|
||||
Set<BlockFace> getAllowedFaces();
|
||||
|
||||
/**
|
||||
* The way in which a redstone wire can connect to an adjacent block face.
|
||||
*/
|
||||
public enum Connection {
|
||||
/**
|
||||
* The wire travels up the side of the block adjacent to this face.
|
||||
*/
|
||||
UP,
|
||||
/**
|
||||
* The wire travels flat from this face and into the adjacent block.
|
||||
*/
|
||||
SIDE,
|
||||
/**
|
||||
* The wire does not connect in this direction.
|
||||
*/
|
||||
NONE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
|
||||
/**
|
||||
* 'delay' is the propagation delay of a repeater, i.e. how many ticks before it
|
||||
* will be activated from a current change and propagate it to the next block.
|
||||
* <br>
|
||||
* Delay may not be lower than {@link #getMinimumDelay()} or higher than
|
||||
* {@link #getMaximumDelay()}.
|
||||
* <br>
|
||||
* 'locked' denotes whether the repeater is in the locked state or not.
|
||||
* <br>
|
||||
* A locked repeater will not change its output until it is unlocked. In game, a
|
||||
* locked repeater is created by having a constant current perpendicularly
|
||||
* entering the block.
|
||||
*/
|
||||
public interface Repeater extends Directional, Powerable {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'delay' property.
|
||||
*
|
||||
* @return the 'delay' value
|
||||
*/
|
||||
int getDelay();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'delay' property.
|
||||
*
|
||||
* @param delay the new 'delay' value
|
||||
*/
|
||||
void setDelay(int delay);
|
||||
|
||||
/**
|
||||
* Gets the minimum allowed value of the 'delay' property.
|
||||
*
|
||||
* @return the minimum 'delay' value
|
||||
*/
|
||||
int getMinimumDelay();
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'delay' property.
|
||||
*
|
||||
* @return the maximum 'delay' value
|
||||
*/
|
||||
int getMaximumDelay();
|
||||
|
||||
/**
|
||||
* Gets the value of the 'locked' property.
|
||||
*
|
||||
* @return the 'locked' value
|
||||
*/
|
||||
boolean isLocked();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'locked' property.
|
||||
*
|
||||
* @param locked the new 'locked' value
|
||||
*/
|
||||
void setLocked(boolean locked);
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* 'stage' represents the growth stage of a sapling.
|
||||
* <br>
|
||||
* When the sapling reaches {@link #getMaximumStage()} it will attempt to grow
|
||||
* into a tree as the next stage.
|
||||
*/
|
||||
public interface Sapling extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'stage' property.
|
||||
*
|
||||
* @return the 'stage' value
|
||||
*/
|
||||
int getStage();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'stage' property.
|
||||
*
|
||||
* @param stage the new 'stage' value
|
||||
*/
|
||||
void setStage(int stage);
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'stage' property.
|
||||
*
|
||||
* @return the maximum 'stage' value
|
||||
*/
|
||||
int getMaximumStage();
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
/**
|
||||
* 'pickles' indicates the number of pickles in this block.
|
||||
*/
|
||||
public interface SeaPickle extends Waterlogged {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'pickles' property.
|
||||
*
|
||||
* @return the 'pickles' value
|
||||
*/
|
||||
int getPickles();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'pickles' property.
|
||||
*
|
||||
* @param pickles the new 'pickles' value
|
||||
*/
|
||||
void setPickles(int pickles);
|
||||
|
||||
/**
|
||||
* Gets the minimum allowed value of the 'pickles' property.
|
||||
*
|
||||
* @return the minimum 'pickles' value
|
||||
*/
|
||||
int getMinimumPickles();
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'pickles' property.
|
||||
*
|
||||
* @return the maximum 'pickles' value
|
||||
*/
|
||||
int getMaximumPickles();
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Rotatable;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
public interface Sign extends Rotatable, Waterlogged {
|
||||
}
|
||||
43
paper-api/src/main/java/org/bukkit/block/data/type/Slab.java
Normal file
43
paper-api/src/main/java/org/bukkit/block/data/type/Slab.java
Normal file
@@ -0,0 +1,43 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
/**
|
||||
* 'type' represents what state the slab is in - either top, bottom, or a double
|
||||
* slab occupying the full block.
|
||||
*/
|
||||
public interface Slab extends BlockData, Waterlogged {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'type' property.
|
||||
*
|
||||
* @return the 'type' value
|
||||
*/
|
||||
Type getType();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'type' property.
|
||||
*
|
||||
* @param type the new 'type' value
|
||||
*/
|
||||
void setType(Type type);
|
||||
|
||||
/**
|
||||
* The type of the slab.
|
||||
*/
|
||||
public enum Type {
|
||||
/**
|
||||
* The slab occupies the upper y half of the block.
|
||||
*/
|
||||
TOP,
|
||||
/**
|
||||
* The slab occupies the lower y half of the block.
|
||||
*/
|
||||
BOTTOM,
|
||||
/**
|
||||
* The slab occupies the entire block.
|
||||
*/
|
||||
DOUBLE;
|
||||
}
|
||||
}
|
||||
41
paper-api/src/main/java/org/bukkit/block/data/type/Snow.java
Normal file
41
paper-api/src/main/java/org/bukkit/block/data/type/Snow.java
Normal file
@@ -0,0 +1,41 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* 'layers' represents the amount of layers of snow which are present in this
|
||||
* block.
|
||||
* <br>
|
||||
* May not be lower than {@link #getMinimumLayers()} or higher than
|
||||
* {@link #getMaximumLayers()}.
|
||||
*/
|
||||
public interface Snow extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'layers' property.
|
||||
*
|
||||
* @return the 'layers' value
|
||||
*/
|
||||
int getLayers();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'layers' property.
|
||||
*
|
||||
* @param layers the new 'layers' value
|
||||
*/
|
||||
void setLayers(int layers);
|
||||
|
||||
/**
|
||||
* Gets the minimum allowed value of the 'layers' property.
|
||||
*
|
||||
* @return the minimum 'layers' value
|
||||
*/
|
||||
int getMinimumLayers();
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'layers' property.
|
||||
*
|
||||
* @return the maximum 'layers' value
|
||||
*/
|
||||
int getMaximumLayers();
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Bisected;
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
/**
|
||||
* 'shape' represents the texture and bounding box shape of these stairs.
|
||||
*/
|
||||
public interface Stairs extends Bisected, Directional, Waterlogged {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'shape' property.
|
||||
*
|
||||
* @return the 'shape' value
|
||||
*/
|
||||
Shape getShape();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'shape' property.
|
||||
*
|
||||
* @param shape the new 'shape' value
|
||||
*/
|
||||
void setShape(Shape shape);
|
||||
|
||||
/**
|
||||
* The shape of a stair block - used for constructing corners.
|
||||
*/
|
||||
public enum Shape {
|
||||
/**
|
||||
* Regular stair block.
|
||||
*/
|
||||
STRAIGHT,
|
||||
/**
|
||||
* Inner corner stair block with higher left side.
|
||||
*/
|
||||
INNER_LEFT,
|
||||
/**
|
||||
* Inner corner stair block with higher right side.
|
||||
*/
|
||||
INNER_RIGHT,
|
||||
/**
|
||||
* Outer corner stair block with higher left side.
|
||||
*/
|
||||
OUTER_LEFT,
|
||||
/**
|
||||
* Outer corner stair block with higher right side.
|
||||
*/
|
||||
OUTER_RIGHT;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* 'mode' represents the different modes in which this structure block may
|
||||
* operate.
|
||||
*/
|
||||
public interface StructureBlock extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'mode' property.
|
||||
*
|
||||
* @return the 'mode' value
|
||||
*/
|
||||
Mode getMode();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'mode' property.
|
||||
*
|
||||
* @param mode the new 'mode' value
|
||||
*/
|
||||
void setMode(Mode mode);
|
||||
|
||||
/**
|
||||
* Operating mode of a structure block.
|
||||
*/
|
||||
public enum Mode {
|
||||
/**
|
||||
* Allows selection and saving of a structure.
|
||||
*/
|
||||
SAVE,
|
||||
/**
|
||||
* Allows loading of a structure.
|
||||
*/
|
||||
LOAD,
|
||||
/**
|
||||
* Used for detection of two opposite corners of a structure.
|
||||
*/
|
||||
CORNER,
|
||||
/**
|
||||
* Dummy block used to run a custom function during world generation
|
||||
* before being removed.
|
||||
*/
|
||||
DATA;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
|
||||
/**
|
||||
* 'face' represents the face to which a lever or button is stuck.
|
||||
* <br>
|
||||
* This is used in conjunction with {@link Directional} to compute the
|
||||
* orientation of these blocks.
|
||||
*/
|
||||
public interface Switch extends Directional, Powerable {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'face' property.
|
||||
*
|
||||
* @return the 'face' value
|
||||
*/
|
||||
Face getFace();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'face' property.
|
||||
*
|
||||
* @param face the new 'face' value
|
||||
*/
|
||||
void setFace(Face face);
|
||||
|
||||
/**
|
||||
* The face to which a switch type block is stuck.
|
||||
*/
|
||||
public enum Face {
|
||||
/**
|
||||
* The switch is mounted to the floor and pointing upwards.
|
||||
*/
|
||||
FLOOR,
|
||||
/**
|
||||
* The switch is mounted to the wall.
|
||||
*/
|
||||
WALL,
|
||||
/**
|
||||
* The switch is mounted to the ceiling and pointing dowanrds.
|
||||
*/
|
||||
CEILING;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
|
||||
/**
|
||||
* 'type' represents the type of piston which this (technical) block corresponds
|
||||
* to.
|
||||
*/
|
||||
public interface TechnicalPiston extends Directional {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'type' property.
|
||||
*
|
||||
* @return the 'stage' value
|
||||
*/
|
||||
Type getType();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'type' property.
|
||||
*
|
||||
* @param type the new ''type value
|
||||
*/
|
||||
void setType(Type type);
|
||||
|
||||
/**
|
||||
* Different piston variants.
|
||||
*/
|
||||
public enum Type {
|
||||
/**
|
||||
* A normal piston which does not pull connected blocks backwards on
|
||||
* retraction.
|
||||
*/
|
||||
NORMAL,
|
||||
/**
|
||||
* A sticky piston which will also retract connected blocks.
|
||||
*/
|
||||
STICKY;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Bisected;
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Openable;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
public interface TrapDoor extends Bisected, Directional, Openable, Powerable, Waterlogged {
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Attachable;
|
||||
import org.bukkit.block.data.MultipleFacing;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
|
||||
/**
|
||||
* 'disarmed' denotes that the tripwire was broken with shears and will not
|
||||
* subsequently produce a current when destroyed.
|
||||
*/
|
||||
public interface Tripwire extends Attachable, MultipleFacing, Powerable {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'disarmed' property.
|
||||
*
|
||||
* @return the 'disarmed' value
|
||||
*/
|
||||
boolean isDisarmed();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'disarmed' property.
|
||||
*
|
||||
* @param disarmed the new 'disarmed' value
|
||||
*/
|
||||
void setDisarmed(boolean disarmed);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Attachable;
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
|
||||
public interface TripwireHook extends Attachable, Directional, Powerable {
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* 'hatch' is the number of turtles which may hatch from these eggs.
|
||||
* <br>
|
||||
* 'eggs' is the number of eggs which appear in this block.
|
||||
*/
|
||||
public interface TurtleEgg extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'eggs' property.
|
||||
*
|
||||
* @return the 'eggs' value
|
||||
*/
|
||||
int getEggs();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'eggs' property.
|
||||
*
|
||||
* @param eggs the new 'eggs' value
|
||||
*/
|
||||
void setEggs(int eggs);
|
||||
|
||||
/**
|
||||
* Gets the minimum allowed value of the 'eggs' property.
|
||||
*
|
||||
* @return the minimum 'eggs' value
|
||||
*/
|
||||
int getMinimumEggs();
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'eggs' property.
|
||||
*
|
||||
* @return the maximum 'eggs' value
|
||||
*/
|
||||
int getMaximumEggs();
|
||||
|
||||
/**
|
||||
* Gets the value of the 'hatch' property.
|
||||
*
|
||||
* @return the 'hatch' value
|
||||
*/
|
||||
int getHatch();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'hatch' property.
|
||||
*
|
||||
* @param hatch the new 'hatch' value
|
||||
*/
|
||||
void setHatch(int hatch);
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'hatch' property.
|
||||
*
|
||||
* @return the maximum 'hatch' value
|
||||
*/
|
||||
int getMaximumHatch();
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
public interface WallSign extends Directional, Waterlogged {
|
||||
}
|
||||
Reference in New Issue
Block a user