Емае, добавил электро-теплицу

This commit is contained in:
Dmitry 2024-01-01 20:11:38 +07:00
parent 1dd5776e3b
commit 3f8391a73e
10 changed files with 185 additions and 10 deletions

View file

@ -2,12 +2,6 @@
"material.salt_water": "Concentrated Salt Water",
"gtceu.jei.bedrock_fluid.salt_water_deposit": "Concentrated Salt Water Deposit",
"block.gtceu.lv_saw_mill": "WIP",
"block.gtceu.mv_saw_mill": "WIP",
"block.gtceu.hv_saw_mill": "WIP",
"block.gtceu.ev_saw_mill": "WIP",
"block.gtceu.iv_saw_mill": "WIP",
"block.gtceu.luv_saw_mill": "WIP",
"block.gtceu.zpm_saw_mill": "WIP",
"block.gtceu.uv_saw_mill": "WIP"
"block.gtceu.greenhouse": "Electric Greenhouse",
"gtceu.greenhouse": "Electric Greenhouse"
}

View file

@ -2,6 +2,9 @@
"material.salt_water": "Концентрированная соленая вода",
"gtceu.jei.bedrock_fluid.salt_water_deposit": "Concentrated Salt Water Deposit",
"block.gtceu.greenhouse": "Электрическая теплица",
"gtceu.greenhouse": "Электрическая теплица",
"behavior.item_magnet.disabled": "§cМагнитное поле выключено",
"behavior.item_magnet.enabled": "§aМагнитное поле включено",
"behavior.prospector.not_enough_energy": "Не достаточно энергии!",

View file

@ -63,5 +63,21 @@ const registerFirmaLifeRecipes = (event) => {
event.recipes.tfc.anvil('4x firmalife:pie_pan', '#forge:plates/wrought_iron', ["hit_last", "hit_second_last", "draw_third_last"])
.tier(3)
.id('firmalife:anvil/pie_pan')
//#region Рецепты электрической теплицы
// Дерево
// Семена фруктов
global.FIRMALIFE_GREENHOUSE_FRUIT_RECIPE_COMPONENTS.forEach(element => {
generateGreenHouseRecipe(event, element.input, element.fluid_amount, element.output, element.name)
})
// Семена ягод
global.FIRMALIFE_GREENHOUSE_BERRY_RECIPE_COMPONENTS.forEach(element => {
generateGreenHouseRecipe(event, element.input, element.fluid_amount, element.output, element.name)
})
//#endregion
}

View file

@ -54,4 +54,30 @@ const generateCutterRecipe = (event, input, circuit, output, duration, EUt, id)
recipe2.circuit(circuit)
recipe3.circuit(circuit)
}
}
const generateGreenHouseRecipe = (event, input, fluid_amount, output, id) => {
// Без удобрения
event.recipes.gtceu.greenhouse(id)
.itemInputs(input)
.circuit(1)
.inputFluids(Fluid.of('minecraft:water', fluid_amount))
.itemOutputs(output)
.chancedOutput(input, 7500, 0)
.chancedOutput(input, 5000, 0)
.duration(32000)
.EUt(240)
// С удобрением
event.recipes.gtceu.greenhouse(`${id}_fertilized`)
.itemInputs(input)
.itemInputs('8x gtceu:fertilizer')
.circuit(2)
.inputFluids(Fluid.of('minecraft:water', fluid_amount))
.itemOutputs(output)
.chancedOutput(input, 8500, 0)
.chancedOutput(input, 6000, 0)
.duration(16000)
.EUt(240)
}

View file

