init
This commit is contained in:
commit
a956daf8e2
2351 changed files with 163047 additions and 0 deletions
25
kubejs/startup_scripts/_initial.js
Normal file
25
kubejs/startup_scripts/_initial.js
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
// priority: 999
|
||||
// ! This script loads first before the other startup scripts
|
||||
/**
|
||||
* This script loads first before the other startup scripts.
|
||||
* Put your utility functions or global vars here so that you can access them in other scripts
|
||||
*/
|
||||
|
||||
// Spoof our custom items' mod name
|
||||
Platform.mods.kubejs.name = "Moni Labs"
|
||||
|
||||
/**
|
||||
* Capitalizes the first char of the string
|
||||
* @param {string} word
|
||||
* @returns {string}
|
||||
*/
|
||||
const capitalize = (word) => (word[0].toUpperCase() + word.substring(1));
|
||||
|
||||
/**
|
||||
* Creates a placeholder item
|
||||
* @param {Registry.Item} registry
|
||||
* @param {ResourceLocation_ | string} name - item (id)
|
||||
*/
|
||||
const placeHolder = (registry, name) => {
|
||||
registry.create(name).texture("kubejs:item/barrier").displayName(`§eT. B. I. §r- §d${name.split("_").map(v => capitalize(v))}`);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue