Fix remaining usages to be in-line with previous commit

This commit is contained in:
Brady 2019-09-26 23:20:45 -05:00
parent 5ba1e67ea0
commit 45bea50c91
No known key found for this signature in database
GPG Key ID: 73A788379A197567
3 changed files with 7 additions and 6 deletions

View File

@ -21,7 +21,7 @@ import baritone.api.utils.BlockOptionalMeta;
import baritone.api.utils.BlockOptionalMetaLookup;
import net.minecraft.block.Block;
import java.util.Arrays;
import java.util.stream.Stream;
/**
* @author Brady
@ -93,7 +93,7 @@ public interface IMineProcess extends IBaritoneProcess {
*/
default void mine(int quantity, Block... blocks) {
mine(quantity, new BlockOptionalMetaLookup(
Arrays.stream(blocks)
Stream.of(blocks)
.map(BlockOptionalMeta::new)
.toArray(BlockOptionalMeta[]::new)
));

View File

@ -24,6 +24,7 @@ import net.minecraft.util.text.TextComponentString;
import net.minecraft.util.text.TextFormatting;
import java.util.Arrays;
import java.util.stream.Stream;
/**
* @author Brady
@ -88,7 +89,7 @@ public interface Helper {
* @param color The color to print that message in
*/
default void logDirect(String message, TextFormatting color) {
Arrays.stream(message.split("\n")).forEach(line -> {
Stream.of(message.split("\n")).forEach(line -> {
ITextComponent component = new TextComponentString(line.replace("\t", " "));
component.getStyle().setColor(color);
logDirect(component);

View File

@ -34,7 +34,6 @@ import java.nio.file.Files;
import java.nio.file.NoSuchFileException;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.function.Consumer;
@ -42,6 +41,7 @@ import java.util.function.Function;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static net.minecraft.client.Minecraft.getMinecraft;
@ -242,7 +242,7 @@ public class SettingsUtil {
Type type = ((ParameterizedType) context.getSetting().getType()).getActualTypeArguments()[0];
Parser parser = Parser.getParser(type);
return Arrays.stream(raw.split(","))
return Stream.of(raw.split(","))
.map(s -> parser.parse(context, s))
.collect(Collectors.toList());
}
@ -301,7 +301,7 @@ public class SettingsUtil {
}
public static Parser getParser(Type type) {
return Arrays.stream(values())
return Stream.of(values())
.filter(parser -> parser.accepts(type))
.findFirst().orElse(null);
}