mirror of
https://git.fellies.tech/minecraft/fellies.git
synced 2021-02-13 10:18:48 +00:00
Updates
This commit is contained in:
94
kubejs/server_scripts/fellies/kubejs/functions.js
Normal file
94
kubejs/server_scripts/fellies/kubejs/functions.js
Normal file
@ -0,0 +1,94 @@
|
||||
const air = 'minecraft:air';
|
||||
|
||||
function unificationBlacklistEntry(material, type) {
|
||||
return { material: material, type: type };
|
||||
}
|
||||
|
||||
function entryIsBlacklisted(material, type) {
|
||||
for (var i = 0; i < unificationBlacklist.length; i++) {
|
||||
if (unificationBlacklist[i].material === material && unificationBlacklist[i].type === type) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getPreferredItemInTag(tag) {
|
||||
const pref = wrapArray(tag.stacks).sort(({ mod: a }, { mod: b }) => compareIndices(a, b, tag))[0] || item.of(air);
|
||||
return pref;
|
||||
}
|
||||
|
||||
function compareIndices(a, b, tag) {
|
||||
if (a == b) return 0; // iff a == b, they'll be found at the same position in modPriorities
|
||||
|
||||
for (let mod of modPriorities) {
|
||||
if (mod == a) return -1; // if a comes before b, then idx(a) < idx(b), so -1
|
||||
if (mod == b) return 1; // if a comes after b, then idx(a) > idx(b), so 1
|
||||
}
|
||||
|
||||
console.error('[' + a + ', ' + b + '] were both unaccounted for in mod unification' + (tag ? ' for ' + tag : '!'));
|
||||
return 0;
|
||||
}
|
||||
|
||||
function wrapArray(array) {
|
||||
return utils.listOf(array).toArray();
|
||||
}
|
||||
|
||||
function tagIsEmpty(tag) {
|
||||
return getPreferredItemInTag(ingredient.of(tag)).id == air;
|
||||
}
|
||||
|
||||
function gear_unification(event, material, ingot, gem, gear) {
|
||||
if (gear == air) {
|
||||
return;
|
||||
}
|
||||
|
||||
var output = gear,
|
||||
input,
|
||||
mold = 'immersiveengineering:mold_gear';
|
||||
|
||||
if (ingot != air) {
|
||||
input = '#forge:ingots/' + material;
|
||||
} else if (gem != air) {
|
||||
input = '#forge:gems/' + material;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
event.recipes.immersiveengineering.metal_press(output, ingredient.of(input, 4), mold);
|
||||
event.shaped(gear, [' B ', 'BAB', ' B '], {
|
||||
A: '#forge:nuggets/iron',
|
||||
B: input
|
||||
});
|
||||
}
|
||||
|
||||
function rod_unification(event, material, ingot, gem, rod) {
|
||||
if (rod == air) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.remove({ type: 'minecraft:crafting_shaped', output: rod });
|
||||
|
||||
var output = item.of(rod, 2),
|
||||
input,
|
||||
mold = 'immersiveengineering:mold_rod';
|
||||
|
||||
if (ingot != air) {
|
||||
input = '#forge:ingots/' + material;
|
||||
} else if (gem != air) {
|
||||
input = '#forge:gems/' + material;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
event.recipes.thermal.press(output, [input, mold]).energy(2400);
|
||||
event.recipes.immersiveengineering.metal_press(output, input, mold);
|
||||
event.shaped(output, [' A ', ' A ', ' '], {
|
||||
A: input
|
||||
});
|
||||
}
|
||||
|
||||
const unificationBlacklist = [
|
||||
unificationBlacklistEntry('quartz', 'gem'),
|
||||
unificationBlacklistEntry('quartz', 'storage_block')
|
||||
];
|
95
kubejs/server_scripts/fellies/kubejs/globals.js
Normal file
95
kubejs/server_scripts/fellies/kubejs/globals.js
Normal file
@ -0,0 +1,95 @@
|
||||
const materialsToUnify = [
|
||||
'iron',
|
||||
'gold',
|
||||
'copper',
|
||||
'silver',
|
||||
'zinc',
|
||||
'brass',
|
||||
'lead',
|
||||
'tin',
|
||||
'compressed_iron',
|
||||
'nickel',
|
||||
'aluminum',
|
||||
'uranium',
|
||||
'bronze',
|
||||
'electrum',
|
||||
'constantan',
|
||||
'steel',
|
||||
'osmium',
|
||||
'diamond',
|
||||
'lapis',
|
||||
'emerald',
|
||||
'quartz',
|
||||
'coal',
|
||||
'charcoal',
|
||||
'obsidian',
|
||||
'ender',
|
||||
'fluix',
|
||||
'saltpeter',
|
||||
'fluorite',
|
||||
'invar',
|
||||
'signalum',
|
||||
'lumium',
|
||||
'enderium',
|
||||
'sulfur',
|
||||
'cinnabar',
|
||||
'niter',
|
||||
'potassium_nitrate',
|
||||
'saltpeter',
|
||||
'apatite',
|
||||
'bitumen',
|
||||
'redstone',
|
||||
'glowstone',
|
||||
'arcane',
|
||||
'mana',
|
||||
'certus_quartz',
|
||||
'charged_certus_quartz',
|
||||
'iesnium',
|
||||
'dimensional',
|
||||
'cloggrum',
|
||||
'froststeel',
|
||||
'regalium',
|
||||
'utherium',
|
||||
'coal_coke',
|
||||
'starmetal'
|
||||
];
|
||||
|
||||
const typesToUnify = [
|
||||
'nugget',
|
||||
'ingot',
|
||||
'gem',
|
||||
'storage_block',
|
||||
'ore',
|
||||
'dust',
|
||||
'gear',
|
||||
'plate',
|
||||
'rod'
|
||||
];
|
||||
|
||||
const modPriorities = [
|
||||
'emendatusenigmatica',
|
||||
'minecraft',
|
||||
'immersiveengineering',
|
||||
'thermal',
|
||||
'mekanism',
|
||||
'jaopca',
|
||||
'kubejs',
|
||||
'pneumaticcraft',
|
||||
'create',
|
||||
'occultism',
|
||||
'tmechworks',
|
||||
'industrialforegoing',
|
||||
'botania',
|
||||
'quark',
|
||||
'pedestals',
|
||||
'refinedstorage',
|
||||
'mapperbase',
|
||||
'bloodmagic',
|
||||
'eidolon',
|
||||
'morevanillalib',
|
||||
'titanium'
|
||||
];
|
||||
|
||||
global.materialsToUnify = materialsToUnify;
|
||||
global.typesToUnify = typesToUnify;
|
||||
global.modPriorities = modPriorities;
|
77
kubejs/server_scripts/fellies/kubejs/recipes/remove.js
Normal file
77
kubejs/server_scripts/fellies/kubejs/recipes/remove.js
Normal file
@ -0,0 +1,77 @@
|
||||
events.listen('recipes', (event) => {
|
||||
// Additional Lights
|
||||
event.remove({output: 'additional_lights:fire_for_standing_torch_s'});
|
||||
event.remove({output: 'additional_lights:fire_for_standing_torch_l'});
|
||||
event.remove({output: 'additional_lights:fire_for_fire_pit_s'});
|
||||
event.remove({output: 'additional_lights:fire_for_fire_pit_l'});
|
||||
event.remove({output: 'additional_lights:soul_fire_for_standing_torch_s'});
|
||||
event.remove({output: 'additional_lights:soul_fire_for_standing_torch_l'});
|
||||
event.remove({output: 'additional_lights:soul_fire_for_fire_pit_s'});
|
||||
event.remove({output: 'additional_lights:soul_fire_for_fire_pit_l'});
|
||||
|
||||
// Environmental Core
|
||||
event.remove({input: 'envirocore:aethium', output: 'envirocore:aethium'});
|
||||
event.remove({input: 'envirocore:litherite', output: 'envirocore:litherite'});
|
||||
|
||||
// Extra Storage
|
||||
event.remove({id: 'extrastorage:part/storagepart_256k'});
|
||||
event.remove({id: 'extrastorage:part/storagepart_1024k'});
|
||||
event.remove({id: 'extrastorage:part/storagepart_4096k'});
|
||||
event.remove({id: 'extrastorage:part/storagepart_16384k'});
|
||||
event.remove({id: 'extrastorage:part/storagepart_16384k_fluid'});
|
||||
event.remove({id: 'extrastorage:part/storagepart_65536k_fluid'});
|
||||
event.remove({id: 'extrastorage:part/storagepart_262144k_fluid'});
|
||||
event.remove({id: 'extrastorage:part/storagepart_1048576k_fluid'});
|
||||
event.remove({id: 'extrastorage:disk/shaped/disk_256k'});
|
||||
event.remove({id: 'extrastorage:disk/shaped/disk_1024k'});
|
||||
event.remove({id: 'extrastorage:disk/shaped/disk_4096k'});
|
||||
event.remove({id: 'extrastorage:disk/shaped/disk_16384k'});
|
||||
event.remove({id: 'extrastorage:disk/shaped/disk_16384k_fluid'});
|
||||
event.remove({id: 'extrastorage:disk/shaped/disk_65536k_fluid'});
|
||||
event.remove({id: 'extrastorage:disk/shaped/disk_262144k_fluid'});
|
||||
event.remove({id: 'extrastorage:disk/shaped/disk_1048576k_fluid'});
|
||||
event.remove({id: 'extrastorage:disk/shapeless/disk_256k'});
|
||||
event.remove({id: 'extrastorage:disk/shapeless/disk_1024k'});
|
||||
event.remove({id: 'extrastorage:disk/shapeless/disk_4096k'});
|
||||
event.remove({id: 'extrastorage:disk/shapeless/disk_16384k'});
|
||||
event.remove({id: 'extrastorage:disk/shapeless/disk_16384k_fluid'});
|
||||
event.remove({id: 'extrastorage:disk/shapeless/disk_65536k_fluid'});
|
||||
event.remove({id: 'extrastorage:disk/shapeless/disk_262144k_fluid'});
|
||||
event.remove({id: 'extrastorage:disk/shapeless/disk_1048576k_fluid'});
|
||||
|
||||
|
||||
// Iron Rods
|
||||
event.remove({id: 'immersiveengineering:crafting/stick_iron'});
|
||||
|
||||
// Mekanism
|
||||
event.remove({id: 'mekanism:storage_blocks/charcoal'});
|
||||
|
||||
// Pams
|
||||
event.remove({id: 'pamhc2foodextended:pralinesitem'});
|
||||
|
||||
// Thermal Series
|
||||
event.remove({id: 'thermal:parts/emerald_gear'});
|
||||
event.remove({id: 'thermal:storage/bamboo_block'});
|
||||
event.remove({id: 'thermal:storage/gunpowder_block'});
|
||||
event.remove({id: 'thermal:storage/sugar_cane_block'});
|
||||
event.remove({id: 'thermal:storage/beetroot_block'});
|
||||
event.remove({id: 'thermal:storage/apple_block'});
|
||||
event.remove({id: 'thermal:storage/potato_block'});
|
||||
event.remove({id: 'thermal:storage/carrot_block'});
|
||||
event.remove({id: 'thermal:storage/charcoal_block'});
|
||||
event.remove({id: 'thermal:storage/sawdust_block'});
|
||||
event.remove({id: 'thermal:machine/press/packing3x3/press_bamboo_packing'});
|
||||
event.remove({id: 'thermal:machine/press/packing3x3/press_gunpowder_packing'});
|
||||
event.remove({id: 'thermal:machine/press/packing3x3/press_sugar_cane_packing'});
|
||||
event.remove({id: 'thermal:machine/press/packing3x3/press_beetroot_packing'});
|
||||
event.remove({id: 'thermal:machine/press/packing3x3/press_apple_packing'});
|
||||
event.remove({id: 'thermal:machine/press/packing3x3/press_potato_packing'});
|
||||
event.remove({id: 'thermal:machine/press/packing3x3/press_carrot_packing'});
|
||||
event.remove({id: 'thermal:machine/press/packing3x3/press_charcoal_packing'});
|
||||
event.remove({id: 'thermal:machine/press/packing3x3/press_sawdust_packing'});
|
||||
|
||||
// Xreliquary
|
||||
event.remove({id: 'xreliquary:items/uncrafting/redstone'});
|
||||
event.remove({id: 'xreliquary:items/uncrafting/gunpowder_witch_hat'});
|
||||
event.remove({id: 'xreliquary:items/uncrafting/glowstone_dust'});
|
||||
});
|
11
kubejs/server_scripts/fellies/kubejs/recipes/replace.js
Normal file
11
kubejs/server_scripts/fellies/kubejs/recipes/replace.js
Normal file
@ -0,0 +1,11 @@
|
||||
events.listen('recipes', (event) => {
|
||||
// Immersive Engineering
|
||||
// event.replaceInput({}, '#minecraft:planks', 'minecraft:gold_nugget');
|
||||
// event.replaceOutput({}, 'minecraft:stick', 'minecraft:oak_sapling');
|
||||
|
||||
// Extra Storage
|
||||
// event.replaceInput({}, 'extrastorage:storagepart_256k', 'extradisks:256k_storage_part');
|
||||
// event.replaceInput({}, 'extrastorage:storagepart_1024k', 'extradisks:1024k_storage_part');
|
||||
// event.replaceInput({}, 'extrastorage:storagepart_4096k', 'extradisks:4096k_storage_part');
|
||||
// event.replaceInput({}, 'extrastorage:storagepart_16384k', 'extradisks:16384k_storage_part');
|
||||
});
|
27
kubejs/server_scripts/fellies/kubejs/recipes/shaped.js
Normal file
27
kubejs/server_scripts/fellies/kubejs/recipes/shaped.js
Normal file
@ -0,0 +1,27 @@
|
||||
events.listen('recipes', (event) => {
|
||||
// Xreliquary
|
||||
event.shaped(Item.of('minecraft:glowstone_dust', 6), [
|
||||
'H ',
|
||||
' H ',
|
||||
' H'
|
||||
], {
|
||||
H: 'xreliquary:witch_hat'
|
||||
});
|
||||
|
||||
event.shaped(Item.of('minecraft:gunpowder', 6), [
|
||||
' H ',
|
||||
' H ',
|
||||
' H '
|
||||
], {
|
||||
H: 'xreliquary:witch_hat'
|
||||
});
|
||||
|
||||
event.shaped(Item.of('minecraft:redstone', 6), [
|
||||
'H ',
|
||||
' H ',
|
||||
'H '
|
||||
], {
|
||||
H: 'xreliquary:witch_hat'
|
||||
});
|
||||
});
|
||||
|
844
kubejs/server_scripts/fellies/kubejs/unification/additions.js
Normal file
844
kubejs/server_scripts/fellies/kubejs/unification/additions.js
Normal file
@ -0,0 +1,844 @@
|
||||
//priority: 900
|
||||
events.listen('recipes', function (event) {
|
||||
materialsToUnify.forEach(function (material) {
|
||||
var ore = getPreferredItemInTag(ingredient.of('#forge:ores/' + material)).id;
|
||||
var ingot = getPreferredItemInTag(ingredient.of('#forge:ingots/' + material)).id;
|
||||
var gem = getPreferredItemInTag(ingredient.of('#forge:gems/' + material)).id;
|
||||
|
||||
var crushedOre = getPreferredItemInTag(ingredient.of('#create:crushed_ores/' + material)).id;
|
||||
var dust = getPreferredItemInTag(ingredient.of('#forge:dusts/' + material)).id;
|
||||
|
||||
var plate = getPreferredItemInTag(ingredient.of('#forge:plates/' + material)).id;
|
||||
var gear = getPreferredItemInTag(ingredient.of('#forge:gears/' + material)).id;
|
||||
var rod = getPreferredItemInTag(ingredient.of('#forge:rods/' + material)).id;
|
||||
var wire = getPreferredItemInTag(ingredient.of('#forge:wires/' + material)).id;
|
||||
|
||||
gear_unification(event, material, ingot, gem, gear);
|
||||
rod_unification(event, material, ingot, gem, rod);
|
||||
|
||||
// astralsorcery_ore_processing_infuser(event, material, ore, ingot, gem);
|
||||
|
||||
// bloodmagic_ore_processing_alchemy(event, material, ore, dust, gem);
|
||||
// bloodmagic_ore_processing_arc(event, material, ore, dust, gem);
|
||||
|
||||
// create_ore_processing_with_secondary_outputs(event, material, crushedOre);
|
||||
// create_gem_processing(event, material, ore, gem, dust);
|
||||
// create_ingot_gem_milling(event, material, ingot, dust, gem);
|
||||
// create_press_plates(event, material, gem, plate);
|
||||
|
||||
// emendatus_hammer_crushing(event, material, ore, dust);
|
||||
|
||||
// immersiveengineering_gem_crushing(event, material, dust, gem);
|
||||
// immersiveengineering_ingot_crushing(event, material, dust, ingot);
|
||||
// immersiveengineering_ore_processing(event, material, ore, gem);
|
||||
// immersiveengineering_press_plates(event, material, ingot, gem, plate);
|
||||
|
||||
// occultism_ore_crushing(event, material, ore, dust, gem);
|
||||
// occultism_ingot_gem_crushing(event, material, ingot, dust, gem);
|
||||
|
||||
// pedestals_ore_crushing(event, material, ore, dust, gem);
|
||||
// pedestals_ingot_gem_crushing(event, material, ingot, dust, gem);
|
||||
|
||||
// thermal_press_wires(event, material, wire);
|
||||
// thermal_press_plates(event, material, gem, plate);
|
||||
});
|
||||
|
||||
// dyeSources.forEach((recipe) => {
|
||||
// botania_dye_pestle_mortar(event, recipe);
|
||||
// create_dye_milling(event, recipe);
|
||||
// immersiveengineering_dye_crusher(event, recipe);
|
||||
// mekanism_dye_enriching(event, recipe);
|
||||
// pedestals_dye_crushing(event, recipe);
|
||||
// thermal_dye_centrifuge(event, recipe);
|
||||
// });
|
||||
});
|
||||
|
||||
// function getPreferredItemInTag(tag) {
|
||||
// const pref = wrapArray(tag.stacks).sort(({ mod: a }, { mod: b }) => compareIndices(a, b, tag))[0] || item.of(air);
|
||||
// // console.info('Preferred item: ' + tag + ' => ' + pref);
|
||||
// return pref;
|
||||
// }
|
||||
|
||||
// function tagIsEmpty(tag) {
|
||||
// return getPreferredItemInTag(ingredient.of(tag)).id == air;
|
||||
// }
|
||||
|
||||
// //material unification functions
|
||||
// function gear_unification(event, material, ingot, gem, gear) {
|
||||
// if (gear == air) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// var output = gear,
|
||||
// input,
|
||||
// mold = 'immersiveengineering:mold_gear';
|
||||
|
||||
// if (ingot != air) {
|
||||
// input = '#forge:ingots/' + material;
|
||||
// } else if (gem != air) {
|
||||
// input = '#forge:gems/' + material;
|
||||
// } else {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // Implemented by Thermal
|
||||
// // event.recipes.thermal.press(gear, [item.of(gearInput, 4), 'thermal:press_gear_die']);
|
||||
|
||||
// event.recipes.immersiveengineering.metal_press(output, ingredient.of(input, 4), mold);
|
||||
// event.shaped(gear, [' B ', 'BAB', ' B '], {
|
||||
// A: '#forge:nuggets/iron',
|
||||
// B: input
|
||||
// });
|
||||
// }
|
||||
|
||||
// function rod_unification(event, material, ingot, gem, rod) {
|
||||
// if (rod == air) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// event.remove({ type: 'minecraft:crafting_shaped', output: rod });
|
||||
|
||||
// var output = item.of(rod, 2),
|
||||
// input,
|
||||
// mold = 'immersiveengineering:mold_rod';
|
||||
|
||||
// if (ingot != air) {
|
||||
// input = '#forge:ingots/' + material;
|
||||
// } else if (gem != air) {
|
||||
// input = '#forge:gems/' + material;
|
||||
// } else {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// event.recipes.thermal.press(output, [input, mold]).energy(2400);
|
||||
// event.recipes.immersiveengineering.metal_press(output, input, mold);
|
||||
// event.shaped(output, [' A ', ' A ', ' '], {
|
||||
// A: input
|
||||
// });
|
||||
// }
|
||||
|
||||
// function astralsorcery_ore_processing_infuser(event, material, ore, ingot, gem) {
|
||||
// if (ore == air) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// blacklistedMaterials = ['redstone', 'lapis', 'emerald', 'diamond', 'iron'];
|
||||
// for (var i = 0; i < blacklistedMaterials.length; i++) {
|
||||
// if (blacklistedMaterials[i] == material) {
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
|
||||
// var input = 'forge:ores/' + material,
|
||||
// output,
|
||||
// count;
|
||||
// if (gem != air) {
|
||||
// output = gem;
|
||||
// count = 5;
|
||||
// } else if (ingot != air) {
|
||||
// output = ingot;
|
||||
// count = 3;
|
||||
// } else {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// event.custom({
|
||||
// type: 'astralsorcery:infuser',
|
||||
// fluidInput: 'astralsorcery:liquid_starlight',
|
||||
// input: {
|
||||
// tag: input
|
||||
// },
|
||||
// output: {
|
||||
// item: output,
|
||||
// count: count
|
||||
// },
|
||||
// consumptionChance: 0.1,
|
||||
// duration: 100,
|
||||
// consumeMultipleFluids: false,
|
||||
// acceptChaliceInput: true,
|
||||
// copyNBTToOutputs: false
|
||||
// });
|
||||
// }
|
||||
|
||||
// function bloodmagic_ore_processing_alchemy(event, material, ore, dust, gem) {
|
||||
// if (ore == air || gem == air) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// var inputs = ['#forge:ores/' + material, '#bloodmagic:arc/cuttingfluid'],
|
||||
// output = item.of(gem, 2);
|
||||
|
||||
// event.recipes.bloodmagic.alchemytable(output, inputs).syphon(400).ticks(200).upgradeLevel(1);
|
||||
// }
|
||||
|
||||
// function bloodmagic_ore_processing_arc(event, material, ore, dust, gem) {
|
||||
// var data = {
|
||||
// recipes: []
|
||||
// };
|
||||
|
||||
// if (ore != air && gem != air) {
|
||||
// data.recipes.push({
|
||||
// input: '#forge:ores/' + material,
|
||||
// output: item.of(gem, 5),
|
||||
// addedOutput: [],
|
||||
// tool: '#bloodmagic:arc/cuttingfluid'
|
||||
// });
|
||||
// }
|
||||
|
||||
// if (gem != air && dust != air) {
|
||||
// data.recipes.push({
|
||||
// input: '#forge:gems/' + material,
|
||||
// output: item.of(dust, 1),
|
||||
// addedOutput: [],
|
||||
// tool: '#bloodmagic:arc/explosive'
|
||||
// });
|
||||
// }
|
||||
|
||||
// data.recipes.forEach((recipe) => {
|
||||
// event.recipes.bloodmagic
|
||||
// .arc(recipe.output, recipe.input, recipe.tool, recipe.addedOutput)
|
||||
// .consumeIngredient(false);
|
||||
// });
|
||||
// }
|
||||
|
||||
// function create_ore_processing_with_secondary_outputs(event, material, crushedOre) {
|
||||
// if (crushedOre == air) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// var primaryOutput = crushedOre,
|
||||
// stoneOutput = 'minecraft:cobblestone',
|
||||
// primaryCount = 2,
|
||||
// secondaryCount = 2,
|
||||
// secondaryMaterial,
|
||||
// input = '#forge:ores/' + material,
|
||||
// processingTime = 300;
|
||||
|
||||
// switch (material) {
|
||||
// case 'iron':
|
||||
// secondaryMaterial = 'nickel';
|
||||
// processingTime = 400;
|
||||
// break;
|
||||
// case 'nickel':
|
||||
// secondaryMaterial = 'iron';
|
||||
// processingTime = 350;
|
||||
// break;
|
||||
// case 'gold':
|
||||
// secondaryMaterial = 'zinc';
|
||||
// break;
|
||||
// case 'copper':
|
||||
// secondaryMaterial = 'gold';
|
||||
// processingTime = 350;
|
||||
// break;
|
||||
// case 'aluminum':
|
||||
// secondaryMaterial = 'iron';
|
||||
// break;
|
||||
// case 'lead':
|
||||
// secondaryMaterial = 'silver';
|
||||
// break;
|
||||
// case 'silver':
|
||||
// secondaryMaterial = 'lead';
|
||||
// break;
|
||||
// case 'uranium':
|
||||
// secondaryMaterial = 'lead';
|
||||
// processingTime = 400;
|
||||
// break;
|
||||
// case 'osmium':
|
||||
// secondaryMaterial = 'tin';
|
||||
// processingTime = 400;
|
||||
// break;
|
||||
// case 'tin':
|
||||
// secondaryMaterial = 'osmium';
|
||||
// processingTime = 350;
|
||||
// break;
|
||||
// case 'zinc':
|
||||
// secondaryMaterial = 'gold';
|
||||
// processingTime = 350;
|
||||
// break;
|
||||
// case 'iesnium':
|
||||
// secondaryMaterial = 'iesnium';
|
||||
// processingTime = 350;
|
||||
// break;
|
||||
// case 'cloggrum':
|
||||
// secondaryMaterial = 'cloggrum';
|
||||
// processingTime = 350;
|
||||
// break;
|
||||
// case 'froststeel':
|
||||
// secondaryMaterial = 'froststeel';
|
||||
// processingTime = 350;
|
||||
// break;
|
||||
// case 'regalium':
|
||||
// secondaryMaterial = 'regalium';
|
||||
// processingTime = 350;
|
||||
// break;
|
||||
// case 'utherium':
|
||||
// secondaryMaterial = 'utherium';
|
||||
// processingTime = 350;
|
||||
// break;
|
||||
// default:
|
||||
// return;
|
||||
// }
|
||||
|
||||
// var secondaryOutput = getPreferredItemInTag(ingredient.of('#create:crushed_ores/' + secondaryMaterial)).id;
|
||||
// var primaryChance = 0.25,
|
||||
// secondaryChance = 0.05;
|
||||
|
||||
// var outputs = [
|
||||
// item.of(primaryOutput),
|
||||
// item.of(primaryOutput, primaryCount).withChance(primaryChance),
|
||||
// item.of(secondaryOutput, secondaryCount).withChance(secondaryChance)
|
||||
// ];
|
||||
|
||||
// event.recipes.create.milling(outputs, input).processingTime(processingTime);
|
||||
|
||||
// primaryChance = 0.6;
|
||||
// secondaryChance = 0.1;
|
||||
// outputs = [
|
||||
// item.of(primaryOutput),
|
||||
// item.of(primaryOutput, primaryCount).withChance(primaryChance),
|
||||
// item.of(secondaryOutput, secondaryCount).withChance(secondaryChance),
|
||||
// Item.of(stoneOutput).withChance(0.125)
|
||||
// ];
|
||||
// event.recipes.create.crushing(outputs, input).processingTime(processingTime);
|
||||
// }
|
||||
|
||||
// function create_gem_processing(event, material, ore, gem, dust) {
|
||||
// if (ore == air) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// var stoneOutput = 'minecraft:cobblestone',
|
||||
// processingTime = 300,
|
||||
// output = gem,
|
||||
// primaryCount,
|
||||
// secondaryCount,
|
||||
// input = '#forge:ores/' + material;
|
||||
|
||||
// switch (material) {
|
||||
// case 'redstone':
|
||||
// primaryCount = 8;
|
||||
// secondaryCount = 6;
|
||||
// secondaryChance = 0.25;
|
||||
// output = dust;
|
||||
// break;
|
||||
// case 'coal':
|
||||
// primaryCount = 2;
|
||||
// secondaryCount = 2;
|
||||
// secondaryChance = 0.5;
|
||||
// break;
|
||||
// case 'diamond':
|
||||
// primaryCount = 2;
|
||||
// secondaryCount = 1;
|
||||
// secondaryChance = 0.25;
|
||||
// processingTime = 500;
|
||||
// break;
|
||||
// case 'emerald':
|
||||
// primaryCount = 2;
|
||||
// secondaryCount = 1;
|
||||
// secondaryChance = 0.25;
|
||||
// processingTime = 500;
|
||||
// break;
|
||||
// case 'lapis':
|
||||
// primaryCount = 8;
|
||||
// secondaryCount = 4;
|
||||
// secondaryChance = 0.25;
|
||||
// break;
|
||||
// case 'quartz':
|
||||
// primaryCount = 2;
|
||||
// secondaryCount = 4;
|
||||
// secondaryChance = 0.5;
|
||||
// processingTime = 350;
|
||||
// stoneOutput = 'minecraft:netherrack';
|
||||
// break;
|
||||
// case 'sulfur':
|
||||
// primaryCount = 6;
|
||||
// secondaryCount = 2;
|
||||
// secondaryChance = 0.25;
|
||||
// break;
|
||||
// case 'apatite':
|
||||
// primaryCount = 8;
|
||||
// secondaryCount = 4;
|
||||
// secondaryChance = 0.25;
|
||||
// break;
|
||||
// case 'fluorite':
|
||||
// primaryCount = 6;
|
||||
// secondaryCount = 3;
|
||||
// secondaryChance = 0.25;
|
||||
// break;
|
||||
// case 'dimensional':
|
||||
// primaryCount = 6;
|
||||
// secondaryCount = 3;
|
||||
// secondaryChance = 0.25;
|
||||
// break;
|
||||
// default:
|
||||
// return;
|
||||
// }
|
||||
// var outputs = [
|
||||
// item.of(output, primaryCount),
|
||||
// item.of(output, secondaryCount).withChance(secondaryChance),
|
||||
// Item.of(stoneOutput).withChance(0.125)
|
||||
// ];
|
||||
|
||||
// event.recipes.create.crushing(outputs, input).processingTime(processingTime);
|
||||
// }
|
||||
|
||||
// function create_ingot_gem_milling(event, material, ingot, dust, gem) {
|
||||
// if (dust == air) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// var input,
|
||||
// outputs = [item.of(dust, 1)],
|
||||
// processingTime = 300;
|
||||
// if (ingot != air) {
|
||||
// input = '#forge:ingots/' + material;
|
||||
// } else if (gem != air) {
|
||||
// input = '#forge:gems/' + material;
|
||||
// } else {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// event.recipes.create.milling(outputs, input).processingTime(processingTime);
|
||||
// }
|
||||
|
||||
// function create_press_plates(event, material, gem, plate) {
|
||||
// if (plate == air || gem == air) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// var output = plate;
|
||||
// var input = '#forge:gems/' + material;
|
||||
|
||||
// event.recipes.create.pressing(output, input);
|
||||
// }
|
||||
|
||||
// function emendatus_hammer_crushing(event, material, ore, dust) {
|
||||
// if (ore == air || dust == air) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// event.remove({ id: 'immersiveengineering:crafting/hammercrushing_' + material });
|
||||
// event.replaceInput(
|
||||
// { id: 'emendatusenigmatica:dust_from_chunk/' + material },
|
||||
// 'emendatusenigmatica:' + material + '_chunk',
|
||||
// '#forge:ores/' + material
|
||||
// );
|
||||
// }
|
||||
|
||||
// function immersiveengineering_gem_crushing(event, material, dust, gem) {
|
||||
// if (gem == air || dust == air) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// var output = dust,
|
||||
// input = '#forge:gems/' + material;
|
||||
|
||||
// event.recipes.immersiveengineering.crusher(output, input).energy(2000);
|
||||
// }
|
||||
|
||||
// function immersiveengineering_ingot_crushing(event, material, dust, ingot) {
|
||||
// if (ingot == air || dust == air) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// if (material == 'signalum' || material == 'lumium' || material == 'enderium') {
|
||||
// var output = dust,
|
||||
// input = '#forge:ingots/' + material;
|
||||
|
||||
// event.recipes.immersiveengineering.crusher(output, input).energy(2000);
|
||||
// }
|
||||
// }
|
||||
|
||||
// function immersiveengineering_ore_processing(event, material, ore, gem) {
|
||||
// if (ore == air || gem == air) {
|
||||
// return;
|
||||
// }
|
||||
// var count,
|
||||
// input = '#forge:ores/' + material;
|
||||
|
||||
// switch (material) {
|
||||
// case 'sulfur':
|
||||
// count = 6;
|
||||
// break;
|
||||
// case 'apatite':
|
||||
// count = 12;
|
||||
// break;
|
||||
// case 'dimensional':
|
||||
// count = 8;
|
||||
// break;
|
||||
// case 'mana':
|
||||
// count = 2;
|
||||
// break;
|
||||
// case 'cinnabar':
|
||||
// count = 2;
|
||||
// break;
|
||||
// case 'potassium_nitrate':
|
||||
// count = 2;
|
||||
// break;
|
||||
// case 'bitumen':
|
||||
// count = 2;
|
||||
// break;
|
||||
// default:
|
||||
// return;
|
||||
// }
|
||||
// var output = item.of(gem, count);
|
||||
|
||||
// event.recipes.immersiveengineering.crusher(output, input).energy(2000);
|
||||
// }
|
||||
|
||||
// function immersiveengineering_press_plates(event, material, ingot, gem, plate) {
|
||||
// if (plate == air) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// //var hammer = 'immersiveengineering:hammer';
|
||||
// //event.shapeless(plate, [hammer, ingot]);
|
||||
// event.remove({ id: 'immersiveengineering:crafting/plate_' + material + '_hammering' });
|
||||
|
||||
// blacklistedMaterials = [
|
||||
// 'iron',
|
||||
// 'gold',
|
||||
// 'copper',
|
||||
// 'aluminum',
|
||||
// 'silver',
|
||||
// 'lead',
|
||||
// 'nickel',
|
||||
// 'uranium',
|
||||
// 'osmium',
|
||||
// 'tin',
|
||||
// 'zinc',
|
||||
// 'bronze',
|
||||
// 'brass',
|
||||
// 'constantan',
|
||||
// 'electrum',
|
||||
// 'steel',
|
||||
// 'invar'
|
||||
// ];
|
||||
|
||||
// for (var i = 0; i < blacklistedMaterials.length; i++) {
|
||||
// if (blacklistedMaterials[i] == material) {
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
|
||||
// var output = plate,
|
||||
// mold = 'immersiveengineering:mold_plate';
|
||||
// if (ingot != air) {
|
||||
// input = '#forge:ingots/' + material;
|
||||
// } else if (gem != air) {
|
||||
// input = '#forge:gems/' + material;
|
||||
// } else {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// event.recipes.immersiveengineering.metal_press(output, input, mold).energy(2400);
|
||||
// }
|
||||
|
||||
// function occultism_ore_crushing(event, material, ore, dust, gem) {
|
||||
// if (ore == air) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// blacklistedMaterials = ['silver'];
|
||||
|
||||
// for (var i = 0; i < blacklistedMaterials.length; i++) {
|
||||
// if (blacklistedMaterials[i] == material) {
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
|
||||
// var count;
|
||||
// switch (material) {
|
||||
// case 'redstone':
|
||||
// count = 6;
|
||||
// break;
|
||||
// case 'coal':
|
||||
// count = 4;
|
||||
// break;
|
||||
// case 'lapis':
|
||||
// count = 9;
|
||||
// break;
|
||||
// case 'quartz':
|
||||
// count = 3;
|
||||
// break;
|
||||
// case 'sulfur':
|
||||
// count = 6;
|
||||
// break;
|
||||
// case 'apatite':
|
||||
// count = 12;
|
||||
// break;
|
||||
// case 'fluorite':
|
||||
// count = 6;
|
||||
// break;
|
||||
// case 'dimensional':
|
||||
// count = 8;
|
||||
// break;
|
||||
// default:
|
||||
// count = 2;
|
||||
// }
|
||||
|
||||
// var output,
|
||||
// input = 'forge:ores/' + material,
|
||||
// output = dust;
|
||||
// if (gem != air) {
|
||||
// output = gem;
|
||||
// }
|
||||
|
||||
// event.custom({
|
||||
// type: 'occultism:crushing',
|
||||
// ingredient: {
|
||||
// tag: input
|
||||
// },
|
||||
// result: {
|
||||
// item: output,
|
||||
// count: count
|
||||
// },
|
||||
// crushing_time: 100
|
||||
// });
|
||||
// }
|
||||
|
||||
// function occultism_ingot_gem_crushing(event, material, ingot, dust, gem) {
|
||||
// if (dust == air) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// blacklistedMaterials = ['silver'];
|
||||
|
||||
// for (var i = 0; i < blacklistedMaterials.length; i++) {
|
||||
// if (blacklistedMaterials[i] == material) {
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
|
||||
// var input,
|
||||
// output = dust;
|
||||
// if (ingot != air) {
|
||||
// input = 'forge:ingots/' + material;
|
||||
// } else if (gem != air) {
|
||||
// input = 'forge:gems/' + material;
|
||||
// } else {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// event.custom({
|
||||
// type: 'occultism:crushing',
|
||||
// ingredient: {
|
||||
// tag: input
|
||||
// },
|
||||
// result: {
|
||||
// item: output,
|
||||
// count: 1
|
||||
// },
|
||||
// crushing_time: 100
|
||||
// });
|
||||
// }
|
||||
|
||||
// function pedestals_ore_crushing(event, material, ore, dust, gem) {
|
||||
// if (ore == air) {
|
||||
// return;
|
||||
// }
|
||||
// var count;
|
||||
// switch (material) {
|
||||
// case 'redstone':
|
||||
// count = 6;
|
||||
// break;
|
||||
// case 'coal':
|
||||
// count = 4;
|
||||
// break;
|
||||
// case 'lapis':
|
||||
// count = 9;
|
||||
// break;
|
||||
// case 'quartz':
|
||||
// count = 3;
|
||||
// break;
|
||||
// case 'sulfur':
|
||||
// count = 6;
|
||||
// break;
|
||||
// case 'apatite':
|
||||
// count = 12;
|
||||
// break;
|
||||
// case 'fluorite':
|
||||
// count = 6;
|
||||
// break;
|
||||
// case 'dimensional':
|
||||
// count = 8;
|
||||
// break;
|
||||
// default:
|
||||
// count = 2;
|
||||
// }
|
||||
|
||||
// var output,
|
||||
// input = 'forge:ores/' + material,
|
||||
// output = dust;
|
||||
// if (gem != air) {
|
||||
// output = gem;
|
||||
// }
|
||||
|
||||
// event.custom({
|
||||
// type: 'pedestals:pedestal_crushing',
|
||||
// ingredient: {
|
||||
// tag: input
|
||||
// },
|
||||
// result: {
|
||||
// item: output,
|
||||
// count: count
|
||||
// }
|
||||
// });
|
||||
// event.remove({
|
||||
// id: 'pedestals:pedestal_crushing/dust' + material
|
||||
// });
|
||||
// }
|
||||
|
||||
// function pedestals_ingot_gem_crushing(event, material, ingot, dust, gem) {
|
||||
// if (dust == air) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// var input,
|
||||
// output = dust;
|
||||
// if (ingot != air) {
|
||||
// input = 'forge:ingots/' + material;
|
||||
// } else if (gem != air) {
|
||||
// input = 'forge:gems/' + material;
|
||||
// } else {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// event.custom({
|
||||
// type: 'pedestals:pedestal_crushing',
|
||||
// ingredient: {
|
||||
// tag: input
|
||||
// },
|
||||
// result: {
|
||||
// item: output,
|
||||
// count: 1
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
// function thermal_press_plates(event, material, gem, plate) {
|
||||
// if (plate == air || gem == air) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// var output = plate;
|
||||
// var input = '#forge:gems/' + material;
|
||||
|
||||
// event.recipes.thermal.press(item.of(output), input);
|
||||
// }
|
||||
|
||||
// function thermal_press_wires(event, material, wire) {
|
||||
// if (wire == air) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// var output = item.of(wire, 2),
|
||||
// input = '#forge:ingots/' + material,
|
||||
// mold = 'immersiveengineering:mold_wire';
|
||||
// event.recipes.thermal.press(output, [input, mold]).energy(2400);
|
||||
// }
|
||||
|
||||
// //dye normalization functions
|
||||
// function botania_dye_pestle_mortar(event, recipe) {
|
||||
// if (recipe.type == 'petal') {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// var baseCount = 2,
|
||||
// multiplier = 1;
|
||||
// if (recipe.type == 'large') {
|
||||
// multiplier = 2;
|
||||
// }
|
||||
|
||||
// var count = baseCount * multiplier,
|
||||
// output = Item.of(recipe.primary, count),
|
||||
// inputs = [recipe.input, 'botania:pestle_and_mortar'];
|
||||
|
||||
// event.shapeless(output, inputs);
|
||||
// }
|
||||
|
||||
// function create_dye_milling(event, recipe) {
|
||||
// var baseCount = 2,
|
||||
// multiplier = 1;
|
||||
// if (recipe.type == 'large') {
|
||||
// multiplier = 2;
|
||||
// }
|
||||
|
||||
// var count = baseCount * multiplier,
|
||||
// outputs = [
|
||||
// Item.of(recipe.primary, count),
|
||||
// Item.of(recipe.secondary).withCount(count).withChance(0.25),
|
||||
// Item.of(recipe.tertiary).withCount(multiplier).withChance(0.05)
|
||||
// ],
|
||||
// input = recipe.input;
|
||||
|
||||
// event.recipes.create.milling(outputs, input);
|
||||
// }
|
||||
// function immersiveengineering_dye_crusher(event, recipe) {
|
||||
// var baseCount = 2,
|
||||
// multiplier = 1;
|
||||
// if (recipe.type == 'large') {
|
||||
// multiplier = 2;
|
||||
// }
|
||||
// var count = baseCount * multiplier,
|
||||
// output = Item.of(recipe.primary, count),
|
||||
// extras = [
|
||||
// Item.of(recipe.secondary).withCount(count).withChance(0.25),
|
||||
// Item.of(recipe.tertiary).withCount(multiplier).withChance(0.05)
|
||||
// ],
|
||||
// input = recipe.input;
|
||||
|
||||
// event.recipes.immersiveengineering.crusher(output, input, extras);
|
||||
// }
|
||||
// function mekanism_dye_enriching(event, recipe) {
|
||||
// var baseCount = 3,
|
||||
// multiplier = 1;
|
||||
// if (recipe.type == 'large') {
|
||||
// multiplier = 2;
|
||||
// }
|
||||
|
||||
// var count = baseCount * multiplier,
|
||||
// output = Item.of(recipe.primary, count),
|
||||
// input = recipe.input;
|
||||
|
||||
// event.recipes.mekanism.enriching(output, input);
|
||||
// }
|
||||
// function pedestals_dye_crushing(event, recipe) {
|
||||
// var baseCount = 2,
|
||||
// multiplier = 1;
|
||||
// if (recipe.type == 'large') {
|
||||
// multiplier = 2;
|
||||
// }
|
||||
|
||||
// var count = baseCount * multiplier,
|
||||
// output = recipe.primary,
|
||||
// input = recipe.input;
|
||||
|
||||
// event.custom({
|
||||
// type: 'pedestals:pedestal_crushing',
|
||||
// ingredient: {
|
||||
// item: input
|
||||
// },
|
||||
// result: {
|
||||
// item: output,
|
||||
// count: count
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// function thermal_dye_centrifuge(event, recipe) {
|
||||
// var baseCount = 2,
|
||||
// multiplier = 1;
|
||||
// if (recipe.type == 'large') {
|
||||
// multiplier = 2;
|
||||
// }
|
||||
|
||||
// var count = baseCount * multiplier,
|
||||
// outputs = [
|
||||
// Item.of(recipe.primary, count),
|
||||
// Item.of(recipe.secondary).withCount(count).withChance(0.25),
|
||||
// Item.of(recipe.tertiary).withCount(multiplier).withChance(0.05)
|
||||
// ],
|
||||
// input = recipe.input;
|
||||
|
||||
// event.recipes.thermal.centrifuge(outputs, input);
|
||||
// }
|
@ -0,0 +1,16 @@
|
||||
events.listen('recipes', function (event) {
|
||||
materialsToUnify.forEach(function (material) {
|
||||
typesToUnify.forEach(function (type) {
|
||||
if (!entryIsBlacklisted(material, type)) {
|
||||
var tagString = '#forge:' + type + 's/' + material;
|
||||
var tag = ingredient.of(tagString);
|
||||
if (tag.stacks.size() > 1) {
|
||||
var prefItem = getPreferredItemInTag(tag);
|
||||
// console.log('Tag: ' + tag);
|
||||
// console.log('Prefered item: ' + prefItem);
|
||||
event.replaceOutput({}, tagString, prefItem);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
@ -1,6 +0,0 @@
|
||||
events.listen('player.logged_in', (event) => {
|
||||
if (!event.hasGameStage('starting_items')) {
|
||||
event.player.give(item.of('ftbquests:book'));
|
||||
event.addGameStage('starting_items');
|
||||
}
|
||||
});
|
@ -1,11 +0,0 @@
|
||||
events.listen('recipes', (event) => {
|
||||
// Additional Lights
|
||||
event.remove({output: 'additional_lights:fire_for_standing_torch_s'});
|
||||
event.remove({output: 'additional_lights:fire_for_standing_torch_l'});
|
||||
event.remove({output: 'additional_lights:fire_for_fire_pit_s'});
|
||||
event.remove({output: 'additional_lights:fire_for_fire_pit_l'});
|
||||
event.remove({output: 'additional_lights:soul_fire_for_standing_torch_s'});
|
||||
event.remove({output: 'additional_lights:soul_fire_for_standing_torch_l'});
|
||||
event.remove({output: 'additional_lights:soul_fire_for_fire_pit_s'});
|
||||
event.remove({output: 'additional_lights:soul_fire_for_fire_pit_l'});
|
||||
});
|
Reference in New Issue
Block a user