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.look;
019
020import baritone.api.utils.Rotation;
021
022/**
023 * @author Brady
024 */
025public interface IAimProcessor {
026
027    /**
028     * Returns the actual rotation that will be used when the desired rotation is requested. The returned rotation
029     * always reflects what would happen in the upcoming tick. In other words, it is a pure function, and no internal
030     * state changes. If simulation of the rotation states beyond the next tick is required, then a
031     * {@link IAimProcessor#fork fork} should be created.
032     *
033     * @param desired The desired rotation to set
034     * @return The actual rotation
035     */
036    Rotation peekRotation(Rotation desired);
037
038    /**
039     * Returns a copy of this {@link IAimProcessor} which has its own internal state and is manually tickable.
040     *
041     * @return The forked processor
042     * @see ITickableAimProcessor
043     */
044    ITickableAimProcessor fork();
045}