diff --git a/build.gradle b/build.gradle index 2d949eb..f89a6ba 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,7 @@ buildscript { apply plugin: 'forge' -version = "1.7.10-1.7.9" +version = "1.7.10-1.8.0" group= "com.jaquadro.minecraft.storagedrawers" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "StorageDrawers" diff --git a/src/com/jaquadro/minecraft/storagedrawers/integration/ThermalFoundation.java b/src/com/jaquadro/minecraft/storagedrawers/integration/ThermalFoundation.java index 6d716d9..5ddc957 100644 --- a/src/com/jaquadro/minecraft/storagedrawers/integration/ThermalFoundation.java +++ b/src/com/jaquadro/minecraft/storagedrawers/integration/ThermalFoundation.java @@ -1,8 +1,13 @@ package com.jaquadro.minecraft.storagedrawers.integration; import com.jaquadro.minecraft.storagedrawers.StorageDrawers; +import com.jaquadro.minecraft.storagedrawers.core.ModItems; import com.jaquadro.minecraft.storagedrawers.integration.thermalfoundation.CoFHSecurityProvider; import com.mojang.authlib.GameProfile; +import cpw.mods.fml.common.registry.GameRegistry; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.ShapedOreRecipe; import java.lang.reflect.Method; @@ -19,7 +24,12 @@ public class ThermalFoundation extends IntegrationModule @Override public void init () throws Throwable { - classRegistrySocial = Class.forName("cofh.core.RegistrySocial"); + try { + classRegistrySocial = Class.forName("cofh.core.RegistrySocial"); + } + catch (ClassNotFoundException e) { + classRegistrySocial = Class.forName("cofh.core.util.SocialRegistry"); + } methodPlayerHasAccess = classRegistrySocial.getDeclaredMethod("playerHasAccess", String.class, GameProfile.class); } @@ -27,6 +37,11 @@ public class ThermalFoundation extends IntegrationModule @Override public void postInit () { StorageDrawers.securityRegistry.registerProvider(new CoFHSecurityProvider(this)); + + if (StorageDrawers.config.cache.enablePersonalUpgrades) { + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.personalKey, 1, 1), "xxx", "xyx", "xxx", + 'x', "nuggetSignalum", 'y', ModItems.personalKey)); + } } public boolean playerHasAccess (String playerName, GameProfile owner) {