PlayerBonemeal
Link to playerbonemeal
The PlayerBonemeal Event is fired whenever a player uses bonemeal on a block.
Event Class
Link to event-class
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:
ZenGetters
Link to zengetters
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 |
ZenMethods
Link to zenmethods
event.cancel()
sets the event as cancelledevent.process()
sets the event as processed