-
Notifications
You must be signed in to change notification settings - Fork 211
Expand file tree
/
Copy pathDustProperty.java
More file actions
54 lines (44 loc) · 1.37 KB
/
Copy pathDustProperty.java
File metadata and controls
54 lines (44 loc) · 1.37 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
54
package gregtech.api.unification.material.properties;
public class DustProperty implements IMaterialProperty {
/**
* Tool level needed to harvest block of this Material.
* <p>
* Default: 2 (Iron).
*/
private int harvestLevel;
/**
* Burn time of this Material when used as fuel in Furnace smelting.
* Zero or negative value indicates that this Material cannot be used as fuel.
* <p>
* Default: 0.
*/
private int burnTime;
public DustProperty(int harvestLevel, int burnTime) {
this.harvestLevel = harvestLevel;
this.burnTime = burnTime;
}
/**
* Default property constructor.
*/
public DustProperty() {
this(2, 0);
}
public DustProperty setHarvestLevel(int harvestLevel) {
if (harvestLevel <= 0) throw new IllegalArgumentException("Harvest Level must be greater than zero!");
this.harvestLevel = harvestLevel;
return this;
}
public int getHarvestLevel() {
return this.harvestLevel;
}
public DustProperty setBurnTime(int burnTime) {
if (burnTime < 0) throw new IllegalArgumentException("Burn Time cannot be negative!");
this.burnTime = burnTime;
return this;
}
public int getBurnTime() {
return burnTime;
}
@Override
public void verifyProperty(MaterialProperties properties) {}
}