Allow blinking onto the roof (#65)

* Allow blinking onto the roof

* swap
This commit is contained in:
miozune authored and GitHub committed 2022-04-25 15:32:07 +02:00
1 parent edc8786d79
commit da6e0c5ba0
2 files changed
+11 -3

No files matched your search

@@ -161,6 +161,7 @@ public final class Config {
"Thaumcraft:blockWarded"
};
public static float travelAnchorZoomScale = 0.2f;
public static boolean travelStaffSearchOptimize = true;
public static int enderIoRange = 8;
public static boolean enderIoMeAccessEnabled = true;
@@ -870,6 +871,11 @@ public final class Config {
"Lists the blocks that cannot be teleported through in the form 'modID:blockName'");
travelAnchorZoomScale = config.getFloat("travelAnchorZoomScale", sectionStaff.name, travelAnchorZoomScale, 0, 1,
"Set the max zoomed size of a travel anchor as an aprox. percentage of screen height");
travelStaffSearchOptimize = config.get(sectionStaff.name, "travelStaffSearchOptimize", travelStaffSearchOptimize,
"If set to true: blinking by travel staff has reduced search branch. " +
"You can now teleport onto the roof. " +
"This config is experimental, so if you encounter any strange behavior, please report to GTNH developer.")
.getBoolean(travelStaffSearchOptimize);
enderIoRange = config.get(sectionEfficiency.name, "enderIoRange", enderIoRange,
@@ -213,15 +213,17 @@ public class TravelController {
}
private boolean doBlinkAround(EntityPlayer player, Vector3d sample, boolean conserveMomentum) {
if(doBlink(player, new BlockCoord((int) Math.floor(sample.x), (int) Math.floor(sample.y) - 1, (int) Math.floor(sample.z)), conserveMomentum)) {
return true;
}
if(doBlink(player, new BlockCoord((int) Math.floor(sample.x), (int) Math.floor(sample.y), (int) Math.floor(sample.z)), conserveMomentum)) {
return true;
}
if(doBlink(player, new BlockCoord((int) Math.floor(sample.x), (int) Math.floor(sample.y) + 1, (int) Math.floor(sample.z)), conserveMomentum)) {
return true;
}
if (!Config.travelStaffSearchOptimize) {
if (doBlink(player, new BlockCoord((int) Math.floor(sample.x), (int) Math.floor(sample.y) - 1, (int) Math.floor(sample.z)), conserveMomentum)) {
return true;
}
}
return false;
}