@ -2405,6 +2405,30 @@ const registerTFCRecipes = (event) => {
//#endregion
//#region Рецепты электрической теплицы
// Дерево
global.TFC_WOOD_TYPES.forEach(wood => {
generateGreenHouseRecipe(event, `tfc:wood/sapling/${wood}`, 16000, `32x tfc:wood/log/${wood}`, `tfg:greenhouse/${wood}`)
})
// Семена фруктов
global.TFC_GREENHOUSE_FRUIT_RECIPE_COMPONENTS.forEach(element => {
generateGreenHouseRecipe(event, element.input, element.fluid_amount, element.output, element.name)
})
// Семена овощей
global.TFC_GREENHOUSE_VEGETABLE_RECIPE_COMPONENTS.forEach(element => {
generateGreenHouseRecipe(event, element.input, element.fluid_amount, element.output, element.name)
})
// Семена ягод
global.TFC_GREENHOUSE_BERRY_RECIPE_COMPONENTS.forEach(element => {
generateGreenHouseRecipe(event, element.input, element.fluid_amount, element.output, element.name)
})
//#endregion
// Другое
event.remove({ id: `tfc:crafting/trip_hammer` })
event.remove({ id: `tfc:anvil/steel_pump` })

View file

@ -37,4 +37,14 @@ global.FIRMALIFE_DISABLED_ITEMS = [
global.FIRMALIFE_ORE_MATERIALS = [
'chromite'
];
global.FIRMALIFE_GREENHOUSE_FRUIT_RECIPE_COMPONENTS = [
{ input: 'firmalife:plant/cocoa_sapling', fluid_amount: 8000, output: '3x firmalife:food/cocoa_beans', name: 'cocoa_beans' },
{ input: 'firmalife:plant/fig_sapling', fluid_amount: 8000, output: '3x firmalife:food/fig', name: 'fig' },
];
global.FIRMALIFE_GREENHOUSE_BERRY_RECIPE_COMPONENTS = [
{ input: 'firmalife:plant/pineapple_bush', fluid_amount: 6000, output: '3x firmalife:food/pineapple', name: 'pineapple' },
{ input: 'firmalife:plant/nightshade_bush', fluid_amount: 6000, output: '3x firmalife:food/nightshade_berry', name: 'nightshade' },
];

View file

@ -0,0 +1,26 @@
// priority: 0
const registerGTCEuMachines = (event) => {
event.create('greenhouse', 'multiblock')
.rotationState(RotationState.NON_Y_AXIS)
.recipeType('greenhouse')
.appearanceBlock(GTBlocks.CASING_STEEL_SOLID)
.pattern(definition => FactoryBlockPattern.start()
.aisle("CCCCCCC", "XXXFXXX", "XXXFXXX", "XXXFXXX", "XXXFXXX", "XXXFXXX", "XXXFXXX", "XXXFXXX", " F ")
.aisle("CDDDDDC", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", " XXFXX ")
.aisle("CDDDDDC", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", " XXFXX ")
.aisle("CDDDDDC", "F#####F", "F#####F", "F#####F", "F#####F", "F#####F", "F#####F", "F#####F", "FFFFFFF")
.aisle("CDDDDDC", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", " XXFXX ")
.aisle("CDDDDDC", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", " XXFXX ")
.aisle("CCCYCCC", "XXXFXXX", "XXXFXXX", "XXXFXXX", "XXXFXXX", "XXXFXXX", "XXXFXXX", "XXXFXXX", " F ")
.where('X', Predicates.blocks('ae2:quartz_glass'))
.where('F', Predicates.frames('steel'))
.where('D', Predicates.blocks('tfc:dirt/silt').or(Predicates.blocks('tfc:dirt/loam')).or(Predicates.blocks('tfc:dirt/sandy_loam')).or(Predicates.blocks('tfc:dirt/silty_loam')).or(Predicates.blocks('tfc:grass/silt')).or(Predicates.blocks('tfc:grass/loam')).or(Predicates.blocks('tfc:grass/sandy_loam')).or(Predicates.blocks('tfc:grass/silty_loam')))
.where('C', Predicates.blocks('gtceu:steel_machine_casing').or(Predicates.autoAbilities(definition.getRecipeTypes())))
.where('#', Predicates.air())
.where(' ', Predicates.any())
.where('Y', Predicates.controller(Predicates.blocks(definition.get())))
.build()
)
.workableCasingRenderer('gtceu:block/casings/solid/machine_casing_solid_steel', 'gtceu:block/multiblock/implosion_compressor', false)
}

View file

@ -0,0 +1,10 @@
// priority: 0
const registerGTCEuRecipeTypes = (event) => {
event.create('greenhouse')
.category('greenhouse')
.setEUIO('in')
.setMaxIOSize(3, 4, 1, 0)
.setProgressBar(GuiTextures.PROGRESS_BAR_ARROW, FillDirection.LEFT_TO_RIGHT)
.setSound(GTSoundEntries.BATH)
}

View file

@ -15,4 +15,18 @@ StartupEvents.registry('block', (event) => {})
/**
* Событие регистрации жидкостей.
*/
StartupEvents.registry('fluid', (event) => {})
StartupEvents.registry('fluid', (event) => {})
/**
* Событие регистрации типов рецептов.
*/
GTCEuStartupEvents.registry('gtceu:recipe_type', event => {
registerGTCEuRecipeTypes(event)
})
/**
* Событие регистрации механизмов.
*/
GTCEuStartupEvents.registry('gtceu:machine', event => {
registerGTCEuMachines(event)
})

View file

@ -1619,7 +1619,59 @@ global.TFC_QUERN_FLOUR_RECIPE_COMPONENTS = [
{ input: 'tfc:food/wheat_grain', output: '2x tfc:food/wheat_flour', name: 'wheat_flour' },
];
global.TFC_GREENHOUSE_FRUIT_RECIPE_COMPONENTS = [
{ input: 'tfc:plant/cherry_sapling', fluid_amount: 8000, output: '3x tfc:food/cherry', name: 'cherry' },
{ input: 'tfc:plant/green_apple_sapling', fluid_amount: 8000, output: '3x tfc:food/green_apple', name: 'green_apple' },
{ input: 'tfc:plant/lemon_sapling', fluid_amount: 8000, output: '3x tfc:food/lemon', name: 'lemon' },
{ input: 'tfc:plant/olive_sapling', fluid_amount: 8000, output: '3x tfc:food/olive', name: 'olive' },
{ input: 'tfc:plant/orange_sapling', fluid_amount: 8000, output: '3x tfc:food/orange', name: 'orange' },
{ input: 'tfc:plant/peach_sapling', fluid_amount: 8000, output: '3x tfc:food/peach', name: 'peach' },
{ input: 'tfc:plant/plum_sapling', fluid_amount: 8000, output: '3x tfc:food/plum', name: 'plum' },
{ input: 'tfc:plant/red_apple_sapling', fluid_amount: 8000, output: '3x tfc:food/red_apple', name: 'red_apple' },
{ input: 'tfc:plant/banana_sapling', fluid_amount:8000, output: '3x tfc:food/banana', name: 'banana' },
];
global.TFC_GREENHOUSE_VEGETABLE_RECIPE_COMPONENTS = [
{ input: 'tfc:seeds/barley', fluid_amount: 4000, output: '3x tfc:food/barley', name: 'barley' },
{ input: 'tfc:seeds/oat', fluid_amount: 4000, output: '3x tfc:food/oat', name: 'oat' },
{ input: 'tfc:seeds/rye', fluid_amount: 4000, output: '3x tfc:food/rye', name: 'rye' },
{ input: 'tfc:seeds/maize', fluid_amount: 4000, output: '3x tfc:food/maize', name: 'maize' },
{ input: 'tfc:seeds/wheat', fluid_amount: 4000, output: '3x tfc:food/wheat', name: 'wheat' },
{ input: 'tfc:seeds/rice', fluid_amount: 4000, output: '3x tfc:food/rice', name: 'rice' },
{ input: 'tfc:seeds/beet', fluid_amount: 4000, output: '3x tfc:food/beet', name: 'beet' },
{ input: 'tfc:seeds/cabbage', fluid_amount: 4000, output: '3x tfc:food/cabbage', name: 'cabbage' },
{ input: 'tfc:seeds/carrot', fluid_amount: 4000, output: '3x tfc:food/carrot', name: 'carrot' },
{ input: 'tfc:seeds/green_bean', fluid_amount: 4000, output: '3x tfc:food/green_bean', name: 'green_bean' },
{ input: 'tfc:seeds/garlic', fluid_amount: 4000, output: '3x tfc:food/garlic', name: 'garlic' },
{ input: 'tfc:seeds/potato', fluid_amount: 4000, output: '3x tfc:food/potato', name: 'potato' },
{ input: 'tfc:seeds/onion', fluid_amount: 4000, output: '3x tfc:food/onion', name: 'onion' },
{ input: 'tfc:seeds/soybean', fluid_amount: 4000, output: '3x tfc:food/soybean', name: 'soybean' },
{ input: 'tfc:seeds/squash', fluid_amount: 4000, output: '3x tfc:food/squash', name: 'squash' },
{ input: 'tfc:seeds/sugarcane', fluid_amount: 4000, output: '3x tfc:food/sugarcane', name: 'sugarcane' },
{ input: 'tfc:seeds/tomato', fluid_amount: 4000, output: '3x tfc:food/tomato', name: 'tomato' },
{ input: 'tfc:seeds/jute', fluid_amount: 4000, output: '3x tfc:jute', name: 'jute' },
{ input: 'tfc:seeds/papyrus', fluid_amount: 4000, output: '3x tfc:papyrus', name: 'papyrus' },
{ input: 'tfc:seeds/pumpkin', fluid_amount: 4000, output: '3x tfc:pumpkin', name: 'pumpkin' },
{ input: 'tfc:seeds/melon', fluid_amount: 4000, output: '3x tfc:melon', name: 'melon' },
{ input: 'tfc:seeds/red_bell_pepper', fluid_amount: 4000, output: '3x tfc:food/red_bell_pepper', name: 'red_bell_pepper' },
{ input: 'tfc:seeds/yellow_bell_pepper', fluid_amount: 4000, output: '3x tfc:food/yellow_bell_pepper', name: 'yellow_bell_pepper' },
];
global.TFC_GREENHOUSE_BERRY_RECIPE_COMPONENTS = [
{ input: 'tfc:plant/snowberry_bush', fluid_amount: 6000, output: '3x tfc:food/snowberry', name: 'snowberry' },
{ input: 'tfc:plant/bunchberry_bush', fluid_amount: 6000, output: '3x tfc:food/bunchberry', name: 'bunchberry' },
{ input: 'tfc:plant/gooseberry_bush', fluid_amount: 6000, output: '3x tfc:food/gooseberry', name: 'gooseberry' },
{ input: 'tfc:plant/cloudberry_bush', fluid_amount: 6000, output: '3x tfc:food/cloudberry', name: 'cloudberry' },
{ input: 'tfc:plant/strawberry_bush', fluid_amount: 6000, output: '3x tfc:food/strawberry', name: 'strawberry' },
{ input: 'tfc:plant/wintergreen_berry_bush', fluid_amount: 6000, output: '3x tfc:food/wintergreen_berry', name: 'wintergreen_berry' },
{ input: 'tfc:plant/blackberry_bush', fluid_amount: 6000, output: '3x tfc:food/blackberry', name: 'blackberry' },
{ input: 'tfc:plant/raspberry_bush', fluid_amount: 6000, output: '3x tfc:food/raspberry', name: 'raspberry' },
{ input: 'tfc:plant/blueberry_bush', fluid_amount: 6000, output: '3x tfc:food/blueberry', name: 'blueberry' },
{ input: 'tfc:plant/elderberry_bush', fluid_amount: 6000, output: '3x tfc:food/elderberry', name: 'elderberry' },
{ input: 'tfc:plant/cranberry_bush', fluid_amount: 6000, output: '3x tfc:food/cranberry', name: 'cranberry' },
];
global.calcAmountOfMetal = (defaultAmount, percents) => {
const value = defaultAmount / (100 / percents)
return (value % 2 == 0) ? value : Math.round(value) - 1
}
}