Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functional storage for 0.7 #708

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
268 changes: 268 additions & 0 deletions kubejs/server_scripts/functional storage/recipes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,268 @@
// priority: 0
//f storage

const registerFunctionalStorageRecipes = (event) => {

event.remove({ mod: 'functionalstorage' });
event.remove({ mod: 'functional_tfc' });

// Виды деревянных дроверов

for (var i = 0; i < 19; i++) {
event.shaped(`functionalstorage:tfc_${global.TYPE_OF_TREE_FOR_FS_NAMES[i]}_1`, [
'AAA',
'CBC',
'AAA'
],
{
A: `tfc:wood/planks/${global.TYPE_OF_TREE_FOR_FS_NAMES[i]}`,
B: '#forge:chests/wooden',
C: '#forge:double_plates/steel'
}).id(`functionalstorage:tfc_${global.TYPE_OF_TREE_FOR_FS_NAMES[i]}_1_${i}`)

event.shaped(`functionalstorage:tfc_${global.TYPE_OF_TREE_FOR_FS_NAMES[i]}_2`, [
'ABA',
'CAC',
'ABA'
], {
A: `tfc:wood/planks/${global.TYPE_OF_TREE_FOR_FS_NAMES[i]}`,
B: '#forge:chests/wooden',
C: '#forge:double_plates/steel'
}).id(`functionalstorage:tfc_${global.TYPE_OF_TREE_FOR_FS_NAMES[i]}_2_${[i]}`)

event.shaped(`functionalstorage:tfc_${global.TYPE_OF_TREE_FOR_FS_NAMES[i]}_4`, [
'BAB',
'CAC',
'BAB'
], {
A: `tfc:wood/planks/${global.TYPE_OF_TREE_FOR_FS_NAMES[i]}`,
B: '#forge:chests/wooden',
C: '#forge:double_plates/steel'
}).id(`functionalstorage:tfc_${global.TYPE_OF_TREE_FOR_FS_NAMES[i]}_4_${[i]}`)

}

//дровер контроллер
event.shaped('functionalstorage:storage_controller', [
'ABA',
'CDC',
'EFE'
], {
A: '#gtceu:circuits/lv',
B: 'create:electron_tube',
C: 'create:precision_mechanism',
D: '#functionalstorage:drawer',
E: 'gtceu:lv_conveyor_module',
F: 'gtceu:lv_robot_arm'
}).id('functionalstorage:storage_controller')

//дровер воронка
event.shaped('functionalstorage:controller_extension', [
'ABA',
'CDC',
'EFE'
], {
A: '#forge:double_plates/steel',
B: 'minecraft:hopper',
C: 'create:precision_mechanism',
D: '#functionalstorage:drawer',
E: 'gtceu:lv_conveyor_module',
F: 'gtceu:lv_electric_motor'
}).id('functionalstorage:controller_extension')

//инструмент связывания

event.shaped('functionalstorage:linking_tool', [
' A ',
'BCB',
' D '
], {
A: 'create:electron_tube',
B: '#forge:plates/steel',
C: '#functionalstorage:drawer' ,
D: 'create:precision_mechanism' ,

}).id('functionalstorage:linking_tool')

//инструмент конфигурации

event.shaped('functionalstorage:configuration_tool', [
' A ',
'BCB',
' D '
], {
A: 'create:electron_tube',
B: '#forge:plates/wrought_iron',
C: '#functionalstorage:drawer',
D: 'create:precision_mechanism',

}).id('functionalstorage:configuration_tool')

// жидкостные дроверы

event.shaped('functionalstorage:fluid_1', [
'ABA',
'CDC',
'EFE'
], {
A: '#forge:plates/steel',
B: '#gtceu:circuits/lv' ,
C: '#forge:double_plates/steel',
D: 'gtceu:steel_drum' ,
E: 'create:fluid_tank',
F: 'gtceu:lv_electric_pump',
}).id('functionalstorage:fluid_1')

event.shaped('functionalstorage:fluid_2', [
'ABA',
'CDC',
'EFE'
], {
A: 'gtceu:fluid_cell',
B: '#gtceu:circuits/lv',
C: '#forge:double_plates/steel',
D: 'gtceu:steel_drum',
E: 'create:fluid_tank',
F: 'gtceu:lv_electric_pump',
}).id('functionalstorage:fluid_2')

event.shaped('functionalstorage:fluid_4', [
'EBE',
'CDC',
'EFE'
], {
B: '#gtceu:circuits/lv',
C: '#forge:plates/steel',
D: 'gtceu:steel_drum',
E: 'create:fluid_tank',
F: 'gtceu:lv_electric_pump',
}).id('functionalstorage:fluid_4')


// Дровер края

event.shaped('functionalstorage:ender_drawer', [
'ABA',
'CDC',
'ABA'
], {
B: '#gtceu:circuits/mv',
C: 'gtceu:mv_field_generator',
D: '#forge:chests/ender',
A: '#forge:double_sheets/aluminium',
}).id('functionalstorage:ender_drawer')

// Улучшения взаимодействия

event.shaped('functionalstorage:collector_upgrade', [
'ABA',
'CDC',
'ABA'
], {
A: '#forge:stone' ,
B: 'gtceu:lv_conveyor_module',
C: '#forge:dusts/redstone',
D: '#functionalstorage:drawer',
}).id('functionalstorage:collector_upgrade')

event.shaped('functionalstorage:puller_upgrade', [
'ABA',
'ADA',
'ACA'
], {
A: '#forge:stone',
B: 'gtceu:lv_conveyor_module',
C: '#forge:dusts/redstone',
D: '#functionalstorage:drawer',
}).id('functionalstorage:puller_upgrade')

event.shaped('functionalstorage:pusher_upgrade', [
'ACA',
'ADA',
'ABA'
], {
A: '#forge:stone',
B: 'gtceu:lv_conveyor_module',
C: '#forge:dusts/redstone',
D: '#functionalstorage:drawer',
}).id('functionalstorage:pusher_upgrade')

// Улучшения вместимости

event.shaped('functionalstorage:copper_upgrade', [
'ABA',
'BCB',
'ABA'
], {
A: '#forge:plates/steel',
B: '#gtceu:circuits/lv',
C: 'gtceu:steel_crate',

}).id('functionalstorage:copper_upgrade')

event.shaped('functionalstorage:gold_upgrade', [
'ABA',
'BCB',
'ABA'
], {
A: '#forge:plates/stainless_steel',
B: '#gtceu:circuits/hv',
C: 'gtceu:lv_field_generator',

}).id('functionalstorage:gold_upgrade')

event.shaped('functionalstorage:diamond_upgrade', [
'ABA',
'BCB',
'ABA'
], {
A: '#forge:plates/titanium',
B: '#gtceu:circuits/ev',
C: 'gtceu:mv_field_generator',

}).id('functionalstorage:diamond_upgrade')

event.shaped('functionalstorage:iron_downgrade', [
' A ',
'ABA',
' A '
], {
A: '#forge:double_plates/steel',
B: '#gtceu:circuits/lv',


}).id('functionalstorage:iron_downgrade')

// Улучшения разное

event.shaped('functionalstorage:redstone_upgrade', [
' A ',
' B ',
' '
], {
A: 'gtceu:activity_detector_cover',
B: '#functionalstorage:drawer',


}).id('functionalstorage:redstone_upgrade')

event.shaped('functionalstorage:void_upgrade', [
'ABA',
'CDE',
'FGF'
], {
A: '#forge:screws/steel',
B: 'gtceu:item_detector_cover',
C: '#forge:tools/screwdrivers',
D: '#functionalstorage:drawer',
E: '#forge:tools/wrenches',
F: '#forge:normal_item_pipes/brass',
G: '#forge:ender_pearls',
}).id('functionalstorage:void_upgrade')






}
10 changes: 10 additions & 0 deletions kubejs/server_scripts/functional storage/tags.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// priority: 0
//f storage

