Merge pull request #4636 from Lyzev/1.19.4
add(Settings): added settings to control block placement in fluid sources and flowing fluids
This commit is contained in:
@@ -77,6 +77,16 @@ public final class Settings {
|
||||
*/
|
||||
public final Setting<Boolean> allowPlace = new Setting<>(true);
|
||||
|
||||
/**
|
||||
* Allow Baritone to place blocks in fluid source blocks
|
||||
*/
|
||||
public final Setting<Boolean> allowPlaceInFluidsSource = new Setting<>(true);
|
||||
|
||||
/**
|
||||
* Allow Baritone to place blocks in flowing fluid
|
||||
*/
|
||||
public final Setting<Boolean> allowPlaceInFluidsFlow = new Setting<>(true);
|
||||
|
||||
/**
|
||||
* Allow Baritone to move items in your inventory to your hotbar
|
||||
*/
|
||||
|
||||
@@ -161,6 +161,12 @@ public class CalculationContext {
|
||||
if (!worldBorder.canPlaceAt(x, z)) {
|
||||
return COST_INF;
|
||||
}
|
||||
if (!Baritone.settings().allowPlaceInFluidsSource.value && current.getFluidState().isSource()) {
|
||||
return COST_INF;
|
||||
}
|
||||
if (!Baritone.settings().allowPlaceInFluidsFlow.value && !current.getFluidState().isEmpty() && !current.getFluidState().isSource()) {
|
||||
return COST_INF;
|
||||
}
|
||||
return placeBlockCost;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user