The PlayerBonemeal Event is fired whenever a player uses bonemeal on a block.

You will need to cast the event in the function header as this class:
crafttweaker.event.PlayerBonemealEvent
You can, of course, also import the class before and use that name then.

Event interface extensions

Link to event-interface-extensions

PlayerBonemeal Events implement the following interfaces and are able to call all of their methods/getters/setters as well:

The following information can be retrieved from the event:

ZenGetter返回值类型
ZenGetter
canceled
返回值类型
布尔值
ZenGetter
processed
返回值类型
布尔值
ZenGetter
x
返回值类型
int
ZenGetter
y
返回值类型
int
ZenGetter
z
返回值类型
int
ZenGetter
player
返回值类型
IPlayer
ZenGetter
world
返回值类型
IWorld
ZenGetter
block #方块
返回值类型
IBlock
ZenGetter
blockState
返回值类型
IBlockState
ZenGetter
blockPos
返回值类型
IBlockPos
ZenGetter
dimension
返回值类型
int
ZenGetter
item
返回值类型
IItemstack
  • event.cancel() sets the event as cancelled
  • event.process() sets the event as processed