[Change] More Suggested changes

This commit is contained in:
cdagaming 2019-04-20 12:32:35 -05:00
parent dd8406c39a
commit d5a8ed5cb1
2 changed files with 4 additions and 2 deletions

View File

@ -150,7 +150,7 @@ public final class Settings {
/**
* Blocks that Baritone will attempt to avoid (Used in avoidance)
*/
public final Setting<List<Block>> blocksToAvoid = new Setting<>(new ArrayList<>(Arrays.asList(
public final Setting<LinkedList<Block>> blocksToAvoid = new Setting<>(new LinkedList<>(Arrays.asList(
// Leave Empty by Default
)));
@ -257,7 +257,7 @@ public final class Settings {
public final Setting<Double> mobAvoidanceCoefficient = new Setting<>(1.5);
public final Setting<Integer> mobAvoidanceRadius = new Setting<>(8);
/**
* When running a goto towards a container block (chest, ender chest, furnace, etc),
* right click and open it once you arrive.

View File

@ -18,6 +18,7 @@
package baritone.api.utils;
import baritone.api.Settings;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
@ -147,6 +148,7 @@ public class SettingsUtil {
FLOAT(Float.class, Float::parseFloat),
LONG(Long.class, Long::parseLong),
BLOCK_LIST(LinkedList.class, str -> Stream.of(str.split(",")).map(String::trim).map(BlockUtils::stringToBlockRequired).collect(Collectors.toCollection(LinkedList::new)), list -> ((LinkedList<Block>) list).stream().map(BlockUtils::blockToString).collect(Collectors.joining(","))),
ITEM_LIST(ArrayList.class, str -> Stream.of(str.split(",")).map(String::trim).map(Item::getByNameOrId).collect(Collectors.toCollection(ArrayList::new)), list -> ((ArrayList<Item>) list).stream().map(Item.REGISTRY::getNameForObject).map(ResourceLocation::toString).collect(Collectors.joining(","))),
COLOR(Color.class, str -> new Color(Integer.parseInt(str.split(",")[0]), Integer.parseInt(str.split(",")[1]), Integer.parseInt(str.split(",")[2])), color -> color.getRed() + "," + color.getGreen() + "," + color.getBlue()),
ENUMFACING(EnumFacing.class, EnumFacing::byName);