-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMetal.java
More file actions
53 lines (43 loc) · 1.07 KB
/
Metal.java
File metadata and controls
53 lines (43 loc) · 1.07 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
52
53
package LiquidMetals;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraftforge.liquids.LiquidStack;
import net.minecraftforge.oredict.OreDictionary;
public class Metal {
private String prefix;
private ItemStack item;
private int amount;
private String oreName = "";
public Metal(String prefix, ItemStack item, int amount/*amount of liquid to equal one of the itemstack*/) {
this.prefix = prefix;
this.item = item;
this.amount = amount;
}
public Metal(String prefix, String oreDictName, int amount/*amount of liquid to equal one of the itemstack*/) {
this.prefix = prefix;
this.amount = amount;
this.oreName = oreDictName;
this.item = null;
}
public String getPrefix() {
return prefix;
}
public ItemStack getItem() {
return item;
}
public int getAmount() {
return amount;
}
public void updateLiquid() {
if(oreName.equals("")) {
return;
}
ArrayList temp = OreDictionary.getOres(oreName);
if(temp.size() > 0) {
item = (ItemStack) temp.get(0);
} else {
item = null;
}
}
}