-
-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy pathBellows.java
More file actions
40 lines (33 loc) · 1.3 KB
/
Bellows.java
File metadata and controls
40 lines (33 loc) · 1.3 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
package com.blamejared.compat.betterwithmods;
import betterwithmods.common.registry.BellowsManager;
import betterwithmods.util.item.Stack;
import betterwithmods.util.item.StackMap;
import com.blamejared.ModTweaker;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.utils.BaseMapAddition;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IItemStack;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
import java.util.Map;
@ZenClass("mods.betterwithmods.Bellows")
@ModOnly("betterwithmods")
@ZenRegister
public class Bellows {
@ZenMethod
public static void set(IItemStack stack, float value) {
StackMap<Float> map = new StackMap<>(1.0f);
map.put(new Stack(InputHelper.toStack(stack)), value);
ModTweaker.LATE_ADDITIONS.add(new Set(map));
}
public static class Set extends BaseMapAddition<Stack, Float> {
protected Set(StackMap<Float> map) {
super("Set Bellows Item Weight", BellowsManager.bellowing, map);
}
@Override
protected String getRecipeInfo(Map.Entry<Stack, Float> recipe) {
return recipe.getKey().toString() + " -> " + recipe.getValue();
}
}
}