BlockEditor
interface BlockEditor
Interface for editing block properties in a DSL-style manner.
This interface provides a fluent API for modifying blocks in the world. It is designed to be used within a DSL context, typically within a lambda passed to a world or location editing function.
Example usage:
// Basic block type change
blockEditor {
type = Material.DIAMOND_BLOCK
}
// Modifying block data
blockEditor {
type = Material.CHEST
blockData = (blockData as Directional).apply {
facing = BlockFace.NORTH
}
}
// Dropping items
blockEditor {
dropItem(ItemStack(Material.DIAMOND, 5))
type = Material.AIR
}Content copied to clipboard