mirror of
https://github.com/GTNewHorizons/StorageDrawers.git
synced 2026-11-13 17:04:15 +00:00
Thermal expansion integration; less pack support
This commit is contained in:
1 parent
fbe6dc679e
commit
807ca1ea2e
4 files changed
+75
No files matched your search
@@ -180,3 +180,4 @@ storageDrawers.config.integration.enableWaila=Enable WAILA Integration
|
||||
storageDrawers.config.integration.enableThaumcraft=Enable Thaumcraft Integration
|
||||
storageDrawers.config.integration.enableMineTweaker=Enable MineTweaker Integration
|
||||
storageDrawers.config.integration.enableRefinedRelocation=Enable Refined Relocation Integration
|
||||
storageDrawers.config.integration.enableThermalExpansion=Enable Thermal Expansion Integration
|
||||
@@ -73,6 +73,7 @@ public class ConfigManager
|
||||
public boolean enableThaumcraftIntegration;
|
||||
public boolean enableMineTweakerIntegration;
|
||||
public boolean enableRefinedRelocationIntegration;
|
||||
public boolean enableThermalExpansionIntegration;
|
||||
public boolean enableTape;
|
||||
public boolean enableFallbackRecipes;
|
||||
public boolean invertShift;
|
||||
@@ -250,6 +251,7 @@ public class ConfigManager
|
||||
cache.enableThaumcraftIntegration = config.get(sectionIntegration.getQualifiedName(), "enableThaumcraft", true).setLanguageKey(LANG_PREFIX + "integration.enableThaumcraft").setRequiresMcRestart(true).getBoolean();
|
||||
cache.enableMineTweakerIntegration = config.get(sectionIntegration.getQualifiedName(), "enableMineTweaker", true).setLanguageKey(LANG_PREFIX + "integration.enableMineTweaker").setRequiresMcRestart(true).getBoolean();
|
||||
cache.enableRefinedRelocationIntegration = config.get(sectionIntegration.getQualifiedName(), "enableRefinedRelocation", true).setLanguageKey(LANG_PREFIX + "integration.enableRefinedRelocation").setRequiresMcRestart(true).getBoolean();
|
||||
cache.enableThermalExpansionIntegration = config.get(sectionIntegration.getQualifiedName(), "enableThermalExpansion", true).setLanguageKey(LANG_PREFIX + "integration.enableThermalExpansion").setRequiresMcRestart(true).getBoolean();
|
||||
|
||||
config.get(sectionBlocksFullDrawers1x1.getQualifiedName(), "enabled", true).setLanguageKey(LANG_PREFIX + "prop.enabled").setRequiresMcRestart(true);
|
||||
config.get(sectionBlocksFullDrawers1x1.getQualifiedName(), "baseStorage", 32).setLanguageKey(LANG_PREFIX + "prop.baseStorage").setRequiresWorldRestart(true);
|
||||
|
||||
@@ -28,6 +28,8 @@ public class IntegrationRegistry
|
||||
reg.add(new RefinedRelocation());
|
||||
if (Loader.isModLoaded("NotEnoughItems"))
|
||||
reg.add(new NotEnoughItems());
|
||||
if (Loader.isModLoaded("ThermalExpansion") && StorageDrawers.config.cache.enableThermalExpansionIntegration)
|
||||
reg.add(new ThermalExpansion());
|
||||
}
|
||||
|
||||
private IntegrationRegistry () {
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.integration;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.IPackBlock;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.IPackDataResolver;
|
||||
import com.jaquadro.minecraft.storagedrawers.core.ModBlocks;
|
||||
import com.jaquadro.minecraft.storagedrawers.core.ModItems;
|
||||
import cpw.mods.fml.common.registry.GameData;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
public class ThermalExpansion extends IntegrationModule
|
||||
{
|
||||
private static final String MOD_ID = "ThermalExpansion";
|
||||
|
||||
static Class clSawmillManager;
|
||||
static Class clPulverizerManager;
|
||||
static Method mtSawmillAddRecipe;
|
||||
static Method mtPulverizerAddRecipe;
|
||||
|
||||
static ItemStack itemSawdust;
|
||||
|
||||
@Override
|
||||
public void init () throws Throwable {
|
||||
clSawmillManager = Class.forName("cofh.thermalexpansion.util.crafting.SawmillManager");
|
||||
clPulverizerManager = Class.forName("cofh.thermalexpansion.util.crafting.PulverizerManager");
|
||||
|
||||
mtSawmillAddRecipe = clSawmillManager.getMethod("addRecipe", int.class, ItemStack.class, ItemStack.class, ItemStack.class, int.class);
|
||||
mtPulverizerAddRecipe = clSawmillManager.getMethod("addRecipe", int.class, ItemStack.class, ItemStack.class, ItemStack.class, int.class);
|
||||
|
||||
Item itemMaterial = GameData.getItemRegistry().getObject(MOD_ID + ":material");
|
||||
itemSawdust = new ItemStack(itemMaterial, 1, 512);
|
||||
|
||||
for (int i = 0; i < 6; i++) {
|
||||
mtSawmillAddRecipe.invoke(null, 2400, new ItemStack(ModBlocks.fullDrawers1, 1, i), new ItemStack(Blocks.planks, 6, i), itemSawdust, 100);
|
||||
mtSawmillAddRecipe.invoke(null, 2400, new ItemStack(ModBlocks.fullDrawers2, 1, i), new ItemStack(Blocks.planks, 7, i), itemSawdust, 100);
|
||||
mtSawmillAddRecipe.invoke(null, 2400, new ItemStack(ModBlocks.fullDrawers4, 1, i), new ItemStack(Blocks.planks, 5, i), itemSawdust, 100);
|
||||
mtSawmillAddRecipe.invoke(null, 2400, new ItemStack(ModBlocks.halfDrawers2, 1, i), new ItemStack(Blocks.planks, 3, i), itemSawdust, 100);
|
||||
mtSawmillAddRecipe.invoke(null, 2400, new ItemStack(ModBlocks.halfDrawers4, 1, i), new ItemStack(Blocks.planks, 2, i), itemSawdust, 100);
|
||||
mtSawmillAddRecipe.invoke(null, 2400, new ItemStack(ModBlocks.trim, 1, i), new ItemStack(Blocks.planks, 5, i), itemSawdust, 100);
|
||||
}
|
||||
|
||||
itemMaterial = GameData.getItemRegistry().getObject("ThermalFoundation:material");
|
||||
|
||||
mtPulverizerAddRecipe.invoke(null, 2400, new ItemStack(ModItems.upgrade, 1, 2), new ItemStack(itemMaterial, 2, 0), itemSawdust, 100);
|
||||
mtPulverizerAddRecipe.invoke(null, 2400, new ItemStack(ModItems.upgrade, 1, 3), new ItemStack(itemMaterial, 2, 1), itemSawdust, 100);
|
||||
mtPulverizerAddRecipe.invoke(null, 2400, new ItemStack(ModItems.upgrade, 1, 4), new ItemStack(itemMaterial, 2, 4), itemSawdust, 100);
|
||||
mtPulverizerAddRecipe.invoke(null, 2400, new ItemStack(ModItems.upgrade, 1, 5), new ItemStack(Items.diamond, 2), itemSawdust, 100);
|
||||
mtPulverizerAddRecipe.invoke(null, 2400, new ItemStack(ModItems.upgrade, 1, 6), new ItemStack(Items.emerald, 2), itemSawdust, 100);
|
||||
|
||||
mtPulverizerAddRecipe.invoke(null, 2400, new ItemStack(ModItems.upgradeStatus, 1, 1), new ItemStack(Items.redstone, 2), itemSawdust, 100);
|
||||
mtPulverizerAddRecipe.invoke(null, 2400, new ItemStack(ModItems.upgradeStatus, 1, 2), new ItemStack(Items.quartz, 2), itemSawdust, 100);
|
||||
|
||||
mtPulverizerAddRecipe.invoke(null, 2400, new ItemStack(ModItems.upgradeVoid, 1, 1), new ItemStack(itemMaterial, 2, 4), itemSawdust, 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit () {
|
||||
|
||||
}
|
||||
|
||||
/*public static void registerPackBlock (Block block, IPackBlock packBlock) {
|
||||
IPackDataResolver resolver = packBlock.getDataResolver();
|
||||
if (resolver == null)
|
||||
return;
|
||||
}*/
|
||||
}
|
||||
Reference in new issue
Block a user