Class Block
java.lang.Object
fr.hytale.loader.api.Block
Represents a block in the world.
This class acts as a wrapper around coordinates and a world reference. It allows object-oriented manipulation of blocks.
- Since:
- 1.0.5
- Version:
- 1.0.6
- Author:
- HytaleLoader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets the location of this block.getType()Gets the identifier (type) of this block.getWorld()Gets the world this block is in.intgetX()Gets the X coordinate.intgetY()Gets the Y coordinate.intgetZ()Gets the Z coordinate.inthashCode()voidSets the type of this block.toString()
-
Constructor Details
-
Block
Creates a new Block reference.- Parameters:
world- The world containing the blockx- The X coordinatey- The Y coordinatez- The Z coordinate
-
-
Method Details
-
getWorld
-
getX
public int getX()Gets the X coordinate.- Returns:
- The X coordinate
-
getY
public int getY()Gets the Y coordinate.- Returns:
- The Y coordinate
-
getZ
public int getZ()Gets the Z coordinate.- Returns:
- The Z coordinate
-
getLocation
Gets the location of this block.- Returns:
- A new Location object representing this block's position
-
getType
Gets the identifier (type) of this block.- Returns:
- The block identifier string (e.g. "Rock_Magma_Cooled") or "Empty"
-
setType
Sets the type of this block.- Parameters:
identifier- The new block identifier (e.g. "Rock_Magma_Cooled")
-
toString
-
equals
-
hashCode
-