blob: a87fba4be06e7ba535b1afb571b89ea97b91ad6d (
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
40
41
42
43
44
45
|
package net.cshift.transit.basic;
import java.util.*;
import net.cshift.transit.network.system.*;
import net.minecraft.block.entity.*;
public abstract class AbstractNode extends BlockEntity implements INode {
public AbstractNode(BlockEntityType<?> type) {
super(type);
}
HashMap<String, Object> data = new HashMap<String, Object>();
ArrayList<Connection> connections = new ArrayList<Connection>(0);
@Override
public abstract boolean hasGroup(String groupID);
@Override
public ISystem getSystem() {
return null;
}
@Override
public Object getData(String groupID) {
return data.get(groupID);
}
@Override
public void setData(Object dat, String groupID) {
data.put(groupID, dat);
}
@Override
public Connection[] getConnections() {
return (Connection[]) connections.toArray();
}
@Override
public int connectionCount() {
return connections.size();
}
}
|