RebarCulledBlock

Enables a RebarBlock to take advantage of the BlockCullingEngine to do something per player when the block is considered culled or visible.

Inheritors

Properties

Link copied to clipboard

If onVisible and onCulled should be called asynchronously instead of scheduled to be called on the main thread.

Functions

Link copied to clipboard
abstract fun isVisible(player: Player): Boolean

If the block is currently visible to the player. Used only to determine which io.github.pylonmc.rebar.culling.PlayerCullingConfig interval to use

Link copied to clipboard
abstract fun onCulled(player: Player)

What to do when the block is considered culled to the player. This method will be called regardless of if the block was already considered culled So you should still run checks in this method to prevent doing unnecessary work.

Link copied to clipboard
abstract fun onVisible(player: Player)

What to do when the block is considered visible to the player. This method will be called regardless of if the block was already considered visible So you should still run checks in this method to prevent doing unnecessary work.