Default

class Default(hardness: Provider<Double>, toolCategories: Provider<Set<ToolCategory>>, toolTier: Provider<ToolTier?>, requiresToolForDrops: Provider<Boolean>, breakParticles: Provider<Material?>, showBreakAnimation: Provider<Boolean>) : BlockBehavior, Breakable

Constructors

Link copied to clipboard
constructor(hardness: Double, toolCategories: Set<ToolCategory>, toolTier: ToolTier?, requiresToolForDrops: Boolean, breakParticles: Material?, showBreakAnimation: Boolean)
constructor(hardness: Provider<Double>, toolCategories: Provider<Set<ToolCategory>>, toolTier: Provider<ToolTier?>, requiresToolForDrops: Provider<Boolean>, breakParticles: Provider<Material?>, showBreakAnimation: Provider<Boolean>)

Properties

Link copied to clipboard
open override val breakParticles: Material?
Link copied to clipboard
open override val hardness: Double
Link copied to clipboard
open override val requiresToolForDrops: Boolean
Link copied to clipboard
open override val showBreakAnimation: Boolean
Link copied to clipboard
open override val toolCategories: Set<ToolCategory>
Link copied to clipboard
open override val toolTier: ToolTier?

Functions

Link copied to clipboard

Checks whether a block of state can be placed at pos using the given ctx.

Link copied to clipboard

Retrieves the items that would be dropped when breaking a block of state at pos with the given ctx.

Link copied to clipboard

Retrieves the amount of experience that would be dropped when breaking a block of state at pos with the given ctx.

Link copied to clipboard

Handles attack (left-click) on a block of state at pos with the given ctx.

Link copied to clipboard

Handles the destruction of a block of state at pos with the given ctx.

Link copied to clipboard
open fun handleEntityInside(pos: BlockPos, state: NovaBlockState, entity: Entity)

Called when an entity is inside a block of state at pos.

Link copied to clipboard

Handles interaction (right-click) with a block of state at pos with the given ctx.

Link copied to clipboard
open fun handleNeighborChanged(pos: BlockPos, state: NovaBlockState, neighborPos: BlockPos)

Called when a block at neighborPos changed next to this state at pos.

Link copied to clipboard

Handles the placement of a block of state at pos with the given ctx.

Link copied to clipboard

Handles a random tick for a block of state at pos.

Link copied to clipboard

Handles a scheduled tick for a block of state at pos.

Link copied to clipboard

Chooses the ItemStack that should be given to the player when mid-clicking a block of state at pos with the given ctx in creative mode.

Link copied to clipboard

Whether this behavior implements random-tick logic for the given state. Note that the result of this method will be cached on startup.

Link copied to clipboard
open fun updateShape(pos: BlockPos, state: NovaBlockState, neighborPos: BlockPos): NovaBlockState

Called when a block at neighborPos changed to update the NovaBlockState of this state at pos.