minecraft server init
This commit is contained in:
32
scripts/crafttweaker/classes/init.zs
Normal file
32
scripts/crafttweaker/classes/init.zs
Normal file
@ -0,0 +1,32 @@
|
||||
#priority 2800
|
||||
|
||||
/*
|
||||
SevTech: Ages Class Creation Script.
|
||||
|
||||
This script creates and sets the globals for the class we use to interact with mods
|
||||
and/or MM machines.
|
||||
|
||||
Note: These scripts are created and for the usage in SevTech: Ages and other
|
||||
modpacks curated by DarkPacks. You can use these scripts for reference and for
|
||||
learning but not for copying and pasting and claiming as your own.
|
||||
*/
|
||||
|
||||
// Mods
|
||||
global abyssalcraft as scripts.crafttweaker.classes.mods.abyssalcraft.AbyssalCraft = scripts.crafttweaker.classes.mods.abyssalcraft.AbyssalCraft(0.5f);
|
||||
global actuallyAdditions as scripts.crafttweaker.classes.mods.actuallyAdditions.ActuallyAdditions = scripts.crafttweaker.classes.mods.actuallyAdditions.ActuallyAdditions();
|
||||
global appliedEnergistics as scripts.crafttweaker.classes.mods.appliedEnergistics.AppliedEnergistics = scripts.crafttweaker.classes.mods.appliedEnergistics.AppliedEnergistics(8);
|
||||
global armoreablemobs as scripts.crafttweaker.classes.mods.armoreablemobs.ArmoreableMobs = scripts.crafttweaker.classes.mods.armoreablemobs.ArmoreableMobs();
|
||||
global astralSorcery as scripts.crafttweaker.classes.mods.astralSorcery.AstralSorcery = scripts.crafttweaker.classes.mods.astralSorcery.AstralSorcery();
|
||||
global betterWithMods as scripts.crafttweaker.classes.mods.betterwithmods.BetterWithMods = scripts.crafttweaker.classes.mods.betterwithmods.BetterWithMods();
|
||||
global bloodMagic as scripts.crafttweaker.classes.mods.bloodMagic.BloodMagic = scripts.crafttweaker.classes.mods.bloodMagic.BloodMagic();
|
||||
global horsePower as scripts.crafttweaker.classes.mods.horsePower.HorsePower = scripts.crafttweaker.classes.mods.horsePower.HorsePower(4, 16);
|
||||
global immersiveEngineering as scripts.crafttweaker.classes.mods.immersiveEngineering.ImmersiveEngineering = scripts.crafttweaker.classes.mods.immersiveEngineering.ImmersiveEngineering(6000, 600);
|
||||
global mekanism as scripts.crafttweaker.classes.mods.mekanism.Mekanism = scripts.crafttweaker.classes.mods.mekanism.Mekanism();
|
||||
global tinkers as scripts.crafttweaker.classes.mods.tinkers.Tinkers = scripts.crafttweaker.classes.mods.tinkers.Tinkers();
|
||||
|
||||
// Integration
|
||||
global orematic as scripts.crafttweaker.classes.integration.orematic.OreMatic = scripts.crafttweaker.classes.integration.orematic.OreMatic();
|
||||
global dryingUnit as scripts.crafttweaker.classes.integration.dryingUnit.DryingUnit = scripts.crafttweaker.classes.integration.dryingUnit.DryingUnit();
|
||||
|
||||
// Utils
|
||||
global recipeUtil as scripts.crafttweaker.classes.utils.recipeUtil.RecipeUtil = scripts.crafttweaker.classes.utils.recipeUtil.RecipeUtil();
|
14
scripts/crafttweaker/classes/initUnifier.zs
Normal file
14
scripts/crafttweaker/classes/initUnifier.zs
Normal file
@ -0,0 +1,14 @@
|
||||
#priority 2700
|
||||
|
||||
/*
|
||||
SevTech: Ages Unifier Class Creation Script.
|
||||
|
||||
This script creates and sets the globals for the class we use to interact with mods
|
||||
and/or MM machines.
|
||||
|
||||
Note: These scripts are created and for the usage in SevTech: Ages and other
|
||||
modpacks curated by DarkPacks. You can use these scripts for reference and for
|
||||
learning but not for copying and pasting and claiming as your own.
|
||||
*/
|
||||
global metalProc as scripts.crafttweaker.classes.resources.metals.Metals = scripts.crafttweaker.classes.resources.metals.Metals();
|
||||
global unifier as scripts.crafttweaker.classes.utils.unifier.Unifier = scripts.crafttweaker.classes.utils.unifier.Unifier();
|
92
scripts/crafttweaker/classes/integration/dryingUnit.zs
Normal file
92
scripts/crafttweaker/classes/integration/dryingUnit.zs
Normal file
@ -0,0 +1,92 @@
|
||||
#priority 3400
|
||||
|
||||
/*
|
||||
SevTech: Ages Drying Unit Script
|
||||
|
||||
This script is a zenClass to allow easy interation with the MM Drying Machine.
|
||||
|
||||
Note: These scripts are created and for the usage in SevTech: Ages and other
|
||||
modpacks curated by DarkPacks. You can use these scripts for reference and for
|
||||
learning but not for copying and pasting and claiming as your own.
|
||||
*/
|
||||
import crafttweaker.item.IItemStack;
|
||||
import crafttweaker.item.IIngredient;
|
||||
import crafttweaker.oredict.IOreDictEntry;
|
||||
|
||||
import mods.modularmachinery.RecipeBuilder;
|
||||
import mods.modularmachinery.RecipePrimer;
|
||||
|
||||
import scripts.crafttweaker.utils.createRecipeName;
|
||||
import scripts.crafttweaker.utils.squareNum;
|
||||
|
||||
/*
|
||||
TODO: Look into making this class generic for possible conversion from other MM machines.
|
||||
*/
|
||||
zenClass DryingUnit {
|
||||
var machineName as string = "industrial_drying_unit";
|
||||
var energyScalingMultiplier as int[] = [1, 4, 8];
|
||||
var tickTimeValue as int = 600;
|
||||
|
||||
zenConstructor() {
|
||||
}
|
||||
|
||||
/*
|
||||
Forms the basic recipe.
|
||||
*/
|
||||
function formBaseRecipe(tier as int, name as string) as RecipePrimer {
|
||||
var machineSlug = tier > 1 ? machineName ~ "_mk" ~ tier : machineName;
|
||||
var timeScaler = (tier + 1) > 2 ? squareNum(2, tier - 1) : tier + 1;
|
||||
|
||||
var builder = RecipeBuilder.newBuilder(
|
||||
createRecipeName(machineName ~ "_mk" ~ tier, name),
|
||||
machineSlug, tickTimeValue / timeScaler
|
||||
)
|
||||
.addEnergyPerTickInput(5 * energyScalingMultiplier[tier - 1]);
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
/*
|
||||
Forms the basic via the arguments given the function.
|
||||
*/
|
||||
function formBaseRecipe(tier as int, input as IOreDictEntry, inAmount as int, output as IOreDictEntry, outAmount as int) {
|
||||
var builder = formBaseRecipe(tier, input.name);
|
||||
builder
|
||||
.addItemInput(input, inAmount)
|
||||
.addItemOutput(output, outAmount)
|
||||
.build();
|
||||
}
|
||||
function formBaseRecipe(tier as int, input as IOreDictEntry, inAmount as int, output as IItemStack) {
|
||||
var builder = formBaseRecipe(tier, input.name);
|
||||
builder
|
||||
.addItemInput(input, inAmount)
|
||||
.addItemOutput(output)
|
||||
.build();
|
||||
}
|
||||
function formBaseRecipe(tier as int, input as IItemStack, output as IItemStack) {
|
||||
var builder = formBaseRecipe(tier, input.name);
|
||||
builder
|
||||
.addItemInput(input)
|
||||
.addItemOutput(output)
|
||||
.build();
|
||||
}
|
||||
|
||||
/*
|
||||
Create the builder/recipes based on the arguments given to the function.
|
||||
*/
|
||||
function addAllTiers(input as IOreDictEntry, inAmount as int, output as IOreDictEntry, outAmount as int) {
|
||||
formBaseRecipe(1, input, inAmount, output, outAmount);
|
||||
formBaseRecipe(2, input, inAmount, output, outAmount);
|
||||
formBaseRecipe(3, input, inAmount, output, outAmount);
|
||||
}
|
||||
function addAllTiers(input as IOreDictEntry, inAmount as int, output as IItemStack) {
|
||||
formBaseRecipe(1, input, inAmount, output);
|
||||
formBaseRecipe(2, input, inAmount, output);
|
||||
formBaseRecipe(3, input, inAmount, output);
|
||||
}
|
||||
function addAllTiers(input as IItemStack, output as IItemStack) {
|
||||
formBaseRecipe(1, input, output);
|
||||
formBaseRecipe(2, input, output);
|
||||
formBaseRecipe(3, input, output);
|
||||
}
|
||||
}
|
141
scripts/crafttweaker/classes/integration/orematic.zs
Normal file
141
scripts/crafttweaker/classes/integration/orematic.zs
Normal file
@ -0,0 +1,141 @@
|
||||
#priority 3400
|
||||
|
||||
/*
|
||||
SevTech: Ages OreMatic Script
|
||||
|
||||
This script is a zenClass to allow easy interation with the MM OreMatic Machine.
|
||||
|
||||
Note: These scripts are created and for the usage in SevTech: Ages and other
|
||||
modpacks curated by DarkPacks. You can use these scripts for reference and for
|
||||
learning but not for copying and pasting and claiming as your own.
|
||||
*/
|
||||
import crafttweaker.item.IItemStack;
|
||||
import crafttweaker.oredict.IOreDictEntry;
|
||||
import crafttweaker.liquid.ILiquidStack;
|
||||
|
||||
import mods.modularmachinery.RecipeBuilder;
|
||||
import mods.modularmachinery.RecipePrimer;
|
||||
|
||||
import scripts.crafttweaker.utils.createRecipeName;
|
||||
|
||||
/*
|
||||
OreMatic Class to intergrate with the custom machine even easier!
|
||||
*/
|
||||
zenClass OreMatic {
|
||||
var machine_name as string = "orematic5000";
|
||||
var energyScalingMultiplier as int[] = [4, 5, 10];
|
||||
var default_priority as int[] = [125, 250, 500];
|
||||
var default_ticktime as int = 125;
|
||||
var default_type as string = "";
|
||||
|
||||
zenConstructor() {
|
||||
}
|
||||
|
||||
/*
|
||||
Forms the basic recipe for all tiers
|
||||
|
||||
This is essentially Tier 1 that then can be built on top of as deemed necessary
|
||||
*/
|
||||
function formBaseRecipe(tier as int, tickTime as int, oreInput as IOreDictEntry, dustOutput as IItemStack, secondaryOuput as IOreDictEntry, secondaryChance as float) as RecipePrimer {
|
||||
return formBaseRecipe(tier, tickTime, oreInput, dustOutput, default_type, secondaryOuput, secondaryChance, 0);
|
||||
}
|
||||
function formBaseRecipe(tier as int, tickTime as int, oreInput as IOreDictEntry, dustOutput as IItemStack, type as string, secondaryOuput as IOreDictEntry, secondaryChance as float, priority as int) as RecipePrimer {
|
||||
var machine_slug = tier > 1 ? machine_name ~ "_mk" ~ tier : machine_name;
|
||||
|
||||
var builder = RecipeBuilder.newBuilder(
|
||||
createRecipeName(machine_name ~ "_mk" ~ tier, oreInput.name ~ "_processing" ~ type),
|
||||
machine_slug, tickTime, priority
|
||||
)
|
||||
.addEnergyPerTickInput(60 * energyScalingMultiplier[tier - 1])
|
||||
.addItemInput(oreInput)
|
||||
.addFluidInput(<liquid:water> * 250)
|
||||
.addGasInput("oxygen", 150)
|
||||
.addItemOutput(dustOutput * (3 + tier - 1));
|
||||
|
||||
if (!isNull(secondaryOuput) & tier > 2) {
|
||||
builder
|
||||
.addItemOutput(secondaryOuput)
|
||||
.addItemOutput(secondaryOuput)
|
||||
.setChance(secondaryChance);
|
||||
}
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
/*
|
||||
Forms the basic recipes for all tiers.
|
||||
|
||||
This is essentially Tier 1 that then can be built on top of as deemed necessary also adds the optional fluids which lower or increase the
|
||||
secondary outputs.
|
||||
*/
|
||||
function formBaseRecipe(tier as int, oreInput as IOreDictEntry, dustOutput as IItemStack, secondaryOuput as IOreDictEntry) as RecipePrimer[] {
|
||||
var allowGasoline = tier > 2;
|
||||
|
||||
return [
|
||||
// 0 - Basic
|
||||
formBaseRecipe(tier, default_ticktime, oreInput, dustOutput, secondaryOuput, 0.5f),
|
||||
// 1 - Lube
|
||||
formBaseRecipe(tier, 0.8 * default_ticktime, oreInput, dustOutput, "_lubricant", secondaryOuput, 0.5f, -125)
|
||||
.addFluidInput(<liquid:lubricant> * 50),
|
||||
// 2 - Gasoline
|
||||
allowGasoline ? formBaseRecipe(tier, default_ticktime, oreInput, dustOutput, "_gasoline", secondaryOuput, 0.75f, -250)
|
||||
.addFluidInput(<liquid:gasoline> * 150) : null,
|
||||
// 3 - Lube & Gasoline
|
||||
allowGasoline ? formBaseRecipe(tier, 0.7 * default_ticktime, oreInput, dustOutput, "_gasoline_lubricant", secondaryOuput, 0.75f, -500)
|
||||
.addFluidInput(<liquid:gasoline> * 150)
|
||||
.addFluidInput(<liquid:lubricant> * 50): null
|
||||
] as RecipePrimer[];
|
||||
}
|
||||
|
||||
/*
|
||||
Tier One (Base): Processing. This allows for 3 times dust production from Ores. This tier requires only Water and Oxygen.
|
||||
*/
|
||||
function addTier1(oreInput as IOreDictEntry, dustOutput as IItemStack, secondaryOuput as IOreDictEntry) {
|
||||
var baseRecipes = formBaseRecipe(1, oreInput, dustOutput, secondaryOuput);
|
||||
for baseRecipe in baseRecipes {
|
||||
if (!isNull(baseRecipe)) {
|
||||
baseRecipe.build();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Tier Two: Processing. This allows for 4 times dust production from Ores. This tier requires only Water, Oxygen and Hydrogen Cholride.
|
||||
*/
|
||||
function addTier2(oreInput as IOreDictEntry, dustOutput as IItemStack, secondaryOuput as IOreDictEntry) {
|
||||
var baseRecipes = formBaseRecipe(2, oreInput, dustOutput, secondaryOuput);
|
||||
for baseRecipe in baseRecipes {
|
||||
if (!isNull(baseRecipe)) {
|
||||
baseRecipe
|
||||
.addGasInput("hydrogenChloride", 200)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Tier Three: Processing. This allows for 5 times dust production from Ores. This tier requires only Water, Oxygen, Hydrogen Cholride
|
||||
and Sulfuric Acid.
|
||||
|
||||
This tier also has the option to allow adding Lube or Gasoline to increase the speed and enable getting secondary output from the ores
|
||||
your processing.
|
||||
*/
|
||||
function addTier3(oreInput as IOreDictEntry, dustOutput as IItemStack, secondaryOuput as IOreDictEntry) {
|
||||
var baseRecipes = formBaseRecipe(3, oreInput, dustOutput, secondaryOuput);
|
||||
for baseRecipe in baseRecipes {
|
||||
baseRecipe
|
||||
.addGasInput("hydrogenChloride", 200)
|
||||
.addGasInput("sulfuricAcid", 120)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Adds ore processing recipe to all tiers
|
||||
*/
|
||||
function addAllTiers(oreInput as IOreDictEntry, dustOutput as IItemStack, secondaryOuput as IOreDictEntry) {
|
||||
addTier1(oreInput, dustOutput, secondaryOuput);
|
||||
addTier2(oreInput, dustOutput, secondaryOuput);
|
||||
addTier3(oreInput, dustOutput, secondaryOuput);
|
||||
}
|
||||
}
|
90
scripts/crafttweaker/classes/mods/abyssalcraft.zs
Normal file
90
scripts/crafttweaker/classes/mods/abyssalcraft.zs
Normal file
@ -0,0 +1,90 @@
|
||||
#priority 3400
|
||||
|
||||
/*
|
||||
SevTech: Ages AbyssalCraft Script
|
||||
|
||||
This script is a zenClass to allow easy interation with AbyssalCraft.
|
||||
|
||||
Note: These scripts are created and for the usage in SevTech: Ages and other
|
||||
modpacks curated by DarkPacks. You can use these scripts for reference and for
|
||||
learning but not for copying and pasting and claiming as your own.
|
||||
*/
|
||||
import crafttweaker.item.IItemStack;
|
||||
|
||||
import mods.abyssalcraft.Crystallizer;
|
||||
import mods.abyssalcraft.Materializer;
|
||||
import mods.abyssalcraft.Transmutator;
|
||||
import mods.abyssalcraft.RitualStages;
|
||||
|
||||
zenClass AbyssalCraft {
|
||||
var default_xp as float;
|
||||
|
||||
zenConstructor(defaultXP as float) {
|
||||
default_xp = defaultXP;
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Transmutator Recipe
|
||||
*/
|
||||
function removeTransmutation(input as IItemStack) {
|
||||
Transmutator.removeTransmutation(input);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Transmutator Recipe
|
||||
*/
|
||||
function addTransmutation(input as IItemStack, output as IItemStack) {
|
||||
Transmutator.addTransmutation(input, output, default_xp);
|
||||
}
|
||||
function addTransmutation(input as IItemStack, output as IItemStack, exp as float) {
|
||||
Transmutator.addTransmutation(input, output, exp as float);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Crystallizer Recipe
|
||||
*/
|
||||
function removeCrystallization(input as IItemStack) {
|
||||
Crystallizer.removeCrystallization(input);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Single Crystallizer Recipe
|
||||
*/
|
||||
function addSingleCrystallization(input as IItemStack, output as IItemStack) {
|
||||
Crystallizer.addSingleCrystallization(input, output, default_xp);
|
||||
}
|
||||
function addSingleCrystallization(input as IItemStack, output as IItemStack, exp as float) {
|
||||
Crystallizer.addSingleCrystallization(input, output, exp);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Dual Crystallizer Recipe
|
||||
*/
|
||||
function addCrystallization(input as IItemStack, output as IItemStack, output2 as IItemStack) {
|
||||
Crystallizer.addCrystallization(input, output, output2, default_xp);
|
||||
}
|
||||
function addCrystallization(input as IItemStack, output as IItemStack, output2 as IItemStack, exp as float) {
|
||||
Crystallizer.addCrystallization(input, output, output2, exp);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Materializer Recipe
|
||||
*/
|
||||
function removeMaterialization(output as IItemStack) {
|
||||
Materializer.removeMaterialization(output);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Materializer Recipe
|
||||
*/
|
||||
function addMaterialization(output as IItemStack, input as IItemStack[]) {
|
||||
Materializer.addMaterialization(output, input);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Ritual to a Stage.
|
||||
*/
|
||||
function addRitualStage(stage as string, ritual as string) {
|
||||
RitualStages.addRitualStage(stage, ritual);
|
||||
}
|
||||
}
|
36
scripts/crafttweaker/classes/mods/actuallyAdditions.zs
Normal file
36
scripts/crafttweaker/classes/mods/actuallyAdditions.zs
Normal file
@ -0,0 +1,36 @@
|
||||
#priority 3400
|
||||
|
||||
/*
|
||||
SevTech: Ages Actually Additions Script
|
||||
|
||||
This script is a zenClass to allow easy interation with Actually Additions.
|
||||
|
||||
Note: These scripts are created and for the usage in SevTech: Ages and other
|
||||
modpacks curated by DarkPacks. You can use these scripts for reference and for
|
||||
learning but not for copying and pasting and claiming as your own.
|
||||
*/
|
||||
import crafttweaker.item.IItemStack;
|
||||
|
||||
import mods.actuallyadditions.Crusher;
|
||||
|
||||
zenClass ActuallyAdditions {
|
||||
zenConstructor() {
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Crusher Recipe
|
||||
*/
|
||||
function removeCrusher(output as IItemStack) {
|
||||
Crusher.removeRecipe(output);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Crusher Recipe
|
||||
*/
|
||||
function addCrusher(output as IItemStack, input as IItemStack) {
|
||||
Crusher.addRecipe(output, input);
|
||||
}
|
||||
function addCrusher(output as IItemStack, input as IItemStack, outputSecondary as IItemStack, secondaryChance as int) {
|
||||
Crusher.addRecipe(output, input, outputSecondary, secondaryChance);
|
||||
}
|
||||
}
|
64
scripts/crafttweaker/classes/mods/appliedEnergistics.zs
Normal file
64
scripts/crafttweaker/classes/mods/appliedEnergistics.zs
Normal file
@ -0,0 +1,64 @@
|
||||
#priority 3400
|
||||
|
||||
/*
|
||||
SevTech: Ages Applied Energistics Script
|
||||
|
||||
This script is a zenClass to allow easy interation with Applied Energistics.
|
||||
|
||||
Note: These scripts are created and for the usage in SevTech: Ages and other
|
||||
modpacks curated by DarkPacks. You can use these scripts for reference and for
|
||||
learning but not for copying and pasting and claiming as your own.
|
||||
*/
|
||||
import crafttweaker.item.IItemStack;
|
||||
import crafttweaker.item.IIngredient;
|
||||
|
||||
import mods.appliedenergistics2.Inscriber;
|
||||
import mods.appliedenergistics2.Grinder;
|
||||
|
||||
zenClass AppliedEnergistics {
|
||||
var default_spins as int;
|
||||
|
||||
zenConstructor(defaultSpins as int) {
|
||||
default_spins = defaultSpins;
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Crusher Recipe
|
||||
*/
|
||||
function removeGrindstone(input as IItemStack) {
|
||||
Grinder.removeRecipe(input);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Crusher Recipe
|
||||
*/
|
||||
function addGrindstone(output as IItemStack, input as IItemStack) {
|
||||
Grinder.addRecipe(output, input, default_spins);
|
||||
}
|
||||
function addGrindstone(output as IItemStack, input as IItemStack, spins as int) {
|
||||
Grinder.addRecipe(output, input, spins);
|
||||
}
|
||||
function addGrindstone(output as IItemStack, input as IItemStack, spins as int, outputSecondary as IItemStack, secondaryChance as int) {
|
||||
Grinder.addRecipe(output, input, spins, outputSecondary, secondaryChance);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove an Inscriber Recipe.
|
||||
*/
|
||||
function removeInscribe(output as IItemStack) {
|
||||
Inscriber.removeRecipe(output);
|
||||
}
|
||||
|
||||
/*
|
||||
Add an Inscriber Recipe.
|
||||
*/
|
||||
function addInscribe(output as IItemStack, input as IIngredient, inscribe as bool) {
|
||||
Inscriber.addRecipe(output, input, inscribe);
|
||||
}
|
||||
function addInscribe(output as IItemStack, input as IIngredient, inscribe as bool, top as IIngredient) {
|
||||
Inscriber.addRecipe(output, input, inscribe, top);
|
||||
}
|
||||
function addInscribe(output as IItemStack, input as IIngredient, inscribe as bool, top as IIngredient, bottom as IIngredient) {
|
||||
Inscriber.addRecipe(output, input, inscribe, top, bottom);
|
||||
}
|
||||
}
|
86
scripts/crafttweaker/classes/mods/armoreablemobs.zs
Normal file
86
scripts/crafttweaker/classes/mods/armoreablemobs.zs
Normal file
@ -0,0 +1,86 @@
|
||||
#priority 3400
|
||||
|
||||
/*
|
||||
SevTech: Ages Armoreable Mobs Script
|
||||
|
||||
This script is a zenClass to allow easy interation with Armoreable Mobs.
|
||||
|
||||
Note: These scripts are created and for the usage in SevTech: Ages and other
|
||||
modpacks curated by DarkPacks. You can use these scripts for reference and for
|
||||
learning but not for copying and pasting and claiming as your own.
|
||||
*/
|
||||
import mods.armoreablemobs.ArmorHandler;
|
||||
import mods.armoreablemobs.ArmorEntity;
|
||||
import mods.armoreablemobs.ArmorSlot;
|
||||
import mods.armoreablemobs.ArmorGroup;
|
||||
|
||||
zenClass ArmoreableMobs {
|
||||
var mobEntities as ArmorEntity[string][string] = {};
|
||||
|
||||
var defaultArmorDropChance as double = 0.15;
|
||||
var blankGroup as ArmorGroup = ArmorHandler.createArmorGroup("Blank", 1.0);
|
||||
|
||||
zenConstructor() {
|
||||
// Set up "Blank" group
|
||||
blankGroup.addArmor(ArmorHandler.createArmorSlot("head", null, 1, 0));
|
||||
blankGroup.addArmor(ArmorHandler.createArmorSlot("chest", null, 1, 0));
|
||||
blankGroup.addArmor(ArmorHandler.createArmorSlot("legs", null, 1, 0));
|
||||
blankGroup.addArmor(ArmorHandler.createArmorSlot("feet", null, 1, 0));
|
||||
blankGroup.addArmor(ArmorHandler.createArmorSlot("mainhand", null, 1, 0));
|
||||
blankGroup.addArmor(ArmorHandler.createArmorSlot("offhand", null, 1, 0));
|
||||
}
|
||||
|
||||
function addMobEntity(mobEntityType as string, mobName as string) {
|
||||
var mobEntityTypeExists as bool = (mobEntities has mobEntityType);
|
||||
|
||||
if (mobEntityTypeExists) {
|
||||
if (mobEntities[mobEntityType] has mobName) {
|
||||
logger.logWarning("Attempted to add " ~ mobName
|
||||
~ " as a mob armor entity but already exists in " ~ mobEntityType ~ " type");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if (!mobEntityTypeExists) {
|
||||
mobEntities[mobEntityType] = {};
|
||||
}
|
||||
|
||||
mobEntities[mobEntityType][mobName] = ArmorHandler.createArmorEntity(mobName);
|
||||
}
|
||||
|
||||
function addMobEntities(mobEntityType as string, mobNames as string[]) {
|
||||
for mobName in mobNames {
|
||||
addMobEntity(mobEntityType, mobName);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears all gear from the mobs added to mobEntities
|
||||
*/
|
||||
function clearAllMobGear() {
|
||||
for mobEntityType, mobEntitiesForType in mobEntities {
|
||||
for mobName, mobEntity in mobEntitiesForType {
|
||||
blankGroup.addEntity(mobEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds armor group to the specified armor type
|
||||
*/
|
||||
function addArmorGroupToType(mobEntityType as string, armorGroup as ArmorGroup) {
|
||||
if (!(mobEntities has mobEntityType)) {
|
||||
logger.logWarning("Attempted to add armor group to " ~ mobEntityType ~ " mobs but none exist");
|
||||
}
|
||||
|
||||
for mobName, mobEntity in mobEntities[mobEntityType] {
|
||||
armorGroup.addEntity(mobEntity);
|
||||
}
|
||||
}
|
||||
|
||||
function addArmorGroupsToType(mobEntityType as string, armorGroups as ArmorGroup[]) {
|
||||
for armorGroup in armorGroups {
|
||||
addArmorGroupToType(mobEntityType, armorGroup);
|
||||
}
|
||||
}
|
||||
}
|
49
scripts/crafttweaker/classes/mods/astralSorcery.zs
Normal file
49
scripts/crafttweaker/classes/mods/astralSorcery.zs
Normal file
@ -0,0 +1,49 @@
|
||||
#priority 3400
|
||||
|
||||
/*
|
||||
SevTech: Ages Astral Sorcery Script
|
||||
|
||||
This script is a zenClass to allow easy interation with Astral Sorcery.
|
||||
|
||||
Note: These scripts are created and for the usage in SevTech: Ages and other
|
||||
modpacks curated by DarkPacks. You can use these scripts for reference and for
|
||||
learning but not for copying and pasting and claiming as your own.
|
||||
*/
|
||||
import crafttweaker.item.IItemStack;
|
||||
|
||||
import mods.astralsorcery.Grindstone;
|
||||
import mods.astralsorcery.StarlightInfusion;
|
||||
|
||||
zenClass AstralSorcery {
|
||||
zenConstructor() {
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Grindstone Recipe
|
||||
*/
|
||||
function removeGrindstone(output as IItemStack) {
|
||||
Grindstone.removeRecipe(output);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Grindstone Recipe
|
||||
*/
|
||||
function addGrindstone(input as IItemStack, output as IItemStack) {
|
||||
Grindstone.addRecipe(input, output);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Starlight Infusion Recipe
|
||||
*/
|
||||
function removeStarlight(output as IItemStack) {
|
||||
StarlightInfusion.removeInfusion(output);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Starlight Infusion Recipe
|
||||
*/
|
||||
function addStarlight(input as IItemStack, output as IItemStack, consumeMultiple as bool, consumptionChance as float, tickTime as int) {
|
||||
StarlightInfusion.addInfusion(input, output, consumeMultiple, consumptionChance, tickTime);
|
||||
}
|
||||
}
|
||||
|
104
scripts/crafttweaker/classes/mods/betterwithmods.zs
Normal file
104
scripts/crafttweaker/classes/mods/betterwithmods.zs
Normal file
@ -0,0 +1,104 @@
|
||||
#priority 3400
|
||||
|
||||
/*
|
||||
SevTech: Ages Better With Mods/Addons Script
|
||||
|
||||
This script is a zenClass to allow easy interation with Better With Mods/Addons.
|
||||
|
||||
Note: These scripts are created and for the usage in SevTech: Ages and other
|
||||
modpacks curated by DarkPacks. You can use these scripts for reference and for
|
||||
learning but not for copying and pasting and claiming as your own.
|
||||
*/
|
||||
import crafttweaker.item.IIngredient;
|
||||
import crafttweaker.item.IItemStack;
|
||||
|
||||
import mods.betterwithaddons.DryingBox;
|
||||
import mods.betterwithaddons.SoakingBox;
|
||||
import mods.betterwithaddons.Spindle;
|
||||
import mods.betterwithmods.Cauldron;
|
||||
import mods.betterwithmods.Crucible;
|
||||
import mods.betterwithmods.Kiln;
|
||||
import mods.betterwithmods.Mill;
|
||||
import mods.betterwithmods.Saw;
|
||||
|
||||
zenClass BetterWithMods {
|
||||
zenConstructor() {
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Kiln recipe
|
||||
*/
|
||||
function removeKiln(input as IItemStack) {
|
||||
Kiln.remove(input);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Soaking recipe
|
||||
*/
|
||||
function removeSoaking(input as IItemStack) {
|
||||
SoakingBox.remove(input);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Saw recipe
|
||||
*/
|
||||
function removeSaw(outputs as IItemStack[]) {
|
||||
Saw.remove(outputs);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Crucible recipe
|
||||
*/
|
||||
function removeCrucible(outputs as IItemStack[]) {
|
||||
Crucible.remove(outputs);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Spindle recipe
|
||||
*/
|
||||
function addSpindle(outputs as IItemStack[], input as IIngredient, consumesSpindle as bool) {
|
||||
Spindle.add(outputs, input, consumesSpindle);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Mill recipe.
|
||||
*/
|
||||
function addMilling(inputs as IIngredient[], outputs as IItemStack[]) {
|
||||
Mill.addRecipe(inputs, outputs);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Mill recipe.
|
||||
*/
|
||||
function removeMilling(outputs as IItemStack[]) {
|
||||
Mill.remove(outputs);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Cauldron recipe.
|
||||
*/
|
||||
function addCauldron(inputs as IIngredient[], outputs as IItemStack[]) {
|
||||
addCauldron(inputs, outputs, false);
|
||||
}
|
||||
function addCauldron(inputs as IIngredient[], outputs as IItemStack[], stoked as bool) {
|
||||
if (stoked) {
|
||||
Cauldron.addStoked(inputs, outputs);
|
||||
} else {
|
||||
Cauldron.addUnstoked(inputs, outputs);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Cauldron recipe.
|
||||
*/
|
||||
function removeCauldron(outputs as IItemStack[]) {
|
||||
Cauldron.remove(outputs);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Drying Box recipe.
|
||||
*/
|
||||
function removeDrying(input as IItemStack) {
|
||||
DryingBox.remove(input);
|
||||
}
|
||||
}
|
76
scripts/crafttweaker/classes/mods/bloodMagic.zs
Normal file
76
scripts/crafttweaker/classes/mods/bloodMagic.zs
Normal file
@ -0,0 +1,76 @@
|
||||
#priority 3400
|
||||
|
||||
/*
|
||||
SevTech: Ages Blood Magic Script
|
||||
|
||||
This script is a zenClass to allow easy interation with Blood Magic.
|
||||
|
||||
Note: These scripts are created and for the usage in SevTech: Ages and other
|
||||
modpacks curated by DarkPacks. You can use these scripts for reference and for
|
||||
learning but not for copying and pasting and claiming as your own.
|
||||
*/
|
||||
import crafttweaker.item.IItemStack;
|
||||
import crafttweaker.item.IIngredient;
|
||||
|
||||
import mods.bloodmagic.AlchemyArray;
|
||||
import mods.bloodmagic.AlchemyTable;
|
||||
import mods.bloodmagic.BloodAltar;
|
||||
|
||||
zenClass BloodMagic {
|
||||
zenConstructor() {
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Alchemy Table Recipe
|
||||
|
||||
http://crafttweaker.readthedocs.io/en/latest/#Mods/Modtweaker/BloodMagic/AlchemyTable/#removal
|
||||
*/
|
||||
function removeAlchemyTable(inputs as IItemStack[]) {
|
||||
AlchemyTable.removeRecipe(inputs);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Alchemy Table Recipe
|
||||
|
||||
http://crafttweaker.readthedocs.io/en/latest/#Mods/Modtweaker/BloodMagic/AlchemyTable/#addition
|
||||
*/
|
||||
function addAlchemyTable(output as IItemStack, inputs as IIngredient[], syphon as int, tickTime as int, minTier as int) {
|
||||
AlchemyTable.addRecipe(output, inputs, syphon, tickTime, minTier);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Alchemy Table Recipe
|
||||
|
||||
http://crafttweaker.readthedocs.io/en/latest/#Mods/Modtweaker/BloodMagic/AlchemyArray/#removal
|
||||
*/
|
||||
function removeAlchemyArray(input as IItemStack, catalyst as IItemStack) {
|
||||
AlchemyArray.removeRecipe(input, catalyst);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Alchemy Array Recipe
|
||||
|
||||
http://crafttweaker.readthedocs.io/en/latest/#Mods/Modtweaker/BloodMagic/AlchemyArray/#addition
|
||||
*/
|
||||
function addAlchemyArray(input as IItemStack, catalyst as IItemStack, output as IItemStack) {
|
||||
AlchemyArray.addRecipe(input, catalyst, output);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Blood Altar Recipe
|
||||
|
||||
http://crafttweaker.readthedocs.io/en/latest/#Mods/Modtweaker/BloodMagic/BloodAltar/#removal
|
||||
*/
|
||||
function removeAltar(input as IItemStack) {
|
||||
BloodAltar.removeRecipe(input);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Blood Altar Recipe
|
||||
|
||||
http://crafttweaker.readthedocs.io/en/latest/#Mods/Modtweaker/BloodMagic/BloodAltar/#addition
|
||||
*/
|
||||
function addAltar(output as IItemStack, input as IItemStack, minimumTier as int, syphon as int, consumeRate as int, drainRate as int) {
|
||||
BloodAltar.addRecipe(output, input, minimumTier, syphon, consumeRate, drainRate);
|
||||
}
|
||||
}
|
68
scripts/crafttweaker/classes/mods/horsePower.zs
Normal file
68
scripts/crafttweaker/classes/mods/horsePower.zs
Normal file
@ -0,0 +1,68 @@
|
||||
#priority 3400
|
||||
|
||||
/*
|
||||
SevTech: Ages Horse Power Script
|
||||
|
||||
This script is a zenClass to allow easy interation with Horse Power.
|
||||
|
||||
Note: These scripts are created and for the usage in SevTech: Ages and other
|
||||
modpacks curated by DarkPacks. You can use these scripts for reference and for
|
||||
learning but not for copying and pasting and claiming as your own.
|
||||
*/
|
||||
import crafttweaker.item.IIngredient;
|
||||
import crafttweaker.item.IItemStack;
|
||||
|
||||
import mods.horsepower.ChoppingBlock;
|
||||
import mods.horsepower.Grindstone;
|
||||
import mods.horsepower.Press;
|
||||
import mods.horsepower.Recipes;
|
||||
|
||||
zenClass HorsePower {
|
||||
var def_chop as int;
|
||||
var def_grind as int;
|
||||
|
||||
zenConstructor(defChop as int, defGrind as int) {
|
||||
def_chop = defChop;
|
||||
def_grind = defGrind;
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Chopping Block recipe.
|
||||
|
||||
By default if not set recipes would be set to manual only.
|
||||
*/
|
||||
function addChopping(output as IItemStack, input as IIngredient) {
|
||||
addChopping(output, input, def_chop, true);
|
||||
}
|
||||
function addChopping(output as IItemStack, input as IIngredient, time as int) {
|
||||
addChopping(output, input, time, true);
|
||||
}
|
||||
function addChopping(output as IItemStack, input as IIngredient, time as int, manual as bool) {
|
||||
ChoppingBlock.add(input, output, time, manual);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Grindstone recipe.
|
||||
|
||||
By default if not set recipes would be set to manual only.
|
||||
*/
|
||||
function addGrindstone(output as IItemStack, input as IIngredient) {
|
||||
addGrindstone(output, input, def_grind, true);
|
||||
}
|
||||
function addGrindstone(output as IItemStack, input as IIngredient, secondaryOutput as IItemStack, secondaryChance as int) {
|
||||
addGrindstone(output, input, def_grind, true, secondaryOutput, secondaryChance);
|
||||
}
|
||||
function addGrindstone(output as IItemStack, input as IIngredient, time as int, hand as bool) {
|
||||
Grindstone.add(input, output, time, hand);
|
||||
}
|
||||
function addGrindstone(output as IItemStack, input as IIngredient, time as int, hand as bool, secondaryOutput as IItemStack, secondaryChance as int) {
|
||||
Grindstone.add(input, output, time, hand, secondaryOutput, secondaryChance);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Press recipe.
|
||||
*/
|
||||
function addPress(input as IIngredient, output as IItemStack) {
|
||||
Press.add(input, output);
|
||||
}
|
||||
}
|
109
scripts/crafttweaker/classes/mods/immersiveEngineering.zs
Normal file
109
scripts/crafttweaker/classes/mods/immersiveEngineering.zs
Normal file
@ -0,0 +1,109 @@
|
||||
#priority 3400
|
||||
|
||||
/*
|
||||
SevTech: Ages Immersive Engineering Script
|
||||
|
||||
This script is a zenClass to allow easy interation with Immersive Engineering.
|
||||
|
||||
Note: These scripts are created and for the usage in SevTech: Ages and other
|
||||
modpacks curated by DarkPacks. You can use these scripts for reference and for
|
||||
learning but not for copying and pasting and claiming as your own.
|
||||
*/
|
||||
import crafttweaker.item.IItemStack;
|
||||
import crafttweaker.item.IIngredient;
|
||||
|
||||
import mods.immersiveengineering.AlloySmelter;
|
||||
import mods.immersiveengineering.ArcFurnace;
|
||||
import mods.immersiveengineering.Crusher;
|
||||
import mods.immersiveengineering.MetalPress;
|
||||
|
||||
zenClass ImmersiveEngineering {
|
||||
var default_energy as int;
|
||||
var default_alloy as int;
|
||||
|
||||
zenConstructor(defaultEnergy as int, defaultAlloy as int) {
|
||||
default_energy = defaultEnergy;
|
||||
default_alloy = defaultAlloy;
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Crusher Recipe by Output. (Default)
|
||||
*/
|
||||
function removeCrusher(output as IItemStack) {
|
||||
Crusher.removeRecipe(output);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Crusher Recipe by Input.
|
||||
*/
|
||||
function removeCrusherByInput(input as IItemStack) {
|
||||
Crusher.removeRecipesForInput(input);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Crusher Recipe
|
||||
*/
|
||||
function addCrusher(output as IItemStack, input as IIngredient) {
|
||||
Crusher.addRecipe(output, input, default_energy);
|
||||
}
|
||||
function addCrusher(output as IItemStack, input as IIngredient, energy as int) {
|
||||
Crusher.addRecipe(output, input, energy);
|
||||
}
|
||||
function addCrusher(output as IItemStack, input as IIngredient, secondaryOutput as IItemStack, secondaryChance as double) {
|
||||
Crusher.addRecipe(output, input, default_energy, secondaryOutput, secondaryChance);
|
||||
}
|
||||
function addCrusher(output as IItemStack, input as IIngredient, energy as int, secondaryOutput as IItemStack, secondaryChance as double) {
|
||||
Crusher.addRecipe(output, input, energy, secondaryOutput, secondaryChance);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove an Alloy Smelter Recipe
|
||||
*/
|
||||
function removeAlloy(output as IItemStack) {
|
||||
AlloySmelter.removeRecipe(output);
|
||||
}
|
||||
|
||||
/*
|
||||
Add an Alloy Smelter Recipe
|
||||
*/
|
||||
function addAlloy(output as IItemStack, input as IIngredient, input2 as IIngredient) {
|
||||
AlloySmelter.addRecipe(output, input, input2, default_alloy);
|
||||
}
|
||||
function addAlloy(output as IItemStack, input as IIngredient, input2 as IIngredient, time as int) {
|
||||
AlloySmelter.addRecipe(output, input, input2, time);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove an Arc Furnace Recipe
|
||||
*/
|
||||
function removeArcFurn(output as IItemStack) {
|
||||
ArcFurnace.removeRecipe(output);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Arc Furnace Recipe
|
||||
*/
|
||||
function addArcFurn(output as IItemStack, input as IIngredient, slag as IItemStack, time as int, energy as int) {
|
||||
ArcFurnace.addRecipe(output, input, slag, time, energy);
|
||||
}
|
||||
function addArcFurn(output as IItemStack, input as IIngredient, slag as IItemStack, time as int, energy as int, additives as IIngredient[]) {
|
||||
ArcFurnace.addRecipe(output, input, slag, time, energy, additives);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Metal Press Recipe
|
||||
*/
|
||||
function removePress(output as IItemStack) {
|
||||
MetalPress.removeRecipe(output);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Metal Press Recipe
|
||||
*/
|
||||
function addPress(output as IItemStack, input as IIngredient, mold as IItemStack, inputSize as int) {
|
||||
MetalPress.addRecipe(output, input, mold, 500, inputSize);
|
||||
}
|
||||
function addPress(output as IItemStack, input as IIngredient, mold as IItemStack, energy as int, inputSize as int) {
|
||||
MetalPress.addRecipe(output, input, mold, energy, inputSize);
|
||||
}
|
||||
}
|
234
scripts/crafttweaker/classes/mods/mekanism.zs
Normal file
234
scripts/crafttweaker/classes/mods/mekanism.zs
Normal file
@ -0,0 +1,234 @@
|
||||
#priority 3400
|
||||
|
||||
/*
|
||||
SevTech: Ages Mekanism Script
|
||||
|
||||
This script is a zenClass to allow easy interation with Mekanism.
|
||||
|
||||
Note: These scripts are created and for the usage in SevTech: Ages and other
|
||||
modpacks curated by DarkPacks. You can use these scripts for reference and for
|
||||
learning but not for copying and pasting and claiming as your own.
|
||||
*/
|
||||
import crafttweaker.item.IIngredient;
|
||||
import crafttweaker.item.IItemStack;
|
||||
import crafttweaker.liquid.ILiquidStack;
|
||||
|
||||
import mod.mekanism.gas.IGasStack;
|
||||
|
||||
import mods.mekanism.chemical.crystallizer as Crystallizer;
|
||||
import mods.mekanism.chemical.injection as Injection;
|
||||
import mods.mekanism.combiner as Combiner;
|
||||
import mods.mekanism.compressor as Compressor;
|
||||
import mods.mekanism.crusher as Crusher;
|
||||
import mods.mekanism.enrichment as Enrichment;
|
||||
import mods.mekanism.infuser as Infuser;
|
||||
import mods.mekanism.purification as PurificationChamber;
|
||||
import mods.mekanism.reaction as PressurisedReactionChamber;
|
||||
import mods.mekanism.sawmill as Sawmill;
|
||||
import mods.mekanism.smelter as Smelter;
|
||||
|
||||
zenClass Mekanism {
|
||||
zenConstructor() {
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Enrichment Chamber Recipe
|
||||
*/
|
||||
function removeEnrichment(input as IIngredient) {
|
||||
Enrichment.removeRecipe(input);
|
||||
}
|
||||
function removeEnrichment(input as IIngredient, output as IIngredient) {
|
||||
Enrichment.removeRecipe(input, output);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Enrichment Chamber Recipe
|
||||
*/
|
||||
function addEnrichment(input as IIngredient, output as IItemStack) {
|
||||
Enrichment.addRecipe(input, output);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Chemical Injection Chamber Recipe
|
||||
*/
|
||||
function addChemicalInjection(input as IIngredient, gasInput as IGasStack, output as IItemStack) {
|
||||
Injection.addRecipe(input, gasInput, output);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Chemical Injection Chamber Recipe
|
||||
*/
|
||||
function removeChemicalInjection(output as IIngredient) {
|
||||
Injection.removeRecipe(output);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Combiner Recipe
|
||||
*/
|
||||
function addCombiner(input as IIngredient, extraInput as IIngredient, output as IItemStack) {
|
||||
Combiner.addRecipe(input, extraInput, output);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Combiner Recipe
|
||||
*/
|
||||
function removeCombiner(output as IIngredient) {
|
||||
Combiner.removeRecipe(output);
|
||||
}
|
||||
function removeCombiner(output as IIngredient, input as IIngredient) {
|
||||
Combiner.removeRecipe(output, input);
|
||||
}
|
||||
function removeCombiner(output as IIngredient, input as IIngredient, extra as IIngredient) {
|
||||
Combiner.removeRecipe(output, input, extra);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Crusher Recipe
|
||||
*/
|
||||
function addCrusher(input as IIngredient, output as IItemStack) {
|
||||
Crusher.addRecipe(input, output);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Crusher Recipe
|
||||
*/
|
||||
function removeCrusher(output as IIngredient) {
|
||||
Crusher.removeRecipe(output);
|
||||
}
|
||||
function removeCrusher(output as IIngredient, input as IIngredient) {
|
||||
Crusher.removeRecipe(output, input);
|
||||
}
|
||||
|
||||
/*
|
||||
Add an Infuser Recipe
|
||||
*/
|
||||
function addInfusion(infusionType as string, toConsume as int, input as IIngredient, output as IItemStack) {
|
||||
Infuser.addRecipe(infusionType, toConsume, input, output);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove an Infuser Recipe
|
||||
*/
|
||||
function removeInfusion(output as IIngredient) {
|
||||
Infuser.removeRecipe(output);
|
||||
}
|
||||
function removeInfusion(output as IIngredient, input as IIngredient, infusionType as string) {
|
||||
Infuser.removeRecipe(output, input, infusionType);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Chemical Crystallizer Recipe
|
||||
*/
|
||||
function addChemicalCrystallizer(inputGas as IGasStack, output as IItemStack) {
|
||||
Crystallizer.addRecipe(inputGas, output);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Chemical Crystallizer Recipe
|
||||
*/
|
||||
function removeChemicalCrystallizer(output as IIngredient) {
|
||||
Crystallizer.removeRecipe(output);
|
||||
}
|
||||
function removeChemicalCrystallizer(output as IIngredient, inputGas as IIngredient) {
|
||||
Crystallizer.removeRecipe(output, inputGas);
|
||||
}
|
||||
|
||||
/*
|
||||
Add an Energized Smelter Recipe
|
||||
*/
|
||||
function addSmelter(input as IIngredient, output as IItemStack) {
|
||||
Smelter.addRecipe(input, output);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove an Energized Smelter Recipe
|
||||
*/
|
||||
function removeSmelter(input as IIngredient) {
|
||||
Smelter.removeRecipe(input);
|
||||
}
|
||||
function removeSmelter(input as IIngredient, output as IIngredient) {
|
||||
Smelter.removeRecipe(input, output);
|
||||
}
|
||||
|
||||
/*
|
||||
Add an Osmium Compressor Recipe
|
||||
*/
|
||||
function addCompressor(input as IIngredient, output as IItemStack) {
|
||||
Compressor.addRecipe(input, output);
|
||||
}
|
||||
function addCompressor(input as IIngredient, inputGas as IGasStack, output as IItemStack) {
|
||||
Compressor.addRecipe(input, inputGas, output);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove an Osmium Compressor Recipe
|
||||
*/
|
||||
function removeCompressor(output as IItemStack) {
|
||||
Compressor.removeRecipe(output);
|
||||
}
|
||||
function removeCompressor(output as IItemStack, input as IIngredient, inputGas as IIngredient) {
|
||||
Compressor.removeRecipe(output, input, inputGas);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Sawmill Recipe
|
||||
*/
|
||||
function addSawmill(input as IIngredient, output as IItemStack) {
|
||||
Sawmill.addRecipe(input, output);
|
||||
}
|
||||
function addSawmill(input as IIngredient, output as IItemStack, bonusOutput as IItemStack, bonusChance as double) {
|
||||
Sawmill.addRecipe(input, output, bonusOutput, bonusChance);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Sawmill Recipe
|
||||
*/
|
||||
function removeSawmill(input as IIngredient) {
|
||||
Sawmill.removeRecipe(input);
|
||||
}
|
||||
function removeSawmill(input as IIngredient, output as IIngredient) {
|
||||
Sawmill.removeRecipe(input, output);
|
||||
}
|
||||
function removeSawmill(input as IIngredient, output as IIngredient, bonusOutput as IIngredient) {
|
||||
Sawmill.removeRecipe(input, output, bonusOutput);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Purification Chamber Recipe
|
||||
*/
|
||||
function addPurification(input as IIngredient, output as IItemStack) {
|
||||
PurificationChamber.addRecipe(input, output);
|
||||
}
|
||||
function addPurification(input as IIngredient, inputGas as IGasStack, output as IItemStack) {
|
||||
PurificationChamber.addRecipe(input, inputGas, output);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Purification Chamber Recipe
|
||||
*/
|
||||
function removePurification(output as IItemStack) {
|
||||
PurificationChamber.removeRecipe(output);
|
||||
}
|
||||
function removePurification(output as IItemStack, input as IIngredient, inputGas as IIngredient) {
|
||||
PurificationChamber.removeRecipe(output, input, inputGas);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Pressurised Reaction Chamber Recipe
|
||||
|
||||
An energy value of 0.0 uses a default value in Mekanism
|
||||
*/
|
||||
function addPRC(itemInput as IIngredient, liquidInput as ILiquidStack, gasInput as IGasStack, itemOutput as IItemStack, gasOutput as IGasStack, energy as double, duration as int) {
|
||||
PressurisedReactionChamber.addRecipe(itemInput, liquidInput, gasInput, itemOutput, gasOutput, energy, duration);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Pressurised Reaction Chamber Recipe
|
||||
*/
|
||||
function removePRC(itemOutput as IIngredient, gasOutput as IGasStack) {
|
||||
PressurisedReactionChamber.removeRecipe(itemOutput, gasOutput);
|
||||
}
|
||||
function removePRC(itemOutput as IIngredient, gasOutput as IGasStack, itemInput as IIngredient, liquidInput as ILiquidStack, gasInput as IGasStack) {
|
||||
PressurisedReactionChamber.removeRecipe(itemOutput, gasOutput, itemInput, liquidInput, gasInput);
|
||||
}
|
||||
}
|
125
scripts/crafttweaker/classes/mods/tinkers.zs
Normal file
125
scripts/crafttweaker/classes/mods/tinkers.zs
Normal file
@ -0,0 +1,125 @@
|
||||
#priority 3400
|
||||
|
||||
/*
|
||||
SevTech: Ages Tinkers Construct Script
|
||||
|
||||
This script is a zenClass to allow easy interation with Tinkers Construct.
|
||||
|
||||
Note: These scripts are created and for the usage in SevTech: Ages and other
|
||||
modpacks curated by DarkPacks. You can use these scripts for reference and for
|
||||
learning but not for copying and pasting and claiming as your own.
|
||||
*/
|
||||
import crafttweaker.entity.IEntityDefinition;
|
||||
import crafttweaker.item.IIngredient;
|
||||
import crafttweaker.item.IItemStack;
|
||||
import crafttweaker.liquid.ILiquidStack;
|
||||
|
||||
import mods.tconstruct.Alloy;
|
||||
import mods.tconstruct.Casting;
|
||||
import mods.tconstruct.Drying;
|
||||
import mods.tconstruct.Melting;
|
||||
|
||||
zenClass Tinkers {
|
||||
zenConstructor() {
|
||||
}
|
||||
|
||||
/*
|
||||
Add an Alloying recipe.
|
||||
*/
|
||||
function addAlloying(output as ILiquidStack, inputs as ILiquidStack[]) {
|
||||
Alloy.addRecipe(output, inputs);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove an Alloying recipe.
|
||||
*/
|
||||
function removeAlloying(output as ILiquidStack) {
|
||||
Alloy.removeRecipe(output);
|
||||
}
|
||||
function removeAlloying(output as ILiquidStack, inputs as ILiquidStack[]) {
|
||||
Alloy.removeRecipe(output, inputs);
|
||||
}
|
||||
|
||||
/*
|
||||
Add an Casting Table recipe.
|
||||
*/
|
||||
function addCastingTable(output as IItemStack, cast as IIngredient, fluid as ILiquidStack, amount as int) {
|
||||
Casting.addTableRecipe(output, cast, fluid, amount);
|
||||
}
|
||||
function addCastingTable(output as IItemStack, cast as IIngredient, fluid as ILiquidStack, amount as int, consumeCast as bool) {
|
||||
Casting.addTableRecipe(output, cast, fluid, amount, consumeCast);
|
||||
}
|
||||
function addCastingTable(output as IItemStack, cast as IIngredient, fluid as ILiquidStack, amount as int, consumeCast as bool, time as int) {
|
||||
Casting.addTableRecipe(output, cast, fluid, amount, consumeCast, time);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove an Casting Table recipe.
|
||||
*/
|
||||
function removeCastingTable(output as IItemStack) {
|
||||
Casting.removeTableRecipe(output);
|
||||
}
|
||||
|
||||
/*
|
||||
Add an Casting Basin recipe.
|
||||
*/
|
||||
function addCastingBasin(output as IItemStack, cast as IIngredient, fluid as ILiquidStack, amount as int) {
|
||||
Casting.addBasinRecipe(output, cast, fluid, amount);
|
||||
}
|
||||
function addCastingBasin(output as IItemStack, cast as IIngredient, fluid as ILiquidStack, amount as int, consumeCast as bool) {
|
||||
Casting.addBasinRecipe(output, cast, fluid, amount, consumeCast);
|
||||
}
|
||||
function addCastingBasin(output as IItemStack, cast as IIngredient, fluid as ILiquidStack, amount as int, consumeCast as bool, time as int) {
|
||||
Casting.addBasinRecipe(output, cast, fluid, amount, consumeCast, time);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove an Casting Basin recipe.
|
||||
*/
|
||||
function removeCastingBasin(output as IItemStack) {
|
||||
Casting.removeBasinRecipe(output);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Drying Recipe
|
||||
*/
|
||||
function addDrying(output as IItemStack, input as IIngredient, time as int) {
|
||||
Drying.addRecipe(output, input, time);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Drying Recipe.
|
||||
*/
|
||||
function removeDrying(output as IItemStack) {
|
||||
Drying.removeRecipe(output);
|
||||
}
|
||||
function removeDrying(output as IItemStack, input as IItemStack) {
|
||||
Drying.removeRecipe(output, input);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a Melting Recipe.
|
||||
*/
|
||||
function addMelting(output as ILiquidStack, input as IIngredient) {
|
||||
Melting.addRecipe(output, input);
|
||||
}
|
||||
function addMelting(output as ILiquidStack, input as IIngredient, time as int) {
|
||||
Melting.addRecipe(output, input, time);
|
||||
}
|
||||
function addMeltingEntity(entity as IEntityDefinition, output as ILiquidStack) {
|
||||
Melting.addEntityMelting(entity, output);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove a Melting Recipe.
|
||||
*/
|
||||
function removeMelting(output as ILiquidStack) {
|
||||
Melting.removeRecipe(output);
|
||||
}
|
||||
function removeMelting(output as ILiquidStack, input as IItemStack) {
|
||||
Melting.removeRecipe(output, input);
|
||||
}
|
||||
function removeMeltingEntity(entity as IEntityDefinition) {
|
||||
Melting.removeEntityMelting(entity);
|
||||
}
|
||||
}
|
315
scripts/crafttweaker/classes/resources/metals.zs
Normal file
315
scripts/crafttweaker/classes/resources/metals.zs
Normal file
@ -0,0 +1,315 @@
|
||||
#priority 2751
|
||||
|
||||
/*
|
||||
SevTech: Ages Metals Processing Script
|
||||
|
||||
TODO:
|
||||
|
||||
Note: These scripts are created and for the usage in SevTech: Ages and other
|
||||
modpacks curated by DarkPacks. You can use these scripts for reference and for
|
||||
learning but not for copying and pasting and claiming as your own.
|
||||
*/
|
||||
import crafttweaker.item.IItemStack;
|
||||
import crafttweaker.item.IIngredient;
|
||||
import crafttweaker.liquid.ILiquidStack;
|
||||
import crafttweaker.oredict.IOreDictEntry;
|
||||
|
||||
import scripts.crafttweaker.utils;
|
||||
|
||||
zenClass Metals {
|
||||
var defaultArcEnergyPerTick as int = 512;
|
||||
var defaultArcTickTime as int = 100;
|
||||
var arcGivesSlag as bool = false;
|
||||
var immersivePressEnergy as int = 2400;
|
||||
var packingMold as IItemStack = <immersiveengineering:mold:6>;
|
||||
var unpackingMold as IItemStack = <immersiveengineering:mold:7>;
|
||||
var packingInputCount as int = 9;
|
||||
var packingOutputCount as int = 1;
|
||||
var unpackingInputCount as int = 1;
|
||||
var unpackingOutputCount as int = 9;
|
||||
|
||||
var wires as IItemStack[string] = {
|
||||
aluminum: <immersiveengineering:material:22>,
|
||||
copper: <immersiveengineering:material:20>,
|
||||
electrum: <immersiveengineering:material:21>,
|
||||
steel: <immersiveengineering:material:23>
|
||||
};
|
||||
|
||||
/*
|
||||
Secondary Output mapping for Ores.
|
||||
|
||||
This should link/be to/an OreDict entry always!
|
||||
*/
|
||||
var secondaryOutputs as IOreDictEntry[string] = {
|
||||
copper: metals.gold.dust,
|
||||
iron: metals.nickel.dust,
|
||||
lead: metals.silver.dust,
|
||||
nickel: metals.platinum.dust,
|
||||
platinum: metals.nickel.dust,
|
||||
silver: metals.lead.dust,
|
||||
uranium: metals.lead.dust
|
||||
};
|
||||
|
||||
zenConstructor() {
|
||||
}
|
||||
|
||||
function handleTinkers(preferredMetalItem as IItemStack, metalName as string, metalPartName as string, metalLiquid as ILiquidStack) {
|
||||
var fluidAmount as int = utils.getFluidAmount(metalPartName);
|
||||
|
||||
// ==============================
|
||||
// Melting
|
||||
tinkers.removeMelting(metalLiquid * 1, preferredMetalItem);
|
||||
if (fluidAmount != 0) {
|
||||
tinkers.addMelting(metalLiquid * fluidAmount, preferredMetalItem);
|
||||
}
|
||||
|
||||
// ==============================
|
||||
// Casting
|
||||
if (metalPartName == "block") {
|
||||
tinkers.removeCastingBasin(preferredMetalItem);
|
||||
tinkers.addCastingBasin(preferredMetalItem, null, metalLiquid, fluidAmount, false);
|
||||
} else {
|
||||
var tinkersCast as IItemStack = utils.getCast(metalPartName);
|
||||
if (tinkersCast as bool) {
|
||||
tinkers.removeCastingTable(preferredMetalItem);
|
||||
tinkers.addCastingTable(preferredMetalItem, tinkersCast, metalLiquid, fluidAmount, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleDirtyDust(preferredMetalItem as IItemStack, metalName as string, metal as IOreDictEntry[string]) {
|
||||
mekanism.removeEnrichment(preferredMetalItem);
|
||||
if (metalItems[metalName].dust as bool) {
|
||||
mekanism.addEnrichment(preferredMetalItem, metalItems[metalName].dust.items[0]);
|
||||
}
|
||||
// Handle the dirtyDust set in the map to force change the outcome. (Fixes an issue with Meka registration)
|
||||
mekanism.removeEnrichment(metal.dirtyDust.firstItem);
|
||||
mekanism.addEnrichment(metal.dirtyDust.firstItem, metal.dust.firstItem);
|
||||
}
|
||||
|
||||
function handleDust(preferredMetalItem as IItemStack, metalName as string, metalPartName as string, metal as IOreDictEntry[string]) {
|
||||
immersiveEngineering.addArcFurn(
|
||||
metalItems[metalName].ingot.items[0],
|
||||
metal[metalPartName],
|
||||
arcGivesSlag ? <ore:itemSlag>.firstItem : null,
|
||||
defaultArcTickTime,
|
||||
defaultArcEnergyPerTick
|
||||
);
|
||||
// Later Stage Smelting.
|
||||
mekanism.addSmelter(preferredMetalItem, metalItems[metalName].ingot.items[0]);
|
||||
}
|
||||
|
||||
function handleIngot(preferredMetalItem as IItemStack, metalName as string, metalPartName as string) {
|
||||
// Remove ingot recipes, mainly for preventing ore doubling recipes.
|
||||
immersiveEngineering.removeArcFurn(preferredMetalItem);
|
||||
|
||||
// ==============================
|
||||
// Nugget
|
||||
if (metalItems[metalName].nugget as bool) {
|
||||
// Packing
|
||||
immersiveEngineering.addPress(
|
||||
preferredMetalItem * packingOutputCount,
|
||||
metalItems[metalName].nugget.items[0],
|
||||
packingMold,
|
||||
immersivePressEnergy,
|
||||
packingInputCount
|
||||
);
|
||||
|
||||
// Unpacking
|
||||
immersiveEngineering.addPress(
|
||||
metalItems[metalName].nugget.items[0] * unpackingOutputCount,
|
||||
preferredMetalItem,
|
||||
unpackingMold,
|
||||
immersivePressEnergy,
|
||||
unpackingInputCount
|
||||
);
|
||||
}
|
||||
|
||||
// ==============================
|
||||
// Block
|
||||
if (metalItems[metalName].block as bool) {
|
||||
// Packing
|
||||
immersiveEngineering.addPress(
|
||||
metalItems[metalName].block.items[0] * packingOutputCount,
|
||||
preferredMetalItem,
|
||||
packingMold,
|
||||
immersivePressEnergy,
|
||||
packingInputCount
|
||||
);
|
||||
|
||||
// Unpacking
|
||||
immersiveEngineering.addPress(
|
||||
preferredMetalItem * unpackingOutputCount,
|
||||
metalItems[metalName].block.items[0],
|
||||
unpackingMold,
|
||||
immersivePressEnergy,
|
||||
unpackingInputCount
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function handlePlate(preferredMetalItem as IItemStack, metalName as string) {
|
||||
mods.primaltech.StoneAnvil.addRecipe(preferredMetalItem, metalItems[metalName].ingot.items[0]);
|
||||
// Plates should also be used in place of ingots for wire.
|
||||
if (metalName == "copper" | metalName == "electrum" | metalName == "aluminum" | metalName == "steel") {
|
||||
immersiveEngineering.addPress(
|
||||
wires[metalName] * 2,
|
||||
preferredMetalItem,
|
||||
<immersiveengineering:mold:4>,
|
||||
immersivePressEnergy,
|
||||
1
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function handleBlock(preferredMetalItem as IItemStack, metalName as string) {
|
||||
mods.primaltech.StoneAnvil.addRecipe(metalItems[metalName].ingot.items[0] * 9, preferredMetalItem);
|
||||
}
|
||||
|
||||
function handleRod(preferredMetalItem as IItemStack, metalName as string) {
|
||||
mods.primaltech.StoneAnvil.addRecipe(preferredMetalItem, metalItems[metalName].plate.items[0]);
|
||||
}
|
||||
|
||||
function handlePress(preferredMetalItem as IItemStack, metalName as string, metalPartName as string) {
|
||||
var pressMold as IItemStack = utils.getMold(metalPartName);
|
||||
|
||||
if (pressMold as bool) {
|
||||
immersiveEngineering.removePress(preferredMetalItem);
|
||||
immersiveEngineering.addPress(
|
||||
preferredMetalItem * utils.getPressOutputCount(metalPartName),
|
||||
metalItems[metalName].ingot.items[0],
|
||||
pressMold,
|
||||
immersivePressEnergy,
|
||||
utils.getPressInputCount(metalPartName)
|
||||
);
|
||||
}
|
||||
|
||||
if (metalPartName != "plate" & metalItems[metalName].plate as bool) {
|
||||
immersiveEngineering.addPress(
|
||||
preferredMetalItem * utils.getPressOutputCount(metalPartName),
|
||||
metalItems[metalName].plate.items[0],
|
||||
pressMold,
|
||||
immersivePressEnergy,
|
||||
utils.getPressInputCount(metalPartName)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// ==============================
|
||||
// Ore Processing/Handling
|
||||
|
||||
/*
|
||||
Remove all the current recipes for the ore and mods processing so we can add back in our tier system.
|
||||
|
||||
(Some of these are not really needed but it flushes the system and ensures for compat with our forced dusts)
|
||||
*/
|
||||
function removeOreRecipes(metalType as IOreDictEntry[string]) {
|
||||
// Remove Ore recipes from mods which support IIngredient.
|
||||
mekanism.removeEnrichment(metalType.ore);
|
||||
// Remove Starlight Ingot Conversion.
|
||||
astralSorcery.removeStarlight(metalType.ingot.firstItem);
|
||||
// Remove the Ingot -> Dust recipe from Applied Energistics.
|
||||
appliedEnergistics.removeGrindstone(metalType.ingot.firstItem);
|
||||
|
||||
// Remove all Dust recipes.
|
||||
for dust in metalType.dust.items {
|
||||
// Remove the dust from Actually Additions.
|
||||
actuallyAdditions.removeCrusher(dust);
|
||||
// Remove the dust from Astral Sorcery.
|
||||
astralSorcery.removeGrindstone(dust);
|
||||
astralSorcery.removeStarlight(dust);
|
||||
// Remove the dust from IE Crusher.
|
||||
immersiveEngineering.removeCrusher(dust);
|
||||
// Remove the dust from Mekanism.
|
||||
mekanism.removeCrusher(dust);
|
||||
}
|
||||
// Remove all Ore recipes.
|
||||
for ore in metalType.ore.items {
|
||||
// Remove the ore from Applied Energistics.
|
||||
appliedEnergistics.removeGrindstone(ore);
|
||||
// Remove the ore from Blood Magic.
|
||||
bloodMagic.removeAlchemyTable([ore, <bloodmagic:cutting_fluid:0>] as IItemStack[]);
|
||||
// Remove the ore from AbyssalCraft.
|
||||
abyssalcraft.removeCrystallization(ore);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Add the recipes following our tier system back to the game.
|
||||
|
||||
These are added using our tier system, along with tweaks to how progression works each tier
|
||||
is noted below and self explained with the method calling to the mods.
|
||||
*/
|
||||
function createOreRecipes(metalType as IOreDictEntry[string], oreSecondOutput as IOreDictEntry) {
|
||||
// Add recipes for mods which support input by IIngredient.
|
||||
if (!isNull(oreSecondOutput)) {
|
||||
// Tier 2 Recipes
|
||||
immersiveEngineering.addCrusher(metalType.dust.firstItem * 2, metalType.ore, immersiveEngineering.default_energy, oreSecondOutput.firstItem, 0.25);
|
||||
} else {
|
||||
// Tier 2 Recipes
|
||||
immersiveEngineering.addCrusher(metalType.dust.firstItem * 2, metalType.ore);
|
||||
}
|
||||
|
||||
for ore in metalType.ore.items {
|
||||
// Tier 1 Recipes
|
||||
appliedEnergistics.addGrindstone(metalType.dust.firstItem, ore);
|
||||
astralSorcery.addGrindstone(ore, metalType.dust.firstItem);
|
||||
|
||||
// Tier 3 Recipes
|
||||
mekanism.addCrusher(ore, metalType.dust.firstItem * 2);
|
||||
|
||||
if (!isNull(oreSecondOutput)) {
|
||||
// Tier 3 Recipes
|
||||
actuallyAdditions.addCrusher(metalType.dust.firstItem * 2, ore, oreSecondOutput.firstItem, 50);
|
||||
} else {
|
||||
// Tier 3 Recipes
|
||||
actuallyAdditions.addCrusher(metalType.dust.firstItem * 2, ore);
|
||||
}
|
||||
}
|
||||
|
||||
// Tier 4 Recipes
|
||||
createTier4Recipes(metalType, oreSecondOutput);
|
||||
}
|
||||
|
||||
/*
|
||||
Add the conversion recipes for the ore sub items.
|
||||
|
||||
This adds the processing such as Ingot -> Dust or other conversions needed for the Ore outputs which are removed
|
||||
in process with cleaning up via the `removeRecipes` Function.
|
||||
*/
|
||||
function createConversionRecipes(metalName as string, metalType as IOreDictEntry[string]) {
|
||||
// Handle the Ingot -> Dust conversion.
|
||||
if (metalType has "dust" & !isNull(metalItems[metalName].dust)) {
|
||||
immersiveEngineering.addCrusher(metalType.dust.firstItem, metalItems[metalName].ingot.items[0], 256);
|
||||
appliedEnergistics.addGrindstone(metalType.dust.firstItem, metalItems[metalName].ingot.items[0]);
|
||||
astralSorcery.addGrindstone(metalItems[metalName].ingot.items[0], metalType.dust.firstItem);
|
||||
actuallyAdditions.addCrusher(metalType.dust.firstItem, metalItems[metalName].ingot.items[0]);
|
||||
mekanism.addCrusher(metalItems[metalName].ingot.items[0], metalType.dust.firstItem);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Add the recipes to the Modular Machine for processing Ores.
|
||||
|
||||
This is a custom machine using various gases/fluids to tie with Mekanism but allow the
|
||||
player to explore with other options and to improve efficiency with autocrafting/autoprocessing.
|
||||
*/
|
||||
function createTier4Recipes(metalType as IOreDictEntry[string], oreSecondOutput as IOreDictEntry) {
|
||||
// Add the ore to the OreMatic 5000.
|
||||
orematic.addAllTiers(metalType.ore, metalType.dust.firstItem, oreSecondOutput);
|
||||
}
|
||||
|
||||
/*
|
||||
Handle Ores by removing all recipes which are created from the Ore. Then re-add them using our logic/changes.
|
||||
Also add processing for the Ore Matic to enable faster Ore Processing in later Ages.
|
||||
*/
|
||||
function handleOre(metalName as string, metalType as IOreDictEntry[string]) {
|
||||
var secondaryOutput as IOreDictEntry = secondaryOutputs[metalName];
|
||||
// Remove all the old recipes for the ore conversion.
|
||||
removeOreRecipes(metalType);
|
||||
// Add back the recipes needed for the Tier'd Ore Processing.
|
||||
createOreRecipes(metalType, secondaryOutput);
|
||||
// Add back the conversion recipes which are removed by the script (Due to how the removals work).
|
||||
createConversionRecipes(metalName, metalType);
|
||||
}
|
||||
}
|
146
scripts/crafttweaker/classes/resources/resources.zs
Normal file
146
scripts/crafttweaker/classes/resources/resources.zs
Normal file
@ -0,0 +1,146 @@
|
||||
#priority 2650
|
||||
|
||||
/*
|
||||
SevTech: Ages Resources Script
|
||||
|
||||
It does things and stuff which some of us understand?
|
||||
|
||||
Note: These scripts are created and for the usage in SevTech: Ages and other
|
||||
modpacks curated by DarkPacks. You can use these scripts for reference and for
|
||||
learning but not for copying and pasting and claiming as your own.
|
||||
*/
|
||||
import crafttweaker.data.IData;
|
||||
import crafttweaker.item.IIngredient;
|
||||
import crafttweaker.item.IItemStack;
|
||||
import crafttweaker.liquid.ILiquidStack;
|
||||
import crafttweaker.oredict.IOreDictEntry;
|
||||
|
||||
import mods.zenstages.ZenStager;
|
||||
|
||||
import scripts.crafttweaker.craftingUtils;
|
||||
import scripts.crafttweaker.stages.metalStages;
|
||||
|
||||
zenClass Resources {
|
||||
var partsToSkip as string[] = [
|
||||
"clump",
|
||||
"crystal",
|
||||
"shard"
|
||||
];
|
||||
|
||||
zenConstructor() {
|
||||
}
|
||||
|
||||
/*
|
||||
Returns liquid if it exists for that metal if not return null.
|
||||
*/
|
||||
function getMetalLiquid(metalName as string) as ILiquidStack {
|
||||
return metalItems[metalName].liquid as bool ? metalItems[metalName].liquid.liquids[0] : null;
|
||||
}
|
||||
|
||||
/*
|
||||
Returns item if it exists for that metal if not return null.
|
||||
*/
|
||||
function getPreferredMetalItem(metalName as string, metalPartName as string) as IItemStack {
|
||||
return metalItems[metalName][metalPartName] as bool ? metalItems[metalName][metalPartName].items[0] : null;
|
||||
}
|
||||
|
||||
/*
|
||||
This method will handle the part being passed. This will perform the magic required to make the magic happen!
|
||||
*/
|
||||
function processPart(metalName as string, metalPartName as string, metal as IOreDictEntry[string], preferredMetalItem as IItemStack, metalLiquid as ILiquidStack, doFurnace as bool, metalStage as string, hasLiquid as bool) {
|
||||
recipes.remove(preferredMetalItem);
|
||||
furnace.remove(preferredMetalItem);
|
||||
|
||||
if (hasLiquid) {
|
||||
metalProc.handleTinkers(preferredMetalItem, metalName, metalPartName, metalLiquid);
|
||||
}
|
||||
|
||||
// ==============================
|
||||
// Process the part via their own handlers.
|
||||
if (metalPartName == "dirtyDust") {
|
||||
metalProc.handleDirtyDust(preferredMetalItem, metalName, metal);
|
||||
} else if (metalPartName == "dust") {
|
||||
metalProc.handleDust(preferredMetalItem, metalName, metalPartName, metal);
|
||||
} else if (metalPartName == "ingot") {
|
||||
metalProc.handleIngot(preferredMetalItem, metalName, metalPartName);
|
||||
} else if (metalPartName == "plate") {
|
||||
metalProc.handlePlate(preferredMetalItem, metalName);
|
||||
} else if (metalPartName == "block") {
|
||||
metalProc.handleBlock(preferredMetalItem, metalName);
|
||||
} else if (metalPartName == "rod") {
|
||||
metalProc.handleRod(preferredMetalItem, metalName);
|
||||
}
|
||||
// ==============================
|
||||
// Handle Press Recipes
|
||||
metalProc.handlePress(preferredMetalItem, metalName, metalPartName);
|
||||
}
|
||||
|
||||
/*
|
||||
This method is called to init the loop over metals to change how the processing mechanics work for the pack.
|
||||
TLDR: Removes/Adds/Changes recipes/usages for the metal being handled.
|
||||
*/
|
||||
function processMetal(metalName as string, metal as IOreDictEntry[string]) {
|
||||
var metalLiquid = getMetalLiquid(metalName);
|
||||
var hasLiquid = metalLiquid as bool;
|
||||
var metalStage = (metalStages has metalName) ? metalStages[metalName] : "";
|
||||
|
||||
// Log as a warn is the metal has no Stage. As ALL metals should have been staged!
|
||||
// I.E. Could be a new metal or change to a name which we missed in a mod update etc...
|
||||
if (metalStage == "") {
|
||||
logger.logWarning("[Metals] No stage found for " ~ metalName);
|
||||
}
|
||||
|
||||
// ==============================
|
||||
// Stage the Liquid
|
||||
if (metalStage != "" & hasLiquid) {
|
||||
ZenStager.getStage(metalStage).addLiquid(metalLiquid);
|
||||
ZenStager.getStage(metalStage).addIngredient(craftingUtils.getBucketIngredient(metalLiquid));
|
||||
}
|
||||
// ==============================
|
||||
// Loop over the parts for the Metal and handle each part for correcting/changing processing recipes/mechanics.
|
||||
for partName, part in metal {
|
||||
if (part as bool & partName != "ore") {
|
||||
var preferredMetalItem = getPreferredMetalItem(metalName, partName);
|
||||
unifier.unify(part, preferredMetalItem, metalLiquid);
|
||||
|
||||
if (preferredMetalItem as bool) {
|
||||
// Stage the part.
|
||||
if (metalStage != "") {
|
||||
ZenStager.getStage(metalStage).addIngredient(preferredMetalItem);
|
||||
}
|
||||
|
||||
if (!(partsToSkip has partName)) {
|
||||
processPart(metalName, partName, metal, preferredMetalItem, metalLiquid, partName == "ingot", metalStage, hasLiquid);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// ==============================
|
||||
// Ore Processing
|
||||
if (metal has "ore" & !isNull(metal.dust)) {
|
||||
metalProc.handleOre(metalName, metal);
|
||||
}
|
||||
}
|
||||
|
||||
function processCluster(metal as string, cluster as IItemStack) {
|
||||
// ==============================
|
||||
// Crushing Recipes
|
||||
if (metal == "titanium") {
|
||||
immersiveEngineering.addCrusher(metals[metal].dust.firstItem * 2, cluster, metals.iron.dust.firstItem, 0.50);
|
||||
actuallyAdditions.addCrusher(metals[metal].dust.firstItem * 2, cluster, metals.iron.dust.firstItem, 50);
|
||||
} else {
|
||||
immersiveEngineering.addCrusher(metals[metal].dust.firstItem * 2, cluster);
|
||||
actuallyAdditions.addCrusher(metals[metal].dust.firstItem * 2, cluster);
|
||||
}
|
||||
|
||||
// ==============================
|
||||
// Smelting Recipes
|
||||
mekanism.addEnrichment(cluster, metals[metal].dust.firstItem * 2);
|
||||
|
||||
// ==============================
|
||||
// Tinkers Melting
|
||||
if (!isNull(metalItems[metal].liquid)) {
|
||||
tinkers.addMelting(metalItems[metal].liquid.liquids[0] * 144, cluster);
|
||||
}
|
||||
}
|
||||
}
|
157
scripts/crafttweaker/classes/utils/recipeUtil.zs
Normal file
157
scripts/crafttweaker/classes/utils/recipeUtil.zs
Normal file
@ -0,0 +1,157 @@
|
||||
#priority 3400
|
||||
|
||||
/*
|
||||
SevTech: Ages Recipe Util Script
|
||||
|
||||
This script is a zenClass "Util/Wrapper" for recipe adding. Which gives us an easier way
|
||||
to add recipes to the game in a clean script layout using Maps/Arrays.
|
||||
|
||||
Note: These scripts are created and for the usage in SevTech: Ages and other
|
||||
modpacks curated by DarkPacks. You can use these scripts for reference and for
|
||||
learning but not for copying and pasting and claiming as your own.
|
||||
*/
|
||||
import crafttweaker.item.IItemStack;
|
||||
import crafttweaker.item.IIngredient;
|
||||
|
||||
import mods.zenstages.ZenStager;
|
||||
|
||||
import scripts.crafttweaker.stages.stageDisabled;
|
||||
|
||||
zenClass RecipeUtil {
|
||||
zenConstructor() {
|
||||
}
|
||||
|
||||
/*
|
||||
Process Method to handle Shapless Recipes.
|
||||
*/
|
||||
function processNamed(map as IIngredient[][][string][IItemStack]) {
|
||||
for item, itemRecipes in map {
|
||||
for recipeName, recipesInner in itemRecipes {
|
||||
for i, recipe in recipesInner {
|
||||
var toName = recipeName;
|
||||
if (i > 0) {
|
||||
toName = toName ~ "_" ~ i;
|
||||
}
|
||||
if (recipeName == "nameless") {
|
||||
recipes.addShapeless(item, recipe);
|
||||
} else {
|
||||
recipes.addShapeless(toName, item, recipe);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function process(map as IIngredient[][][IItemStack]) {
|
||||
for item, itemRecipes in map {
|
||||
for recipe in itemRecipes {
|
||||
recipes.addShapeless(item, recipe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Process Method to handle Shaped and Mirrored Recipes.
|
||||
*/
|
||||
function processNamed(map as IIngredient[][][][string][IItemStack], isMirrored as bool) {
|
||||
for item, itemRecipes in map {
|
||||
for recipeName, recipesInner in itemRecipes {
|
||||
for i, recipe in recipesInner {
|
||||
var toName = recipeName;
|
||||
if (i > 0) {
|
||||
toName = toName ~ "_" ~ i;
|
||||
}
|
||||
|
||||
if (recipeName == "nameless") {
|
||||
if (isMirrored) {
|
||||
recipes.addShapedMirrored(item, recipe);
|
||||
} else {
|
||||
recipes.addShaped(item, recipe);
|
||||
}
|
||||
} else {
|
||||
if (isMirrored) {
|
||||
recipes.addShapedMirrored(toName, item, recipe);
|
||||
} else {
|
||||
recipes.addShaped(toName, item, recipe);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function process(map as IIngredient[][][][IItemStack], isMirrored as bool) {
|
||||
for item, itemRecipes in map {
|
||||
for recipe in itemRecipes {
|
||||
if (isMirrored) {
|
||||
recipes.addShapedMirrored(item, recipe);
|
||||
} else {
|
||||
recipes.addShaped(item, recipe);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Removes recipes simple as baking a cake!
|
||||
*/
|
||||
function removeRecipes(removals as IItemStack[]) {
|
||||
for toRemove in removals {
|
||||
recipes.remove(toRemove);
|
||||
}
|
||||
}
|
||||
function removeRecipes(removals as string[]) {
|
||||
for toRemove in removals {
|
||||
recipes.removeByRegex(toRemove);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Process Method for handling Furnace Recipes.
|
||||
*/
|
||||
function processFurnace(recipesToAdd as IIngredient[][IItemStack]) {
|
||||
for output, inputs in recipesToAdd {
|
||||
for input in inputs {
|
||||
furnace.addRecipe(output, input);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Remove recipes from the Vanilla Furnace
|
||||
*/
|
||||
function removeFurnace(removals as IIngredient[]) {
|
||||
for toRemove in removals {
|
||||
furnace.remove(toRemove);
|
||||
}
|
||||
}
|
||||
function removeFurnace(removals as IIngredient[IIngredient]) {
|
||||
for input, output in removals {
|
||||
furnace.remove(input, output);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Hide an item from JEI.
|
||||
|
||||
You can also set true to the second param to remove the recipes also.
|
||||
This also sets the Stage to Disabled incase people still have them or find them.
|
||||
*/
|
||||
function hideItems(removals as IIngredient[]) {
|
||||
hideItems(removals, false);
|
||||
}
|
||||
function hideItems(removals as IIngredient[], removeRecipe as bool) {
|
||||
if (removeRecipe) {
|
||||
for toHide in removals {
|
||||
mods.jei.JEI.removeAndHide(toHide);
|
||||
ZenStager.getStage(stageDisabled.stage).addIngredient(toHide, false);
|
||||
}
|
||||
} else {
|
||||
for toHide in removals {
|
||||
for toHideItem in toHide.items {
|
||||
mods.jei.JEI.hide(toHideItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
146
scripts/crafttweaker/classes/utils/unifier.zs
Normal file
146
scripts/crafttweaker/classes/utils/unifier.zs
Normal file
@ -0,0 +1,146 @@
|
||||
#priority 2750
|
||||
|
||||
/*
|
||||
SevTech: Ages Unifier Class Script
|
||||
|
||||
Note: These scripts are created and for the usage in SevTech: Ages and other
|
||||
modpacks curated by DarkPacks. You can use these scripts for reference and for
|
||||
learning but not for copying and pasting and claiming as your own.
|
||||
*/
|
||||
import crafttweaker.item.IItemStack;
|
||||
import crafttweaker.liquid.ILiquidStack;
|
||||
import crafttweaker.oredict.IOreDictEntry;
|
||||
|
||||
import mods.chisel.Carving;
|
||||
|
||||
zenClass Unifier {
|
||||
// In order of priority
|
||||
var defaultPreferredMods as string[] = [
|
||||
"minecraft",
|
||||
"contenttweaker",
|
||||
"immersiveengineering",
|
||||
"mekanism"
|
||||
];
|
||||
|
||||
zenConstructor() {
|
||||
}
|
||||
|
||||
/*
|
||||
Figure out which item is preferred
|
||||
|
||||
The array should be in order of priority, so if its found, return immediately
|
||||
as this will be the most preferred option
|
||||
*/
|
||||
function getPreferredItem(oreDictEntry as IOreDictEntry) as IItemStack {
|
||||
return getPreferredItem(oreDictEntry, defaultPreferredMods);
|
||||
}
|
||||
function getPreferredItem(oreDictEntry as IOreDictEntry, preferredMods as string[]) as IItemStack {
|
||||
for modName in preferredMods {
|
||||
for item in oreDictEntry.items {
|
||||
if (item.definition.owner == modName) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If there is still no item found, take the first availble
|
||||
return oreDictEntry.firstItem;
|
||||
}
|
||||
|
||||
function clearOreDict(oreDictEntry as IOreDictEntry) {
|
||||
unify(oreDictEntry, null, null);
|
||||
}
|
||||
function clearOreDict(oreDictEntry as IOreDictEntry, liquid as ILiquidStack) {
|
||||
unify(oreDictEntry, null, liquid);
|
||||
}
|
||||
function clearOreDict(oreDictEntry as IOreDictEntry, preferredItem as IItemStack, liquid as ILiquidStack) {
|
||||
unify(oreDictEntry, preferredItem, liquid);
|
||||
}
|
||||
|
||||
function unify(oreDictEntry as IOreDictEntry) {
|
||||
unify(oreDictEntry, getPreferredItem(oreDictEntry), null);
|
||||
}
|
||||
function unify(oreDictEntry as IOreDictEntry, liquid as ILiquidStack) {
|
||||
unify(oreDictEntry, getPreferredItem(oreDictEntry), liquid);
|
||||
}
|
||||
function unify(oreDictEntry as IOreDictEntry, preferredItem as IItemStack) {
|
||||
unify(oreDictEntry, preferredItem, null);
|
||||
}
|
||||
function unify(oreDictEntry as IOreDictEntry, preferredItem as IItemStack, liquid as ILiquidStack) {
|
||||
var hasLiquid = liquid as bool;
|
||||
|
||||
var vgName = "vg_" + oreDictEntry.name.toLowerCase();
|
||||
if (!isNull(preferredItem) & chiselBlocks.keys has oreDictEntry) {
|
||||
print("[Chisel] Removing " + oreDictEntry.name);
|
||||
Carving.removeGroup(oreDictEntry.name);
|
||||
print("[Chisel] Creating " + vgName);
|
||||
Carving.addGroup(vgName);
|
||||
print("[Chisel] Adding " + preferredItem.definition.id + " to " + vgName);
|
||||
Carving.addVariation(vgName, preferredItem);
|
||||
}
|
||||
|
||||
for item in oreDictEntry.items {
|
||||
if (!item.matches(preferredItem)) {
|
||||
oreDictEntry.remove(item);
|
||||
|
||||
furnace.remove(item);
|
||||
furnace.setFuel(item, 0); // Setting the burnTime to 0 will stop the input from being a fuel item
|
||||
|
||||
/*
|
||||
Remove from mod integrations
|
||||
*/
|
||||
// ==================================
|
||||
// Applied Energistics 2
|
||||
appliedEnergistics.removeGrindstone(item);
|
||||
appliedEnergistics.removeInscribe(item);
|
||||
|
||||
// ==================================
|
||||
// Astral Sorcery
|
||||
astralSorcery.removeGrindstone(item);
|
||||
|
||||
// ==================================
|
||||
// Immersive Engineering
|
||||
immersiveEngineering.removeAlloy(item);
|
||||
immersiveEngineering.removeArcFurn(item);
|
||||
immersiveEngineering.removeCrusher(item);
|
||||
immersiveEngineering.removeCrusherByInput(item);
|
||||
immersiveEngineering.removePress(item);
|
||||
|
||||
// ==================================
|
||||
// Just Enough Items
|
||||
mods.jei.JEI.removeAndHide(item);
|
||||
|
||||
// ==================================
|
||||
// Mekanism
|
||||
mekanism.removeChemicalCrystallizer(item);
|
||||
mekanism.removeChemicalInjection(item);
|
||||
mekanism.removeCombiner(item);
|
||||
mekanism.removeCrusher(item);
|
||||
mekanism.removeSmelter(item);
|
||||
mekanism.removeEnrichment(item);
|
||||
mekanism.removeInfusion(item);
|
||||
mekanism.removeCompressor(item);
|
||||
mekanism.removeSawmill(item);
|
||||
mekanism.removePurification(item);
|
||||
|
||||
// ==================================
|
||||
// Tinker's Construct
|
||||
tinkers.removeCastingBasin(item);
|
||||
tinkers.removeCastingTable(item);
|
||||
|
||||
if (hasLiquid) {
|
||||
tinkers.removeMelting(liquid, item);
|
||||
}
|
||||
|
||||
if (item.definition.owner == "chisel" & chiselBlocks.keys has oreDictEntry) {
|
||||
print("[Chisel] Adding " + item.definition.id + " to " + vgName);
|
||||
Carving.addVariation(vgName, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!isNull(preferredItem)) {
|
||||
scripts.crafttweaker.utils.ensureOreDict(oreDictEntry, preferredItem);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user