Skip to content

Commit

Permalink
First Vomhine Industries Multi
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghostipedia committed Jun 19, 2024
1 parent 7f0e069 commit a0aa0d9
Show file tree
Hide file tree
Showing 23 changed files with 154 additions and 7 deletions.
2 changes: 1 addition & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Adds Advanced Ram Wafers and Chips
New Parallel Behavior and First Vomhine Industries Multi
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ parchment_mappings=2023.09.03
quilt_mappings=23

# Mod Properties
mod_version=0.2.8
mod_version=0.2.9
maven_group=com.ghostipedia.frontiers
archives_base_name=cosmic-core
mod_id=cosmiccore
mod_author=Ghostipedia

# Dependencies
gtceu_version=1.2.3.a
gtceu_version=1.3.0
ldlib_version=1.0.25.l
registrate_version=MC1.20-1.3.3
kubejs_version=2001.6.4-build.120
Expand Down
3 changes: 3 additions & 0 deletions src/generated/resources/assets/cosmiccore/lang/en_ud.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
"block.cosmiccore.uv_soul_output_hatch": "ɥɔʇɐH ʇndʇnO ןnoS Λ∩Ɛ§",
"block.cosmiccore.uxv_soul_input_hatch": "ɥɔʇɐH ʇnduI ןnoS ΛX∩ǝ§",
"block.cosmiccore.uxv_soul_output_hatch": "ɥɔʇɐH ʇndʇnO ןnoS ΛX∩ǝ§",
"block.cosmiccore.vomahine_certified_chemically_resistant_casing": "buısɐƆ ʇuɐʇsısǝᴚ ʎןןɐɔıɯǝɥƆ pǝıɟıʇɹǝƆ ǝuıɥɐɯoΛ",
"block.cosmiccore.vomahine_certified_chemically_resistant_pipe": "ǝdıԀ ʇuɐʇsısǝᴚ ʎןןɐɔıɯǝɥƆ pǝıɟıʇɹǝƆ ǝuıɥɐɯoΛ",
"block.cosmiccore.vomahine_industrial_chemical_plant": "ʇuɐןԀ ןɐɔıɯǝɥƆ ןɐıɹʇsnpuI ǝuıɥɐɯoΛ",
"block.cosmiccore.zpm_soul_input_hatch": "ɥɔʇɐH ʇnduI ןnoS WԀZɔ§",
"block.cosmiccore.zpm_soul_output_hatch": "ɥɔʇɐH ʇndʇnO ןnoS WԀZɔ§",
"cosmiccore.multiblock.current_field_strength": "%s :ɥʇbuǝɹʇS pןǝıℲɟ§",
Expand Down
3 changes: 3 additions & 0 deletions src/generated/resources/assets/cosmiccore/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
"block.cosmiccore.uv_soul_output_hatch": "§3UV Soul Output Hatch",
"block.cosmiccore.uxv_soul_input_hatch": "§eUXV Soul Input Hatch",
"block.cosmiccore.uxv_soul_output_hatch": "§eUXV Soul Output Hatch",
"block.cosmiccore.vomahine_certified_chemically_resistant_casing": "Vomahine Certified Chemically Resistant Casing",
"block.cosmiccore.vomahine_certified_chemically_resistant_pipe": "Vomahine Certified Chemically Resistant Pipe",
"block.cosmiccore.vomahine_industrial_chemical_plant": "Vomahine Industrial Chemical Plant",
"block.cosmiccore.zpm_soul_input_hatch": "§cZPM Soul Input Hatch",
"block.cosmiccore.zpm_soul_output_hatch": "§cZPM Soul Output Hatch",
"cosmiccore.multiblock.current_field_strength": "§fField Strength: %s",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
],
"entries": [
{
"type": "minecraft:item",
"name": "cosmiccore:vomahine_certified_chemically_resistant_casing"
}
],
"rolls": 1.0
}
],
"random_sequence": "cosmiccore:blocks/vomahine_certified_chemically_resistant_casing"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
],
"entries": [
{
"type": "minecraft:item",
"name": "cosmiccore:vomahine_certified_chemically_resistant_pipe"
}
],
"rolls": 1.0
}
],
"random_sequence": "cosmiccore:blocks/vomahine_certified_chemically_resistant_pipe"
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"cosmiccore:high_powered_magnet",
"cosmiccore:fusion_grade_magnet",
"cosmiccore:high_temperature_fission_casing",
"cosmiccore:vomahine_certified_chemically_resistant_casing",
"cosmiccore:vomahine_certified_chemically_resistant_pipe",
"cosmiccore:highly_conductive_fission_casing"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public boolean isRecipeSearchFilter() {
return true;
}

