MCBlockDisplayReader

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

Импорт класса

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;

Methods

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));
ПараметрТипDescription
posBlockPosThe position to look up.
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));
ПараметрТипDescription
posBlockPosThe position to look up.
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));
ПараметрТипDescription
posBlockPosThe position to look up.
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));
ПараметрТипDescription
posBlockPosThe position of the tile entity.