Skip to content

Commit

Permalink
project red and bluepower stone type support
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoriusT committed Jun 26, 2023
1 parent 6ff8496 commit aa48749
Show file tree
Hide file tree
Showing 8 changed files with 117 additions and 33 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Nothing (I tend to only add finished Stuff to the Changelog).

6.16.02: (Not released yet)
[IMPROVED] Terrafirmacraft Blocks when harvested with GT Tools will use four times less durability, in order to make my Tools on par with TFC Axes/Pickaxes/Shovels. Better Solution than just mindlessly buffing my Tools for everything.
[COMPAT] Bluepower and Project Red have better Stone Type Support, and some minor Recipe fixes.
[FIXED] My Betweenlands Durability usage check for GT Tools did the opposite of what it was actually supposed to do, and made "Betweenlands Material GT Tools" worse instead of making "NON-Betweenlands Material GT Tools" Worse.
[FIXED] Village Names should no longer crash with the Blacksmith Chest.
[CHANGED] Wooden Barrels and Plastic Canisters can now have decorative nonfunctional Covers attached to them. Now you can put Hazard Stickers on them, lol.
Expand Down
17 changes: 10 additions & 7 deletions src/main/java/gregapi/GT_API_Post.java
Original file line number Diff line number Diff line change
Expand Up @@ -272,14 +272,16 @@ public void onModInit2(FMLInitializationEvent aEvent) {

// Okay I should not have wondered about Blue Power doing the same garbage considering Project Red...
if (MD.BP.mLoaded) {
OreDictManager.INSTANCE.setTarget(OP.ingot , MT.RedAlloy , MD.BP, "red_alloy_ingot", 0);
OreDictManager.INSTANCE.setTarget(OP.ingot , MT.BlueAlloy , MD.BP, "blue_alloy_ingot", 0);
OreDictManager.INSTANCE.setTarget(OP.ingot , MT.PurpleAlloy , MD.BP, "purple_alloy_ingot", 0);
OreDictManager.INSTANCE.setTarget(OP.dust , MT.Nikolite , MD.BP, "teslatite_dust", 0);
OreDictManager.INSTANCE.setTarget(OP.dust , MT.UNUSED.InfusedTeslatite , MD.BP, "infused_teslatite_dust", 0);
OreDictManager.INSTANCE.setTarget(OP.plate , MT.Stone , MD.BP, "stone_tile", 0);
OreDictManager.INSTANCE.setTarget(OP.ingot , MT.RedAlloy , MD.BP, "red_alloy_ingot", 0);
OreDictManager.INSTANCE.setTarget(OP.ingot , MT.BlueAlloy , MD.BP, "blue_alloy_ingot", 0);
OreDictManager.INSTANCE.setTarget(OP.ingot , MT.PurpleAlloy , MD.BP, "purple_alloy_ingot", 0);
OreDictManager.INSTANCE.setTarget(OP.dust , MT.Nikolite , MD.BP, "teslatite_dust", 0);
OreDictManager.INSTANCE.setTarget(OP.blockDust, MT.Nikolite , MD.BP, "teslatite_block", 0);
OreDictManager.INSTANCE.setTarget(OP.dust , MT.UNUSED.Teslatite , MD.BP, "infused_teslatite_dust", 0);
OreDictManager.INSTANCE.setTarget(OP.plate , MT.Stone , MD.BP, "stone_tile", 0);

OM.reg(OD.craftingWorkBench , ST.make(MD.BP, "project_table", 1, 0));
OM.reg(OD.craftingWorkBench , ST.make(MD.BP, "auto_project_table", 1, 0));
OM.reg("seedFlax" , ST.make(MD.BP, "flax_seeds", 1, 0));
OM.reg(DYE_OREDICTS_MIXABLE[DYE_INDEX_Purple], ST.make(MD.BP, "indigo_dye", 1, 0));
OM.reg("cropIndigo" , ST.make(MD.BP, "indigo_flower", 1, 0));
Expand All @@ -305,8 +307,9 @@ public void onModInit2(FMLInitializationEvent aEvent) {
OM.data(MD.BP, "zincplate", 1, 0, ANY.Fe, U2, MT.Zn, U4);
OM.data(MD.BP, "paint_can", 1, W, ANY.Fe, 7*U2, MT.Zn, 7*U4);
OM.data(MD.BP, "lumar", 1, W, ANY.Glowstone, U2, MT.Redstone, U2);
OM.data(MD.BP, "tiles", 1, 0, MT.STONES.Marble, U2, MT.STONES.Basalt, U2);
OM.data(MD.BP, "tiles", 1, 0, MT.STONES.Marble, 2*U, MT.STONES.Basalt, 2*U);

ItemsGT.SHOW_RESISTANCE.add(ST.make(MD.BP, "tiles", 1, 0));
ItemsGT.SHOW_RESISTANCE.add(ST.make(MD.BP, "sapphire_glass", 1, 0));
ItemsGT.SHOW_RESISTANCE.add(ST.make(MD.BP, "reinforced_sapphire_glass", 1, 0));

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/gregapi/data/MT.java
Original file line number Diff line number Diff line change
Expand Up @@ -3908,7 +3908,7 @@ public static class UNUSED {
Thyrium = unused ("Thyrium" ).setPriorityPrefix(3).put(G_INGOT_ORES),
Zectium = unused ("Zectium" ).setPriorityPrefix(3).put(G_INGOT_ORES),
Draconic = deprecated("Draconic" ).setPriorityPrefix(2).put(G_DUST),
InfusedTeslatite = unused ("InfusedTeslatite" ).setPriorityPrefix(2).put(G_DUST), // 1 Redstone + 1 Teslatite/Nikolite = 1 Infused
Teslatite = unused ("InfusedTeslatite" ).setPriorityPrefix(2).put(G_DUST).setLocal("Teslatite"), // 1 Redstone + 1 Nikolite = 1 Teslatite; and 8 Teslatite + 1 Gold = 1 Purple Alloy;
IrridantUranium = unused ("Irridant Uranium" ).setPriorityPrefix(3).put(G_INGOT),
IrridantReinforced = unused ("IrridantReinforced" ).setPriorityPrefix(3).put(G_INGOT),
IronSharp = unused ("IronSharp" ).setPriorityPrefix(3).put(G_INGOT).setLocal("Sharp Iron"),
Expand Down
38 changes: 36 additions & 2 deletions src/main/java/gregapi/data/RM.java
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,9 @@ public static ItemStack stoneshapes(OreDictMaterial aMat, boolean aIsCobbleTarge
return aBlock;
}

public static boolean stonetypes(OreDictMaterial aMat, boolean aIsMatTarget, ItemStack aStone, ItemStack aCobble, ItemStack aBricks, ItemStack aCracked, ItemStack aChiseled, ItemStack aSmooth, ItemStack aTiles) {
public static boolean stonetypes(OreDictMaterial aMat, boolean aIsMatTarget, ItemStack aStone, ItemStack aCobble, ItemStack aBricks, ItemStack aCracked, ItemStack aChiseled, ItemStack aSmooth, ItemStack aTiles, ItemStack aBricks2) {

for (ItemStack tStack : ST.array(aStone, aCobble, aBricks, aCracked, aChiseled, aSmooth, aTiles)) if (ST.valid(tStack)) {
for (ItemStack tStack : ST.array(aStone, aCobble, aBricks, aCracked, aChiseled, aSmooth, aTiles, aBricks2)) if (ST.valid(tStack)) {
RM.Shredder.addRecipe1(T, 16, 16, tStack, OP.blockDust.mat(aMat, 1));
}

Expand Down Expand Up @@ -499,6 +499,9 @@ public static boolean stonetypes(OreDictMaterial aMat, boolean aIsMatTarget, Ite
CR.shaped(OP.rockGt.mat(aMat, 4), CR.DEF_REM, "h" , "X" , 'X', aBricks);
CR.shaped(OP.rockGt.mat(aMat, 4), CR.DEF_REM, "y" , "X" , 'X', aBricks);
}
if (ST.valid(aBricks2)) {
CR.shaped(ST.amount(4, aBricks2), CR.DEF_REM, "XX", "XX", 'X', aBricks);
}
}

if (ST.valid(aCracked)) {
Expand Down Expand Up @@ -587,6 +590,37 @@ public static boolean stonetypes(OreDictMaterial aMat, boolean aIsMatTarget, Ite
}
}

if (ST.valid(aBricks2)) {
CR.remout(aBricks2);
RM.generify(aBricks2, ST.make(Blocks.stonebrick, 1, 0));

if (ST.valid(aStone)) {
RM.add_smelting(aBricks2, aStone, T, F, F);
} else if (ST.valid(aSmooth)) {
RM.add_smelting(aBricks2, aSmooth, T, F, F);
}
if (ST.valid(aBricks)) {
CR.shaped(ST.amount(4, aBricks), CR.DEF_REM, "XX", "XX", 'X', aBricks2);
}
if (ST.valid(aCracked)) {
RM.Chisel .addRecipe1(T, 16, 16, aBricks2, aCracked);
RM.Hammer .addRecipe1(T, 16, 16, aBricks2, aCracked);
RM.Crusher .addRecipe1(T, 16, 16, aBricks2, aCracked);
CR.shaped(aCracked, CR.DEF_REM, "h" , "X" , 'X', aBricks2);
CR.shaped(aCracked, CR.DEF_REM, "y" , "X" , 'X', aBricks2);
} else if (ST.valid(aCobble)) {
RM.Chisel .addRecipe1(T, 16, 16, aBricks2, aCobble);
RM.Hammer .addRecipe1(T, 16, 16, aBricks2, aCobble);
RM.Crusher .addRecipe1(T, 16, 16, aBricks2, aCobble);
CR.shaped(aCobble, CR.DEF_REM, "h" , "X" , 'X', aBricks2);
CR.shaped(aCobble, CR.DEF_REM, "y" , "X" , 'X', aBricks2);
} else {
RM.Hammer .addRecipe1(T, 16, 16, aBricks2, OP.rockGt.mat(aMat, 4));
RM.Crusher .addRecipe1(T, 16, 16, aBricks2, OP.rockGt.mat(aMat, 4));
CR.shaped(OP.rockGt.mat(aMat, 4), CR.DEF_REM, "h" , "X" , 'X', aBricks2);
CR.shaped(OP.rockGt.mat(aMat, 4), CR.DEF_REM, "y" , "X" , 'X', aBricks2);
}
}
return T;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public class Compat_Recipes_Betweenlands extends CompatMods {
, ST.make(MD.BTL, "chiseledLimestone" , 1, 0)
, ST.make(MD.BTL, "polishedLimestone" , 1, 0)
, ST.make(MD.BTL, "limestoneTiles" , 1, 0)
, NI
);


Expand All @@ -113,6 +114,7 @@ public class Compat_Recipes_Betweenlands extends CompatMods {
, ST.make(MD.BTL, "chiseledBetweenstone" , 1, 0)
, NI
, ST.make(MD.BTL, "betweenstoneTiles" , 1, 0)
, NI
);


Expand All @@ -124,6 +126,7 @@ public class Compat_Recipes_Betweenlands extends CompatMods {
, ST.make(MD.BTL, "chiseledPitstone" , 1, 0)
, RM.stoneshapes(MT.STONES.Pitstone, F, ST.make(MD.BTL, "smoothPitstone" , 1, 0), ST.make(MD.BTL, "smoothPitstoneStairs" , 1, 0), ST.make(MD.BTL, "Smooth Pitstone Slab" , 1, 0), ST.make(MD.BTL, "smoothPitstoneWall" , 1, 0), ST.make(MD.BTL, "pitstonePillar" , 1, 0))
, NI
, NI
);


Expand All @@ -135,6 +138,7 @@ public class Compat_Recipes_Betweenlands extends CompatMods {
, ST.make(MD.BTL, "carvedCrag" , 1, 0)
, NI
, ST.make(MD.BTL, "cragTiles" , 1, 0)
, NI
);


Expand All @@ -146,6 +150,7 @@ public class Compat_Recipes_Betweenlands extends CompatMods {
, ST.make(MD.BTL, "carvedTempleBrick" , 1, 0)
, ST.make(MD.BTL, "smoothTempleBrick" , 1, 0)
, NI
, NI
);


Expand Down
50 changes: 36 additions & 14 deletions src/main/java/gregtech/compat/Compat_Recipes_Bluepower.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2021 GregTech-6 Team
* Copyright (c) 2023 GregTech-6 Team
*
* This file is part of GregTech.
*
Expand All @@ -19,39 +19,37 @@

package gregtech.compat;

import static gregapi.data.CS.*;

import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import gregapi.api.Abstract_Mod;
import gregapi.code.ModData;
import gregapi.compat.CompatMods;
import gregapi.data.ANY;
import gregapi.data.FL;
import gregapi.data.MD;
import gregapi.data.MT;
import gregapi.data.OP;
import gregapi.data.RM;
import gregapi.data.*;
import gregapi.oredict.OreDictMaterial;
import gregapi.util.CR;
import gregapi.util.ST;
import gregapi.util.UT;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;

import static gregapi.data.CS.*;

public class Compat_Recipes_Bluepower extends CompatMods {
public Compat_Recipes_Bluepower(ModData aMod, Abstract_Mod aGTMod) {super(aMod, aGTMod);}

@Override public void onPostLoad(FMLPostInitializationEvent aInitEvent) {OUT.println("GT_Mod: Doing BP Recipes.");
for (OreDictMaterial tMat : ANY.Iron.mToThis) RM.Press.addRecipeX(T, 16, 256, ST.array((tMat==MT.Enori?OP.plateGem:OP.plate).mat(tMat, 1), OP.foil.mat(MT.Zn, 2)), ST.make(MD.BP, "zincplate", 2, 0));

// This Table is a liability more than a useful thing. Use a less laggy Table like the one from Better Storage if you need to.
CR.remout(MD.BP, "project_table");
// The Project Table is a liability more than a useful thing. Use a less laggy Table like the one from Better Storage if you need to.
CR.remout(MD.BP, "project_table", "auto_project_table", "tiles");

CR.shaped(ST.make(MD.BP, "iron_wire" , 1, 0), CR.DEF_REV_NCC, "XXX", "X X", "XXX", 'X', OP.wireFine.dat(ANY.Fe));
CR.shaped(ST.make(MD.BP, "copper_wire" , 1, 0), CR.DEF_REV_NCC, "XXX", "X X", "XXX", 'X', OP.wireFine.dat(ANY.Cu));
CR.shaped(ST.make(MD.BP, "silicon_wafer" , 4, 0), CR.DEF_NCC, "X ", " s", 'X', OP.plateGem.dat(ANY.Si));
CR.shaped(ST.make(MD.BP, "red_doped_wafer" , 4, 0), CR.DEF_NCC, "X ", " s", 'X', OP.plateGem.dat(MT.RedstoneAlloy));
CR.shaped(ST.make(MD.BP, "blue_doped_wafer" , 4, 0), CR.DEF_NCC, "X ", " s", 'X', OP.plateGem.dat(MT.NikolineAlloy));
CR.shaped(ST.make(MD.BP, "silicon_wafer" , 4, 0), CR.DEF_NCC , "X ", " s" , 'X', OP.plateGem.dat(ANY.Si));
CR.shaped(ST.make(MD.BP, "red_doped_wafer" , 4, 0), CR.DEF_NCC , "X ", " s" , 'X', OP.plateGem.dat(MT.RedstoneAlloy));
CR.shaped(ST.make(MD.BP, "blue_doped_wafer" , 4, 0), CR.DEF_NCC , "X ", " s" , 'X', OP.plateGem.dat(MT.NikolineAlloy));

CR.shaped(ST.make(MD.BP, "tiles" , 1, 0), CR.DEF_NCC_MIR, "XY", "YX" , 'X', OP.plate.dat(MT.STONES.Basalt), 'X', OP.plate.dat(MT.STONES.Marble));
CR.shaped(ST.make(MD.BP, "circuit_table" , 1, 0), CR.DEF_NCC , "PDP", "PCP", "PWP", 'P', OD.plankAnyWood, 'C', OD.craftingChest, 'W', OD.craftingWorkBench, 'D', OP.plate.dat(MT.NikolineAlloy));

RM.biomass(ST.make(MD.BP, "indigo_flower", 16, 0));

Expand All @@ -67,6 +65,30 @@ public class Compat_Recipes_Bluepower extends CompatMods {

RM.sawing(64, 64, F, 1000, ST.make(MD.BP, "silicon_boule", 1, 0), ST.make(MD.BP, "silicon_wafer", 16, 0));


RM.stonetypes(MT.STONES.Marble, F
, ST.make(MD.BP, "marble", 1, 0)
, NI
, ST.make(MD.BP, "marble_brick", 1, 0)
, NI
, ST.make(MD.BP, "fancy_marble", 1, 0)
, ST.make(MD.BP, "basalt_paver", 1, 0)
, ST.make(MD.BP, "marble_tile", 1, 0)
, ST.make(MD.BP, "marble_brick_small", 1, 0)
);

RM.stonetypes(MT.STONES.Basalt, F
, ST.make(MD.BP, "basalt", 1, 0)
, ST.make(MD.BP, "basalt_cobble", 1, 0)
, ST.make(MD.BP, "basalt_brick", 1, 0)
, ST.make(MD.BP, "basaltbrick_cracked", 1, 0)
, ST.make(MD.BP, "fancy_basalt", 1, 0)
, ST.make(MD.BP, "marble_paver", 1, 0)
, ST.make(MD.BP, "basalt_tile", 1, 0)
, ST.make(MD.BP, "basalt_brick_small", 1, 0)
);


try {
// Remove Tungsten Block from Volcanos
((Object[])UT.Reflection.getFieldContent("com.bluepowermod.world.WorldGenVolcano", "ALTAR_BLOCKS"))[3] = Blocks.gold_block;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/gregtech/compat/Compat_Recipes_Erebus.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public class Compat_Recipes_Erebus extends CompatMods {
, NI
, RM.stoneshapes(MT.STONES.Umber, F, ST.make(MD.ERE, "umberstone", 1, 5), ST.make(MD.ERE, "umbercobbleStairs5", 1, 0), NI , NI , ST.make(MD.ERE, "umberstonePillar" , 1, 0))
, RM.stoneshapes(MT.STONES.Umber, F, ST.make(MD.ERE, "umberstone", 1, 6), ST.make(MD.ERE, "umbercobbleStairs6", 1, 0), NI , NI , NI)
, NI
);


Expand All @@ -108,6 +109,7 @@ public class Compat_Recipes_Erebus extends CompatMods {
, RM.stoneshapes(MT.STONES.Gneiss, F, ST.make(MD.ERE, "gneiss", 1, 1), ST.make(MD.ERE, "gneissStairs1", 1, 0), NI, NI, NI)
, RM.stoneshapes(MT.STONES.Gneiss, F, ST.make(MD.ERE, "gneiss", 1, 4), ST.make(MD.ERE, "gneissStairs4", 1, 0), NI, NI, NI)
, RM.stoneshapes(MT.STONES.Gneiss, F, ST.make(MD.ERE, "gneiss", 1, 5), ST.make(MD.ERE, "gneissStairs5", 1, 0), NI, NI, NI)
, NI
);


Expand Down
35 changes: 26 additions & 9 deletions src/main/java/gregtech/compat/Compat_Recipes_ProjectRed.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2019 Gregorius Techneticies
* Copyright (c) 2023 GregTech-6 Team
*
* This file is part of GregTech.
*
Expand All @@ -19,21 +19,16 @@

package gregtech.compat;

import static gregapi.data.CS.*;

import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import gregapi.api.Abstract_Mod;
import gregapi.code.ModData;
import gregapi.compat.CompatMods;
import gregapi.data.ANY;
import gregapi.data.MD;
import gregapi.data.MT;
import gregapi.data.OD;
import gregapi.data.OP;
import gregapi.data.RM;
import gregapi.data.*;
import gregapi.util.CR;
import gregapi.util.ST;

import static gregapi.data.CS.*;

public class Compat_Recipes_ProjectRed extends CompatMods {
public Compat_Recipes_ProjectRed(ModData aMod, Abstract_Mod aGTMod) {super(aMod, aGTMod);}

Expand All @@ -45,5 +40,27 @@ public class Compat_Recipes_ProjectRed extends CompatMods {
CR.shaped(ST.make(MD.PR, "projectred.core.part", 4, 13), CR.DEF_NCC, " X", "s ", 'X', OP.plateGem.dat(MT.RedstoneAlloy));

RM.sawing(64, 64, F, 1000, ST.make(MD.PR, "projectred.core.part", 1, 11), ST.make(MD.PR, "projectred.core.part", 16, 12));

RM.stonetypes(MT.STONES.Marble, F
, ST.make(MD.PR_EXPLORATION, "projectred.exploration.stone", 1, 0)
, NI
, NI
, NI
, NI
, NI
, NI
, NI
);

RM.stonetypes(MT.STONES.Basalt, F
, ST.make(MD.PR_EXPLORATION, "projectred.exploration.stone", 1, 3)
, ST.make(MD.PR_EXPLORATION, "projectred.exploration.stone", 1, 2)
, NI
, NI
, NI
, NI
, NI
, NI
);
}
}

0 comments on commit aa48749

Please sign in to comment.