MCBlockNeighborNotifyEvent

Link to mcblockneighbornotifyevent

Fired when a physics update occurs on a block. This event acts as a way for mods to detect physics updates, in the same way a BUD switch does. This event is only called on the server.

The event is cancelable.

If the event is canceled, vanilla logic won't be executed

The event does not have a result.

Импорт класса

Link to импорт-класса

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.api.event.block.MCBlockNeighborNotifyEvent;

Extending MCBlockEvent

Link to extending-mcblockevent

MCBlockNeighborNotifyEvent extends MCBlockEvent. That means all methods available in MCBlockEvent are also available in MCBlockNeighborNotifyEvent

Link to getForceRedstoneUpdate

Name: getForceRedstoneUpdate

Gets if a redstone update was forced during setBlock call

Return Type: boolean

ZenScript
Copy
// MCBlockNeighborNotifyEvent.getForceRedstoneUpdate() as boolean

myMCBlockNeighborNotifyEvent.getForceRedstoneUpdate();

Link to getNotifiedSides

Name: getNotifiedSides

Gets a list of directions from the base block that updates will occur upon.

Return Type: stdlib.List<Direction>

ZenScript
Copy
// MCBlockNeighborNotifyEvent.getNotifiedSides() as stdlib.List<Direction>

myMCBlockNeighborNotifyEvent.getNotifiedSides();

Свойства

Link to свойства

НазваниеТипИмеет GetterИмеет SetterОписание
Название
forceRedstoneUpdate
Тип
boolean
Имеет Getter
true
Имеет Setter
false
Описание
Gets if a redstone update was forced during setBlock call
Название
notifiedSides
Тип
stdlib.List<Direction>
Имеет Getter
true
Имеет Setter
false
Описание
Gets a list of directions from the base block that updates will occur upon.