Don't break Forge world loading
This commit is contained in:
parent
b924e8511b
commit
2ee313a795
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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<String> tabCompleted(String label, ArgConsumer args, Settings settings) {
|
||||
return Stream.empty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getLongDesc() {
|
||||
return asList(
|
||||
"",
|
||||
"",
|
||||
"Usage:",
|
||||
"> "
|
||||
);
|
||||
}
|
||||
}
|
@ -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];
|
||||
|
||||
|
@ -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
|
||||
|
@ -1,5 +1,7 @@
|
||||
package baritone.utils.accessor;
|
||||
|
||||
public interface IBitArray {
|
||||
int getAtFast(int index);
|
||||
|
||||
int[] toArray();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user