@Override
public void addXEIInfo(WidgetGroup group, int xOffset, List<Content> contents, boolean perTick, boolean isInput, MutableInt yOffset) {
int soul = contents.stream().map(Content::getContent).mapToInt(SoulRecipeCapability.CAP::of).sum();
if (isInput) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ public class CosmicBlocks {

//TODO : FIGURE OUT WHY these are breaking the minable tags for pickaxe/wrench..
public static final BlockEntry<Block> HIGH_TEMP_FISSION_CASING = createCasingBlockWrenchOnly("high_temperature_fission_casing", CosmicCore.id("block/casings/solid/high_temperature_fission_casing"));
public static final BlockEntry<Block> VOMAHINE_CERTIFIED_CHEMICALLY_RESISTANT_CASING = createCasingBlockWrenchOnly("vomahine_certified_chemically_resistant_casing", CosmicCore.id("block/casings/solid/vomahine_certified_chemically_resistant_casing"));
public static final BlockEntry<Block> VOMAHINE_CERTIFIED_CHEMICALLY_RESISTANT_PIPE = createCasingBlockWrenchOnly("vomahine_certified_chemically_resistant_pipe", CosmicCore.id("block/casings/solid/vomahine_certified_chemically_resistant_pipe"));
public static final BlockEntry<Block> HIGHLY_CONDUCTIVE_FISSION_CASING = createCasingBlockWrenchOnly("highly_conductive_fission_casing", CosmicCore.id("block/casings/solid/highly_conductive_fission_casing"));

//This is a Bunch of Rendering Magic I barely understand (See: I Don't understand at all) ~Ghost
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import com.gregtechceu.gtceu.common.data.GTBlocks;
import com.gregtechceu.gtceu.common.data.GTMaterials;
import com.gregtechceu.gtceu.common.data.GTRecipeModifiers;
import com.gregtechceu.gtceu.common.machine.multiblock.part.ParallelHatchPartMachine;
import net.minecraft.network.chat.Component;
import com.gregtechceu.gtceu.utils.GTHashMaps;
import com.gregtechceu.gtceu.utils.ItemStackHashStrategy;
Expand All @@ -47,7 +48,10 @@

import static com.ghostipedia.cosmiccore.api.pattern.CosmicPredicates.magnetCoils;
import static com.ghostipedia.cosmiccore.api.registries.CosmicRegistration.REGISTRATE;
import static com.gregtechceu.gtceu.api.GTValues.*;
import static com.gregtechceu.gtceu.api.GTValues.UV;
import static com.gregtechceu.gtceu.api.pattern.Predicates.*;
import static com.gregtechceu.gtceu.common.data.GTMachines.registerTieredMachines;

public class CosmicMachines {
static {
Expand Down Expand Up @@ -144,9 +148,9 @@ public static GTRecipe copyOutputs(GTRecipe recipe, ContentModifier modifier) {
.pattern(definition -> FactoryBlockPattern.start()
.aisle("##QQQ##", "##QQQ##", "###Q###", "#######", "#######","#######","#######","#######","#######","#######","###Q###","##QQQ##","##QQQ##")
.aisle("#QQQQQ#", "#QQSQQ#", "#FQQQF#", "#FQFQF#", "#F###F#","#F###F#","#F###F#","#F###F#","#F###F#","#FQFQF#","#FQQQF#","#QQSQQ#","#QQQQQ#")
.aisle("QQQQQQQ", "QQSSSQQ", "#QSSSQ#", "#QHGHQ#", "#QHGHQ#","#QHGHQ#","#QHGHQ#","#QHGHQ#","#QHGHQ#","#QHGHQ#","#QSSSQ#","QQSSSQQ","QQQQQQQ")
.aisle("QQQQQQQ", "QQSSSQQ", "#QSSSQ#", "#QHGHQ#", "##HGH##","##HGH##","##HGH##","##HGH##","##HGH##","#QHGHQ#","#QSSSQ#","QQSSSQQ","QQQQQQQ")
.aisle("QQQQQQQ", "QSSSSSQ", "QQSSSQQ", "#FGSGF#", "##GSG##","##GSG##","##GSG##","##GSG##","##GSG##","#FGSGF#","QQSSSQQ","QSSSSSQ","QQQQQQQ")
.aisle("QQQQQQQ", "QQSSSQQ", "#QSSSQ#", "#QHGHQ#", "#QHGHQ#","#QHGHQ#","#QHGHQ#","#QHGHQ#","#QHGHQ#","#QHGHQ#","#QSSSQ#","QQSSSQQ","QQQQQQQ")
.aisle("QQQQQQQ", "QQSSSQQ", "#QSSSQ#", "#QHGHQ#", "##HGH##","##HGH##","##HGH##","##HGH##","##HGH##","#QHGHQ#","#QSSSQ#","QQSSSQQ","QQQQQQQ")
.aisle("#QQQQQ#", "#QQSQQ#", "#FQQQF#", "#FQFQF#", "#F###F#","#F###F#","#F###F#","#F###F#","#F###F#","#FQFQF#","#FQQQF#","#QQSQQ#","#QQQQQ#")
.aisle("##QQQ##", "##QCQ##", "###Q###", "#######", "#######","#######","#######","#######","#######","#######","###Q###","##QQQ##","##QQQ##")
.where('#', any())
Expand All @@ -170,7 +174,42 @@ public static GTRecipe copyOutputs(GTRecipe recipe, ContentModifier modifier) {
.workableCasingRenderer(CosmicCore.id("block/casings/solid/naquadah_pressure_resistant_casing"), GTCEu.id("block/multiblock/hpca"))

.register();
public final static MultiblockMachineDefinition VOMAHINE_INDUSTRIAL_CHEMPLANT = REGISTRATE.multiblock("vomahine_industrial_chemical_plant", WorkableElectricMultiblockMachine::new)
.rotationState(RotationState.ALL)
.recipeType(CosmicRecipeTypes.VOMAHINE_INDUSTRIAL_CHEMVAT)
.recipeModifiers(CosmicRecipeModifiers::vomahineChemicalPlantParallel,GTRecipeModifiers.ELECTRIC_OVERCLOCK.apply(OverclockingLogic.PERFECT_OVERCLOCK))
.appearanceBlock(CosmicBlocks.VOMAHINE_CERTIFIED_CHEMICALLY_RESISTANT_CASING)
.pattern(definition -> FactoryBlockPattern.start()
.aisle("##QQQ##", "##QQQ##", "###Q###", "#######", "#######","#######","#######","#######","###Q###","##QQQ##","##QQQ##")
.aisle("#QQQQQ#", "#QQSQQ#", "#FQQQF#", "#FQ#QF#", "#F###F#","#F###F#","#F###F#","#FQ#QF#","#FQQQF#","#QQSQQ#","#QQQQQ#")
.aisle("QQQQQQQ", "QQSSSQQ", "#QSSSQ#", "##HGH##", "##HGH##","##HGH##","##HGH##","#QHGHQ#","#QSSSQ#","QQSSSQQ","QQQQQQQ")
.aisle("QQQQQQQ", "QSSSSSQ", "QQSSSQQ", "##GSG##", "##GSG##","##GSG##","##GSG##","##GSG##","QQSSSQQ","QSSSSSQ","QQQQQQQ")
.aisle("QQQQQQQ", "QQSSSQQ", "#QSSSQ#", "##HGH##", "##HGH##","##HGH##","##HGH##","#QHGHQ#","#QSSSQ#","QQSSSQQ","QQQQQQQ")
.aisle("#QQQQQ#", "#QQSQQ#", "#FQQQF#", "#FQ#QF#", "#F###F#","#F###F#","#F###F#","#FQ#QF#","#FQQQF#","#QQSQQ#","#QQQQQ#")
.aisle("##QQQ##", "##QCQ##", "###Q###", "#######", "#######","#######","#######","#######","###Q###","##QQQ##","##QQQ##")
.where('#', any())
.where("C", controller(blocks(definition.getBlock())))
.where('F', blocks(ChemicalHelper.getBlock(TagPrefix.frameGt, GTMaterials.NaquadahAlloy)))
.where('S', blocks(CosmicBlocks.COIL_RESONANT_VIRTUE_MELD.get()))
.where('H', blocks(CosmicBlocks.VOMAHINE_CERTIFIED_CHEMICALLY_RESISTANT_PIPE.get()))
.where('G', blocks(GTBlocks.CASING_LAMINATED_GLASS.get()))
.where('Q', blocks(CosmicBlocks.VOMAHINE_CERTIFIED_CHEMICALLY_RESISTANT_CASING.get())
.or(abilities(PartAbility.IMPORT_FLUIDS))
.or(abilities(PartAbility.EXPORT_FLUIDS))
.or(abilities(PartAbility.IMPORT_ITEMS))
.or(abilities(PartAbility.EXPORT_ITEMS))
.or(abilities(PartAbility.INPUT_ENERGY))
.or(abilities(PartAbility.MAINTENANCE))
.or(abilities(PartAbility.DATA_ACCESS))
.or(abilities(PartAbility.COMPUTATION_DATA_RECEPTION))
.or(abilities(PartAbility.OPTICAL_DATA_RECEPTION))
.or(abilities(PartAbility.PARALLEL_HATCH))
.or(abilities(PartAbility.INPUT_LASER))
.or(abilities(PartAbility.INPUT_ENERGY))
).build())
.workableCasingRenderer(CosmicCore.id("block/casings/solid/vomahine_certified_chemically_resistant_casing"), CosmicCore.id("block/multiblock/vomahine_chemplant"))

.register();
private static MachineDefinition[] registerSoulTieredHatch(String name, String displayName, String model, IO io, int[] tiers, PartAbility... abilities) {
return registerTieredMachines(name,
(holder, tier) -> new SoulHatchPartMachine(holder, tier, io),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,20 @@
import com.ghostipedia.cosmiccore.api.machine.multiblock.MagnetWorkableElectricMultiblockMachine;
import com.ghostipedia.cosmiccore.common.machine.multiblock.electric.MagneticFieldMachine;
import com.gregtechceu.gtceu.api.GTValues;
import com.gregtechceu.gtceu.api.capability.IParallelHatch;
import com.gregtechceu.gtceu.api.machine.MetaMachine;
import com.gregtechceu.gtceu.api.machine.multiblock.CoilWorkableElectricMultiblockMachine;
import com.gregtechceu.gtceu.api.machine.multiblock.WorkableElectricMultiblockMachine;
import com.gregtechceu.gtceu.api.recipe.GTRecipe;
import com.gregtechceu.gtceu.api.recipe.OverclockingLogic;
import com.gregtechceu.gtceu.api.recipe.RecipeHelper;
import com.gregtechceu.gtceu.api.recipe.modifier.ParallelLogic;
import com.gregtechceu.gtceu.common.data.GTRecipeModifiers;
import com.mojang.datafixers.util.Pair;
import org.jetbrains.annotations.NotNull;

import java.util.Optional;

public class CosmicRecipeModifiers {
public static GTRecipe magnetRecipe(MetaMachine machine, @NotNull GTRecipe recipe) {
if (machine instanceof MagneticFieldMachine magnetMachine) {
Expand All @@ -27,4 +34,30 @@ public static GTRecipe magnetRecipe(MetaMachine machine, @NotNull GTRecipe recip
}
return null;
}

public static GTRecipe vomahineChemicalPlantParallel(MetaMachine machine, @NotNull GTRecipe recipe){
if (machine instanceof WorkableElectricMultiblockMachine vomahineMachine){
Optional<IParallelHatch> optional = vomahineMachine.getParts().stream().filter(IParallelHatch.class::isInstance)
.map(IParallelHatch.class::cast).findAny();
if (optional.isPresent()) {
IParallelHatch hatch = optional.get();
if (hatch.getCurrentParallel() != 0){
var result = GTRecipeModifiers.accurateParallel(machine, recipe, hatch.getCurrentParallel(), false);
recipe = result.getFirst() == recipe ? result.getFirst().copy() : result.getFirst();
var smartDuration = (recipe.duration * hatch.getCurrentParallel())/2;
int parallelValue = result.getSecond();
recipe.duration = smartDuration;
return recipe;
}
}
var result = GTRecipeModifiers.accurateParallel(machine, recipe, 0, false);
recipe = result.getFirst() == recipe ? result.getFirst().copy() : result.getFirst();
var smartDuration = recipe.duration/2;
int parallelValue = result.getSecond();
recipe.duration = smartDuration;
return recipe;
}
return null;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@
import com.gregtechceu.gtceu.api.gui.GuiTextures;
import com.gregtechceu.gtceu.api.recipe.GTRecipeType;
import com.gregtechceu.gtceu.common.data.GTRecipeTypes;
import com.gregtechceu.gtceu.common.data.GTSoundEntries;
import com.lowdragmc.lowdraglib.gui.texture.ProgressTexture;
import com.lowdragmc.lowdraglib.utils.LocalizationUtils;

import static com.gregtechceu.gtceu.common.data.GTRecipeTypes.*;

public class CosmicRecipeTypes {

public static final GTRecipeType SOUL_TESTER_RECIPES = GTRecipeTypes.register("soul_tester", GTRecipeTypes.MULTIBLOCK)
Expand Down Expand Up @@ -41,9 +44,25 @@ public class CosmicRecipeTypes {
return LocalizationUtils.format("cosmiccore.recipe.fieldDecay", decayRate);
})
.setMaxIOSize(1, 0, 1, 0)
.setSound(GTSoundEntries.ARC)
.setProgressBar(GuiTextures.PROGRESS_BAR_ARROW, ProgressTexture.FillDirection.LEFT_TO_RIGHT);
public static final GTRecipeType VOMAHINE_INDUSTRIAL_CHEMVAT = GTRecipeTypes.register("vomahine_industrial_chemvat", GTRecipeTypes.MULTIBLOCK)
.setMaxIOSize(6, 6, 6, 6)
.setHasResearchSlot(true)
.setSound(GTSoundEntries.CHEMICAL)
.setProgressBar(GuiTextures.PROGRESS_BAR_ARROW, ProgressTexture.FillDirection.LEFT_TO_RIGHT);


public static void init() {
CHEMICAL_RECIPES.onRecipeBuild((builder, provider) -> {
LARGE_CHEMICAL_RECIPES.copyFrom(builder)
.save(provider);
VOMAHINE_INDUSTRIAL_CHEMVAT.copyFrom(builder)
.save(provider);
});
LARGE_CHEMICAL_RECIPES.onRecipeBuild((builder, provider) -> {
VOMAHINE_INDUSTRIAL_CHEMVAT.copyFrom(builder)
.save(provider);
});

}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ldlib": {
"connection": "cosmiccore:block/casings/solid/vomahine_certified_chemically_resistant_casing_ctm"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a0aa0d9

Please sign in to comment.