Skip to content

Commit

Permalink
1.8.2 Update
Browse files Browse the repository at this point in the history
- Re-added Laser Drill integration, since Industrial Foregoing now uses JSON files for all the entries, all files are now loaded to the same directory as the default file. If you disable the integration for a mod via config, the file will be deleted on load as well

- Added NuclearCraft integration, closes #38
  • Loading branch information
JackyyTV committed Dec 30, 2018
1 parent ba1a27f commit 2be8ab1
Show file tree
Hide file tree
Showing 33 changed files with 1,295 additions and 153 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ dependencies {
deobfCompile("mcjty.theoneprobe:TheOneProbe-1.12:+") {
transitive = false
}
deobfCompile("industrial-foregoing:industrialforegoing-1.12.2:1.12.2:226") {
deobfCompile("industrial-foregoing:industrialforegoing-1.12.2:1.12.3:227") {
transitive = false
}
deobfCompile("slimeknights:TConstruct:1.12.2-2.+") {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
org.gradle.jvmargs=-Xmx4G
mc_version=1.12.2
forge_version=1.12.2-14.23.5.2796
mod_version=1.8.1
mod_version=1.8.2
mappings_version=stable_39

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
public class LaserDrillHandlerAE2 {

public static void init() {
ModUtils.addCustomLaserDrillEntryBlock(8, ModNames.AE2, "quartz_ore", 1, 0, 2);
ModUtils.addCustomLaserDrillEntryBlock(8, ModNames.AE2, "charged_quartz_ore", 1, 0, 1);
ModUtils.loadLaserDrillFile(ModNames.AE2);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
public class LaserDrillHandlerActuallyAdditions {

public static void init() {
ModUtils.addCustomLaserDrillEntryBlock(15, ModNames.AA, "block_misc", 1, 3, 6);
ModUtils.loadLaserDrillFile(ModNames.AA);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
public class LaserDrillHandlerAstralSorcery {

public static void init() {
ModUtils.addCustomLaserDrillEntryBlock(0, ModNames.AS, "blockcustomore", 1, 0, 1);
ModUtils.addCustomLaserDrillEntryBlock(11, ModNames.AS, "blockcustomore", 1, 1, 1);
ModUtils.addCustomLaserDrillEntryBlock(3, ModNames.AS, "blockcustomsandore", 1, 0, 2);
ModUtils.loadLaserDrillFile(ModNames.AS);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,7 @@
public class LaserDrillHandlerBiomesOP {

public static void init() {
ModUtils.addCustomLaserDrillEntryBlock(0, ModNames.BIOMESOP, "biome_block", 1, 0, 1);
ModUtils.addCustomLaserDrillEntryBlock(2, ModNames.BIOMESOP, "gem_ore", 1, 0, 1);
ModUtils.addCustomLaserDrillEntryBlock(14, ModNames.BIOMESOP, "gem_ore", 1, 1, 2);
ModUtils.addCustomLaserDrillEntryBlock(5, ModNames.BIOMESOP, "gem_ore", 1, 2, 2);
ModUtils.addCustomLaserDrillEntryBlock(1, ModNames.BIOMESOP, "gem_ore", 1, 3, 1);
ModUtils.addCustomLaserDrillEntryBlock(10, ModNames.BIOMESOP, "gem_ore", 1, 4, 1);
ModUtils.addCustomLaserDrillEntryBlock(9, ModNames.BIOMESOP, "gem_ore", 1, 5, 1);
ModUtils.addCustomLaserDrillEntryBlock(11, ModNames.BIOMESOP, "gem_ore", 1, 6, 2);
ModUtils.addCustomLaserDrillEntryBlock(1, ModNames.BIOMESOP, "gem_ore", 1, 7, 1);
ModUtils.loadLaserDrillFile(ModNames.BIOMESOP);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
public class LaserDrillHandlerEvilCraft {

public static void init() {
ModUtils.addCustomLaserDrillEntryBlock(15, ModNames.EVILCRAFT, "dark_ore", 1, 0, 2);
ModUtils.loadLaserDrillFile(ModNames.EVILCRAFT);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
public class LaserDrillHandlerForestry {

public static void init() {
ModUtils.addCustomLaserDrillEntryBlock(3, ModNames.FORESTRY, "resources", 1, 0, 6);
ModUtils.loadLaserDrillFile(ModNames.FORESTRY);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
public class LaserDrillHandlerMatterOverdrive {

public static void init() {
ModUtils.addCustomLaserDrillEntryBlock(3, ModNames.MATTEROVERDRIVE, "dilithium_ore", 1, 0, 2);
ModUtils.addCustomLaserDrillEntryBlock(7, ModNames.MATTEROVERDRIVE, "tritanium_ore", 1, 0, 2);
ModUtils.loadLaserDrillFile(ModNames.MATTEROVERDRIVE);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
public class LaserDrillHandlerMysticalAgriculture {

public static void init() {
ModUtils.addCustomLaserDrillEntryBlock(4, ModNames.MAG, "inferium_ore", 1, 0, 4);
ModUtils.addCustomLaserDrillEntryBlock(3, ModNames.MAG, "prosperity_ore", 1, 0, 4);
ModUtils.loadLaserDrillFile(ModNames.MAG);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package jackyy.integrationforegoing.integration.laserdrill;

import jackyy.integrationforegoing.util.ModNames;
import jackyy.integrationforegoing.util.ModUtils;

public class LaserDrillHandlerNuclearCraft {

public static void init() {
ModUtils.loadLaserDrillFile(ModNames.NUCLEARCRAFT);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
public class LaserDrillHandlerRFTools {

public static void init() {
ModUtils.addCustomLaserDrillEntryBlock(0, ModNames.RFTOOLS, "dimensional_shard_ore", 1, 0, 1);
ModUtils.addCustomLaserDrillEntryBlock(0, ModNames.RFTOOLS, "dimensional_shard_ore", 1, 1, 1);
ModUtils.addCustomLaserDrillEntryBlock(0, ModNames.RFTOOLS, "dimensional_shard_ore", 1, 2, 1);
ModUtils.loadLaserDrillFile(ModNames.RFTOOLS);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,7 @@
public class LaserDrillHandlerSilentsGems {

public static void init() {
ModUtils.addCustomLaserDrillEntryBlock(14, ModNames.SILENTSGEMS, "gemore", 1, 0, 1);
ModUtils.addCustomLaserDrillEntryBlock(14, ModNames.SILENTSGEMS, "gemore", 1, 1, 1);
ModUtils.addCustomLaserDrillEntryBlock(1, ModNames.SILENTSGEMS, "gemore", 1, 2, 1);
ModUtils.addCustomLaserDrillEntryBlock(1, ModNames.SILENTSGEMS, "gemore", 1, 3, 1);
ModUtils.addCustomLaserDrillEntryBlock(4, ModNames.SILENTSGEMS, "gemore", 1, 4, 1);
ModUtils.addCustomLaserDrillEntryBlock(5, ModNames.SILENTSGEMS, "gemore", 1, 5, 1);
ModUtils.addCustomLaserDrillEntryBlock(13, ModNames.SILENTSGEMS, "gemore", 1, 6, 1);
ModUtils.addCustomLaserDrillEntryBlock(13, ModNames.SILENTSGEMS, "gemore", 1, 7, 1);
ModUtils.addCustomLaserDrillEntryBlock(9, ModNames.SILENTSGEMS, "gemore", 1, 8, 1);
ModUtils.addCustomLaserDrillEntryBlock(11, ModNames.SILENTSGEMS, "gemore", 1, 9, 1);
ModUtils.addCustomLaserDrillEntryBlock(10, ModNames.SILENTSGEMS, "gemore", 1, 10, 1);
ModUtils.addCustomLaserDrillEntryBlock(10, ModNames.SILENTSGEMS, "gemore", 1, 11, 1);
ModUtils.addCustomLaserDrillEntryBlock(2, ModNames.SILENTSGEMS, "gemore", 1, 12, 1);
ModUtils.addCustomLaserDrillEntryBlock(6, ModNames.SILENTSGEMS, "gemore", 1, 13, 1);
ModUtils.addCustomLaserDrillEntryBlock(15, ModNames.SILENTSGEMS, "gemore", 1, 14, 1);
ModUtils.addCustomLaserDrillEntryBlock(0, ModNames.SILENTSGEMS, "gemore", 1, 15, 1);
ModUtils.addCustomLaserDrillEntryBlock(14, ModNames.SILENTSGEMS, "gemoredark", 1, 0, 1);
ModUtils.addCustomLaserDrillEntryBlock(14, ModNames.SILENTSGEMS, "gemoredark", 1, 1, 1);
ModUtils.addCustomLaserDrillEntryBlock(1, ModNames.SILENTSGEMS, "gemoredark", 1, 2, 1);
ModUtils.addCustomLaserDrillEntryBlock(1, ModNames.SILENTSGEMS, "gemoredark", 1, 3, 1);
ModUtils.addCustomLaserDrillEntryBlock(4, ModNames.SILENTSGEMS, "gemoredark", 1, 4, 1);
ModUtils.addCustomLaserDrillEntryBlock(5, ModNames.SILENTSGEMS, "gemoredark", 1, 5, 1);
ModUtils.addCustomLaserDrillEntryBlock(13, ModNames.SILENTSGEMS, "gemoredark", 1, 6, 1);
ModUtils.addCustomLaserDrillEntryBlock(13, ModNames.SILENTSGEMS, "gemoredark", 1, 7, 1);
ModUtils.addCustomLaserDrillEntryBlock(9, ModNames.SILENTSGEMS, "gemoredark", 1, 8, 1);
ModUtils.addCustomLaserDrillEntryBlock(11, ModNames.SILENTSGEMS, "gemoredark", 1, 9, 1);
ModUtils.addCustomLaserDrillEntryBlock(10, ModNames.SILENTSGEMS, "gemoredark", 1, 10, 1);
ModUtils.addCustomLaserDrillEntryBlock(10, ModNames.SILENTSGEMS, "gemoredark", 1, 11, 1);
ModUtils.addCustomLaserDrillEntryBlock(2, ModNames.SILENTSGEMS, "gemoredark", 1, 12, 1);
ModUtils.addCustomLaserDrillEntryBlock(6, ModNames.SILENTSGEMS, "gemoredark", 1, 13, 1);
ModUtils.addCustomLaserDrillEntryBlock(15, ModNames.SILENTSGEMS, "gemoredark", 1, 14, 1);
ModUtils.addCustomLaserDrillEntryBlock(0, ModNames.SILENTSGEMS, "gemoredark", 1, 15, 1);
ModUtils.addCustomLaserDrillEntryBlock(14, ModNames.SILENTSGEMS, "gemorelight", 1, 0, 1);
ModUtils.addCustomLaserDrillEntryBlock(14, ModNames.SILENTSGEMS, "gemorelight", 1, 1, 1);
ModUtils.addCustomLaserDrillEntryBlock(1, ModNames.SILENTSGEMS, "gemorelight", 1, 2, 1);
ModUtils.addCustomLaserDrillEntryBlock(1, ModNames.SILENTSGEMS, "gemorelight", 1, 3, 1);
ModUtils.addCustomLaserDrillEntryBlock(4, ModNames.SILENTSGEMS, "gemorelight", 1, 4, 1);
ModUtils.addCustomLaserDrillEntryBlock(5, ModNames.SILENTSGEMS, "gemorelight", 1, 5, 1);
ModUtils.addCustomLaserDrillEntryBlock(13, ModNames.SILENTSGEMS, "gemorelight", 1, 6, 1);
ModUtils.addCustomLaserDrillEntryBlock(13, ModNames.SILENTSGEMS, "gemorelight", 1, 7, 1);
ModUtils.addCustomLaserDrillEntryBlock(9, ModNames.SILENTSGEMS, "gemorelight", 1, 8, 1);
ModUtils.addCustomLaserDrillEntryBlock(11, ModNames.SILENTSGEMS, "gemorelight", 1, 9, 1);
ModUtils.addCustomLaserDrillEntryBlock(10, ModNames.SILENTSGEMS, "gemorelight", 1, 10, 1);
ModUtils.addCustomLaserDrillEntryBlock(10, ModNames.SILENTSGEMS, "gemorelight", 1, 11, 1);
ModUtils.addCustomLaserDrillEntryBlock(2, ModNames.SILENTSGEMS, "gemorelight", 1, 12, 1);
ModUtils.addCustomLaserDrillEntryBlock(6, ModNames.SILENTSGEMS, "gemorelight", 1, 13, 1);
ModUtils.addCustomLaserDrillEntryBlock(15, ModNames.SILENTSGEMS, "gemorelight", 1, 14, 1);
ModUtils.addCustomLaserDrillEntryBlock(0, ModNames.SILENTSGEMS, "gemorelight", 1, 15, 1);
ModUtils.addCustomLaserDrillEntryBlock(8, ModNames.SILENTSGEMS, "essenceore", 1, 0, 2);
ModUtils.addCustomLaserDrillEntryBlock(13, ModNames.SILENTSGEMS, "essenceore", 1, 1, 2);
ModUtils.loadLaserDrillFile(ModNames.SILENTSGEMS);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@
public class LaserDrillHandlerThermalFoundation {

public static void init() {
ModUtils.addCustomLaserDrillEntryBlock(3, ModNames.TF, "ore", 1, 8, 1);
ModUtils.addCustomLaserDrillEntryBlock(15, ModNames.TF, "ore_fluid", 1, 0, 2);
ModUtils.addCustomLaserDrillEntryBlock(15, ModNames.TF, "ore_fluid", 1, 1, 2);
ModUtils.addCustomLaserDrillEntryBlock(14, ModNames.TF, "ore_fluid", 1, 2, 3);
ModUtils.addCustomLaserDrillEntryBlock(4, ModNames.TF, "ore_fluid", 1, 3, 2);
ModUtils.addCustomLaserDrillEntryBlock(13, ModNames.TF, "ore_fluid", 1, 4, 1);
ModUtils.loadLaserDrillFile(ModNames.TF);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
public class CommonProxy {

public void preInit(FMLPreInitializationEvent event) {
Integrations.preInit();
Integrations.preInit(event);
}

public void init(FMLInitializationEvent event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public static class Integrations {
public boolean biomesoPlenty = true;
public boolean astralSorcery = true;
public boolean botania = true;
public boolean nuclearCraft = true;
}

public static class Misc {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ public final class ModNames {
public static final String BIOMESOP = "biomesoplenty";
public static final String AS = "astralsorcery";
public static final String BOTANIA = "botania";
public static final String NUCLEARCRAFT = "nuclearcraft";

}
22 changes: 16 additions & 6 deletions src/main/java/jackyy/integrationforegoing/util/ModUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.buuz135.industrial.api.IndustrialForegoingHelper;
import com.buuz135.industrial.api.recipe.BioReactorEntry;
import com.buuz135.industrial.api.recipe.LaserDrillEntry;
import com.buuz135.industrial.api.recipe.ProteinReactorEntry;
import jackyy.integrationforegoing.IntegrationForegoing;
import net.minecraft.block.Block;
Expand All @@ -14,6 +15,9 @@
import net.minecraftforge.fml.common.ModContainer;
import net.minecraftforge.fml.common.registry.ForgeRegistries;

import java.io.File;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Map;

public class ModUtils {
Expand Down Expand Up @@ -102,13 +106,19 @@ public static void addCustomProteinReactorEntryItem(String modid, String name, i
}
}

//TODO Generate JSON files for the entries
public static void addCustomLaserDrillEntryBlock(int laserMeta, String modid, String name, int amount, int meta, int weight) {
/*
if (ForgeRegistries.BLOCKS.getValue(new ResourceLocation(modid, name)) != null) {
IndustrialForegoingHelper.addLaserDrillEntry(new LaserDrillEntry(laserMeta, getBlockStackByName(modid, name, amount, meta), weight));
public static void loadLaserDrillFile(String fileName) {
LaserDrillEntry.addOreFile(new ResourceLocation(Reference.MODID, fileName + "_ores.json"));
}

public static void deleteExistingLaserDrillFile(File dir, String fileName) {
Path path = dir.toPath().resolve("laser_drill_ores");
if (Files.exists(path)) {
File file = new File(path.toFile(), fileName + "_ores.json");
if (!file.exists())
return;
if (file.delete())
IntegrationForegoing.logger.info("Deleted existing Laser Drill config file " + file.getName());
}
*/
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public final class Reference {

public static final String MODID = "integrationforegoing";
public static final String MODNAME = "Integration Foregoing";
public static final String VERSION = "1.12.2-1.8.1";
public static final String VERSION = "1.12.2-1.8.2";
public static final String MCVERSION = "[1.12,1.13)";
public static final String DEPENDS
= "required-after:" + IF + "@[1.12.0,);"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[
{
"item" : "actuallyadditions:block_misc:3",
"color" : 15,
"rarity" : [
{
"whitelist": "",
"blacklist": "minecraft:hell, minecraft:sky",
"depth_min": 0,
"depth_max": 255,
"weight": 6
}
]
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[
{
"item" : "appliedenergistics2:quartz_ore:0",
"color" : 8,
"rarity" : [
{
"whitelist": "",
"blacklist": "minecraft:hell, minecraft:sky",
"depth_min": 0,
"depth_max": 255,
"weight": 2
}
]
},
{
"item" : "appliedenergistics2:charged_quartz_ore:0",
"color" : 8,
"rarity" : [
{
"whitelist": "",
"blacklist": "minecraft:hell, minecraft:sky",
"depth_min": 0,
"depth_max": 255,
"weight": 1
}
]
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[
{
"item" : "astralsorcery:blockcustomore:0",
"color" : 0,
"rarity" : [
{
"whitelist": "",
"blacklist": "minecraft:hell, minecraft:sky",
"depth_min": 0,
"depth_max": 255,
"weight": 1
}
]
},
{
"item" : "astralsorcery:blockcustomore:1",
"color" : 11,
"rarity" : [
{
"whitelist": "",
"blacklist": "minecraft:hell, minecraft:sky",
"depth_min": 0,
"depth_max": 255,
"weight": 1
}
]
},
{
"item" : "astralsorcery:blockcustomsandore:0",
"color" : 3,
"rarity" : [
{
"whitelist": "",
"blacklist": "minecraft:hell, minecraft:sky",
"depth_min": 0,
"depth_max": 255,
"weight": 2
}
]
}
]
Loading

0 comments on commit 2be8ab1

Please sign in to comment.