mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-26 23:03:18 +00:00
Use ForestryPlugin annotation to discover plugins
This commit is contained in:
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;
|
||||
|
||||
Reference in new issue
Block a user