BlockEvent

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.neoforge.api.event.block.BlockEvent;

Extends

BlockEvent extends Event.

Members

Getter
script.zs
// BlockEvent.hasResult as bool
myBlockEvent.hasResult

Return Type: bool

hasResult() as bool
script.zs
// BlockEvent.hasResult() as bool;
myBlockEvent.hasResult();

Return Type: bool

Getter
script.zs
// BlockEvent.level as LevelAccessor
myBlockEvent.level

Return Type: LevelAccessor

Getter
script.zs
// BlockEvent.pos as BlockPos
myBlockEvent.pos

Return Type: BlockPos

Getter
script.zs
// BlockEvent.result as Result
myBlockEvent.result

Return Type: EventResult

Setter
script.zs
// BlockEvent.result = (result as Result);
myBlockEvent.result = myResult;

Parameters:

result Type: EventResult
result() as Result
script.zs
// BlockEvent.result() as Result;
myBlockEvent.result();

Return Type: EventResult

result(result as Result)
script.zs
// BlockEvent.result(result as Result);
myBlockEvent.result(myResult);

Parameters:

result Type: EventResult
setAllow()
sets the event's result to allow
script.zs
// BlockEvent.setAllow();
myBlockEvent.setAllow();
setDefault()
sets the event's result to default
script.zs
// BlockEvent.setDefault();
myBlockEvent.setDefault();
setDeny()
sets the event's result to deny
script.zs
// BlockEvent.setDeny();
myBlockEvent.setDeny();
Getter
script.zs
// BlockEvent.state as BlockState
myBlockEvent.state

Return Type: BlockState