IBlockProperties

Link to iblockproperties

BlockProperties are what makes a block distinctive from other blocks. It mainly serves as superinterface to IBlockState, that means all these functions are also available to all IBlockState objects.

Dieses Paket importieren

Link to dieses-paket-importieren

It might be required for you to import the package if you encounter any issues, so better be safe than sorry and add the import.
import crafttweaker.block.IBlockProperties;

ZenGetterRückgabetypBeschreibung
ZenGetter
canProvidePower
Rückgabetyp
bool
Beschreibung
Returns if the refered block can provide Redstone Power
ZenGetter
mobilityFlag
Rückgabetyp
string
Beschreibung
Returns the mobility flag as string
ZenGetter
material
Rückgabetyp
IMaterial
Beschreibung
Returns the block's material
ZenGetter
causesSuffocation
Rückgabetyp
bool
Beschreibung
Returns whether the block can choke you.
ZenGetter
hasCustomBreakingProgress
Rückgabetyp
bool
Beschreibung
ZenGetter
blockNormalCube
Rückgabetyp
bool
Beschreibung
ZenGetter
fullBlock
Rückgabetyp
bool
Beschreibung
ZenGetter
fullCube
Rückgabetyp
bool
Beschreibung
ZenGetter
normalCube
Rückgabetyp
bool
Beschreibung
ZenGetter
opaqueCube
Rückgabetyp
bool
Beschreibung
ZenGetter
translucent
Rückgabetyp
bool
Beschreibung
ZenGetter
useNeighborBrightness
Rückgabetyp
bool
Beschreibung

boolean isReplaceable(IWorld world, IBlockPos pos);
Parameters:

  • IWorld world → The world to be checked in
  • IBlockPos pos → The Block's position

Returns a boolean that sais whether the block can be replaced or not.

int getLightValue(IWorld world, IBlockPos blockPos);
Parameters:

Returns an int representing the current light value at the given location.

getWeakPower/GetStrongPower

Link to getweakpowergetstrongpower

int getWeakPower(IBlockAccess world, IBlockPos blockPos, Facing facing);
int getStrongPower(IBlockAccess world, IBlockPos blockPos, Facing facing);
Parameters:

  • IBlockAccess world → The world to be checked in
  • IBlockPos pos → The Block's position
  • Facing facing → The side to be checked Returns an int representing the current redstone power on this side.

getComparatorInputOverride

Link to getcomparatorinputoverride

int getComparatorInputOverride(IWorld world, IBlockPos blockPos);

Parameters:

  • IWorld world → The world to be checked in
  • IBlockPos pos → The Block's position

Returns an int representing the block's redstone comparator input override type.

Check if an entity can spawn on the block

Link to check-if-an-entity-can-spawn-on-the-block

Use an IEntity.
Returns a bool.

ZenScript
Copy
blockProperties.canEntitySpawn(IEntity entity);

Get the actual BlockState

Link to get-the-actual-blockstate

Use an IBlockAccess and an IBlockPos.
Returns a new IBlockProperties object.

ZenScript
Copy
blockProperties.getActualState(IBlockAccess world, IBlockPos pos);

Get a block's hardness

Link to get-a-blocks-hardness

Use IWorld and an IBlockPos.
Returns a float.

ZenScript
Copy
blockProperties.getBlockHardness(IWorld world, IBlockPos pos);

Get a block's light opacy

Link to get-a-blocks-light-opacy

Use IWorld and an IBlockPos.
Returns an int.

ZenScript
Copy
blockProperties.getLightOpacy(IWorld world, IBlockPos pos);

Get a player's Relative Block Harness

Link to get-a-players-relative-block-harness

Use an IPlayer, an IWorld and an IBlockPos.
Returns a float.

ZenScript
Copy
blockProperties.getPlayerRelativeBlockHardness(IPlayer player, IWorld world, IBlockPos pos);

Check if a side of the block is solid

Link to check-if-a-side-of-the-block-is-solid

Use an IBlockAccess, an IBlockPos and an IFacing object.
Returns a bool.

ZenScript
Copy
blockProperties.isSideSolid(IBlockAccess world, IBlockPos pos, IFacing facing);