Allow sparks to have different color networks like corporea. For now, show by coloring the upgrade icon, and displaying the corporea star if there is no upgrade

This commit is contained in:
Vincent Lee committed 2019-10-07 19:40:34 -05:00
1 parent be6d7f610e
commit d798e44e8c
10 files changed
+136 -105

No files matched your search

@@ -12,15 +12,21 @@ package vazkii.botania.api.mana.spark;
import com.google.common.base.Predicates;
import net.minecraft.entity.Entity;
import net.minecraft.item.DyeColor;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.world.World;
import java.util.List;
import java.util.stream.Stream;
public final class SparkHelper {
public static final int SPARK_SCAN_RANGE = 12;
public static Stream<ISparkEntity> getSparksAround(World world, double x, double y, double z, DyeColor color) {
return getSparksAround(world, x, y, z).stream().filter(s -> s.getNetwork() == color);
}
public static List<ISparkEntity> getSparksAround(World world, double x, double y, double z) {
return SparkHelper.getEntitiesAround(ISparkEntity.class, world, x, y, z);
}