diff --git a/kubejs/server_scripts/gregtech/recipes.js b/kubejs/server_scripts/gregtech/recipes.js index 045fe6a20..0841e2991 100644 --- a/kubejs/server_scripts/gregtech/recipes.js +++ b/kubejs/server_scripts/gregtech/recipes.js @@ -1465,3 +1465,56 @@ const registerGTCEURecipes = (event) => { //#endregion } + + + + + + +// /** +// * Отключение рецепта генерации nugget'ов из слитков, если nugget'а нет. +// */ +// @Redirect(method = "processIngot", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/builder/GTRecipeBuilder;save(Ljava/util/function/Consumer;)V", ordinal = 3), remap = false) +// private static void tfg$processIngot$gtRecipeBuilder$save$nugget(GTRecipeBuilder instance, Consumer consumer, TagPrefix ingotPrefix, Material material, IngotProperty property) { +// if (!ChemicalHelper.get(TagPrefix.nugget, material).isEmpty()) { +// instance.save(consumer); +// } +// } +// +// /** +// * В GT при добавлении предмета в output или input сразу проверяется empty ли он, +// * чтобы отключить рецепт не хватит просто его не сохранять в некоторых случаях. +// * Если output'а или input'а нет, то нужно будет еще задать условие и какой-то предмет который существует, +// * собственно это мы тут и делаем. +// */ +// @Redirect(method = "processIngot", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/builder/GTRecipeBuilder;outputItems(Lcom/gregtechceu/gtceu/api/data/tag/TagPrefix;Lcom/gregtechceu/gtceu/api/data/chemical/material/Material;I)Lcom/gregtechceu/gtceu/data/recipe/builder/GTRecipeBuilder;", ordinal = 1), remap = false) +// private static GTRecipeBuilder tfg$processIngot$gtRecipeBuilder$outputItems(GTRecipeBuilder instance, TagPrefix orePrefix, Material material, int count) { +// if (!ChemicalHelper.get(TagPrefix.nugget, material).isEmpty()) { +// instance.outputItems(TagPrefix.nugget, material, 9); +// } +// return instance; +// } +// +// /** +// * Отключение генерации рецептов: 2 слитка + молот = пластина (верстак). +// * */ +// @Redirect(method = "processIngot", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/VanillaRecipeHelper;addShapedRecipe(Ljava/util/function/Consumer;Ljava/lang/String;Lnet/minecraft/world/item/ItemStack;[Ljava/lang/Object;)V", ordinal = 2), remap = false) +// private static void tfg$processIngot$addShapedRecipe$plate(Consumer provider, String regName, ItemStack result, Object[] recipe) {} +// +// /** +// * Отключение генерации рецептов: 9 слитков -> блок. (Компрессор) +// */ +// @Redirect(method = "processIngot", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/builder/GTRecipeBuilder;save(Ljava/util/function/Consumer;)V", ordinal = 5), remap = false) +// private static void tfg$processIngot$gtRecipeBuilder$save$block(GTRecipeBuilder instance, Consumer consumer) {} + +// /** +// * Отключение генерации рецептов: 2 пластины + молот = двойная пластина (верстак). +// * */ +// @Redirect(method = "processPlateDouble", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/VanillaRecipeHelper;addShapedRecipe(Ljava/util/function/Consumer;Ljava/lang/String;Lnet/minecraft/world/item/ItemStack;[Ljava/lang/Object;)V"), remap = false) +// private static void tfg$processPlateDouble$vanillaRecipeHelper$addShapedRecipe$doublePlate(Consumer provider, String regName, ItemStack result, Object[] recipe) {} +// +// /** +// * Отключение генерации рецептов: 2 стержня + молот = длинный стержень (верстак). +// * */ +// @Redirect(method = "processLongStick", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/VanillaRecipeHelper;addShapedRecipe(Ljava/util/function/Consumer;Ljava/lang/String;Lnet/minecraft/world/item/ItemStack;[Ljava/lang/Object;)V", ordinal = 3), remap = false) +// private static void tfg$processLongStick$vanillaRecipeHelper$addShapedRecipe$longStick(Consumer provider, String regName, ItemStack result, Object[] recipe) {} \ No newline at end of file diff --git a/kubejs/startup_scripts/gregtech/items.js b/kubejs/startup_scripts/gregtech/items.js index 9500b35c2..4620fb706 100644 --- a/kubejs/startup_scripts/gregtech/items.js +++ b/kubejs/startup_scripts/gregtech/items.js @@ -1,6 +1,6 @@ // priority: 0 -const registerGTCEuItems = (event) => { +const registerGregTechItems = (event) => { event.create('tfg:unfinished_vacuum_tube', 'create:sequenced_assembly') event.create('tfg:unfinished_basic_electronic_circuit', 'create:sequenced_assembly') diff --git a/kubejs/startup_scripts/gregtech/machines.js b/kubejs/startup_scripts/gregtech/machines.js index 0a415b613..31c99918a 100644 --- a/kubejs/startup_scripts/gregtech/machines.js +++ b/kubejs/startup_scripts/gregtech/machines.js @@ -1,6 +1,8 @@ // priority: 0 -const registerGTCEuMachines = (event) => { +const registerGregTechMachines = (event) => { + + // Регистрация мультиблока теплицы event.create('greenhouse', 'multiblock') .rotationState(RotationState.NON_Y_AXIS) .recipeType('greenhouse') @@ -24,20 +26,22 @@ const registerGTCEuMachines = (event) => { ) .workableCasingRenderer('gtceu:block/casings/solid/machine_casing_solid_steel', 'gtceu:block/multiblock/implosion_compressor', false) + // Регистрация мультиблока (хз как перевести, короче конвертит энергию физическую в энергию электрическую) event.create('alternator', 'multiblock') .rotationState(RotationState.NON_Y_AXIS) - .recipeType('alternator') + .recipeType('basic_alternator') + .appearanceBlock(GTBlocks.CASING_STEEL_SOLID) + .generator(true) .pattern(definition => FactoryBlockPattern.start() .aisle("CWC", "CWC", "#W#") .aisle("CWC", "K#E", "CWC") - .aisle("CWI", "CWA", "#W#") + .aisle("CWC", "CWA", "#W#") .where('A', Predicates.controller(Predicates.blocks(definition.get()))) - .where('W', Predicates.blocks('gtceu:cupronickel_coil_block')) + .where('W', Predicates.blocks(GTBlocks.COIL_CUPRONICKEL.get())) .where("C", Predicates.blocks(GTBlocks.CASING_STEEL_SOLID.get())) .where('#', Predicates.any()) .where('K', Predicates.abilities(PartAbility.INPUT_KINETIC).setExactLimit(1)) .where('E', Predicates.abilities(PartAbility.OUTPUT_ENERGY).setExactLimit(1)) - .where('I', Predicates.abilities(PartAbility.IMPORT_ITEMS).setExactLimit(1)) .build() ) .workableCasingRenderer( diff --git a/kubejs/startup_scripts/gregtech/material_info.js b/kubejs/startup_scripts/gregtech/material_info.js index 07238979e..f58f2c3b6 100644 --- a/kubejs/startup_scripts/gregtech/material_info.js +++ b/kubejs/startup_scripts/gregtech/material_info.js @@ -1,6 +1,6 @@ // priority: 0 -const registerGTCEuMaterialInfo = (event) => { +const registerGregTechMaterialInfo = (event) => { //#region Дерево global.VANILLA_WOOD_TYPES.forEach(woodType => { diff --git a/kubejs/startup_scripts/gregtech/recipe_types.js b/kubejs/startup_scripts/gregtech/recipe_types.js index eb4144c95..829c53603 100644 --- a/kubejs/startup_scripts/gregtech/recipe_types.js +++ b/kubejs/startup_scripts/gregtech/recipe_types.js @@ -1,15 +1,15 @@ // priority: 0 -const registerGTCEuRecipeTypes = (event) => { +const registerGregTechRecipeTypes = (event) => { event.create('greenhouse') - .category('greenhouse') + .category('multiblock') .setEUIO('in') .setMaxIOSize(3, 4, 1, 0) .setProgressBar(GuiTextures.PROGRESS_BAR_ARROW, FillDirection.LEFT_TO_RIGHT) .setSound(GTSoundEntries.BATH) event.create('alternator') - .category('alternator') + .category('multiblock') .setEUIO('out') .setMaxIOSize(1, 0, 0, 0) .setProgressBar(GuiTextures.PROGRESS_BAR_ARROW, FillDirection.LEFT_TO_RIGHT) diff --git a/kubejs/startup_scripts/gregtech/world_gen_layers.js b/kubejs/startup_scripts/gregtech/world_gen_layers.js index b2b08d719..8c1c40697 100644 --- a/kubejs/startup_scripts/gregtech/world_gen_layers.js +++ b/kubejs/startup_scripts/gregtech/world_gen_layers.js @@ -1,7 +1,11 @@ // priority: 0 -const registerGTMWorldGenLayers = (event) => { +const registerGregTechWorldGenLayers = (event) => { + // Здесь куча конченных переменных. Почему? + // А потому что мы не можем использовать у руды несколько слоев для гена и з-за этого приходится говнить. + // Спасибо разрабам. + const ALL = ['#tfc:rock/raw'] const IE = [ diff --git a/kubejs/startup_scripts/main_startup_script.js b/kubejs/startup_scripts/main_startup_script.js index ffcd9f0b7..6a5bf6fda 100644 --- a/kubejs/startup_scripts/main_startup_script.js +++ b/kubejs/startup_scripts/main_startup_script.js @@ -4,7 +4,7 @@ * Событие регистрации предметов. */ StartupEvents.registry('item', event => { - registerGTCEuItems(event) + registerGregTechItems(event) }) /** @@ -31,75 +31,26 @@ StartupEvents.registry('fluid', event => {}) * Событие регистрации типов рецептов. */ GTCEuStartupEvents.registry('gtceu:recipe_type', event => { - // registerGTCEuRecipeTypes(event) + registerGregTechRecipeTypes(event) }) /** * Событие регистрации механизмов. */ GTCEuStartupEvents.registry('gtceu:machine', event => { - // registerGTCEuMachines(event) + registerGregTechMachines(event) }) /** * Событие регистрации слоев пород GTM. */ GTCEuStartupEvents.registry('gtceu:world_gen_layer', event => { - registerGTMWorldGenLayers(event) + registerGregTechWorldGenLayers(event) }) /** * Событие регистрации информации о составе предмета. */ -// TFGStartupEvents.materialInfo(event => { -// registerGTCEuMaterialInfo(event) -// }) - - -// /** -// * Отключение рецепта генерации nugget'ов из слитков, если nugget'а нет. -// */ -// @Redirect(method = "processIngot", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/builder/GTRecipeBuilder;save(Ljava/util/function/Consumer;)V", ordinal = 3), remap = false) -// private static void tfg$processIngot$gtRecipeBuilder$save$nugget(GTRecipeBuilder instance, Consumer consumer, TagPrefix ingotPrefix, Material material, IngotProperty property) { -// if (!ChemicalHelper.get(TagPrefix.nugget, material).isEmpty()) { -// instance.save(consumer); -// } -// } -// -// /** -// * В GT при добавлении предмета в output или input сразу проверяется empty ли он, -// * чтобы отключить рецепт не хватит просто его не сохранять в некоторых случаях. -// * Если output'а или input'а нет, то нужно будет еще задать условие и какой-то предмет который существует, -// * собственно это мы тут и делаем. -// */ -// @Redirect(method = "processIngot", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/builder/GTRecipeBuilder;outputItems(Lcom/gregtechceu/gtceu/api/data/tag/TagPrefix;Lcom/gregtechceu/gtceu/api/data/chemical/material/Material;I)Lcom/gregtechceu/gtceu/data/recipe/builder/GTRecipeBuilder;", ordinal = 1), remap = false) -// private static GTRecipeBuilder tfg$processIngot$gtRecipeBuilder$outputItems(GTRecipeBuilder instance, TagPrefix orePrefix, Material material, int count) { -// if (!ChemicalHelper.get(TagPrefix.nugget, material).isEmpty()) { -// instance.outputItems(TagPrefix.nugget, material, 9); -// } -// return instance; -// } -// -// /** -// * Отключение генерации рецептов: 2 слитка + молот = пластина (верстак). -// * */ -// @Redirect(method = "processIngot", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/VanillaRecipeHelper;addShapedRecipe(Ljava/util/function/Consumer;Ljava/lang/String;Lnet/minecraft/world/item/ItemStack;[Ljava/lang/Object;)V", ordinal = 2), remap = false) -// private static void tfg$processIngot$addShapedRecipe$plate(Consumer provider, String regName, ItemStack result, Object[] recipe) {} -// -// /** -// * Отключение генерации рецептов: 9 слитков -> блок. (Компрессор) -// */ -// @Redirect(method = "processIngot", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/builder/GTRecipeBuilder;save(Ljava/util/function/Consumer;)V", ordinal = 5), remap = false) -// private static void tfg$processIngot$gtRecipeBuilder$save$block(GTRecipeBuilder instance, Consumer consumer) {} - -// /** -// * Отключение генерации рецептов: 2 пластины + молот = двойная пластина (верстак). -// * */ -// @Redirect(method = "processPlateDouble", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/VanillaRecipeHelper;addShapedRecipe(Ljava/util/function/Consumer;Ljava/lang/String;Lnet/minecraft/world/item/ItemStack;[Ljava/lang/Object;)V"), remap = false) -// private static void tfg$processPlateDouble$vanillaRecipeHelper$addShapedRecipe$doublePlate(Consumer provider, String regName, ItemStack result, Object[] recipe) {} -// -// /** -// * Отключение генерации рецептов: 2 стержня + молот = длинный стержень (верстак). -// * */ -// @Redirect(method = "processLongStick", at = @At(value = "INVOKE", target = "Lcom/gregtechceu/gtceu/data/recipe/VanillaRecipeHelper;addShapedRecipe(Ljava/util/function/Consumer;Ljava/lang/String;Lnet/minecraft/world/item/ItemStack;[Ljava/lang/Object;)V", ordinal = 3), remap = false) -// private static void tfg$processLongStick$vanillaRecipeHelper$addShapedRecipe$longStick(Consumer provider, String regName, ItemStack result, Object[] recipe) {} \ No newline at end of file +TFGStartupEvents.materialInfo(event => { + registerGregTechMaterialInfo(event) +}) \ No newline at end of file