blob: 83c47603f59e0eb6b07d46b7f0a7e3abdf361cc9 (
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
package galacticgreg.api;
import net.minecraft.util.Vec3;
import galacticgreg.api.Enums.TargetBlockPosition;
/**
* Structural information container. Holds X/Y/Z and block/meta information
*/
public class StructureInformation {
private final Vec3 _mCoordinates;
private final TargetBlockPosition _mBlockPosition;
private final BlockMetaComb _mBlockMetaComb;
public TargetBlockPosition getBlockPosition() {
return _mBlockPosition;
}
public int getX() {
return (int) Math.round(_mCoordinates.xCoord);
}
public int getY() {
return (int) Math.round(_mCoordinates.yCoord);
}
public int getZ() {
return (int) Math.round(_mCoordinates.zCoord);
}
public BlockMetaComb getBlock() {
return _mBlockMetaComb;
}
/**
* Init StructureInfo only with Coords and block position
*
* @param pCoordinates The coords in question
* @param pPosition The position-enum value
*/
public StructureInformation(Vec3 pCoordinates, TargetBlockPosition pPosition) {
this(pCoordinates, pPosition, null);
}
/**
* Init StructureInfo with Coords, block position and a populated block/meta info
*
* @param pCoordinates The coords in question
* @param pPosition The position-enum value
* @param pTargetBlock The target block in question
*/
public StructureInformation(Vec3 pCoordinates, TargetBlockPosition pPosition, BlockMetaComb pTargetBlock) {
_mCoordinates = pCoordinates;
_mBlockPosition = pPosition;
_mBlockMetaComb = pTargetBlock;
}
}
|