001/* 002 * This file is part of Baritone. 003 * 004 * Baritone is free software: you can redistribute it and/or modify 005 * it under the terms of the GNU Lesser General Public License as published by 006 * the Free Software Foundation, either version 3 of the License, or 007 * (at your option) any later version. 008 * 009 * Baritone is distributed in the hope that it will be useful, 010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 012 * GNU Lesser General Public License for more details. 013 * 014 * You should have received a copy of the GNU Lesser General Public License 015 * along with Baritone. If not, see <https://www.gnu.org/licenses/>. 016 */ 017 018package baritone.api.behavior; 019 020import baritone.api.Settings; 021import baritone.api.behavior.look.IAimProcessor; 022import baritone.api.utils.Rotation; 023 024/** 025 * @author Brady 026 * @since 9/23/2018 027 */ 028public interface ILookBehavior extends IBehavior { 029 030 /** 031 * Updates the current {@link ILookBehavior} target to target the specified rotations on the next tick. If any sort 032 * of block interaction is required, {@code blockInteract} should be {@code true}. It is not guaranteed that the 033 * rotations set by the caller will be the exact rotations expressed by the client (This is due to settings like 034 * {@link Settings#randomLooking}). If the rotations produced by this behavior are required, then the 035 * {@link #getAimProcessor() aim processor} should be used. 036 * 037 * @param rotation The target rotations 038 * @param blockInteract Whether the target rotations are needed for a block interaction 039 */ 040 void updateTarget(Rotation rotation, boolean blockInteract); 041 042 /** 043 * The aim processor instance for this {@link ILookBehavior}, which is responsible for applying additional, 044 * deterministic transformations to the target rotation set by {@link #updateTarget}. 045 * 046 * @return The aim processor 047 * @see IAimProcessor#fork 048 */ 049 IAimProcessor getAimProcessor(); 050}