Chunk implements DataInterface
Representation of a chunk.
Tags
Interfaces, Classes and Traits
- DataInterface
- DataInterfaces are all objects, which can contain data.
Table of Contents
- $data : string|null
- The contents of a chunk element is same as that of the data element, except it stores the data of the area specified in the attributes.
- $height : int
- The height of the chunk in tiles.
- $width : int
- The width of the chunk in tiles.
- $x : int
- The x coordinate of the chunk in tiles.
- $y : int
- The y coordinate of the chunk in tiles.
- getData() : string|null
- getHeight() : int
- getWidth() : int
- getX() : int
- getY() : int
- setData() : Chunk
- setHeight() : Chunk
- setWidth() : Chunk
- setX() : Chunk
- setY() : Chunk
Properties
$data
The contents of a chunk element is same as that of the data element, except it stores the data of the area specified in the attributes.
private
string|null
$data
= null
Tags
$height
The height of the chunk in tiles.
private
int
$height
= 0
Tags
$width
The width of the chunk in tiles.
private
int
$width
= 0
Tags
$x
The x coordinate of the chunk in tiles.
private
int
$x
= 0
Tags
$y
The y coordinate of the chunk in tiles.
private
int
$y
= 0
Tags
Methods
getData()
public
getData() : string|null
Return values
string|null —getHeight()
public
getHeight() : int
Return values
int —getWidth()
public
getWidth() : int
Return values
int —getX()
public
getX() : int
Return values
int —getY()
public
getY() : int
Return values
int —setData()
public
setData(string|null $data) : Chunk
Parameters
- $data : string|null
Return values
Chunk —setHeight()
public
setHeight(int $height) : Chunk
Parameters
- $height : int
Return values
Chunk —setWidth()
public
setWidth(int $width) : Chunk
Parameters
- $width : int
Return values
Chunk —setX()
public
setX(int $x) : Chunk
Parameters
- $x : int
Return values
Chunk —setY()
public
setY(int $y) : Chunk
Parameters
- $y : int