const registerFStorageItemTags = (event) => {

global.FS_DISABLED_ITEMS.forEach(item => {
event.removeAllTagsFrom(item)
event.add('c:hidden_from_recipe_viewers', item)
})
}
3 changes: 3 additions & 0 deletions kubejs/server_scripts/main_server_script.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ ServerEvents.tags('item', event => {
registerSophisticatedBackpacksItemTags(event)
registerTFCAmbientalItemTags(event)
registerTFCItemTags(event)
registerFStorageItemTags(event)
})

/**
Expand Down Expand Up @@ -144,4 +145,6 @@ ServerEvents.recipes(event => {
registerToolBeltRecipes(event)
registerTreeTapRecipes(event)
registerWaterFlasksRecipes(event)
registerFunctionalStorageRecipes(event)

})
71 changes: 71 additions & 0 deletions kubejs/startup_scripts/functional storage/constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
// priority: 0
// FS
global.FS_DISABLED_ITEMS = [

'functionalstorage:rubber_1',
'functionalstorage:rubber_2',
'functionalstorage:rubber_4',
'functionalstorage:birch_1',
'functionalstorage:birch_2',
'functionalstorage:birch_4',
'functionalstorage:treated_1',
'functionalstorage:treated_2',
'functionalstorage:treated_4',
'functionalstorage:rubber_1',
'functionalstorage:crimson_1',
'functionalstorage:crimson_2',
'functionalstorage:crimson_4',
'functionalstorage:acacia_1',
'functionalstorage:acacia_2',
'functionalstorage:acacia_4',
'functionalstorage:warped_1',
'functionalstorage:warped_2',
'functionalstorage:warped_4',
'functionalstorage:mangrove_1',
'functionalstorage:mangrove_2',
'functionalstorage:mangrove_4',
'functionalstorage:jungle_1',
'functionalstorage:jungle_2',
'functionalstorage:jungle_4',
'functionalstorage:spruce_1',
'functionalstorage:spruce_2',
'functionalstorage:spruce_4',
'functionalstorage:dark_oak_1',
'functionalstorage:dark_oak_2',
'functionalstorage:dark_oak_4',
'functionalstorage:cherry_1',
'functionalstorage:cherry_2',
'functionalstorage:cherry_4',
'functionalstorage:oak_1',
'functionalstorage:oak_2',
'functionalstorage:oak_4',
'functionalstorage:framed_simple_compacting_drawer',
'functionalstorage:armory_cabinet',
'functionalstorage:creative_vending_upgrade',
'functionalstorage:netherite_upgrade',
'functionalstorage:compacting_drawer',
'functionalstorage:compacting_framed_drawer',
'functionalstorage:simple_compacting_drawer',
]

global.TYPE_OF_TREE_FOR_FS_NAMES = [
'acacia',
'ash',
'aspen',
'birch',
'blackwood',
'chestnut',
'douglas_fir',
'hickory',
'kapok',
'mangrove',
'maple',
'oak',
'palm',
'rosewood',
'sequoia',
'spruce',
'sycamore',
'white_cedar',
'willow',
];
Loading