mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-19 03:39:09 +00:00
Fix #613
This commit is contained in:
1 parent
cca4710cb2
commit
199158aeee
1 file changed
+7
-5
@@ -14,6 +14,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
import forestry.core.config.Defaults;
|
||||
import forestry.core.config.ForestryItem;
|
||||
@@ -22,9 +23,11 @@ import forestry.core.proxy.Proxies;
|
||||
@Plugin(pluginID = "BC6|Transport", name = "BuildCraft 6 Transport", author = "mezz", url = Defaults.URL, unlocalizedDescription = "for.plugin.buildcraft6.description")
|
||||
public class PluginBuildCraftTransport extends ForestryPlugin {
|
||||
|
||||
private static final String BCT = "BuildCraft|Transport";
|
||||
|
||||
@Override
|
||||
public boolean isAvailable() {
|
||||
return Proxies.common.isAPILoaded("buildcraft.api.transport", "[2.0, 4.0)");
|
||||
return Proxies.common.isModLoaded(BCT);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -35,11 +38,10 @@ public class PluginBuildCraftTransport extends ForestryPlugin {
|
||||
@Optional.Method(modid = "BuildCraft|Transport")
|
||||
@Override
|
||||
protected void registerRecipes() {
|
||||
try {
|
||||
Item pipeWaterproof = (Item) Class.forName("buildcraft.BuildCraftTransport").getField("pipeWaterproof").get(null);
|
||||
|
||||
Item pipeWaterproof = GameRegistry.findItem(BCT, "pipeWaterproof");
|
||||
if (pipeWaterproof != null) {
|
||||
Proxies.common.addRecipe(new ItemStack(pipeWaterproof), "#", '#', ForestryItem.beeswax);
|
||||
} catch (Exception ex) {
|
||||
Proxies.log.fine("No BuildCraft pipe waterproof found.");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user