2018-08-08 03:16:53 +00:00
|
|
|
/*
|
|
|
|
* This file is part of Baritone.
|
|
|
|
*
|
|
|
|
* Baritone is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
2018-08-08 04:15:22 +00:00
|
|
|
* Baritone is distributed in the hope that it will be useful,
|
2018-08-08 03:16:53 +00:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2018-08-07 21:36:32 +00:00
|
|
|
package baritone.bot.pathing.movement;
|
|
|
|
|
2018-08-08 22:41:58 +00:00
|
|
|
import baritone.bot.utils.Helper;
|
2018-08-07 21:36:32 +00:00
|
|
|
import baritone.bot.utils.ToolSet;
|
2018-08-08 22:41:58 +00:00
|
|
|
import net.minecraft.init.Items;
|
|
|
|
import net.minecraft.item.ItemStack;
|
2018-08-07 21:36:32 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @author Brady
|
|
|
|
* @since 8/7/2018 4:30 PM
|
|
|
|
*/
|
2018-08-08 22:53:28 +00:00
|
|
|
public class CalculationContext implements Helper {
|
2018-08-07 21:36:32 +00:00
|
|
|
|
|
|
|
private final ToolSet toolSet;
|
2018-08-08 22:41:58 +00:00
|
|
|
private final boolean hasWaterBucket;
|
2018-08-07 21:36:32 +00:00
|
|
|
|
|
|
|
public CalculationContext() {
|
|
|
|
this(new ToolSet());
|
|
|
|
}
|
|
|
|
|
|
|
|
public CalculationContext(ToolSet toolSet) {
|
|
|
|
this.toolSet = toolSet;
|
2018-08-08 22:59:29 +00:00
|
|
|
this.hasWaterBucket = player().inventory.hasItemStack(new ItemStack(Items.WATER_BUCKET)); // TODO check if water bucket is on hotbar or main inventory
|
2018-08-07 21:36:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public ToolSet getToolSet() {
|
|
|
|
return this.toolSet;
|
|
|
|
}
|
2018-08-08 22:41:58 +00:00
|
|
|
|
|
|
|
public boolean hasWaterBucket() {
|
|
|
|
return hasWaterBucket;
|
|
|
|
}
|
2018-08-07 21:36:32 +00:00
|
|
|
}
|