Class BlockConfig
- java.lang.Object
-
- com.bombinggames.wurfelengine.core.map.BlockConfig
-
public class BlockConfig extends java.lang.ObjectAn interface which is used to get information about custom blocks.
-
-
Constructor Summary
Constructors Constructor Description BlockConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetName(byte id, byte value)Default is "undefined".booleanhasSides(byte spriteId, byte spriteValue)Is the block a true block with three sides or does it get rendered by a single sprite?booleanisIndestructible(byte id, byte value)booleanisLiquid(byte id, byte value)Check if the block is liquid.booleanisObstacle(byte id, byte value)Engine reserves ids are 0-9 and must be redirected to return super method.booleanisObstacle(int block)booleanisTransparent(byte spriteId, byte spriteValue)When it is possible to see though the sides.RenderCelltoRenderBlock(byte id, byte value)
-
-
-
Method Detail
-
isTransparent
public boolean isTransparent(byte spriteId, byte spriteValue)When it is possible to see though the sides.- Parameters:
spriteId-spriteValue-- Returns:
-
isLiquid
public boolean isLiquid(byte id, byte value)Check if the block is liquid.- Parameters:
id-value-- Returns:
- true if liquid, false if not
-
getName
public java.lang.String getName(byte id, byte value)Default is "undefined".- Parameters:
id-value-- Returns:
-
toRenderBlock
public RenderCell toRenderBlock(byte id, byte value)
- Parameters:
id- there are ids < 10 which are filtered beforevalue-- Returns:
-
hasSides
public boolean hasSides(byte spriteId, byte spriteValue)Is the block a true block with three sides or does it get rendered by a single sprite?
This field is only used for representation (view) related data.
Only used for blocks. Entities should return false.- Parameters:
spriteId-spriteValue-- Returns:
- true if it has sides, false if is rendered as a single sprite
-
isIndestructible
public boolean isIndestructible(byte id, byte value)- Parameters:
id-value-- Returns:
-
isObstacle
public boolean isObstacle(byte id, byte value)Engine reserves ids are 0-9 and must be redirected to return super method.- Parameters:
id-value-- Returns:
-
isObstacle
public boolean isObstacle(int block)
- Parameters:
block-- Returns:
-
-