### Define Supersymmetry Recipes with Catalysts (Java) Source: https://context7.com/symmetricdevs/susy-core/llms.txt This snippet demonstrates how to define custom recipes for various Supersymmetry processing machines using Java. It includes examples for batch and fixed bed reactors, showcasing input/output definitions, duration, energy usage, and catalyst requirements. Dependencies include GTCEu API and Supersymmetry API. ```java import supersymmetry.api.recipes.SuSyRecipeMaps; import supersymmetry.api.recipes.builders.CatalystRecipeBuilder; import supersymmetry.api.recipes.catalysts.CatalystGroup; import supersymmetry.api.recipes.catalysts.CatalystInfo; import gregtech.api.GTValues; // Create a batch reactor recipe with catalyst requirements SuSyRecipeMaps.BATCH_REACTOR_RECIPES.recipeBuilder() .inputs(OreDictUnifier.get(OrePrefix.dust, Materials.Iron, 2)) .fluidInputs(Materials.HydrochloricAcid.getFluid(2000)) .fluidOutputs(Materials.IronChloride.getFluid(2000)) .duration(200) .EUt(GTValues.VA[GTValues.MV]) .buildAndRegister(); // Create a fixed bed reactor recipe with catalyst tier requirement SuSyRecipeMaps.FIXED_BED_REACTOR_RECIPES.recipeBuilder() .fluidInputs(Materials.Methanol.getFluid(1000)) .fluidInputs(Materials.Oxygen.getFluid(500)) .catalyst(catalystGroup, 2) // Requires tier 2 catalyst minimum .fluidOutputs(Materials.Formaldehyde.getFluid(1000)) .duration(100) .EUt(GTValues.VA[GTValues.HV]) .buildAndRegister(); // Available recipe maps include: // - SuSyRecipeMaps.BATCH_REACTOR_RECIPES - General batch chemical reactions // - SuSyRecipeMaps.CSTR_RECIPES - Continuous Stirred Tank Reactor // - SuSyRecipeMaps.FIXED_BED_REACTOR_RECIPES - Fixed bed catalytic reactions // - SuSyRecipeMaps.TRICKLE_BED_REACTOR_RECIPES - Gas-liquid catalytic reactions // - SuSyRecipeMaps.BUBBLE_COLUMN_REACTOR_RECIPES - Gas bubble reactions // - SuSyRecipeMaps.FLUIDIZED_BED_REACTOR_RECIPES - Fluidized catalyst bed // - SuSyRecipeMaps.ROASTER_RECIPES - Thermal roasting processes // - SuSyRecipeMaps.CRYSTALLIZER_RECIPES - Crystallization processes // - SuSyRecipeMaps.DRYER_RECIPES - Drying operations // - SuSyRecipeMaps.GRAVITY_SEPARATOR_RECIPES - Gravity-based ore separation // - SuSyRecipeMaps.FROTH_FLOTATION - Froth flotation ore processing // - SuSyRecipeMaps.EVAPORATION_POOL - Solar evaporation processing // - SuSyRecipeMaps.COKING_RECIPES - Coking tower operations // - SuSyRecipeMaps.VACUUM_DISTILLATION_RECIPES - Vacuum distillation // - SuSyRecipeMaps.HIGH_TEMPERATURE_DISTILLATION - High temp distillation ``` -------------------------------- ### Multiblock Abilities for Specialized Structures (Java) Source: https://context7.com/symmetricdevs/susy-core/llms.txt This snippet outlines custom multiblock abilities introduced by Supersymmetry for specialized multiblock structures. It lists available abilities such as item import/export, strand handling, beam input/output, and scanners, and provides examples of their usage in multiblock pattern definitions. Dependencies include supersymmetry API multiblock classes and gregtech API multiblock abilities. ```java import supersymmetry.api.metatileentity.multiblock.SuSyMultiblockAbilities; import gregtech.api.metatileentity.multiblock.MultiblockAbility; import net.minecraftforge.items.IItemHandlerModifiable; // Available multiblock abilities: // PRIMITIVE_IMPORT_ITEMS - Item input for primitive multiblocks (no power) // PRIMITIVE_EXPORT_ITEMS - Item output for primitive multiblocks // STRAND_IMPORT - Import hatch for continuous casting strand materials // STRAND_EXPORT - Export hatch for continuous casting strand products // BEAM_IMPORT - Particle beam input for particle accelerators // BEAM_EXPORT - Particle beam output for particle accelerators // SCANNER - Component scanner for rocket assembly validation // Example: Use in multiblock pattern definition TraceabilityPredicate importItems = abilities(SuSyMultiblockAbilities.PRIMITIVE_IMPORT_ITEMS); TraceabilityPredicate exportItems = abilities(SuSyMultiblockAbilities.PRIMITIVE_EXPORT_ITEMS); TraceabilityPredicate beamInput = abilities(SuSyMultiblockAbilities.BEAM_IMPORT); ``` -------------------------------- ### Build and Validate Rocket Stages (Java) Source: https://context7.com/symmetricdevs/susy-core/llms.txt Illustrates how to construct rocket stages using a builder pattern, specifying component types and limits. It also covers adding components, validating them, retrieving stage properties, and serializing/deserializing stages to NBT. ```java import supersymmetry.api.rocketry.rockets.RocketStage; import supersymmetry.api.rocketry.components.AbstractComponent; import supersymmetry.api.rocketry.fuels.RocketFuelEntry; // Build a rocket stage using the builder pattern RocketStage boosterStage = new RocketStage.Builder("boosters") .type("engine") // Require engine components .limit(4) // Allow exactly 4 engines .limit(6) // Or allow exactly 6 engines .type("tank") // Require fuel tank components .limit(1) // Allow exactly 1 tank .limit(2) // Or allow exactly 2 tanks .build(); // Add components to the stage List> engines = Arrays.asList(engine1, engine2, engine3, engine4); RocketStage.ComponentValidationResult result = boosterStage.setComponentListEntry("engine", engines); if (result == RocketStage.ComponentValidationResult.SUCCESS) { // Components added successfully double totalMass = boosterStage.getMass(); // Total stage mass in kg double fuelCapacity = boosterStage.getFuelCapacity(); // Fuel capacity in liters double thrust = boosterStage.getThrust(fuelEntry, 9.81, "engine"); // Thrust in Newtons double stageRadius = boosterStage.getRadius(); // Maximum radius in meters double stageHeight = boosterStage.getHeight(); // Maximum height in meters } else { // Handle validation failure String errorKey = result.getTranslationKey(); } // Serialize stage to NBT for storage NBTTagCompound stageNBT = boosterStage.writeToNBT(); // Load stage from NBT RocketStage loadedStage = new RocketStage(); loadedStage.readFromNBT(stageNBT); ``` -------------------------------- ### Create and Query Particles (Java) Source: https://context7.com/symmetricdevs/susy-core/llms.txt Demonstrates how to define custom particles with physics properties like mass, charge, and spin, and how to query these properties. It also shows how to create composite particles and define antiparticle relationships. ```java import supersymmetry.api.particle.Particle; import supersymmetry.api.particle.ParticleBeam; import supersymmetry.api.particle.Particles; import net.minecraft.util.ResourceLocation; // Create a custom particle with physics properties // Parameters: name, mass(MeV/c^2), charge(e), spin(hbar), width(MeV), colored, weakInt, texture Particle electron = new Particle( "electron", 0.511, // mass in MeV/c^2 -1.0, // electric charge (-1e) 0.5, // spin (1/2 fermion) 0.0, // width (stable particle) false, // no color charge true, // has weak interactions new ResourceLocation("susy", "textures/particles/electron.png") ); // Query particle properties double mass = electron.getMass(); // 0.511 MeV/c^2 double charge = electron.getCharge(); // -1.0 double lifetime = electron.getMeanLifetime(); // Infinity (stable) boolean fundamental = electron.isFundamental(); // true (no subcomponents) // Create composite particle with components Particle proton = new Particle("proton", 938.3, 1.0, 0.5, 0.0, true, true, texture); proton.setComponent(upQuark, 2); proton.setComponent(downQuark, 1); // Set antiparticle relationship Particle positron = new Particle("positron", 0.511, 1.0, 0.5, 0.0, false, true, texture); electron.setAntiParticle(positron); Particle antiElectron = electron.getAntiParticle(); // Returns positron ``` -------------------------------- ### Catalyst System for Recipe Efficiency (Java) Source: https://context7.com/symmetricdevs/susy-core/llms.txt This snippet demonstrates how to create and register catalyst groups for enhancing recipe efficiency in the Susy Core system. It defines catalyst tiers, energy, and speed bonuses, and shows how to integrate them into recipe building. Dependencies include supersymmetry API classes and net.minecraft.item.ItemStack. ```java import supersymmetry.api.recipes.catalysts.CatalystGroup; import supersymmetry.api.recipes.catalysts.CatalystInfo; import supersymmetry.api.recipes.catalysts.CatalystInfos; import net.minecraft.item.ItemStack; // Create a new catalyst group for a specific reaction type CatalystGroup hydrogenationCatalysts = new CatalystGroup("hydrogenation"); // Register catalysts with their properties // CatalystInfo parameters: tier, energyEfficiency, speedEfficiency hydrogenationCatalysts.add( OreDictUnifier.get(OrePrefix.dust, Materials.Platinum), new CatalystInfo(1, 1.0, 1.0) // Tier 1, base efficiency ); hydrogenationCatalysts.add( OreDictUnifier.get(OrePrefix.dust, Materials.Palladium), new CatalystInfo(2, 0.9, 1.2) // Tier 2, 10% energy savings, 20% faster ); hydrogenationCatalysts.add( OreDictUnifier.get(OrePrefix.dust, Materials.Rhodium), new CatalystInfo(3, 0.8, 1.5) // Tier 3, 20% energy savings, 50% faster ); // Use in recipe builder SuSyRecipeMaps.FIXED_BED_REACTOR_RECIPES.recipeBuilder() .fluidInputs(Materials.Benzene.getFluid(1000)) .fluidInputs(Materials.Hydrogen.getFluid(3000)) .catalyst(hydrogenationCatalysts, 1) // Minimum tier 1 catalyst .fluidOutputs(Materials.Cyclohexane.getFluid(1000)) .duration(200) .EUt(GTValues.VA[GTValues.HV]) .buildAndRegister(); // Access all registered catalyst groups List allGroups = CatalystGroup.getCatalystGroups(); ``` -------------------------------- ### Combine Multiple Recipe Maps with RecipeMapGroup (Java) Source: https://context7.com/symmetricdevs/susy-core/llms.txt This Java code illustrates how to create a `RecipeMapGroup` in Supersymmetry, which allows combining multiple `RecipeMap` instances for unified recipe lookups. This is useful for machines capable of performing various processing steps. The group automatically aggregates input/output constraints and facilitates parallel recipe searching. ```java import supersymmetry.api.recipes.RecipeMapGroup; import gregtech.api.recipes.RecipeMap; import gregtech.api.recipes.builders.SimpleRecipeBuilder; // Create a recipe map group that combines multiple recipe sources RecipeMapGroup combinedMap = RecipeMapGroup.create( "combined_processor", SuSyRecipeMaps.BATCH_REACTOR_RECIPES, SuSyRecipeMaps.CRYSTALLIZER_RECIPES, SuSyRecipeMaps.DRYER_RECIPES ); // The group automatically calculates max inputs/outputs from all maps // Recipe lookup searches all maps in parallel for matching recipes Recipe foundRecipe = combinedMap.findRecipe( voltage, itemInputs, fluidInputs, exactVoltage ); ``` -------------------------------- ### Implement Overclocking Logic (Java) Source: https://context7.com/symmetricdevs/susy-core/llms.txt Shows how to apply Supersymmetry's specialized overclocking logic for machines, including standard catalyst-based overclocking and continuous overclocking for increased parallelism. It details the parameters and return values for each logic type. ```java import supersymmetry.api.recipes.builders.logic.SuSyOverclockingLogic; import supersymmetry.api.recipes.catalysts.CatalystInfo; // Standard catalyst overclocking - faster with better catalysts int[] result = SuSyOverclockingLogic.catalystOverclockingLogic( recipeEUt, // Base EU/t of recipe maxVoltage, // Maximum available voltage duration, // Base duration in ticks amountOC, // Number of overclock tiers available catalystInfo, // The catalyst being used requiredCatalystTier, // Minimum required tier durationDivisor, // Duration divisor per OC (typically 2.0) voltageMultiplier // Voltage multiplier per OC (typically 4.0) ); int overclockEUt = result[0]; int overclockDuration = result[1]; // Continuous overclocking - increases parallel instead of reducing time // Returns double[] for fractional parallel calculations double[] continuousResult = SuSyOverclockingLogic.continuousOverclockingLogic( recipeEUt, maxVoltage, duration, amountOC, durationDivisor, voltageMultiplier ); double euPerTick = continuousResult[0]; double parallelMultiplier = 1.0 / continuousResult[1]; // Inverse gives parallel count ``` -------------------------------- ### Register and Modify Materials in Supersymmetry (Java) Source: https://context7.com/symmetricdevs/susy-core/llms.txt This snippet demonstrates how to access and utilize Supersymmetry's custom materials, add flags to existing materials, modify material properties at runtime, and initialize Supersymmetry materials. It requires the Supersymmetry and GregTech libraries. ```java import supersymmetry.common.materials.SusyMaterials; import supersymmetry.api.unification.material.info.SuSyMaterialFlags; import gregtech.api.unification.material.Material; import gregtech.api.unification.material.properties.*; // Access Supersymmetry materials Material latex = SusyMaterials.Latex; Material coolant = SusyMaterials.Coolant; Material premiumLubricant = SusyMaterials.PremiumLubricant; Material preheatedAir = SusyMaterials.PreheatedAir; Material lox = SusyMaterials.LOX; // Liquid Oxygen for rocketry // Add catalyst bed generation flag to existing materials Materials.Platinum.addFlags(SuSyMaterialFlags.GENERATE_CATALYST_BED); Materials.Palladium.addFlags(SuSyMaterialFlags.GENERATE_CATALYST_BED); Materials.Rhodium.addFlags(SuSyMaterialFlags.GENERATE_CATALYST_BED); // Modify material properties at runtime Materials.Lead.setProperty( PropertyKey.FLUID_PIPE, new FluidPipeProperties(1200, 8, true, true, false, false) ); // Add dust property to elements that lack it Materials.Iodine.setProperty(PropertyKey.DUST, new DustProperty()); Materials.Scandium.setProperty(PropertyKey.DUST, new DustProperty()); // Initialize all Supersymmetry materials (called during mod loading) SusyMaterials.init(); ``` -------------------------------- ### Access Supersymmetry Configuration Options (Java) Source: https://context7.com/symmetricdevs/susy-core/llms.txt This code illustrates how to access and modify Supersymmetry's configuration settings, which are managed via static fields and annotated for the Forge config system. Configuration changes typically require a Minecraft restart. The configuration file is located at `config/susy/susy.cfg`. ```java import supersymmetry.SusyConfig; // Configuration is accessed via static fields // Located at config/susy/susy.cfg // Disable Long-Distance Item Pipe recipes (default: true) boolean disableLdPipes = SusyConfig.disableLdItemPipes; // List of items banned from space dimensions String[] bannedItems = SusyConfig.bannedSpaceItems; // Configuration is annotated for Forge config system @Config(modid = "susy", name = "susy/susy") public class SusyConfig { @Config.Comment("Whether to disable Long-Distance Item Pipe recipes") @Config.RequiresMcRestart public static boolean disableLdItemPipes = true; @Config.Comment("Items banned from space dimensions") @Config.RequiresMcRestart public static String[] bannedSpaceItems = {}; } ``` -------------------------------- ### Machine MetaTileEntity Types (Java) Source: https://context7.com/symmetricdevs/susy-core/llms.txt This snippet defines various specialized MetaTileEntity base classes provided by Supersymmetry for different machine functionalities. It includes CatalystMachine, ContinuousMachine, and PseudoMultiMachine, each with specific behaviors and use cases. Dependencies include supersymmetry API metatileentity classes and gregtech API utilities. ```java import supersymmetry.api.metatileentity.CatalystMachineMetaTileEntity; import supersymmetry.api.metatileentity.ContinuousMachineMetaTileEntity; import supersymmetry.api.metatileentity.PseudoMultiMachineMetaTileEntity; import gregtech.api.util.GTUtility; // CatalystMachineMetaTileEntity - Machines that use catalyst-based recipes // Automatically scans inventory for best catalyst and applies bonuses CatalystMachineMetaTileEntity roaster = new CatalystMachineMetaTileEntity( new ResourceLocation("susy", "roaster.hv"), SuSyRecipeMaps.ROASTER_RECIPES, SusyTextures.ROASTER_OVERLAY, 3, // tier (HV) true, // hasFrontFacing GTUtility.defaultTankSizeFunction ); // ContinuousMachineMetaTileEntity - Continuous flow reactor machines // Uses special overclocking that increases parallel instead of speed ContinuousMachineMetaTileEntity cstr = new ContinuousMachineMetaTileEntity( new ResourceLocation("susy", "cstr.ev"), SuSyRecipeMaps.CSTR_RECIPES, SusyTextures.CONTINUOUS_STIRRED_TANK_REACTOR_OVERLAY, 4, // tier (EV) true, SuSyUtility.reactorTankSizeFunction ); // PseudoMultiMachineMetaTileEntity - Machines that check adjacent blocks // Used for latex collectors that need to face specific tree types PseudoMultiMachineMetaTileEntity latexCollector = new PseudoMultiMachineMetaTileEntity( new ResourceLocation("susy", "latex_collector.mv"), SuSyRecipeMaps.LATEX_COLLECTOR_RECIPES, SusyTextures.LATEX_COLLECTOR_OVERLAY, 2, // tier (MV) true, GTUtility.defaultTankSizeFunction ); // The pseudo-multi machine tracks adjacent block state IBlockState adjacentBlock = latexCollector.getTargetBlockState(); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.