baritone/src/main/java/baritone/bot/pathing/movement/CalculationContext.java

51 lines
1.5 KiB
Java
Raw Normal View History

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.
*
* 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/>.
*/
package baritone.bot.pathing.movement;
2018-08-08 22:41:58 +00:00
import baritone.bot.utils.Helper;
import baritone.bot.utils.ToolSet;
2018-08-08 22:41:58 +00:00
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
/**
* @author Brady
* @since 8/7/2018 4:30 PM
*/
2018-08-08 22:53:28 +00:00
public class CalculationContext implements Helper {
private final ToolSet toolSet;
2018-08-08 22:41:58 +00:00
private final boolean hasWaterBucket;
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
}
public ToolSet getToolSet() {
return this.toolSet;
}
2018-08-08 22:41:58 +00:00
public boolean hasWaterBucket() {
return hasWaterBucket;
}
}