com.cliffblaster.game.level.tile
Class LiquidTile

java.lang.Object
  extended by com.cliffblaster.game.level.tile.Tile
      extended by com.cliffblaster.game.level.tile.LiquidTile
Direct Known Subclasses:
StaticLiquidTile

public class LiquidTile
extends Tile

Trampoline tile class

Author:
Vulpovile

Field Summary
 int flowRate
           
 
Fields inherited from class com.cliffblaster.game.level.tile.Tile
BACK, bookshelf, bookshelf_empty, BOTTOM, bricks, canTick, canvas_black, canvas_blue, canvas_cyan, canvas_green, canvas_grey, canvas_indigo, canvas_lightblue, canvas_lime, canvas_magenta, canvas_orange, canvas_pink, canvas_red, canvas_turquoise, canvas_violet, canvas_white, canvas_yellow, coalblock, coalore, conveyor, dandelion, dirt, dislodgerblock, dynamite, elevator, FRONT, glass, goldblock, goldore, grass, gravel, id, ironblock, ironore, IS_LIQUID, lava, LAVA, leaves, LEFT, liquidType, log, MOVING, obsidian, plant, RIGHT, rose, sand, siding, sponge, STILL, stilllava, stillwater, stone, stonebrick, texCoord, tiles, TOP, trampoline, water, WATER, woodplank
 
Constructor Summary
LiquidTile(int i, int tex1, int flowRate, byte liquidType)
           
 
Method Summary
 boolean canFlow(com.cliffblaster.game.level.Level level, int x, int y, int z)
           
protected  boolean canRenderFace(com.cliffblaster.game.level.Level level, int x, int y, int z, int layer)
          Determines whether the face can be rendered
 boolean destroySurroundingOtherLiquid(com.cliffblaster.game.level.Level level, int x, int y, int z)
           
 void flow(com.cliffblaster.game.level.Level level, int x, int y, int z)
           
static int getBaseId(int id)
           
 long getFlowDivider()
           
 AABB getTileAABB(com.cliffblaster.game.level.Level level, int x, int y, int z)
          Gets the AABB of the tile
 boolean glows()
           
 boolean isOpaque()
           
protected  void listFlow(com.cliffblaster.game.level.Level level, int x, int y, int z)
           
 boolean mayPick()
           
 void onNeighbourNotify(com.cliffblaster.game.level.Level level, int x, int y, int z, int id)
          Tile notify
protected static int oppositeId(int id)
           
protected  void renderFace(com.cliffblaster.game.level.Level level, int face, float x, float y, float z)
          Renders the given face
 void tick(com.cliffblaster.game.level.Level level, int x, int y, int z)
          Tile tick
 
Methods inherited from class com.cliffblaster.game.level.tile.Tile
blocksLight, canExplode, entityHit, getStepSound, getTextureFromFace, getTextureFromFace, getTileRenderAABB, getTitle, isMechanical, onDestroy, onExplode, onNeighbourNotify, onPlace, onRemove, render, renderBackFace, renderUnbound, setShape, setStepSound, setTick, setTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

flowRate

public final int flowRate
Constructor Detail

LiquidTile

public LiquidTile(int i,
                  int tex1,
                  int flowRate,
                  byte liquidType)
Method Detail

isOpaque

public boolean isOpaque()
Overrides:
isOpaque in class Tile

getTileAABB

public AABB getTileAABB(com.cliffblaster.game.level.Level level,
                        int x,
                        int y,
                        int z)
Gets the AABB of the tile

Overrides:
getTileAABB in class Tile
Parameters:
level -
x -
y -
z -
Returns:
AABB

mayPick

public boolean mayPick()
Overrides:
mayPick in class Tile

renderFace

protected void renderFace(com.cliffblaster.game.level.Level level,
                          int face,
                          float x,
                          float y,
                          float z)
Description copied from class: Tile
Renders the given face

Overrides:
renderFace in class Tile

tick

public void tick(com.cliffblaster.game.level.Level level,
                 int x,
                 int y,
                 int z)
Description copied from class: Tile
Tile tick

Overrides:
tick in class Tile

canRenderFace

protected boolean canRenderFace(com.cliffblaster.game.level.Level level,
                                int x,
                                int y,
                                int z,
                                int layer)
Description copied from class: Tile
Determines whether the face can be rendered

Overrides:
canRenderFace in class Tile
Returns:

glows

public boolean glows()
Overrides:
glows in class Tile

onNeighbourNotify

public void onNeighbourNotify(com.cliffblaster.game.level.Level level,
                              int x,
                              int y,
                              int z,
                              int id)
Description copied from class: Tile
Tile notify

Overrides:
onNeighbourNotify in class Tile

oppositeId

protected static int oppositeId(int id)

destroySurroundingOtherLiquid

public boolean destroySurroundingOtherLiquid(com.cliffblaster.game.level.Level level,
                                             int x,
                                             int y,
                                             int z)

getBaseId

public static int getBaseId(int id)

getFlowDivider

public long getFlowDivider()
Overrides:
getFlowDivider in class Tile

listFlow

protected void listFlow(com.cliffblaster.game.level.Level level,
                        int x,
                        int y,
                        int z)

flow

public void flow(com.cliffblaster.game.level.Level level,
                 int x,
                 int y,
                 int z)
Overrides:
flow in class Tile

canFlow

public boolean canFlow(com.cliffblaster.game.level.Level level,
                       int x,
                       int y,
                       int z)