standardize on this
This commit is contained in:
parent
23a592ec01
commit
0a38e6f690
@ -1022,6 +1022,7 @@ public final class Settings {
|
||||
public final Map<Setting<?>, Type> settingTypes;
|
||||
|
||||
public final class Setting<T> {
|
||||
|
||||
public T value;
|
||||
public final T defaultValue;
|
||||
private String name;
|
||||
|
@ -20,5 +20,6 @@ package baritone.api.accessor;
|
||||
import java.net.URI;
|
||||
|
||||
public interface IGuiScreen {
|
||||
|
||||
void openLink(URI url);
|
||||
}
|
||||
|
@ -18,5 +18,6 @@
|
||||
package baritone.api.accessor;
|
||||
|
||||
public interface IItemStack {
|
||||
|
||||
int getBaritoneHash();
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ import baritone.api.event.events.type.Overrideable;
|
||||
* @author LoganDark
|
||||
*/
|
||||
public abstract class TabCompleteEvent extends Cancellable {
|
||||
|
||||
public final Overrideable<String> prefix;
|
||||
public final Overrideable<String[]> completions;
|
||||
|
||||
@ -37,12 +38,14 @@ public abstract class TabCompleteEvent extends Cancellable {
|
||||
}
|
||||
|
||||
public static final class Pre extends TabCompleteEvent {
|
||||
|
||||
public Pre(String prefix) {
|
||||
super(prefix, null);
|
||||
}
|
||||
}
|
||||
|
||||
public static final class Post extends TabCompleteEvent {
|
||||
|
||||
public Post(String prefix, String[] completions) {
|
||||
super(prefix, completions);
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ package baritone.api.pathing.goals;
|
||||
* @author LoganDark
|
||||
*/
|
||||
public class GoalInverted implements Goal {
|
||||
|
||||
public final Goal origin;
|
||||
|
||||
public GoalInverted(Goal origin) {
|
||||
|
@ -22,6 +22,7 @@ import baritone.api.utils.interfaces.IGoalRenderPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class GoalNear implements Goal, IGoalRenderPos {
|
||||
|
||||
private final int x;
|
||||
private final int y;
|
||||
private final int z;
|
||||
|
@ -25,6 +25,7 @@ import net.minecraft.util.math.BlockPos;
|
||||
* Dig a tunnel in a certain direction, but if you have to deviate from the path, go back to where you started
|
||||
*/
|
||||
public class GoalStrictDirection implements Goal {
|
||||
|
||||
public final int x;
|
||||
public final int y;
|
||||
public final int z;
|
||||
|
@ -20,6 +20,7 @@ package baritone.api.process;
|
||||
import java.nio.file.Path;
|
||||
|
||||
public interface IExploreProcess extends IBaritoneProcess {
|
||||
|
||||
void explore(int centerX, int centerZ);
|
||||
|
||||
void applyJsonFilter(Path path, boolean invert) throws Exception;
|
||||
|
@ -18,5 +18,6 @@
|
||||
package baritone.api.process;
|
||||
|
||||
public interface IFarmProcess extends IBaritoneProcess {
|
||||
|
||||
void farm();
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ import java.util.Arrays;
|
||||
* @since 9/23/2018
|
||||
*/
|
||||
public interface IMineProcess extends IBaritoneProcess {
|
||||
|
||||
/**
|
||||
* Begin to search for and mine the specified blocks until
|
||||
* the number of specified items to get from the blocks that
|
||||
|
@ -20,6 +20,7 @@ package baritone.api.schematic;
|
||||
import baritone.api.utils.ISchematic;
|
||||
|
||||
public abstract class AbstractSchematic implements ISchematic {
|
||||
|
||||
protected int x;
|
||||
protected int y;
|
||||
protected int z;
|
||||
|
@ -24,6 +24,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CompositeSchematic extends AbstractSchematic {
|
||||
|
||||
private final List<CompositeSchematicEntry> schematics;
|
||||
private CompositeSchematicEntry[] schematicArr;
|
||||
|
||||
|
@ -20,6 +20,7 @@ package baritone.api.schematic;
|
||||
import baritone.api.utils.ISchematic;
|
||||
|
||||
public class CompositeSchematicEntry {
|
||||
|
||||
public final ISchematic schematic;
|
||||
public final int x;
|
||||
public final int y;
|
||||
|
@ -24,6 +24,7 @@ import net.minecraft.init.Blocks;
|
||||
import java.util.List;
|
||||
|
||||
public class FillSchematic extends AbstractSchematic {
|
||||
|
||||
private final BlockOptionalMeta bom;
|
||||
|
||||
public FillSchematic(int x, int y, int z, BlockOptionalMeta bom) {
|
||||
|
@ -23,6 +23,7 @@ import net.minecraft.block.state.IBlockState;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class MaskSchematic extends AbstractSchematic {
|
||||
|
||||
private final ISchematic schematic;
|
||||
|
||||
public MaskSchematic(ISchematic schematic) {
|
||||
|
@ -22,6 +22,7 @@ import baritone.api.utils.ISchematic;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
||||
public class ReplaceSchematic extends MaskSchematic {
|
||||
|
||||
private final BlockOptionalMetaLookup filter;
|
||||
private final Boolean[][][] cache;
|
||||
|
||||
|
@ -21,6 +21,7 @@ import baritone.api.utils.ISchematic;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
||||
public class ShellSchematic extends MaskSchematic {
|
||||
|
||||
public ShellSchematic(ISchematic schematic) {
|
||||
super(schematic);
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ import baritone.api.utils.ISchematic;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
||||
public class WallsSchematic extends MaskSchematic {
|
||||
|
||||
public WallsSchematic(ISchematic schematic) {
|
||||
super(schematic);
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ import net.minecraft.util.math.Vec3i;
|
||||
* types of build commands, however it can be used for anything.
|
||||
*/
|
||||
public interface ISelection {
|
||||
|
||||
/**
|
||||
* @return The first corner of this selection. This is meant to preserve the user's original first corner.
|
||||
*/
|
||||
|
@ -25,6 +25,7 @@ import net.minecraft.util.EnumFacing;
|
||||
* the current selection.
|
||||
*/
|
||||
public interface ISelectionManager {
|
||||
|
||||
/**
|
||||
* Adds a new selection. The added selection is returned.
|
||||
*
|
||||
|
@ -34,6 +34,7 @@ import javax.annotation.Nonnull;
|
||||
* @author leijurv
|
||||
*/
|
||||
public final class BetterBlockPos extends BlockPos {
|
||||
|
||||
public final int x;
|
||||
public final int y;
|
||||
public final int z;
|
||||
|
@ -38,6 +38,7 @@ import java.util.stream.Collectors;
|
||||
import static java.util.Objects.isNull;
|
||||
|
||||
public final class BlockOptionalMeta {
|
||||
|
||||
private final Block block;
|
||||
private final int meta;
|
||||
private final boolean noMeta;
|
||||
|
@ -27,6 +27,7 @@ import java.util.List;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class BlockOptionalMetaLookup {
|
||||
|
||||
private final BlockOptionalMeta[] boms;
|
||||
|
||||
public BlockOptionalMetaLookup(BlockOptionalMeta... boms) {
|
||||
|
@ -24,6 +24,7 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class BlockUtils {
|
||||
|
||||
private static transient Map<String, Block> resourceCache = new HashMap<>();
|
||||
|
||||
public static String blockToString(Block block) {
|
||||
|
@ -51,6 +51,7 @@ import static java.util.Objects.isNull;
|
||||
import static java.util.Objects.nonNull;
|
||||
|
||||
public class BaritoneChatControl implements Helper, AbstractGameEventListener {
|
||||
|
||||
public final IBaritone baritone;
|
||||
public final IPlayerContext ctx;
|
||||
public final Settings settings = BaritoneAPI.getSettings();
|
||||
|
@ -32,6 +32,7 @@ import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public abstract class Command implements Helper {
|
||||
|
||||
protected IBaritone baritone;
|
||||
protected IPlayerContext ctx;
|
||||
protected Minecraft MC = mc;
|
||||
|
@ -20,5 +20,6 @@ package baritone.api.utils.interfaces;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public interface IGoalRenderPos {
|
||||
|
||||
BlockPos getGoalPos();
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ import org.spongepowered.asm.mixin.Unique;
|
||||
|
||||
@Mixin(BitArray.class)
|
||||
public abstract class MixinBitArray implements IBitArray {
|
||||
|
||||
@Shadow
|
||||
@Final
|
||||
private long[] longArray;
|
||||
|
@ -30,6 +30,7 @@ import org.spongepowered.asm.mixin.gen.Accessor;
|
||||
|
||||
@Mixin(BlockStateContainer.class)
|
||||
public abstract class MixinBlockStateContainer implements IBlockStateContainer {
|
||||
|
||||
@Shadow
|
||||
protected BitArray storage;
|
||||
|
||||
|
@ -25,6 +25,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(GuiChat.ChatTabCompleter.class)
|
||||
public abstract class MixinChatTabCompleter extends MixinTabCompleter {
|
||||
|
||||
@Inject(
|
||||
method = "<init>*",
|
||||
at = @At("RETURN")
|
||||
|
@ -28,6 +28,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(GuiChat.class)
|
||||
public abstract class MixinGuiChat implements net.minecraft.util.ITabCompleter {
|
||||
|
||||
@Shadow
|
||||
private TabCompleter tabCompleter;
|
||||
|
||||
|
@ -26,6 +26,7 @@ import java.net.URI;
|
||||
|
||||
@Mixin(GuiScreen.class)
|
||||
public abstract class MixinGuiScreen implements IGuiScreen {
|
||||
|
||||
@Override
|
||||
@Invoker("openWebLink")
|
||||
public abstract void openLink(URI url);
|
||||
|
@ -30,6 +30,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(ItemStack.class)
|
||||
public abstract class MixinItemStack implements IItemStack {
|
||||
|
||||
@Shadow
|
||||
@Final
|
||||
private Item item;
|
||||
|
@ -26,6 +26,7 @@ import org.spongepowered.asm.mixin.gen.Invoker;
|
||||
|
||||
@Mixin(PlayerControllerMP.class)
|
||||
public abstract class MixinPlayerControllerMP implements IPlayerControllerMP {
|
||||
|
||||
@Accessor
|
||||
@Override
|
||||
public abstract void setIsHittingBlock(boolean isHittingBlock);
|
||||
|
@ -26,6 +26,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(targets = "net.minecraft.block.state.BlockStateContainer$StateImplementation")
|
||||
public abstract class MixinStateImplementation {
|
||||
|
||||
@Shadow
|
||||
@Final
|
||||
private ImmutableMap<IProperty<?>, Comparable<?>> properties;
|
||||
|
@ -35,6 +35,7 @@ import static java.util.Objects.isNull;
|
||||
|
||||
@Mixin(TabCompleter.class)
|
||||
public abstract class MixinTabCompleter implements ITabCompleter {
|
||||
|
||||
@Shadow
|
||||
@Final
|
||||
protected GuiTextField textField;
|
||||
|
@ -35,6 +35,7 @@ import java.util.Random;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
public final class InventoryBehavior extends Behavior {
|
||||
|
||||
public InventoryBehavior(Baritone baritone) {
|
||||
super(baritone);
|
||||
}
|
||||
|
@ -255,6 +255,7 @@ public final class MemoryBehavior extends Behavior {
|
||||
}
|
||||
|
||||
public static class EnderChestMemory {
|
||||
|
||||
private static final Map<Path, EnderChestMemory> memory = new HashMap<>();
|
||||
private final Path enderChest;
|
||||
private List<ItemStack> contents;
|
||||
|
@ -288,6 +288,7 @@ public final class CachedWorld implements ICachedWorld, Helper {
|
||||
}
|
||||
|
||||
private class PackerThread implements Runnable {
|
||||
|
||||
public void run() {
|
||||
while (true) {
|
||||
// TODO: Add CachedWorld unloading to remove the redundancy of having this
|
||||
|
@ -26,6 +26,7 @@ import baritone.utils.pathing.PathBase;
|
||||
import java.util.*;
|
||||
|
||||
public class SplicedPath extends PathBase {
|
||||
|
||||
private final List<BetterBlockPos> path;
|
||||
|
||||
private final List<IMovement> movements;
|
||||
|
@ -58,6 +58,7 @@ import java.util.*;
|
||||
import static baritone.api.pathing.movement.ActionCosts.COST_INF;
|
||||
|
||||
public final class BuilderProcess extends BaritoneProcessHelper implements IBuilderProcess {
|
||||
|
||||
private HashSet<BetterBlockPos> incorrectPositions;
|
||||
private LongOpenHashSet observedCompleted; // positions that are completed even if they're out of render distance and we can't make sure right now
|
||||
private String name;
|
||||
@ -207,6 +208,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
|
||||
}
|
||||
|
||||
public static class Placement {
|
||||
|
||||
private final int hotbarSelection;
|
||||
private final BlockPos placeAgainst;
|
||||
private final EnumFacing side;
|
||||
@ -603,6 +605,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
|
||||
}
|
||||
|
||||
public static class JankyGoalComposite implements Goal {
|
||||
|
||||
private final Goal primary;
|
||||
private final Goal fallback;
|
||||
|
||||
@ -676,6 +679,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
|
||||
}
|
||||
|
||||
public static class GoalAdjacent extends GoalGetToBlock {
|
||||
|
||||
private boolean allowSameLevel;
|
||||
private BlockPos no;
|
||||
|
||||
@ -708,6 +712,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
|
||||
}
|
||||
|
||||
public static class GoalPlace extends GoalBlock {
|
||||
|
||||
public GoalPlace(BlockPos placeAt) {
|
||||
super(placeAt.up());
|
||||
}
|
||||
@ -758,6 +763,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
|
||||
}
|
||||
|
||||
public class BuilderCalculationContext extends CalculationContext {
|
||||
|
||||
private final List<IBlockState> placeable;
|
||||
private final ISchematic schematic;
|
||||
private final int originX;
|
||||
|
@ -173,6 +173,7 @@ public final class ExploreProcess extends BaritoneProcessHelper implements IExpl
|
||||
}
|
||||
|
||||
private interface IChunkFilter {
|
||||
|
||||
Status isAlreadyExplored(int chunkX, int chunkZ);
|
||||
|
||||
int countRemain();
|
||||
@ -205,6 +206,7 @@ public final class ExploreProcess extends BaritoneProcessHelper implements IExpl
|
||||
}
|
||||
|
||||
private class JsonChunkFilter implements IChunkFilter {
|
||||
|
||||
private final boolean invert; // if true, the list is interpreted as a list of chunks that are NOT explored, if false, the list is interpreted as a list of chunks that ARE explored
|
||||
private final LongOpenHashSet inFilter;
|
||||
private final MyChunkPos[] positions;
|
||||
@ -257,6 +259,7 @@ public final class ExploreProcess extends BaritoneProcessHelper implements IExpl
|
||||
}
|
||||
|
||||
private class EitherChunk implements IChunkFilter {
|
||||
|
||||
private final IChunkFilter a;
|
||||
private final IChunkFilter b;
|
||||
|
||||
|
@ -52,6 +52,7 @@ import static baritone.api.pathing.movement.ActionCosts.COST_INF;
|
||||
* @author leijurv
|
||||
*/
|
||||
public final class MineProcess extends BaritoneProcessHelper implements IMineProcess {
|
||||
|
||||
private static final int ORE_LOCATIONS_COUNT = 64;
|
||||
|
||||
private BlockOptionalMetaLookup filter;
|
||||
|
@ -7,6 +7,7 @@ import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.Vec3i;
|
||||
|
||||
public class Selection implements ISelection {
|
||||
|
||||
private final BetterBlockPos pos1;
|
||||
private final BetterBlockPos pos2;
|
||||
private final BetterBlockPos min;
|
||||
|
@ -10,6 +10,7 @@ import java.util.LinkedList;
|
||||
import java.util.ListIterator;
|
||||
|
||||
public class SelectionManager implements ISelectionManager {
|
||||
|
||||
private final LinkedList<ISelection> selections = new LinkedList<>();
|
||||
private ISelection[] selectionsArr = new ISelection[0];
|
||||
|
||||
|
@ -8,6 +8,7 @@ import baritone.utils.IRenderer;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
|
||||
public class SelectionRenderer implements IRenderer, AbstractGameEventListener {
|
||||
|
||||
public static final double SELECTION_BOX_EXPANSION = .005D;
|
||||
|
||||
private final SelectionManager manager;
|
||||
|
@ -25,6 +25,7 @@ import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
|
||||
public class BlockPlaceHelper implements Helper {
|
||||
|
||||
private final IPlayerContext ctx;
|
||||
private int rightClickTimer;
|
||||
|
||||
|
@ -32,6 +32,7 @@ import java.awt.*;
|
||||
import static org.lwjgl.opengl.GL11.*;
|
||||
|
||||
public interface IRenderer {
|
||||
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
BufferBuilder buffer = tessellator.getBuffer();
|
||||
RenderManager renderManager = Helper.mc.getRenderManager();
|
||||
|
@ -48,6 +48,7 @@ import static org.lwjgl.opengl.GL11.*;
|
||||
* @since 8/9/2018
|
||||
*/
|
||||
public final class PathRenderer implements IRenderer {
|
||||
|
||||
private PathRenderer() {}
|
||||
|
||||
public static void render(RenderEvent event, PathingBehavior behavior) {
|
||||
|
@ -23,6 +23,7 @@ import baritone.api.process.PathingCommandType;
|
||||
import baritone.pathing.movement.CalculationContext;
|
||||
|
||||
public class PathingCommandContext extends PathingCommand {
|
||||
|
||||
public final CalculationContext desiredCalcContext;
|
||||
|
||||
public PathingCommandContext(Goal goal, PathingCommandType commandType, CalculationContext context) {
|
||||
|
@ -32,6 +32,7 @@ import net.minecraft.util.math.BlockPos;
|
||||
import java.util.*;
|
||||
|
||||
public class PathingControlManager implements IPathingControlManager {
|
||||
|
||||
private final Baritone baritone;
|
||||
private final HashSet<IBaritoneProcess> processes; // unGh
|
||||
private final List<IBaritoneProcess> active;
|
||||
|
@ -21,6 +21,7 @@ import baritone.api.utils.input.Input;
|
||||
import net.minecraft.util.MovementInput;
|
||||
|
||||
public class PlayerMovementInput extends MovementInput {
|
||||
|
||||
private final InputOverrideHandler handler;
|
||||
|
||||
PlayerMovementInput(InputOverrideHandler handler) {
|
||||
|
@ -38,6 +38,7 @@ import java.util.function.Function;
|
||||
* @author Avery, Brady, leijurv
|
||||
*/
|
||||
public class ToolSet {
|
||||
|
||||
/**
|
||||
* A cache mapping a {@link Block} to how long it will take to break
|
||||
* with this toolset, given the optimum tool is used.
|
||||
|
@ -1,6 +1,7 @@
|
||||
package baritone.utils.accessor;
|
||||
|
||||
public interface IBitArray {
|
||||
|
||||
int getAtFast(int index);
|
||||
|
||||
int[] toArray();
|
||||
|
@ -5,6 +5,7 @@ import net.minecraft.util.BitArray;
|
||||
import net.minecraft.world.chunk.IBlockStatePalette;
|
||||
|
||||
public interface IBlockStateContainer {
|
||||
|
||||
IBlockStatePalette getPalette();
|
||||
|
||||
BitArray getStorage();
|
||||
|
@ -21,5 +21,6 @@ import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
||||
public interface IChunkProviderClient {
|
||||
|
||||
Long2ObjectMap<Chunk> loadedChunks();
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ package baritone.utils.accessor;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public interface IPlayerControllerMP {
|
||||
|
||||
void setIsHittingBlock(boolean isHittingBlock);
|
||||
|
||||
BlockPos getCurrentBlock();
|
||||
|
@ -1,6 +1,7 @@
|
||||
package baritone.utils.accessor;
|
||||
|
||||
public interface ITabCompleter {
|
||||
|
||||
String getPrefix();
|
||||
|
||||
void setPrefix(String prefix);
|
||||
|
@ -30,6 +30,7 @@ import java.util.stream.Stream;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class AxisCommand extends Command {
|
||||
|
||||
public AxisCommand(IBaritone baritone) {
|
||||
super(baritone, asList("axis", "highway"));
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ import java.util.stream.Stream;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class BlacklistCommand extends Command {
|
||||
|
||||
public BlacklistCommand(IBaritone baritone) {
|
||||
super(baritone, "blacklist");
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ import java.util.stream.Stream;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class BuildCommand extends Command {
|
||||
|
||||
private static final File schematicsDir = new File(Minecraft.getMinecraft().gameDir, "schematics");
|
||||
|
||||
public BuildCommand(IBaritone baritone) {
|
||||
|
@ -28,6 +28,7 @@ import java.util.stream.Stream;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class CancelCommand extends Command {
|
||||
|
||||
public CancelCommand(IBaritone baritone) {
|
||||
super(baritone, asList("cancel", "stop"));
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ import java.util.stream.Stream;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class ChestsCommand extends Command {
|
||||
|
||||
public ChestsCommand(IBaritone baritone) {
|
||||
super(baritone, "chests");
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ import java.util.stream.Stream;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class ClearareaCommand extends Command {
|
||||
|
||||
public ClearareaCommand(IBaritone baritone) {
|
||||
super(baritone, "cleararea");
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ import java.util.stream.Stream;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class ClickCommand extends Command {
|
||||
|
||||
public ClickCommand(IBaritone baritone) {
|
||||
super(baritone, "click");
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ import static java.util.Arrays.asList;
|
||||
import static java.util.Objects.isNull;
|
||||
|
||||
public class ComeCommand extends Command {
|
||||
|
||||
public ComeCommand(IBaritone baritone) {
|
||||
super(baritone, "come");
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class CommandAlias extends Command {
|
||||
|
||||
private final String shortDesc;
|
||||
public final String target;
|
||||
|
||||
|
@ -25,6 +25,7 @@ import java.util.*;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class DefaultCommands {
|
||||
|
||||
public static List<Command> commands(IBaritone baritone) {
|
||||
Objects.requireNonNull(baritone);
|
||||
List<Command> commands = new ArrayList<>();
|
||||
|
@ -28,6 +28,7 @@ import java.util.stream.Stream;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class EmptyCommand extends Command {
|
||||
|
||||
public EmptyCommand(IBaritone baritone) {
|
||||
super(baritone, asList("name1", "name2"));
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ import java.util.stream.Stream;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class ExploreCommand extends Command {
|
||||
|
||||
public ExploreCommand(IBaritone baritone) {
|
||||
super(baritone, "explore");
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ import java.util.stream.Stream;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class FarmCommand extends Command {
|
||||
|
||||
public FarmCommand(IBaritone baritone) {
|
||||
super(baritone, "farm");
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ import java.util.stream.Stream;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class FindCommand extends Command {
|
||||
|
||||
public FindCommand(IBaritone baritone) {
|
||||
super(baritone, "find");
|
||||
}
|
||||
|
@ -44,6 +44,7 @@ import static java.util.Objects.isNull;
|
||||
import static java.util.Objects.nonNull;
|
||||
|
||||
public class FollowCommand extends Command {
|
||||
|
||||
public FollowCommand(IBaritone baritone) {
|
||||
super(baritone, "follow");
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ import java.util.stream.Stream;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class ForceCancelCommand extends Command {
|
||||
|
||||
public ForceCancelCommand(IBaritone baritone) {
|
||||
super(baritone, "forcecancel");
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ import java.util.stream.Stream;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class GcCommand extends Command {
|
||||
|
||||
public GcCommand(IBaritone baritone) {
|
||||
super(baritone, "gc");
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ import static java.util.Objects.isNull;
|
||||
import static java.util.Objects.nonNull;
|
||||
|
||||
public class GoalCommand extends Command {
|
||||
|
||||
public GoalCommand(IBaritone baritone) {
|
||||
super(baritone, "goal");
|
||||
}
|
||||
|
@ -41,6 +41,7 @@ import static java.util.Arrays.asList;
|
||||
import static java.util.Objects.isNull;
|
||||
|
||||
public class HelpCommand extends Command {
|
||||
|
||||
public HelpCommand(IBaritone baritone) {
|
||||
super(baritone, asList("help", "?"));
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ import static java.util.Arrays.asList;
|
||||
import static java.util.Objects.isNull;
|
||||
|
||||
public class InvertCommand extends Command {
|
||||
|
||||
public InvertCommand(IBaritone baritone) {
|
||||
super(baritone, "invert");
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ import java.util.stream.Stream;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class MineCommand extends Command {
|
||||
|
||||
public MineCommand(IBaritone baritone) {
|
||||
super(baritone, "mine");
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ import static java.util.Arrays.asList;
|
||||
import static java.util.Objects.isNull;
|
||||
|
||||
public class PathCommand extends Command {
|
||||
|
||||
public PathCommand(IBaritone baritone) {
|
||||
super(baritone, asList("path", "goto"));
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ import static java.util.Arrays.asList;
|
||||
* REQUEST_PAUSE} as needed.
|
||||
*/
|
||||
public class PauseResumeCommands {
|
||||
|
||||
private final IBaritone baritone;
|
||||
Command pauseCommand;
|
||||
Command resumeCommand;
|
||||
|
@ -33,6 +33,7 @@ import static java.util.Arrays.asList;
|
||||
import static java.util.Objects.isNull;
|
||||
|
||||
public class ProcCommand extends Command {
|
||||
|
||||
public ProcCommand(IBaritone baritone) {
|
||||
super(baritone, "proc");
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ import java.util.stream.Stream;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class ReloadAllCommand extends Command {
|
||||
|
||||
public ReloadAllCommand(IBaritone baritone) {
|
||||
super(baritone, "reloadall");
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ import java.util.stream.Stream;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class RenderCommand extends Command {
|
||||
|
||||
public RenderCommand(IBaritone baritone) {
|
||||
super(baritone, "render");
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ import java.util.stream.Stream;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class RepackCommand extends Command {
|
||||
|
||||
public RepackCommand(IBaritone baritone) {
|
||||
super(baritone, asList("repack", "rescan"));
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ import java.util.stream.Stream;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class SaveAllCommand extends Command {
|
||||
|
||||
public SaveAllCommand(IBaritone baritone) {
|
||||
super(baritone, "saveall");
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ import java.util.stream.Stream;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class SchematicaCommand extends Command {
|
||||
|
||||
public SchematicaCommand(IBaritone baritone) {
|
||||
super(baritone, "schematica");
|
||||
}
|
||||
|
@ -54,6 +54,7 @@ import java.util.stream.Stream;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class SelCommand extends Command {
|
||||
|
||||
private ISelectionManager manager = baritone.getSelectionManager();
|
||||
private BetterBlockPos pos1 = null;
|
||||
|
||||
|
@ -45,6 +45,7 @@ import static java.util.Objects.nonNull;
|
||||
import static java.util.stream.Stream.of;
|
||||
|
||||
public class SetCommand extends Command {
|
||||
|
||||
public SetCommand(IBaritone baritone) {
|
||||
super(baritone, asList("set", "setting", "settings"));
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ import java.util.stream.Stream;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class ThisWayCommand extends Command {
|
||||
|
||||
public ThisWayCommand(IBaritone baritone) {
|
||||
super(baritone, asList("thisway", "forward"));
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ import java.util.stream.Stream;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class TunnelCommand extends Command {
|
||||
|
||||
public TunnelCommand(IBaritone baritone) {
|
||||
super(baritone, "tunnel");
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ import static java.util.Arrays.asList;
|
||||
import static java.util.Objects.isNull;
|
||||
|
||||
public class VersionCommand extends Command {
|
||||
|
||||
public VersionCommand(IBaritone baritone) {
|
||||
super(baritone, "version");
|
||||
}
|
||||
|
@ -50,6 +50,7 @@ import static baritone.api.utils.command.BaritoneChatControl.FORCE_COMMAND_PREFI
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class WaypointsCommand extends Command {
|
||||
|
||||
public WaypointsCommand(IBaritone baritone) {
|
||||
super(baritone, asList("waypoints", "waypoint", "wp"));
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class Avoidance {
|
||||
|
||||
private final int centerX;
|
||||
private final int centerY;
|
||||
private final int centerZ;
|
||||
|
@ -25,6 +25,7 @@ import baritone.pathing.movement.CalculationContext;
|
||||
import it.unimi.dsi.fastutil.longs.Long2DoubleOpenHashMap;
|
||||
|
||||
public final class Favoring {
|
||||
|
||||
private final Long2DoubleOpenHashMap favorings;
|
||||
|
||||
public Favoring(IPlayerContext ctx, IPath previous, CalculationContext context) {
|
||||
|
@ -25,6 +25,7 @@ import baritone.api.pathing.movement.ActionCosts;
|
||||
* @author leijurv
|
||||
*/
|
||||
public final class MutableMoveResult {
|
||||
|
||||
public int x;
|
||||
public int y;
|
||||
public int z;
|
||||
|
@ -26,6 +26,7 @@ import baritone.utils.BlockStateInterface;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public abstract class PathBase implements IPath {
|
||||
|
||||
@Override
|
||||
public PathBase cutoffAtLoadedChunks(Object bsi0) { // <-- cursed cursed cursed
|
||||
if (!Baritone.settings().cutoffAtLoadBoundary.value) {
|
||||
|
@ -23,6 +23,7 @@ import net.minecraft.block.state.IBlockState;
|
||||
import java.util.List;
|
||||
|
||||
public class FillSchematic implements ISchematic {
|
||||
|
||||
private final int widthX;
|
||||
private final int heightY;
|
||||
private final int lengthZ;
|
||||
|
@ -25,6 +25,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import java.util.List;
|
||||
|
||||
public class Schematic implements ISchematic {
|
||||
|
||||
public final int widthX;
|
||||
public final int heightY;
|
||||
public final int lengthZ;
|
||||
|
@ -23,6 +23,7 @@ import static baritone.api.pathing.movement.ActionCosts.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class ActionCostsTest {
|
||||
|
||||
@Test
|
||||
public void testFallNBlocksCost() {
|
||||
assertEquals(FALL_N_BLOCKS_COST.length, 257); // Fall 0 blocks through fall 256 blocks
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user