Merge remote-tracking branch 'origin/1.12' into 1.12
This commit is contained in:
commit
b9169c5397
7 changed files with 91 additions and 34 deletions
|
@ -54,7 +54,7 @@ configurations {
|
||||||
compile.extendsFrom shade
|
compile.extendsFrom shade
|
||||||
}
|
}
|
||||||
|
|
||||||
version = "2.20.6"
|
version = "2.20.9"
|
||||||
|
|
||||||
def ENV = System.getenv()
|
def ENV = System.getenv()
|
||||||
if (ENV.BUILD_NUMBER) {
|
if (ENV.BUILD_NUMBER) {
|
||||||
|
|
|
@ -36,6 +36,9 @@ public class ConfigTechReborn {
|
||||||
@ConfigRegistry(config = "recipes", category = "ic2", key = "deduplicate", comment = "Changes a lot of recipes and hides blocks to integrate TechReborn into IC2")
|
@ConfigRegistry(config = "recipes", category = "ic2", key = "deduplicate", comment = "Changes a lot of recipes and hides blocks to integrate TechReborn into IC2")
|
||||||
public static boolean REMOVE_DUPLICATES = false;
|
public static boolean REMOVE_DUPLICATES = false;
|
||||||
|
|
||||||
|
@ConfigRegistry(config = "recipes", category = "ic2", key = "ic2_profile", comment = "Enter the ic2 profile name here (Experimental or Classic)")
|
||||||
|
public static String IC2_PROFILE = "Experimental";
|
||||||
|
|
||||||
@ConfigRegistry(config = "misc", category = "general", key = "enableGemTools", comment = "Enable Gem armor and tools")
|
@ConfigRegistry(config = "misc", category = "general", key = "enableGemTools", comment = "Enable Gem armor and tools")
|
||||||
public static boolean enableGemArmorAndTools = true;
|
public static boolean enableGemArmorAndTools = true;
|
||||||
|
|
||||||
|
|
|
@ -25,11 +25,16 @@
|
||||||
package techreborn.init;
|
package techreborn.init;
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
import techreborn.api.TechRebornAPI;
|
import techreborn.api.TechRebornAPI;
|
||||||
|
import techreborn.blocks.BlockMachineFrames;
|
||||||
import techreborn.blocks.cable.EnumCableType;
|
import techreborn.blocks.cable.EnumCableType;
|
||||||
import techreborn.config.ConfigTechReborn;
|
import techreborn.config.ConfigTechReborn;
|
||||||
|
import techreborn.itemblocks.ItemBlockMachineFrames;
|
||||||
import techreborn.items.ingredients.ItemIngots;
|
import techreborn.items.ingredients.ItemIngots;
|
||||||
import techreborn.items.ingredients.ItemParts;
|
import techreborn.items.ingredients.ItemParts;
|
||||||
|
import techreborn.items.ingredients.ItemPlates;
|
||||||
|
import techreborn.lib.ModInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Mark on 18/12/2016.
|
* Created by Mark on 18/12/2016.
|
||||||
|
@ -65,19 +70,46 @@ public enum IC2Duplicates {
|
||||||
THICK_NEUTRON_REFLECTOR(ItemParts.getPartByName("thick_neutron_reflector")),
|
THICK_NEUTRON_REFLECTOR(ItemParts.getPartByName("thick_neutron_reflector")),
|
||||||
IRIDIUM_NEUTRON_REFLECTOR(ItemParts.getPartByName("iridium_neutron_reflector")),
|
IRIDIUM_NEUTRON_REFLECTOR(ItemParts.getPartByName("iridium_neutron_reflector")),
|
||||||
SCRAP(ItemParts.getPartByName("scrap")),
|
SCRAP(ItemParts.getPartByName("scrap")),
|
||||||
FREQ_TRANSMITTER(new ItemStack(ModItems.FREQUENCY_TRANSMITTER));
|
FREQ_TRANSMITTER(new ItemStack(ModItems.FREQUENCY_TRANSMITTER)),
|
||||||
|
|
||||||
|
//Classical dedupes
|
||||||
|
ENERGY_CRYSTAL(new ItemStack(ModItems.ENERGY_CRYSTAL), true),
|
||||||
|
LAPATRON_CRYSTAL(new ItemStack(ModItems.LAPOTRONIC_CRYSTAL), true),
|
||||||
|
RE_BATTERY(new ItemStack(ModItems.RE_BATTERY), true),
|
||||||
|
REFINED_IRON(ItemIngots.getIngotByName("refined_iron"), true),
|
||||||
|
BASIC_MACHINE_FRAME(BlockMachineFrames.getFrameByName("basic"), true),
|
||||||
|
ADVANCED_MACHINE_FRAME(BlockMachineFrames.getFrameByName("advanced"), true),
|
||||||
|
CARBON_PLATE(ItemPlates.getPlateByName("carbon"), true),
|
||||||
|
ADVANCED_ALLOY(ItemPlates.getPlateByName("advanced_alloy"), true);
|
||||||
|
|
||||||
|
|
||||||
ItemStack ic2Stack;
|
ItemStack ic2Stack;
|
||||||
ItemStack trStack;
|
ItemStack trStack;
|
||||||
|
boolean classicOnly;
|
||||||
|
|
||||||
IC2Duplicates(ItemStack trStack) {
|
IC2Duplicates(ItemStack trStack) {
|
||||||
this.trStack = trStack;
|
this(trStack, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
IC2Duplicates(ItemStack ic2Stack, ItemStack trStack) {
|
IC2Duplicates(ItemStack ic2Stack, ItemStack trStack) {
|
||||||
|
this(ic2Stack, trStack, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
IC2Duplicates(ItemStack ic2Stack, ItemStack trStack, boolean classicOnly) {
|
||||||
|
Validate.notNull(trStack);
|
||||||
|
Validate.isTrue(!trStack.isEmpty());
|
||||||
|
Validate.notNull(ic2Stack);
|
||||||
|
Validate.isTrue(!ic2Stack.isEmpty());
|
||||||
this.ic2Stack = ic2Stack;
|
this.ic2Stack = ic2Stack;
|
||||||
this.trStack = trStack;
|
this.trStack = trStack;
|
||||||
|
this.classicOnly = classicOnly;
|
||||||
|
}
|
||||||
|
|
||||||
|
IC2Duplicates(ItemStack trStack, boolean classicOnly) {
|
||||||
|
Validate.notNull(trStack);
|
||||||
|
Validate.isTrue(!trStack.isEmpty());
|
||||||
|
this.trStack = trStack;
|
||||||
|
this.classicOnly = classicOnly;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean deduplicate() {
|
public static boolean deduplicate() {
|
||||||
|
@ -98,6 +130,8 @@ public enum IC2Duplicates {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIc2Stack(ItemStack ic2Stack) {
|
public void setIc2Stack(ItemStack ic2Stack) {
|
||||||
|
Validate.notNull(ic2Stack);
|
||||||
|
Validate.isTrue(!ic2Stack.isEmpty());
|
||||||
this.ic2Stack = ic2Stack;
|
this.ic2Stack = ic2Stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,10 +147,22 @@ public enum IC2Duplicates {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack getStackBasedOnConfig() {
|
public ItemStack getStackBasedOnConfig() {
|
||||||
|
//Used only for when de-duping classic only items
|
||||||
|
if(!isClassicMode() && classicOnly){
|
||||||
|
return getTrStack();
|
||||||
|
}
|
||||||
if (deduplicate()) {
|
if (deduplicate()) {
|
||||||
return getIc2Stack();
|
return getIc2Stack();
|
||||||
}
|
}
|
||||||
return getTrStack();
|
return getTrStack();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isClassicMode(){
|
||||||
|
return ConfigTechReborn.IC2_PROFILE.equals("Classic");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isClassicalDedupe(){
|
||||||
|
return deduplicate() && isClassicMode();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,7 +137,7 @@ public class ModRecipes {
|
||||||
ItemPlates.getPlateByName("RedGarnet"), 300, 4));
|
ItemPlates.getPlateByName("RedGarnet"), 300, 4));
|
||||||
RecipeHandler.addRecipe(new CompressorRecipe(OreUtil.getStackFromName("blockRedGarnet", 1),
|
RecipeHandler.addRecipe(new CompressorRecipe(OreUtil.getStackFromName("blockRedGarnet", 1),
|
||||||
ItemPlates.getPlateByName("RedGarnet", 9), 300, 4));
|
ItemPlates.getPlateByName("RedGarnet", 9), 300, 4));
|
||||||
RecipeHandler.addRecipe(new CompressorRecipe(OreUtil.getStackFromName("ingotRefinedIron", 1),
|
RecipeHandler.addRecipe(new CompressorRecipe("ingotRefinedIron",
|
||||||
ItemPlates.getPlateByName("RefinedIron"), 300, 4));
|
ItemPlates.getPlateByName("RefinedIron"), 300, 4));
|
||||||
|
|
||||||
ItemStack plate;
|
ItemStack plate;
|
||||||
|
|
|
@ -51,6 +51,31 @@ public class OreDict {
|
||||||
);
|
);
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
|
|
||||||
|
for (String type : ItemGems.types) {
|
||||||
|
if (type.equals(ModItems.META_PLACEHOLDER))
|
||||||
|
continue; //Aware of placeholders!
|
||||||
|
OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "gem_" + type), ItemGems.getGemByName(type));
|
||||||
|
boolean ignoreIt = false;
|
||||||
|
for (String ignore : plateGenIgnores)
|
||||||
|
if (type.startsWith(ignore))
|
||||||
|
ignoreIt = true;
|
||||||
|
if (!ignoreIt)
|
||||||
|
ItemPlates.registerType(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (String type : ItemIngots.types) {
|
||||||
|
if (type.equals(ModItems.META_PLACEHOLDER))
|
||||||
|
continue; //Aware of placeholders!
|
||||||
|
OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "ingot_" + type), ItemIngots.getIngotByName(type));
|
||||||
|
boolean ignoreIt = false;
|
||||||
|
for (String ignore : plateGenIgnores)
|
||||||
|
if (type.startsWith(ignore))
|
||||||
|
ignoreIt = true;
|
||||||
|
if (!ignoreIt)
|
||||||
|
ItemPlates.registerType(type);
|
||||||
|
}
|
||||||
|
|
||||||
if(TechRebornAPI.ic2Helper != null){
|
if(TechRebornAPI.ic2Helper != null){
|
||||||
TechRebornAPI.ic2Helper.initDuplicates();
|
TechRebornAPI.ic2Helper.initDuplicates();
|
||||||
}
|
}
|
||||||
|
@ -108,30 +133,6 @@ public class OreDict {
|
||||||
OreUtil.registerOre("pulpWood", ItemDusts.getDustByName("saw_dust"));
|
OreUtil.registerOre("pulpWood", ItemDusts.getDustByName("saw_dust"));
|
||||||
OreUtil.registerOre("dustAsh", ItemDusts.getDustByName("ashes"));
|
OreUtil.registerOre("dustAsh", ItemDusts.getDustByName("ashes"));
|
||||||
|
|
||||||
for (String type : ItemGems.types) {
|
|
||||||
if (type.equals(ModItems.META_PLACEHOLDER))
|
|
||||||
continue; //Aware of placeholders!
|
|
||||||
OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "gem_" + type), ItemGems.getGemByName(type));
|
|
||||||
boolean ignoreIt = false;
|
|
||||||
for (String ignore : plateGenIgnores)
|
|
||||||
if (type.startsWith(ignore))
|
|
||||||
ignoreIt = true;
|
|
||||||
if (!ignoreIt)
|
|
||||||
ItemPlates.registerType(type);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (String type : ItemIngots.types) {
|
|
||||||
if (type.equals(ModItems.META_PLACEHOLDER))
|
|
||||||
continue; //Aware of placeholders!
|
|
||||||
OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "ingot_" + type), ItemIngots.getIngotByName(type));
|
|
||||||
boolean ignoreIt = false;
|
|
||||||
for (String ignore : plateGenIgnores)
|
|
||||||
if (type.startsWith(ignore))
|
|
||||||
ignoreIt = true;
|
|
||||||
if (!ignoreIt)
|
|
||||||
ItemPlates.registerType(type);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (String type : ItemPlates.types) {
|
for (String type : ItemPlates.types) {
|
||||||
if (type.equals(ModItems.META_PLACEHOLDER))
|
if (type.equals(ModItems.META_PLACEHOLDER))
|
||||||
continue; //Aware of placeholders!
|
continue; //Aware of placeholders!
|
||||||
|
|
|
@ -202,11 +202,15 @@ public class CraftingTableRecipes extends RecipeMethods {
|
||||||
|
|
||||||
//Parts
|
//Parts
|
||||||
registerShaped(getMaterial("iridium_alloy", Type.INGOT), "IAI", "ADA", "IAI", 'I', "ingotIridium", 'D', "dustDiamond", 'A', "plateAdvancedAlloy");
|
registerShaped(getMaterial("iridium_alloy", Type.INGOT), "IAI", "ADA", "IAI", 'I', "ingotIridium", 'D', "dustDiamond", 'A', "plateAdvancedAlloy");
|
||||||
registerShaped(getStack(ModItems.RE_BATTERY), " W ", "TRT", "TRT", 'T', "ingotTin", 'R', "dustRedstone", 'W', getStack(IC2Duplicates.CABLE_ICOPPER));
|
|
||||||
registerShaped(getStack(ModItems.LITHIUM_BATTERY), " C ", "PFP", "PFP", 'F', getCell("lithium"), 'P', "plateAluminum", 'C', getStack(IC2Duplicates.CABLE_IGOLD));
|
registerShaped(getStack(ModItems.LITHIUM_BATTERY), " C ", "PFP", "PFP", 'F', getCell("lithium"), 'P', "plateAluminum", 'C', getStack(IC2Duplicates.CABLE_IGOLD));
|
||||||
|
|
||||||
|
if(!IC2Duplicates.isClassicalDedupe()){
|
||||||
|
registerShaped(getStack(ModItems.ENERGY_CRYSTAL), "RRR", "RDR", "RRR", 'R', "dustRedstone", 'D', "gemDiamond");
|
||||||
|
registerShaped(getStack(ModItems.LAPOTRONIC_CRYSTAL), "LCL", "LEL", "LCL", 'L', "dyeBlue", 'E', "energyCrystal", 'C', "circuitBasic");
|
||||||
|
registerShaped(getStack(ModItems.RE_BATTERY), " W ", "TRT", "TRT", 'T', "ingotTin", 'R', "dustRedstone", 'W', getStack(IC2Duplicates.CABLE_ICOPPER));
|
||||||
|
}
|
||||||
|
|
||||||
registerShaped(getStack(ModItems.LITHIUM_BATTERY_PACK), "BCB", "BPB", "B B", 'B', getStack(ModItems.LITHIUM_BATTERY), 'P', "plateAluminum", 'C', "circuitAdvanced");
|
registerShaped(getStack(ModItems.LITHIUM_BATTERY_PACK), "BCB", "BPB", "B B", 'B', getStack(ModItems.LITHIUM_BATTERY), 'P', "plateAluminum", 'C', "circuitAdvanced");
|
||||||
registerShaped(getStack(ModItems.ENERGY_CRYSTAL), "RRR", "RDR", "RRR", 'R', "dustRedstone", 'D', "gemDiamond");
|
|
||||||
registerShaped(getStack(ModItems.LAPOTRONIC_CRYSTAL), "LCL", "LEL", "LCL", 'L', "dyeBlue", 'E', "energyCrystal", 'C', "circuitBasic");
|
|
||||||
registerShaped(getStack(ModItems.LAPOTRONIC_ORB), "LLL", "LPL", "LLL", 'L', "lapotronCrystal", 'P', "plateIridiumAlloy");
|
registerShaped(getStack(ModItems.LAPOTRONIC_ORB), "LLL", "LPL", "LLL", 'L', "lapotronCrystal", 'P', "plateIridiumAlloy");
|
||||||
registerShaped(getStack(ModItems.SCRAP_BOX), "SSS", "SSS", "SSS", 'S', getMaterial("scrap", Type.PART));
|
registerShaped(getStack(ModItems.SCRAP_BOX), "SSS", "SSS", "SSS", 'S', getMaterial("scrap", Type.PART));
|
||||||
registerShaped(getMaterial("machine", Type.MACHINE_FRAME), "AAA", "A A", "AAA", 'A', "ingotRefinedIron");
|
registerShaped(getMaterial("machine", Type.MACHINE_FRAME), "AAA", "A A", "AAA", 'A', "ingotRefinedIron");
|
||||||
|
|
|
@ -38,7 +38,9 @@ public class SmeltingRecipes extends RecipeMethods {
|
||||||
public static void init() {
|
public static void init() {
|
||||||
|
|
||||||
register(getMaterial("sap", Type.PART), getMaterial("rubber", Type.PART));
|
register(getMaterial("sap", Type.PART), getMaterial("rubber", Type.PART));
|
||||||
register(getStack(Items.IRON_INGOT), getMaterial("refined_iron", Type.INGOT));
|
if(!IC2Duplicates.isClassicalDedupe()){
|
||||||
|
register(getStack(Items.IRON_INGOT), getMaterial("refined_iron", Type.INGOT));
|
||||||
|
}
|
||||||
register(BlockOre2.getOreByName("copper"), getMaterial("copper", Type.INGOT));
|
register(BlockOre2.getOreByName("copper"), getMaterial("copper", Type.INGOT));
|
||||||
register(BlockOre2.getOreByName("tin"), getMaterial("tin", Type.INGOT));
|
register(BlockOre2.getOreByName("tin"), getMaterial("tin", Type.INGOT));
|
||||||
register(BlockOre.getOreByName("silver"), getMaterial("silver", Type.INGOT));
|
register(BlockOre.getOreByName("silver"), getMaterial("silver", Type.INGOT));
|
||||||
|
@ -46,6 +48,7 @@ public class SmeltingRecipes extends RecipeMethods {
|
||||||
register(BlockOre.getOreByName("sheldonite"), getMaterial("platinum", Type.INGOT));
|
register(BlockOre.getOreByName("sheldonite"), getMaterial("platinum", Type.INGOT));
|
||||||
register(IC2Duplicates.MIXED_METAL.getStackBasedOnConfig(), getMaterial("advanced_alloy", Type.INGOT));
|
register(IC2Duplicates.MIXED_METAL.getStackBasedOnConfig(), getMaterial("advanced_alloy", Type.INGOT));
|
||||||
|
|
||||||
|
|
||||||
// Dust smelting
|
// Dust smelting
|
||||||
register(getMaterial("iron", Type.DUST), getStack(Items.IRON_INGOT));
|
register(getMaterial("iron", Type.DUST), getStack(Items.IRON_INGOT));
|
||||||
register(getMaterial("gold", Type.DUST), getStack(Items.GOLD_INGOT));
|
register(getMaterial("gold", Type.DUST), getStack(Items.GOLD_INGOT));
|
||||||
|
|
Loading…
Reference in a new issue