Skip to content

ExpandBlock

youyihj edited this page Nov 15, 2020 · 4 revisions

ExpandBlock

ExpandBlock adds some function that CoT forgets to support.

Importing the package

import mods.zenutils.cotx.Block;

ZenProperties

  • IBlockActivated onBlockActivated (default null)
  • IEntityWalk onEntityWalk (default null)
  • IEntityCollided onEntityCollidedWithBlock (default null)
  • TileEntity tileEntity (default null)

Expansion

ExpandBlock extends BlockRepresentation. That means all Methods and ZenProperties that are available for Blocks are also available for ExpandBlocks!

Linked Functions

IBlockActivated

Called when the block is right-clicked by a player.

Package name: mods.zenutils.cotx.IBlockActivated

It is a function with the following parameters (in this order):

The function needs to return a bool.

IEntityWalk

Package name: mods.zenutils.cotx.IEntityWalk

It is a function with the following parameters (in this order):

  • IWorld world
  • IBlockPos pos
  • IEntity entity

IEntityCollided

Package name: mods.zenutils.cotx.IEntityCollided

It is a function with the following parameters (in this order):

  • IWorld world
  • IBlockPos pos
  • ICTBlockState state
  • IEntity entity
Clone this wiki locally