-
Notifications
You must be signed in to change notification settings - Fork 46
/
Reduction.java
61 lines (49 loc) · 1.39 KB
/
Reduction.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
52
53
54
55
56
57
58
59
60
61
package net.porillo.objects;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.UUID;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Reduction {
/**
* Unique Id in DB created for this reduction
*/
private Integer uniqueID;
/**
* Unique Id of the Player who caused this reduction
*/
private Integer reductioner;
/**
* Unique Id of the associated object that corresponds to this reduction
* - Warning: furnaces may be deleted over time (this value may become invalid)
*/
private Integer reductionKey;
/**
* UUID of the Bukkit world where the reduction took place
*/
private UUID worldId;
/**
* Calculated emissions reduction value
*/
private Integer reductionValue;
/**
* Number of blocks in the tree growth, if this reduction is a tree growth
*/
private Integer numBlocks;
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
Reduction reduction = (Reduction) o;
return uniqueID.equals(reduction.uniqueID);
}
@Override
public int hashCode() {
int result = super.hashCode();
result = 31 * result + uniqueID.hashCode();
return result;
}
}