Compatibility
Minecraft: Java Edition
1.20.1
Platforms
Supported environments
Links
Creators
Details
Licensed LGPL-3.0-only
Published last week
Updated 2 weeks ago
LuckyBlock Lib
This is a library mod for all my lucky block mods.
Features
- Interaction trigger methods: Effects are triggered when the player right-clicks; effects are triggered when the block is destroyed; effects are triggered when a redstone signal is received (whether the signal is on or off).
- General trigger effects: The block itself is destroyed after triggering; plays the
UI_STONECUTTER_TAKE_RESULT
sound effect (volume and pitch are both 1.0F); randomly executes preset events (only one event in the current example). - Event effects (current example): Generates diamond items, randomly dropping 1-5 diamonds (implemented through the
spawnItem
method); items are generated at the center of the block's position with a slight projectile speed in a random direction. - Potential expansion functions (implemented methods): Entity spawning, which can specify the entity type, quantity range, and custom name to spawn entities (
spawnEntity
); fluid spawning, which can generate water, lava, or other fluids at the block's position (spawnFluid
); structure placement, which can generate a preset structure at a specified position with rotation settings supported (placeStructure
); player effects, which can add status effects to the player, and if the same effect already exists, the duration and level are stacked (applyEffectToPlayer
); sound playback, supporting the playback of built-in sound effects or custom sound effects (playSound
andplayCustomSound
).