blob: 6c91193832fe89227118490ced95cdfb30ec56ad (
plain)
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
|
package gregtech.api.util;
import net.minecraft.block.Block;
public class GTBlockSet {
private final GTBlockMap<Object> backing = new GTBlockMap<>();
public boolean add(Block block, byte meta) {
return backing.put(block, meta, this) != this;
}
public boolean contains(Block block, byte meta) {
return backing.get(block, meta) == this;
}
public boolean remove(Block block, byte meta) {
return backing.remove(block, meta) == this;
}
public int size() {
return backing.size();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
GTBlockSet that = (GTBlockSet) o;
return backing.equals(that.backing);
}
@Override
public int hashCode() {
return backing.hashCode();
}
}
|