-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy pathCraftingFactoriesRegisterEvent.java
More file actions
38 lines (35 loc) · 1.5 KB
/
CraftingFactoriesRegisterEvent.java
File metadata and controls
38 lines (35 loc) · 1.5 KB
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
package net.minecraftforge.event;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.crafting.IConditionFactory;
import net.minecraftforge.common.crafting.IIngredientFactory;
import net.minecraftforge.common.crafting.IRecipeFactory;
import net.minecraftforge.fml.common.eventhandler.Event;
import java.util.Map;
public class CraftingFactoriesRegisterEvent extends Event {
public CraftingFactoriesRegisterEvent(Map<ResourceLocation, IConditionFactory> m1, Map<ResourceLocation, IIngredientFactory> m2, Map<ResourceLocation, IRecipeFactory> m3){
conditions=m1;
ingredients=m2;
recipes=m3;
}
private final Map<ResourceLocation, IConditionFactory> conditions;
private final Map<ResourceLocation, IIngredientFactory> ingredients;
private final Map<ResourceLocation, IRecipeFactory> recipes;
public void register(ResourceLocation name, IConditionFactory fac) {
conditions.put(name, fac);
}
public IConditionFactory unregisterC(ResourceLocation name) {
return conditions.remove(name);
}
public void register(ResourceLocation name, IRecipeFactory fac) {
recipes.put(name, fac);
}
public IRecipeFactory unregisterR(ResourceLocation name) {
return recipes.remove(name);
}
public void register(ResourceLocation name, IIngredientFactory fac) {
ingredients.put(name, fac);
}
public IIngredientFactory unregisterI(ResourceLocation name) {
return ingredients.remove(name);
}
}