-
-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy pathTurntable.java
More file actions
51 lines (41 loc) · 1.6 KB
/
Turntable.java
File metadata and controls
51 lines (41 loc) · 1.6 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
39
40
41
42
43
44
45
46
47
48
49
50
51
package com.blamejared.compat.betterwithmods;
import betterwithmods.common.BWMRecipes;
import betterwithmods.common.BWRegistry;
import com.blamejared.compat.betterwithmods.base.blockrecipes.TurntableBuilder;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import crafttweaker.api.minecraft.CraftTweakerMC;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
@ZenClass("mods.betterwithmods.Turntable")
@ModOnly("betterwithmods")
@ZenRegister
public class Turntable {
public static TurntableBuilder INSTANCE = new TurntableBuilder(() -> BWRegistry.TURNTABLE, "Turntable");
@ZenMethod
public static TurntableBuilder builder() {
return INSTANCE;
}
@ZenMethod
public static void add(IIngredient inputBlock, IItemStack[] additionalOutput) {
builder().buildRecipe(inputBlock, additionalOutput).build();
}
@ZenMethod
public static void add(IIngredient inputBlock, IItemStack productState, IItemStack[] additionalOutput) {
builder().buildRecipe(inputBlock, additionalOutput).setProductState(productState).build();
}
@ZenMethod
public static void remove(IItemStack input) {
INSTANCE.removeRecipe(input);
}
@ZenMethod
public static void removeByProductState(IItemStack output) {
INSTANCE.removeRecipe(BWMRecipes.getStateFromStack(CraftTweakerMC.getItemStack(output)));
}
@ZenMethod
public static void removeAll() {
builder().removeAll();
}
}