public class BaseBlock extends Block
new class to replace this one| Constructor and Description |
|---|
BaseBlock(int type)
Construct the block with its type, with default data value 0.
|
BaseBlock(int type,
int data)
Construct the block with its type and data.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
containsFuzzy(Collection<BaseBlock> collection,
BaseBlock o) |
int |
cycleData(int increment)
Cycle the damage value of the block forward or backward
|
boolean |
equals(Object o)
Checks whether the type ID and data value are equal.
|
boolean |
equalsFuzzy(BaseBlock o)
Checks if the type is the same, and if data is the same if only data != -1.
|
BaseBlock |
flip()
Flip this block.
|
BaseBlock |
flip(CuboidClipboard.FlipDirection direction)
Flip this block.
|
int |
getType()
Get the type of block.
|
boolean |
inIterable(Iterable<BaseBlock> iter)
Deprecated.
This method is silly, use
containsFuzzy(java.util.Collection, BaseBlock) instead. |
boolean |
isAir()
Returns true if it's air.
|
int |
rotate90()
Rotate this block 90 degrees.
|
int |
rotate90Reverse()
Rotate this block -90 degrees.
|
void |
setType(int type)
Set the type of block.
|
getData, getId, getNbtData, getNbtId, hashCode, hasNbtData, hasWildcardData, setData, setId, setIdAndData, setNbtData, toStringpublic BaseBlock(int type)
type - type ID of blockpublic BaseBlock(int type,
int data)
type - type ID of blockdata - data valuepublic int getType()
public void setType(int type)
type - the type to setpublic boolean isAir()
public int rotate90()
public int rotate90Reverse()
public int cycleData(int increment)
increment - 1 for forward, -1 for backwardpublic BaseBlock flip()
public BaseBlock flip(CuboidClipboard.FlipDirection direction)
direction - direction to flip inpublic boolean equals(Object o)
public boolean equalsFuzzy(BaseBlock o)
o - other block@Deprecated public boolean inIterable(Iterable<BaseBlock> iter)
containsFuzzy(java.util.Collection, BaseBlock) instead.iter - public static boolean containsFuzzy(Collection<BaseBlock> collection, BaseBlock o)
Copyright © 2010-2014. All Rights Reserved.