added config to disable crops

This commit is contained in:
Blood-Asp 2015-11-01 01:57:09 +01:00
parent 97afccb0c3
commit bc86770624
2 changed files with 5 additions and 2 deletions

View file

@ -25,7 +25,8 @@ public enum ConfigCategories {
disabledrecipes,
recipereplacements,
storageblockcrafting,
storageblockdecrafting;
storageblockdecrafting,
crops;
}
public enum Machines {

View file

@ -1,5 +1,6 @@
package gregtech.api.util;
import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
import gregtech.api.enums.Materials;
@ -78,10 +79,11 @@ public class GT_BaseCrop extends CropCard {
mStats[4] = aStatWeed;
mAttributes = aAttributes;
mBlock = aBlock;
if(GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.crops, aCropName, true)){
if (!Crops.instance.registerCrop(this, aID))
throw new GT_ItsNotMyFaultException("Make sure the Crop ID is valid!");
if (aBaseSeed != null) Crops.instance.registerBaseSeed(aBaseSeed, this, 1, 1, 1, 1);
sCropList.add(this);
sCropList.add(this);}
}
}