-
Notifications
You must be signed in to change notification settings - Fork 497
/
StatementSlot.java
51 lines (41 loc) · 1 KB
/
StatementSlot.java
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 buildcraft.core.lib.gui;
import java.util.ArrayList;
import net.minecraft.util.IIcon;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import buildcraft.api.statements.IStatement;
/**
* Created by asie on 1/24/15.
*/
public abstract class StatementSlot extends AdvancedSlot {
public int slot;
public ArrayList<StatementParameterSlot> parameters = new ArrayList<StatementParameterSlot>();
public StatementSlot(GuiAdvancedInterface gui, int x, int y, int slot) {
super(gui, x, y);
this.slot = slot;
}
@Override
public String getDescription() {
IStatement stmt = getStatement();
if (stmt != null) {
return stmt.getDescription();
} else {
return "";
}
}
@SideOnly(Side.CLIENT)
@Override
public IIcon getIcon() {
IStatement stmt = getStatement();
if (stmt != null) {
return stmt.getIcon();
} else {
return null;
}
}
@Override
public boolean isDefined() {
return getStatement() != null;
}
public abstract IStatement getStatement();
}