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.
- Download and install Forge or Fabric, then run Minecraft at least once.
- Download the Lucky Block mod and put it into your .minecraft/mods/ folder.
- Run Minecraft and enjoy!
- Install the Lucky Block mod and run Minecraft at least once.
- Put add-ons into your .minecraft/addons/lucky/ folder.
- Run Minecraft and enjoy!
All Lucky Block releases follow the format:
lucky-block-{loader}@{minecraft}-{major}.{minor}
loader
: forge/fabric/bedrockminecraft
: Minimum compatible Minecraft versionmajor
: Incremented on every feature/fix to the core mod.minor
: Incremented on every fix to this particularloader
/minecraft
combo.
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.
./gradlew tasks
: View all available tasks./gradlew clean
: Clean the build folder. Always run this after updating the version number../gradlew :{forge/fabric}:build
: Build the project, and create a distributable jar file inbuild/dist/{version}
./gradlew :jvmTemplateAddonDist
: Copy the latest template addon tobuild/dist/{version}
./gradlew :{forge/fabric}:runClient
: Run a Minecraft client./gradlew :{forge/fabric}:runServer
: Run a Minecraft server./gradlew :{forge/fabric/tools}:test --tests "*{test name regex}" --info
: Run tests
- Download the Java 8 DCEVM binary
sudo java -jar DCEVM-8uXXX-installer.jar
- Open your Java home directory, and select "Replace by DCEVM"
- In IntelliJ, you may need to ignore the bedrock module:
Preferences > Build, Execution, Deployment > Compiler > Excludes
and add~/bedrock
- Start the
runClient
task in debug mode - Edit the code. Some useful debug values are can be found in
common/src/commonMain/kotlin/drop/DropEvaluator
- Use the IntelliJ build button to reload the entire project, or Shift-Cmd-F9 to reload the current file
- Start the
runServer
task for the first time - Accept
run/eula.txt
- Edit
run/server.properties
with the following:gamemode=creative
online-mode=false
- Start the
runServer
again - Optionally, run
/op <player>
- Start a Mincecraft client, and add a server with the address
:25565
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"
./gradlew :tools:run --args "generate-bedrock-drops --help"
./gradlew :tools:run --args "nbt-to-mcstructure --help"
./gradlew :tools:run --args "download-block-ids --help"
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.