MCBlockDisplayReader

Link to mcblockdisplayreader

One of MCWorld's supertype, used for display calculation.

Importare la Classe

Link to importare-la-classe

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.api.world.MCBlockDisplayReader;

Name: canSeeSky

Gets if can see sky at a given position

Returns: The block state at the position.
Return Type: boolean

ZenScript
Copy
// MCBlockDisplayReader.canSeeSky(pos as BlockPos) as boolean

myMCBlockDisplayReader.canSeeSky(new BlockPos(0, 1, 2));
ParametroTipoDescrizione
Parametro
pos
Tipo
BlockPos
Descrizione
The position to look up.

Name: getBlockState

Gets the block state at a given position.

Returns: The block state at the position.
Return Type: MCBlockState

ZenScript
Copy
// MCBlockDisplayReader.getBlockState(pos as BlockPos) as MCBlockState

myMCBlockDisplayReader.getBlockState(new BlockPos(0, 1, 2));
ParametroTipoDescrizione
Parametro
pos
Tipo
BlockPos
Descrizione
The position to look up.

Name: getLightValue

Gets the light level at a given position

Returns: The light level at the position
Return Type: int

ZenScript
Copy
// MCBlockDisplayReader.getLightValue(pos as BlockPos) as int

myMCBlockDisplayReader.getLightValue(new BlockPos(0, 1, 2));
ParametroTipoDescrizione
Parametro
pos
Tipo
BlockPos
Descrizione
The position to look up.

Name: getTileEntity

Gets the tile entity at a given position.

Returns: The tile entity.
Return Type: MCTileEntity?

ZenScript
Copy
// MCBlockDisplayReader.getTileEntity(pos as BlockPos) as MCTileEntity?

myMCBlockDisplayReader.getTileEntity(new BlockPos(0, 1, 2));
ParametroTipoDescrizione
Parametro
pos
Tipo
BlockPos
Descrizione
The position of the tile entity.