22
22
import baritone .api .pathing .goals .Goal ;
23
23
import baritone .api .pathing .movement .ActionCosts ;
24
24
import baritone .api .utils .BetterBlockPos ;
25
+ import baritone .api .utils .SettingsUtil ;
25
26
import baritone .pathing .calc .openset .BinaryHeapOpenSet ;
26
27
import baritone .pathing .movement .CalculationContext ;
27
28
import baritone .pathing .movement .Moves ;
@@ -124,7 +125,11 @@ protected Optional<IPath> calculate0(long primaryTimeout, long failureTimeout) {
124
125
if (actionCost <= 0 || Double .isNaN (actionCost )) {
125
126
throw new IllegalStateException (String .format (
126
127
"%s from %s %s %s calculated implausible cost %s" ,
127
- moves , currentNode .x , currentNode .y , currentNode .z , actionCost ));
128
+ moves ,
129
+ SettingsUtil .maybeCensor (currentNode .x ),
130
+ SettingsUtil .maybeCensor (currentNode .y ),
131
+ SettingsUtil .maybeCensor (currentNode .z ),
132
+ actionCost ));
128
133
}
129
134
// check destination after verifying it's not COST_INF -- some movements return a static IMPOSSIBLE object with COST_INF and destination being 0,0,0 to avoid allocating a new result for every failed calculation
130
135
if (moves .dynamicXZ && !worldBorder .entirelyContains (res .x , res .z )) { // see issue #218
@@ -133,14 +138,24 @@ protected Optional<IPath> calculate0(long primaryTimeout, long failureTimeout) {
133
138
if (!moves .dynamicXZ && (res .x != newX || res .z != newZ )) {
134
139
throw new IllegalStateException (String .format (
135
140
"%s from %s %s %s ended at x z %s %s instead of %s %s" ,
136
- moves , currentNode .x , currentNode .y , currentNode .z ,
137
- res .x , res .z , newX , newZ ));
141
+ moves ,
142
+ SettingsUtil .maybeCensor (currentNode .x ),
143
+ SettingsUtil .maybeCensor (currentNode .y ),
144
+ SettingsUtil .maybeCensor (currentNode .z ),
145
+ SettingsUtil .maybeCensor (res .x ),
146
+ SettingsUtil .maybeCensor (res .z ),
147
+ SettingsUtil .maybeCensor (newX ),
148
+ SettingsUtil .maybeCensor (newZ )));
138
149
}
139
150
if (!moves .dynamicY && res .y != currentNode .y + moves .yOffset ) {
140
151
throw new IllegalStateException (String .format (
141
152
"%s from %s %s %s ended at y %s instead of %s" ,
142
- moves , currentNode .x , currentNode .y , currentNode .z ,
143
- res .y , (currentNode .y + moves .yOffset )));
153
+ moves ,
154
+ SettingsUtil .maybeCensor (currentNode .x ),
155
+ SettingsUtil .maybeCensor (currentNode .y ),
156
+ SettingsUtil .maybeCensor (currentNode .z ),
157
+ SettingsUtil .maybeCensor (res .y ),
158
+ SettingsUtil .maybeCensor (currentNode .y + moves .yOffset )));
144
159
}
145
160
long hashCode = BetterBlockPos .longHash (res .x , res .y , res .z );
146
161
if (isFavoring ) {
0 commit comments