- Java 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github/workflows | ||
| gradle/wrapper | ||
| src/main | ||
| .gitattributes | ||
| .gitignore | ||
| build.gradle | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| README.md | ||
| settings.gradle | ||
| TEMPLATE_LICENSE.txt | ||
Installation information
This template repository can be directly cloned to get you started with a new mod. Simply create a new repository cloned from this one, by following the instructions provided by GitHub.
Once you have your clone, simply open the repository in the IDE of your choice. The usual recommendation for an IDE is either IntelliJ IDEA or Eclipse.
If at any point you are missing libraries in your IDE, or you've run into problems you can
run gradlew --refresh-dependencies to refresh the local cache. gradlew clean to reset everything
{this does not affect your code} and then start the process again.
Mapping Names:
By default, the MDK is configured to use the official mapping names from Mojang for methods and fields in the Minecraft codebase. These names are covered by a specific license. All modders should be aware of this license. For the latest license text, refer to the mapping file itself, or the reference copy here: https://github.com/NeoForged/NeoForm/blob/main/Mojang.md
Additional Resources:
Community Documentation: https://docs.neoforged.net/
NeoForged Discord: https://discord.neoforged.net/
Economy API
Item values are registered from a KubeJS server script. Values are whole-number currency units:
EscapeFromSomewhereMoneyEvents.values(event => {
event.add('minecraft:iron_ingot', 25)
event.add('minecraft:diamond', 500)
event.addTaczGun('tacz:ai_awp', 15000)
event.addTaczAmmo('tacz:338', 80)
event.addTaczAttachment('tacz:scope_8x', 3000)
})
ItemValueData.valueOf(stack) returns the registered unit value. BankCardData provides
balance, deposit, and withdraw for escapefromsomewheremoney:bank_card. Each card has a
tier component: standard (default 1M), gold (20M), or black (1B). Tiers limit the amount of
each individual deposit or withdrawal, configured with standardCardMaxTransaction,
goldCardMaxTransaction, and blackCardMaxTransaction; card balances themselves are unlimited.
TACZ guns, cartridges, and attachments use shared item IDs and identify their exact model in
minecraft:custom_data; the addTaczGun, addTaczAmmo, and addTaczAttachment helpers
create the appropriate selectors. A three-argument add(itemId, value, customData) is also
available for custom-data variants from other mods.
Sell screen
Use /efsmoney sell to open the sell screen. Place registered-value items (or
bank cards to merge and recycle) in the nine sale slots, place the receiving
bank card in the dedicated card slot, then click its displayed price. The transaction is
only performed when its amount is within the receiving card's per-transaction limit; closing
the screen returns any unsold items to the player.
Shop screen
Store offers are recipes registered from a KubeJS server script. An offer has an output stack, a whole-number price, and one or more shop tags:
EscapeFromSomewhereMoneyEvents.trades(event => {
event.add('minecraft:iron_ingot', 40, ['starter', 'materials'])
event.add(Item.of('minecraft:diamond', { custom_data: { shop_variant: 'polished' } }), 1800, ['starter'])
})
Item.of(...) can carry a count and any item data components supported by KubeJS. Its full stack,
including custom_data, is shown in the shop and delivered unchanged on purchase.
/efsmoney buy <id> opens the shop for that tag. Select an offer on the left, place a bank card
in the payment slot, then buy it. The server verifies the selection and balance before debiting
the card and delivering the output. Registered recipes are also synchronized to clients, which
keeps the rendered list correct in multiplayer and provides the data source for a later JEI view.