blob: a1f085c46278475a5b9d6bf6d087900a6046571e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/*
* Roughly Enough Items by Danielshe.
* Licensed under the MIT License.
*/
package me.shedaniel.rei.plugin;
import me.shedaniel.rei.RoughlyEnoughItemsCore;
import me.shedaniel.rei.api.PluginDisabler;
import me.shedaniel.rei.api.PluginFunction;
import me.shedaniel.rei.api.REIPluginEntry;
import me.shedaniel.rei.api.RecipeHelper;
import me.shedaniel.rei.plugin.autocrafting.AutoCraftingTableHandler;
import net.minecraft.util.Identifier;
public class DefaultAutoCraftingPlugin implements REIPluginEntry {
public static final Identifier PLUGIN = new Identifier("roughlyenoughitems", "default_auto_crafting_plugin");
@Override
public Identifier getPluginIdentifier() {
return PLUGIN;
}
@Override
public void onFirstLoad(PluginDisabler pluginDisabler) {
if (!RoughlyEnoughItemsCore.getConfigManager().getConfig().loadDefaultPlugin) {
pluginDisabler.disablePluginFunction(PLUGIN, PluginFunction.REGISTER_ITEMS);
pluginDisabler.disablePluginFunction(PLUGIN, PluginFunction.REGISTER_CATEGORIES);
pluginDisabler.disablePluginFunction(PLUGIN, PluginFunction.REGISTER_RECIPE_DISPLAYS);
pluginDisabler.disablePluginFunction(PLUGIN, PluginFunction.REGISTER_OTHERS);
}
}
@Override
public void registerOthers(RecipeHelper recipeHelper) {
recipeHelper.registerAutoCraftingHandler(new AutoCraftingTableHandler());
}
}
|