Home Getting Started With Scripts Using this wiki Commands CTGUI Global functions Bracket Handlers

IBlockAccess

BlockAccess objects are a group of blocks accessible via coordinates. They mainly serves as superinterface to IWorld, that means all these functions are also available to all IWorld objects.

Importing the class

It might be required to import the class to avoid errors.
import crafttweaker.world.IBlockAccess

ZenMethods

Get or Set a blockState at a specific Position

Use an IBlockPos Object and an IBlockState Object.
Returns an IBlockState.

script.zs
accObj.getBlockState(IBlockPos pos);

Check if a block is an air block.

Use an IBlockPos object.
Returns a bool.

script.zs
accObj.isAirBlock(IBlockPos pos);

Get strong Power at a block’s side

Use an IBlockPos object and an IFacing object.
Returns an int.

script.zs
accObj.getStrongPower(BlockPos var1, EnumFacing var2);