Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.voxel.engine.core.Block;
- /**
- * Created with IntelliJ IDEA.
- * User: Toby's PC
- * Date: 07/01/14
- * Time: 19:18
- */
- public class Block {
- public boolean isActive;
- public BlockType blockType;
- public enum BlockType{
- BLOCK_TYPE_DEFAULT(0),
- BLOCK_TYPE_GRASS(1),
- BLOCK_TYPE_DIRT(2),
- BLOCK_TYPE_WATER(3),
- BLOCK_TYPE_STONE(4),
- BLOCK_TYPE_WOOD(5),
- BLOCK_TYPE_SAND(6),
- BLOCK_TYPE_SNOW(7),
- BLOCK_TYPE_NUM_TYPES(8),
- BLOCK_TYPE_TRUNK(9),
- BLOCK_TYPE_TREE_LEAF_ONE(10),
- BLOCK_TYPE_TREE_LEAF_TWO(11),
- BLOCK_TYPE_RED_FLOWER(12),
- BLOCK_TYPE_SILVER_BLOCK(13),
- BLOCK_TYPE_GOLD_BLOCK(14),
- BLOCK_TYPE_FACE(15),
- BLOCK_TYPE_GRASS2(16),
- BLOCK_TYPE_GRASS3(17);
- private int blockID;
- BlockType(int i){
- blockID = i;
- }
- public int getID(){
- return blockID;
- }
- }
- public BlockType getType(){
- return blockType;
- }
- public void setType(BlockType type){
- blockType = type;
- }
- public Block(BlockType type){
- blockType = type;
- }
- public boolean isActive(){
- return isActive;
- }
- public void setActive(boolean active){
- isActive = active;
- }
- public int getID(){
- return blockType.getID();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement