You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Called when a collision occurs between two blocks
39
+
* @param hitBlockPos the block that was hit (the block this callback is on)
40
+
* @param otherHitBlockPos the other block that was hit (if the other body is a sub-level)
41
+
* @param impactPosition the impact position, in the plot of the sub-level that was hit (or in global coordinates if a sub-level does not contain the block)
42
+
* @param impactVelocity the velocity of the impact along the normal
thrownewIllegalArgumentException("pos1 does not fall within the plot of the first sub-level in block-coordinates! Double check your coordinate spaces.");
18
+
}
19
+
} else {
20
+
if (container.inBounds(pos1)) {
21
+
thrownewIllegalArgumentException("the first body of this constraint is not a sub-level, but the first position is in the plotgrid! Double check your coordinate spaces.");
22
+
}
23
+
}
24
+
25
+
if (bodyBinstanceoffinalServerSubLevelsubLevel) {
26
+
if (!subLevel.getPlot().contains(pos2)) {
27
+
thrownewIllegalArgumentException("pos2 does not fall within the plot of the second sub-level in block-coordinates! Double check your coordinate spaces.");
28
+
}
29
+
} else {
30
+
if (container.inBounds(pos2)) {
31
+
thrownewIllegalArgumentException("the second body of this constraint is not a sub-level, but the second position is in the plotgrid! Double check your coordinate spaces.");
32
+
}
33
+
}
34
+
}
35
+
36
+
/**
37
+
* Validates that this constraint can be added
38
+
*
39
+
* @param container the sub-level container the constraint is being applied in
40
+
* @param bodyA the first body the constraint is being applied to
41
+
* @param bodyB the first second the constraint is being applied to
0 commit comments