Skip to content

Commit

Permalink
Critical Issue with the feature.js script, fixed gitignore and added …
Browse files Browse the repository at this point in the history
…an optional default off toggle for less lag to add deploying for raw white as well (#590)
  • Loading branch information
Yarden-zamir authored Feb 23, 2024
2 parents 5200e1c + 1c5462f commit f22dfea
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 318 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,4 @@ kubejs/translation_tools/missing_translations/*.missing.json
kubejs/allEnglishTranslationKeys.json
/schmatics/
/contraptions/
/kubejs/features.json
314 changes: 0 additions & 314 deletions kubejs/features.json

This file was deleted.

11 changes: 7 additions & 4 deletions kubejs/server_scripts/base/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ console.log("Reading features.json and indexing all feature rules");
let featuresUserSettings = JsonIO.read(
"kubejs/features.json"
)
featuresUserSettings.forEach((key, value) =>{
global.features.set(key,value)
})
if (featuresUserSettings !== null) {
console.log("Features list found")
featuresUserSettings.forEach((key, value) =>{
global.features.set(key,value)
})
}
function feature(name) {
if (global.features.get(name)){
if (global.features.get(name) !== null && global.features.get(name) !== undefined){
return global.features.get(name)
}
else{
Expand Down
4 changes: 4 additions & 0 deletions kubejs/server_scripts/base/features/oresAndIngots.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ if (feature('Ores from dyes')) {
// addCompacting('raw_iron', ['4x #forge:dyes', '750mb milk'])
}

if (!(feature('Disable Raw White on Belts'))) {
addDeploying(['minecraft:raw_iron'],'minecraft:white_concrete_powder','minecraft:white_dye')
}

if (feature('Raw white, orange and yellow produce less xp in crushing wheels')) {
removeRecipe({ id: 'create:crushing/raw_iron' })
removeRecipe({ id: 'create:crushing/raw_copper' })
Expand Down

0 comments on commit f22dfea

Please sign in to comment.