diff --git a/src/api/java/baritone/api/utils/command/defaults/WaypointCommand.java b/src/api/java/baritone/api/utils/command/defaults/WaypointCommand.java new file mode 100644 index 00000000..22438277 --- /dev/null +++ b/src/api/java/baritone/api/utils/command/defaults/WaypointCommand.java @@ -0,0 +1,53 @@ +/* + * This file is part of Baritone. + * + * Baritone is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Baritone. If not, see . + */ + +package baritone.api.utils.command.defaults; + +import baritone.api.Settings; +import baritone.api.utils.command.Command; +import baritone.api.utils.command.helpers.arguments.ArgConsumer; + +import java.util.List; +import java.util.stream.Stream; + +import static java.util.Arrays.asList; + +public class WaypointCommand extends Command { + public WaypointCommand() { + super(asList("name1", "name2"), "Short description"); + } + + @Override + protected void executed(String label, ArgConsumer args, Settings settings) { + ; + } + + @Override + protected Stream tabCompleted(String label, ArgConsumer args, Settings settings) { + return Stream.empty(); + } + + @Override + public List getLongDesc() { + return asList( + "", + "", + "Usage:", + "> " + ); + } +} diff --git a/src/launch/java/baritone/launch/mixins/MixinBitArray.java b/src/launch/java/baritone/launch/mixins/MixinBitArray.java index 5bb738a2..e0782803 100644 --- a/src/launch/java/baritone/launch/mixins/MixinBitArray.java +++ b/src/launch/java/baritone/launch/mixins/MixinBitArray.java @@ -23,6 +23,7 @@ import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.Unique; @Mixin(BitArray.class) public abstract class MixinBitArray implements IBitArray { @@ -49,8 +50,9 @@ public abstract class MixinBitArray implements IBitArray { * * @author LoganDark */ - @Overwrite - public int getAt(int index) { + @Override + @Unique + public int getAtFast(int index) { final int b = bitsPerEntry; final long mev = maxEntryValue; final int i = index * b; @@ -66,6 +68,7 @@ public abstract class MixinBitArray implements IBitArray { } @Override + @Unique public int[] toArray() { int[] out = new int[arraySize]; diff --git a/src/launch/java/baritone/launch/mixins/MixinBlockStateContainer.java b/src/launch/java/baritone/launch/mixins/MixinBlockStateContainer.java index 8a1b000f..d3de16f0 100644 --- a/src/launch/java/baritone/launch/mixins/MixinBlockStateContainer.java +++ b/src/launch/java/baritone/launch/mixins/MixinBlockStateContainer.java @@ -47,7 +47,7 @@ public abstract class MixinBlockStateContainer implements IBlockStateContainer { @Override @Unique public IBlockState getFast(int index) { - return palette.getBlockState(storage.getAt(index)); + return palette.getBlockState(((IBitArray) storage).getAtFast(index)); } @Override diff --git a/src/main/java/baritone/utils/accessor/IBitArray.java b/src/main/java/baritone/utils/accessor/IBitArray.java index fef08044..1fd912a2 100644 --- a/src/main/java/baritone/utils/accessor/IBitArray.java +++ b/src/main/java/baritone/utils/accessor/IBitArray.java @@ -1,5 +1,7 @@ package baritone.utils.accessor; public interface IBitArray { + int getAtFast(int index); + int[] toArray(); }