baritone/src/main/java/baritone/BaritoneProvider.java

52 lines
1.4 KiB
Java
Raw Normal View History

/*
* 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;
2018-11-04 05:11:52 +00:00
import baritone.api.IBaritone;
import baritone.api.IBaritoneProvider;
2018-11-14 03:45:26 +00:00
import baritone.api.cache.IWorldScanner;
import baritone.cache.WorldScanner;
2018-11-14 03:45:26 +00:00
import java.util.Collections;
2018-11-14 22:00:56 +00:00
import java.util.List;
2018-11-14 03:45:26 +00:00
/**
* @author Brady
* @since 9/29/2018
*/
public final class BaritoneProvider implements IBaritoneProvider {
2018-11-14 03:45:26 +00:00
2018-11-14 05:34:11 +00:00
private final Baritone primary = new Baritone();
2018-11-14 03:45:26 +00:00
@Override
public IBaritone getPrimaryBaritone() {
2018-11-14 05:34:11 +00:00
return primary;
2018-11-14 03:45:26 +00:00
}
@Override
2018-11-14 22:00:56 +00:00
public List<IBaritone> getAllBaritones() {
// TODO return a CopyOnWriteArrayList
return Collections.singletonList(primary);
2018-11-14 03:45:26 +00:00
}
@Override
public IWorldScanner getWorldScanner() {
return WorldScanner.INSTANCE;
2018-10-07 01:16:38 +00:00
}
}