Comparator
extends Tile
in package
Tags
Table of Contents
- TAG_ID = "id"
- TAG_X = "x"
- TAG_Y = "y"
- TAG_Z = "z"
- TAG_OUTPUT_SIGNAL = "OutputSignal"
- $closed : bool
- $position : Position
- $signalStrength : int
- $timings : TimingsHandler
- __construct() : mixed
- __destruct() : mixed
- close() : void
- getBlock() : Block
- getCleanedNBT() : CompoundTag|null
- getPosition() : Position
- getSignalStrength() : int
- isClosed() : bool
- onBlockDestroyed() : void
- Called when the tile's block is destroyed.
- readSaveData() : void
- saveNBT() : CompoundTag
- setSignalStrength() : void
- onBlockDestroyedHook() : void
- Override this method to do actions you need to do when this tile is destroyed due to block being broken.
- writeSaveData() : void
- Writes additional save data to a CompoundTag, not including generic things like ID and coordinates.
Constants
TAG_ID
public
mixed
TAG_ID
= "id"
TAG_X
public
mixed
TAG_X
= "x"
TAG_Y
public
mixed
TAG_Y
= "y"
TAG_Z
public
mixed
TAG_Z
= "z"
TAG_OUTPUT_SIGNAL
private
mixed
TAG_OUTPUT_SIGNAL
= "OutputSignal"
Properties
$closed
public
bool
$closed
= false
$position
protected
Position
$position
$signalStrength
protected
int
$signalStrength
= 0
$timings
protected
TimingsHandler
$timings
Methods
__construct()
public
__construct(World $world, Vector3 $pos) : mixed
Parameters
Return values
mixed —__destruct()
public
__destruct() : mixed
Return values
mixed —close()
public
close() : void
Return values
void —getBlock()
public
getBlock() : Block
Return values
Block —getCleanedNBT()
public
getCleanedNBT() : CompoundTag|null
Return values
CompoundTag|null —getPosition()
public
getPosition() : Position
Return values
Position —getSignalStrength()
public
getSignalStrength() : int
Return values
int —isClosed()
public
isClosed() : bool
Return values
bool —onBlockDestroyed()
Called when the tile's block is destroyed.
public
final onBlockDestroyed() : void
Return values
void —readSaveData()
public
readSaveData(CompoundTag $nbt) : void
Parameters
- $nbt : CompoundTag
Return values
void —saveNBT()
public
saveNBT() : CompoundTag
Return values
CompoundTag —setSignalStrength()
public
setSignalStrength(int $signalStrength) : void
Parameters
- $signalStrength : int
Return values
void —onBlockDestroyedHook()
Override this method to do actions you need to do when this tile is destroyed due to block being broken.
protected
onBlockDestroyedHook() : void
Return values
void —writeSaveData()
Writes additional save data to a CompoundTag, not including generic things like ID and coordinates.
protected
writeSaveData(CompoundTag $nbt) : void
Parameters
- $nbt : CompoundTag