LuckyBlock Lib
This mod serves as a foundational library for all my lucky block modifications.
Key Features
Block Activation Methods:
- Effects trigger when the player right-clicks
- Activation occurs when the block is destroyed
- Response to redstone signals (regardless of whether the signal is on or off)
General Trigger Effects:
- The block automatically breaks after activation
- Plays the
UI_STONECUTTER_TAKE_RESULTsound effect with volume and pitch both at 1.0F - Randomly executes one of the preset events (currently one event is available)
Current Event Example:
- Diamond generation using the
spawnItemmethod - drops 1 to 5 diamonds - Items appear at the center of the block's position with slight projectile speed in random directions
Additional Expansion Functions:
- Entity Spawning: The
spawnEntitymethod allows specifying entity type, quantity range, and custom names - Fluid Generation: The
spawnFluidfunction creates water, lava, or other fluids at the block's location - Structure Placement:
placeStructuregenerates preset constructions at specified locations with rotation settings support - Player Effects:
applyEffectToPlayeradds status effects, with duration and level stacking if effects already exist - Sound Playback: Support for built-in sound effects and custom sounds through
playSoundandplayCustomSoundmethods