Skip to content

Commit

Permalink
added preconfigured storage buses (#1093)
Browse files Browse the repository at this point in the history
  • Loading branch information
boubou19 authored Nov 24, 2024
1 parent 1f6c491 commit c5c8897
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Add your dependencies here

dependencies {
api("com.github.GTNewHorizons:GT5-Unofficial:5.09.50.77:dev")
api("com.github.GTNewHorizons:GT5-Unofficial:5.09.50.78:dev")
api("com.github.GTNewHorizons:Yamcl:0.6.0:dev")
api("com.github.GTNewHorizons:Baubles:1.0.4:dev")

Expand Down
14 changes: 14 additions & 0 deletions src/main/java/com/dreammaster/scripts/ScriptAE2FC.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;

Expand Down Expand Up @@ -437,6 +438,19 @@ public void loadRecipes() {
.itemOutputs(AE2FC_FLUID_STORAGE_BUS).duration(15 * SECONDS).eut(TierEU.RECIPE_MV)
.addTo(assemblerRecipes);

// preconfigurated priorities for storage buses
ItemStack preconfiguredStorageBus = AE2FC_FLUID_STORAGE_BUS.copy();
for (int i = 1; i < 25; i++) {
NBTTagCompound tag = new NBTTagCompound();
tag.setInteger("priority", i);
preconfiguredStorageBus.setTagCompound(tag);
GTValues.RA.stdBuilder().itemInputs(AE2FC_FLUID_STORAGE_BUS, GTUtility.getIntegratedCircuit(i))
.itemOutputs(preconfiguredStorageBus).duration(5 * SECONDS).eut(TierEU.RECIPE_HV)
.addTo(circuitAssemblerRecipes);

addShapelessRecipe(preconfiguredStorageBus, AE2FC_FLUID_STORAGE_BUS, GTUtility.getIntegratedCircuit(i));
}

// Big Long But: Components in Circuit Assembler
// 1k ME Storage Component
GTValues.RA.stdBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.util.List;

import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;

Expand Down Expand Up @@ -90,7 +91,20 @@ public void loadRecipes() {
ItemStack[] FluixSmartCableColor = new ItemStack[16];
ItemStack[] FluixDenseSmartCableColor = new ItemStack[16];
ItemStack[] FluixGlassCableColor = new ItemStack[16];
final ItemStack storageBus = getModItem(AppliedEnergistics2.ID, "item.ItemMultiPart", 1, 220, missing);

// preconfigurated priorities for storage buses
ItemStack preconfiguredStorageBus = storageBus.copy();
for (int i = 1; i < 25; i++) {
NBTTagCompound tag = new NBTTagCompound();
tag.setInteger("priority", i);
preconfiguredStorageBus.setTagCompound(tag);
GTValues.RA.stdBuilder().itemInputs(storageBus, GTUtility.getIntegratedCircuit(i))
.itemOutputs(preconfiguredStorageBus).duration(5 * SECONDS).eut(TierEU.RECIPE_HV)
.addTo(circuitAssemblerRecipes);

addShapelessRecipe(preconfiguredStorageBus, storageBus, GTUtility.getIntegratedCircuit(i));
}
// Hyper-Acceleration Card
addShapelessRecipe(
SuperSpeedCard,
Expand Down Expand Up @@ -1411,7 +1425,7 @@ public void loadRecipes() {
GTOreDictUnificator.get(OrePrefixes.plate, Materials.NetherQuartz, 1L));
// ME storage bus
addShapedRecipe(
getModItem(AppliedEnergistics2.ID, "item.ItemMultiPart", 1, 220, missing),
storageBus,
"craftingToolScrewdriver",
"chestWood",
"craftingToolHardHammer",
Expand Down Expand Up @@ -1911,8 +1925,7 @@ public void loadRecipes() {
getModItem(AppliedEnergistics2.ID, "item.ItemMultiPart", 1, 440, missing),
GTOreDictUnificator.get(OrePrefixes.plate, Materials.NetherQuartz, 2),
ItemList.Electric_Piston_LV.get(1L))
.itemOutputs(getModItem(AppliedEnergistics2.ID, "item.ItemMultiPart", 1, 220, missing))
.duration(10 * SECONDS).eut(TierEU.RECIPE_MV).addTo(assemblerRecipes);
.itemOutputs(storageBus).duration(10 * SECONDS).eut(TierEU.RECIPE_MV).addTo(assemblerRecipes);
GTValues.RA.stdBuilder()
.itemInputs(
GTOreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 1),
Expand Down

0 comments on commit c5c8897

Please sign in to comment.