|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.cliffblaster.game.level.tile.Tile
public class Tile
Base tile class, creates all the tiles and stores tile information
Field Summary | |
---|---|
protected static int |
BACK
Face values for rendering |
static Tile |
bookshelf
|
static Tile |
bookshelf_empty
|
protected static int |
BOTTOM
Face values for rendering |
static Tile |
bricks
|
static boolean[] |
canTick
|
static Tile |
canvas_black
|
static Tile |
canvas_blue
|
static Tile |
canvas_cyan
|
static Tile |
canvas_green
|
static Tile |
canvas_grey
|
static Tile |
canvas_indigo
|
static Tile |
canvas_lightblue
|
static Tile |
canvas_lime
|
static Tile |
canvas_magenta
|
static Tile |
canvas_orange
|
static Tile |
canvas_pink
|
static Tile |
canvas_red
|
static Tile |
canvas_turquoise
|
static Tile |
canvas_violet
|
static Tile |
canvas_white
|
static Tile |
canvas_yellow
|
static Tile |
coalblock
|
static Tile |
coalore
|
static Tile |
conveyor
|
static Tile |
dandelion
|
static Tile |
dirt
|
static Tile |
dislodgerblock
|
static Tile |
dynamite
|
static Tile |
elevator
|
protected static int |
FRONT
Face values for rendering |
static Tile |
glass
|
static Tile |
goldblock
|
static Tile |
goldore
|
static Tile |
grass
|
static Tile |
gravel
|
int |
id
|
static Tile |
ironblock
|
static Tile |
ironore
|
static byte |
IS_LIQUID
|
static Tile |
lava
|
static byte |
LAVA
|
static Tile |
leaves
|
protected static int |
LEFT
Face values for rendering |
byte |
liquidType
|
static Tile |
log
|
static byte |
MOVING
|
static Tile |
obsidian
|
static Tile |
plant
|
protected static int |
RIGHT
Face values for rendering |
static Tile |
rose
|
static Tile |
sand
|
static Tile |
siding
|
static Tile |
sponge
|
static byte |
STILL
|
static Tile |
stilllava
|
static Tile |
stillwater
|
static Tile |
stone
|
static Tile |
stonebrick
|
int |
texCoord
|
static Tile[] |
tiles
|
protected static int |
TOP
Face values for rendering |
static Tile |
trampoline
|
static Tile |
water
|
static byte |
WATER
|
static Tile |
woodplank
|
Constructor Summary | |
---|---|
protected |
Tile(int id)
Create a tile specifying the ID and using the default texture coordinate |
protected |
Tile(int id,
int texCoord)
Create a tile specifying the ID and texture coordinate on the tiles.png file |
Method Summary | |
---|---|
boolean |
blocksLight()
Tells whether the tile blocks light |
boolean |
canExplode()
|
protected boolean |
canRenderFace(com.cliffblaster.game.level.Level level,
int x,
int y,
int z,
int layer)
Determines whether the face can be rendered |
void |
entityHit(com.cliffblaster.game.level.Level level,
int x,
int y,
int z,
com.cliffblaster.game.entity.Entity entity,
int direction)
Function called when entity hits the tile |
void |
flow(com.cliffblaster.game.level.Level level,
int x,
int y,
int z)
|
long |
getFlowDivider()
|
java.lang.String |
getStepSound()
|
int |
getTextureFromFace(int face)
Gets the texture for the face |
int |
getTextureFromFace(int face,
com.cliffblaster.game.level.Level level,
float x,
float y,
float z)
Gets the texture for the face and level |
AABB |
getTileAABB(com.cliffblaster.game.level.Level level,
int x,
int y,
int z)
Gets the AABB of the tile |
AABB |
getTileRenderAABB(com.cliffblaster.game.level.Level level,
int x,
int y,
int z)
Gets the AABB of the tile |
java.lang.String |
getTitle()
|
boolean |
glows()
|
boolean |
isMechanical()
|
boolean |
isOpaque()
|
boolean |
mayPick()
|
void |
onDestroy(com.cliffblaster.game.level.Level level,
com.cliffblaster.game.entity.Player player,
int x,
int y,
int z)
|
void |
onExplode(com.cliffblaster.game.level.Level level,
int x,
int y,
int z,
float distance)
|
void |
onNeighbourNotify(com.cliffblaster.game.level.Level level,
int x,
int y,
int z,
int notifierId)
Tile notify |
void |
onNeighbourNotify(com.cliffblaster.game.level.Level level,
int x,
int y,
int z,
int ntx,
int nty,
int ntz,
int notifierId)
Tile notify |
void |
onPlace(com.cliffblaster.game.level.Level level,
int x,
int y,
int z)
|
void |
onRemove(com.cliffblaster.game.level.Level level,
int x,
int y,
int z)
|
void |
render(com.cliffblaster.game.level.Level level,
int x,
int y,
int z,
int layer)
Render function, renders tile with location to render, the layer, and on what level. |
protected void |
renderBackFace(com.cliffblaster.game.level.Level level,
int face,
float x,
float y,
float z)
Renders the backside of the face |
protected void |
renderFace(com.cliffblaster.game.level.Level level,
int face,
float x,
float y,
float z)
Renders the given face |
void |
renderUnbound(com.cliffblaster.game.level.Level level,
float x,
float y,
float z)
|
protected void |
setShape(float sx,
float sy,
float sz,
float ex,
float ey,
float ez)
|
protected Tile |
setStepSound(java.lang.String sound)
Set the step sound for the tile |
protected void |
setTick(boolean ticks)
Marks the tile as tickable |
protected Tile |
setTitle(java.lang.String string)
Sets a tooltip title for the block |
void |
tick(com.cliffblaster.game.level.Level level,
int x,
int y,
int z)
Tile tick |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static Tile[] tiles
public static boolean[] canTick
public static final byte IS_LIQUID
public static final byte WATER
public static final byte LAVA
public static final byte STILL
public static final byte MOVING
public static final Tile stone
public static final Tile grass
public static final Tile dirt
public static final Tile stonebrick
public static final Tile woodplank
public static final Tile trampoline
public static final Tile elevator
public static final Tile plant
public static final Tile glass
public static final Tile water
public static final Tile stillwater
public static final Tile lava
public static final Tile stilllava
public static final Tile log
public static final Tile leaves
public static final Tile sponge
public static final Tile rose
public static final Tile dandelion
public static final Tile sand
public static final Tile gravel
public static final Tile siding
public static final Tile dynamite
public static final Tile conveyor
public static final Tile coalore
public static final Tile ironore
public static final Tile goldore
public static final Tile coalblock
public static final Tile ironblock
public static final Tile goldblock
public static final Tile dislodgerblock
public static final Tile bricks
public static final Tile canvas_white
public static final Tile canvas_black
public static final Tile canvas_grey
public static final Tile canvas_red
public static final Tile canvas_orange
public static final Tile canvas_yellow
public static final Tile canvas_green
public static final Tile canvas_lime
public static final Tile canvas_turquoise
public static final Tile canvas_cyan
public static final Tile canvas_lightblue
public static final Tile canvas_blue
public static final Tile canvas_indigo
public static final Tile canvas_violet
public static final Tile canvas_pink
public static final Tile canvas_magenta
public static final Tile bookshelf_empty
public static final Tile bookshelf
public static final Tile obsidian
public byte liquidType
public final int id
public final int texCoord
protected static final int TOP
protected static final int BOTTOM
protected static final int FRONT
protected static final int BACK
protected static final int RIGHT
protected static final int LEFT
Constructor Detail |
---|
protected Tile(int id, int texCoord)
id
- texCoord
- protected Tile(int id)
id
- Method Detail |
---|
protected Tile setTitle(java.lang.String string)
string
-
protected Tile setStepSound(java.lang.String sound)
sound
- ID ending
public java.lang.String getTitle()
protected void setTick(boolean ticks)
ticks
- protected boolean canRenderFace(com.cliffblaster.game.level.Level level, int x, int y, int z, int layer)
level
- x
- y
- z
- layer
-
public void render(com.cliffblaster.game.level.Level level, int x, int y, int z, int layer)
level
- x
- y
- z
- layer
- public void renderUnbound(com.cliffblaster.game.level.Level level, float x, float y, float z)
public AABB getTileAABB(com.cliffblaster.game.level.Level level, int x, int y, int z)
level
- x
- y
- z
-
public AABB getTileRenderAABB(com.cliffblaster.game.level.Level level, int x, int y, int z)
level
- x
- y
- z
-
public boolean mayPick()
protected void renderFace(com.cliffblaster.game.level.Level level, int face, float x, float y, float z)
level
- face
- x
- y
- z
- protected void renderBackFace(com.cliffblaster.game.level.Level level, int face, float x, float y, float z)
level
- face
- x
- y
- z
- public void entityHit(com.cliffblaster.game.level.Level level, int x, int y, int z, com.cliffblaster.game.entity.Entity entity, int direction)
level
- x
- y
- z
- entity
- direction
- (AABB face)public int getTextureFromFace(int face)
face
-
public int getTextureFromFace(int face, com.cliffblaster.game.level.Level level, float x, float y, float z)
face
-
public boolean blocksLight()
public boolean isOpaque()
public boolean glows()
protected void setShape(float sx, float sy, float sz, float ex, float ey, float ez)
public void tick(com.cliffblaster.game.level.Level level, int x, int y, int z)
level
- x
- y
- z
- public void onNeighbourNotify(com.cliffblaster.game.level.Level level, int x, int y, int z, int notifierId)
level
- x
- y
- z
- notifierId
- public void onNeighbourNotify(com.cliffblaster.game.level.Level level, int x, int y, int z, int ntx, int nty, int ntz, int notifierId)
level
- x
- y
- z
- notifierId
- public void onPlace(com.cliffblaster.game.level.Level level, int x, int y, int z)
public void onRemove(com.cliffblaster.game.level.Level level, int x, int y, int z)
public void flow(com.cliffblaster.game.level.Level level, int x, int y, int z)
public long getFlowDivider()
public boolean canExplode()
public void onExplode(com.cliffblaster.game.level.Level level, int x, int y, int z, float distance)
public void onDestroy(com.cliffblaster.game.level.Level level, com.cliffblaster.game.entity.Player player, int x, int y, int z)
public boolean isMechanical()
public java.lang.String getStepSound()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |