Use ForestryPlugin annotation to discover plugins

This commit is contained in:
mezz committed 2016-02-25 04:17:33 -08:00
1 parent c6ab58de22
commit 65436a4e70
41 files changed
+721 -560

No files matched your search

@@ -20,9 +20,10 @@ import net.minecraft.world.World;
import forestry.api.arboriculture.ITree;
import forestry.api.arboriculture.TreeManager;
import forestry.api.core.ForestryAPI;
import forestry.api.genetics.IIndividual;
import forestry.core.utils.GeneticsUtil;
import forestry.plugins.PluginManager;
import forestry.plugins.ForestryPluginUids;
public class FarmableVanillaSapling extends FarmableGenericSapling {
@@ -32,7 +33,7 @@ public class FarmableVanillaSapling extends FarmableGenericSapling {
@Override
public boolean plantSaplingAt(EntityPlayer player, ItemStack germling, World world, BlockPos pos) {
if (PluginManager.Module.ARBORICULTURE.isEnabled()) {
if (ForestryAPI.enabledPlugins.contains(ForestryPluginUids.ARBORICULTURE)) {
IIndividual tree = GeneticsUtil.getGeneticEquivalent(germling);
if (!(tree instanceof ITree)) {
return false;