MCBlockDisplayReader

Link to mcblockdisplayreader

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

Diese Klasse importieren

Link to diese-klasse-importieren

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;

Link to g-

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));
ParameterTypeBeschreibung
Parameter
pos
Type
BlockPos
Beschreibung
The position to look up.

Link to g--1

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));
ParameterTypeBeschreibung
Parameter
pos
Type
BlockPos
Beschreibung
The position to look up.

Link to g--2

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));
ParameterTypeBeschreibung
Parameter
pos
Type
BlockPos
Beschreibung
The position to look up.

Link to g--3

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));
ParameterTypeBeschreibung
Parameter
pos
Type
BlockPos
Beschreibung
The position of the tile entity.