Since this project is using beet/bolt, you need to install a few things:
- Download and install python
- Open any terminal, to do this you can press
windows key+rand typecmd- In the terminal type the following to install the required packages:
pip install --upgrade beet mecha bolt ps_beet_bolt pillow
- Create a new Minecraft world, remember the name
- Clone this repository (The following will explain one way to do that, feel free to use your prefered way)
- Click the green
[<> Code ▼]button above the files - Make sure to be on the
HTTPsection and press the copy button next to the url - Open a terminal an navigate to any folder where this repository should be in (
C:/Users/username/gitis commonly used) - Type
git clone <url>where<url>is the url you just copied and press enter
- Click the green
- Move into the repository you just cloned using
cd GenesisReDatapack - Type
beet link "<world name>"where<world name>is the name of the Minecraft world you created earlier
- Open the project in VSCode (preferably)
- Open a terminal if none is open yet (
Terminal>New Terminal) - Run
beet
If you make any changes in the code, save and run beet in the terminal again, then /reload or F3 + T in your minecraft world, depending on what you changed.
When opening the project, it's best to get all changes that others uploaded:
- If you have any local changes, stash them using
git stash - Pull remote changes using
git pull - If you stashed any local changes, you can apply them again using
git stash apply
If you have changed anything and want to upload it, you generally follow these steps:
- Check all changed files using
git status - Add all changes using
git add .(Instead of.you can also write parts of or full paths to only add specific files) - Commit the changes using
git commit -m "<message>"where<message>is a short message describing the change you made - Push using
git push- If pushing fails, make sure you have all remote changes using
git pull
- If pushing fails, make sure you have all remote changes using
Generally it's better to commit/push often so merge conflicts (multiple people modfying the same file) is less common.
- Choose a longer name if it's more descriptive:
- ✅
genesis.crafter,.entity_is_found - ❌
gen.crftr,.bool
- ✅
- Namespace:
genesis- Anything related to genesis uses the
genesisnamespace - The
minecraftnamespace is only used when necessary (#minecraft:load) - Other namespaces may be used by libraries
- Anything related to genesis uses the
- Load/tick functions:
genesis:load,genesis:tick- If you want to add something to the load function (like a new objective), use the following in your module:
append function genesis:load: scoreboard objectives add ...
- Same with the 20hz tick function:
append function genesis:tick: as @e[type=...,tag=...] function genesis:<module>/tick
- If you want to add something to the load function (like a new objective), use the following in your module:
- Scoreboards:
genesis.<module>.<name>- ex.
genesis.stat.attack_speed.mainhand,genesis.mana.current - Temporary scores can use
genesis
- ex.
- Fake Players:
.<name>or#<name>- ex.
.cooldown,.new,#denominator - Use
#to prefix temporary scores, like when calculating - Constants use
constant(<constant>)fromgenesis:utilsmodulefrom genesis:utils import constant scoreboard players operation @s scoreboard /= constant(123) genesis
- ex.
- Tags:
genesis.<module>.<name>- ex.
genesis.crafter
- ex.
- Language Keys:
<category>.genesis.<name>- ex.
category_modifier.genesis.void,item.genesis.ethereal_chestplate.steadfast.0 - For translations that don't really have a category, use
textas the category - If language keys are directly linked to each other, simply extend them:
<category>.genesis.<name>.<passive_name>.<line>->item.genesis.ethereal_chestplate.steadfast.0
- ex.
- Source Files:
src/[data|assets]/<genesis>/<file_type>/<module>- ex.
src/data/function/right_click_ability.mcfunction,src/data/function/stat.mcfunction - Use
src/data/modules/<module>.boltfor stuff that is mostly python - Use
src/data/function/<module>.mcfunctionfor stuff that is mostly actual functions - If you need more than a single file per module, create a subfolder
- Use the
zzzmodule for anything the helps development but shouldn't be in the final pack
- ex.
- Generated Files:
build/...- Every generated file has an explicit, descriptive name
- ✅
as @a if score x y matches 12 function ~/../score_matches_12: - ❌
as @a if score x y matches 12:
- ✅
- If this is not explicitly done, bolt generates names like
nested_execute_0 - To make sure, just look at the
buildfolder from time to time
- Every generated file has an explicit, descriptive name
- Comments:
# <comment>,#! <comment>,#> <comment>,"""<docstring>"""- All comments start with a
#and a whitespace afterwarts - ex.
# The following code does xyz - Things that are todo, so not finished yet use
#! <comment> - ex.
#! This can be removed when mojang fixes the bug,#! This can be done when module xyz is finished - Headlines, file descriptions or other permanent notices can use
#>and caps - These comments get highlighted/colored if you use the mcfunction-syntax extension
- ex.
#> THIS FILE IS MEANT FOR XYZ,#> HEADLINE - Feel free to use docstrings for python functions and classes
"""What the function or class does"""
- All comments start with a
- New lines:
- All files should end with trailing new line
- Feel free to use 2 new lines between functions/imports/things to visually separate them
- Animated Java:
- Prefix your export namespace with
genesisto avoid conflicts with AJ rigs added by other datapacks, e.g.genesis_pegaeonrather thanpegaeon - Place the generated data- and resourcepacks in a subfolder in the
animatedjavafolder for organisation
- Prefix your export namespace with