Enum Tile.TileType
- java.lang.Object
-
- java.lang.Enum<Tile.TileType>
-
- page.codeberg.terratactician_expandoria.world.tiles.Tile.TileType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Tile.TileType>
- Enclosing class:
- Tile
public static enum Tile.TileType extends java.lang.Enum<Tile.TileType>
Encodes all Tile variants. New tiles need to be registered here.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BeehiveBeehive tile.ChameleonChameleon tile.DoubleHouseDoubleHouse tile.ForestForest tile.GrassGrass tile.MarketplaceMarketplace tile.MoaiMoai tile.RgbRgb tile.SmallHouseSmallHouse tile.StoneHillStoneHill tile.StoneMountainStoneMountain tile.StoneQuarryStoneQuarry tile.StoneRocksStoneRocks tile.WheatWheat tile.WindmillWindmill tile.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Tile.TileTypefromName(java.lang.String name)Parse TileType name to enum instance.static Tile.TileTypefromTile(Tile tile)Gets TileType from tile class.java.lang.StringgetName()Get API name of tile.TilenewInstance(CubeCoordinate coord, org.json.JSONObject data)Create a new instance of a tile with coordinates and raw jason data.TilenewInstanceBare()Creates a new instance of a tile without any data.static Tile.TileTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static Tile.TileType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
Chameleon
public static final Tile.TileType Chameleon
Chameleon tile. Associated classChameleonTile.
-
Grass
public static final Tile.TileType Grass
Grass tile. Associated classGrassTile.
-
Wheat
public static final Tile.TileType Wheat
Wheat tile. Associated classWheatTile.
-
Forest
public static final Tile.TileType Forest
Forest tile. Associated classForestTile.
-
Windmill
public static final Tile.TileType Windmill
Windmill tile. Associated classWindmillTile.
-
SmallHouse
public static final Tile.TileType SmallHouse
SmallHouse tile. Associated classSmallHouseTile.
-
Beehive
public static final Tile.TileType Beehive
Beehive tile. Associated classBeehiveTile.
-
StoneQuarry
public static final Tile.TileType StoneQuarry
StoneQuarry tile. Associated classStoneQuarryTile.
-
StoneRocks
public static final Tile.TileType StoneRocks
StoneRocks tile. Associated classStoneRocksTile.
-
StoneHill
public static final Tile.TileType StoneHill
StoneHill tile. Associated classStoneHillTile.
-
StoneMountain
public static final Tile.TileType StoneMountain
StoneMountain tile. Associated classStoneMountainTile.
-
DoubleHouse
public static final Tile.TileType DoubleHouse
DoubleHouse tile. Associated classDoubleHouseTile.
-
Moai
public static final Tile.TileType Moai
Moai tile. Associated classMoaiTile.
-
Marketplace
public static final Tile.TileType Marketplace
Marketplace tile. Associated classMarketplaceTile.
-
Rgb
public static final Tile.TileType Rgb
Rgb tile. Associated classRgbTile.
-
-
Method Detail
-
values
public static Tile.TileType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Tile.TileType c : Tile.TileType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Tile.TileType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getName
public java.lang.String getName()
Get API name of tile.- Returns:
- name of the tile.
-
newInstance
public Tile newInstance(CubeCoordinate coord, org.json.JSONObject data)
Create a new instance of a tile with coordinates and raw jason data.- Parameters:
coord- coordinate of the tile.data- extra json data.- Returns:
- created tile class
-
newInstanceBare
public Tile newInstanceBare()
Creates a new instance of a tile without any data.- Returns:
- created new bare tile instance
-
fromName
public static Tile.TileType fromName(java.lang.String name)
Parse TileType name to enum instance.- Parameters:
name- API name of the tile.- Returns:
- type of the tile name.
-
fromTile
public static Tile.TileType fromTile(Tile tile)
Gets TileType from tile class.- Parameters:
tile- tile instance.- Returns:
- type of the tile.
-
-