Adding/expanding documentation
By: Celtic Minstrel <celtic.minstrel.ca@some.place>
This commit is contained in:
@@ -151,6 +151,12 @@ public interface Block extends Metadatable {
|
||||
*/
|
||||
void setData(byte data);
|
||||
|
||||
/**
|
||||
* Sets the metadata for this block
|
||||
*
|
||||
* @param data New block specific metadata
|
||||
* @param applyPhysics False to cancel physics from the changed block.
|
||||
*/
|
||||
void setData(byte data, boolean applyPhysics);
|
||||
|
||||
/**
|
||||
@@ -168,8 +174,23 @@ public interface Block extends Metadatable {
|
||||
*/
|
||||
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
|
||||
*/
|
||||
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
|
||||
*/
|
||||
boolean setTypeIdAndData(int type, byte data, boolean applyPhysics);
|
||||
|
||||
/**
|
||||
|
||||
@@ -146,7 +146,13 @@ public interface BlockState extends Metadatable {
|
||||
*/
|
||||
boolean update(boolean force);
|
||||
|
||||
/**
|
||||
* @return The data as a raw byte.
|
||||
*/
|
||||
public byte getRawData();
|
||||
|
||||
/**
|
||||
* @param data The new data value for the block.
|
||||
*/
|
||||
public void setRawData(byte data);
|
||||
}
|
||||
|
||||
@@ -4,8 +4,17 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public enum PistonMoveReaction {
|
||||
/**
|
||||
* Indicates that the block can be pushed or pulled.
|
||||
*/
|
||||
MOVE(0),
|
||||
/**
|
||||
* Indicates the block is fragile and will break if pushed on.
|
||||
*/
|
||||
BREAK(1),
|
||||
/**
|
||||
* Indicates that the block will resist being pushed or pulled.
|
||||
*/
|
||||
BLOCK(2);
|
||||
|
||||
private int id;
|
||||
@@ -20,10 +29,17 @@ public enum PistonMoveReaction {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The ID of the move reaction
|
||||
*/
|
||||
public int getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id An ID
|
||||
* @return The move reaction with that ID
|
||||
*/
|
||||
public static PistonMoveReaction getById(int id) {
|
||||
return byId.get(id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user