Add `placeIncorrectBlockPenaltyMultiplier` builder setting

This commit is contained in:
ZacSharp 2024-02-25 19:24:07 +01:00
parent d86a34a527
commit 4c9253fa5e
No known key found for this signature in database
GPG Key ID: 9453647B005083A3
2 changed files with 7 additions and 2 deletions

View File

@ -1058,6 +1058,11 @@ public final class Settings {
*/
public final Setting<Double> breakCorrectBlockPenaltyMultiplier = new Setting<>(10d);
/**
* Multiply the cost of placing a block that's incorrect in the builder's schematic by this coefficient
*/
public final Setting<Double> placeIncorrectBlockPenaltyMultiplier = new Setting<>(2d);
/**
* When this setting is true, build a schematic with the highest X coordinate being the origin, instead of the lowest
*/

View File

@ -1115,7 +1115,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
if (sch.getBlock() instanceof AirBlock) {
// we want this to be air, but they're asking if they can place here
// this won't be a schematic block, this will be a throwaway
return placeBlockCost * 2; // we're going to have to break it eventually
return placeBlockCost * Baritone.settings().placeIncorrectBlockPenaltyMultiplier.value; // we're going to have to break it eventually
}
if (placeable.contains(sch)) {
return 0; // thats right we gonna make it FREE to place a block where it should go in a structure
@ -1128,7 +1128,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
}
// we want it to be something that we don't have
// even more of a pain to place something wrong
return placeBlockCost * 3;
return placeBlockCost * 1.5 * Baritone.settings().placeIncorrectBlockPenaltyMultiplier.value;
} else {
if (hasThrowaway) {
return placeBlockCost;