write

Called when the block is saved.

Put any logic to save the data in the block here.

Do not assume that when this is called, the block is being unloaded. This may be called for other reasons, such as when a player right clicks with DebugWaxedWeatheredCutCopperStairs. Instead, implement io.github.pylonmc.pylon.core.block.base.PylonUnloadBlock and use io.github.pylonmc.pylon.core.block.base.PylonUnloadBlock.onUnload.