mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-18 19:39:14 +00:00
Limit backwards teleport check
This commit is contained in:
1 parent
f1978a6a15
commit
58e8bf712c
1 file changed
+3
-1
@@ -365,12 +365,14 @@ public class TravelController {
|
||||
}
|
||||
|
||||
double distanceIncrement = -2;
|
||||
int maxIter = Math.min(8, (int) teleDistance / 2);
|
||||
// Special case: if the targeted block is too close, we'll try to teleport through it.
|
||||
if (teleDistance < 4) {
|
||||
distanceIncrement = 0.5;
|
||||
maxIter = 32;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 32; i++) {
|
||||
for (int i = 0; i < maxIter; i++) {
|
||||
teleDistance += distanceIncrement;
|
||||
|
||||
sample.set(look);
|
||||
|
||||
Reference in new issue
Block a user