mirror of https://github.com/cabaletta/baritone
Add `placeIncorrectBlockPenaltyMultiplier` builder setting
This commit is contained in:
parent
d86a34a527
commit
4c9253fa5e
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue