alexsocha / luckyblock

The Lucky Block mod for Minecraft.
50 stars 21 forks source link

Lucky Block

build

Originally created in 2015, the Lucky Block is a mod for Minecraft which has since gained over 5 million users. The mod adds a new block to the game which produces random outcomes, as well as items such as the lucky sword, bow and potion. Additionally, the mod can be customized with hundreds of community add-ons.



Resources

Install

  1. Download and install Forge or Fabric, then run Minecraft at least once.
  2. Download the Lucky Block mod and put it into your .minecraft/mods/ folder.
  3. Run Minecraft and enjoy!

Add-ons

Install

  1. Install the Lucky Block mod and run Minecraft at least once.
  2. Put add-ons into your .minecraft/addons/lucky/ folder.
  3. Run Minecraft and enjoy!

Versioning

All Lucky Block releases follow the format:

lucky-block-{loader}@{minecraft}-{major}.{minor}

Development

Dependencies are listed in project.yaml, and lockfiles can be updated with:

./gradlew dependencies --write-locks

To use IntelliJ, ensure that the Gradle plugin is enabled, and import the directory as a Gradle project.

Hot reloading

  1. Download the Java 8 DCEVM binary
  2. sudo java -jar DCEVM-8uXXX-installer.jar
  3. Open your Java home directory, and select "Replace by DCEVM"
  4. In IntelliJ, you may need to ignore the bedrock module: Preferences > Build, Execution, Deployment > Compiler > Excludes and add ~/bedrock
  5. Start the runClient task in debug mode
  6. Edit the code. Some useful debug values are can be found in common/src/commonMain/kotlin/drop/DropEvaluator
  7. Use the IntelliJ build button to reload the entire project, or Shift-Cmd-F9 to reload the current file

Minecraft server

Bedrock

For convenience, create a symlink to the resource and behavior packs:

mklink /D "C:\Users\%USERNAME%\AppData\Local\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState\games\com.mojang\development_resource_packs" "C:\...\bedrock\run\development_resource_packs"

mklink /D "C:\Users\%USERNAME%\AppData\Local\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState\games\com.mojang\development_behavior_packs" "C:\...\bedrock\run\development_behavior_packs"

Bedrock tools

Copyright

Copyright © 2015-2021 Alex Socha. All Rights Reserved.

By submitting a pull request, you agree to transfer all rights and ownership to the copyright holder.