use of hellfirepvp.astralsorcery.common.base.patreon.FlareColor in project AstralSorcery by HellFirePvP.
the class ProviderBlockRing method buildEffect.
@Override
public TypeBlockRing buildEffect(UUID playerUUID, List<String> effectParameters) throws Exception {
UUID effectUniqueId = UUID.fromString(effectParameters.get(0));
FlareColor fc = null;
if (!"null".equals(effectParameters.get(1))) {
fc = FlareColor.valueOf(effectParameters.get(1));
}
float distance = Float.parseFloat(effectParameters.get(2));
float rotationAngle = Float.parseFloat(effectParameters.get(3));
int repeats = Integer.parseInt(effectParameters.get(4));
int tickRotationSpeed = Integer.parseInt(effectParameters.get(5));
JsonArray jo = (JsonArray) PARSER.parse(effectParameters.get(6));
HashMap<BlockPos, BlockState> pattern = new HashMap<>();
for (JsonElement patternElement : jo) {
JsonObject obj = (JsonObject) patternElement;
BlockPos pos = new BlockPos(obj.getAsJsonPrimitive("posX").getAsInt(), obj.getAsJsonPrimitive("posY").getAsInt(), obj.getAsJsonPrimitive("posZ").getAsInt());
Block b = ForgeRegistries.BLOCKS.getValue(new ResourceLocation(obj.getAsJsonPrimitive("block").getAsString()));
pattern.put(pos, b.getDefaultState());
}
return new TypeBlockRing(effectUniqueId, fc, playerUUID, distance, rotationAngle, repeats, tickRotationSpeed, pattern);
}
use of hellfirepvp.astralsorcery.common.base.patreon.FlareColor in project AstralSorcery by HellFirePvP.
the class ProviderCelestialWings method buildEffect.
@Override
public TypeCelestialWings buildEffect(UUID playerUUID, List<String> effectParameters) throws Exception {
UUID effectUUID = UUID.fromString(effectParameters.get(0));
FlareColor fc = null;
if (!"null".equals(effectParameters.get(1))) {
fc = FlareColor.valueOf(effectParameters.get(1));
}
return new TypeCelestialWings(effectUUID, fc, playerUUID);
}
use of hellfirepvp.astralsorcery.common.base.patreon.FlareColor in project AstralSorcery by HellFirePvP.
the class ProviderFlare method buildEffect.
@Override
public PatreonEffect buildEffect(UUID playerUUID, List<String> effectParameters) throws Exception {
UUID effectUUID = UUID.fromString(effectParameters.get(0));
FlareColor fc = null;
if (!"null".equals(effectParameters.get(1))) {
fc = FlareColor.valueOf(effectParameters.get(1));
}
return new PatreonEffect(effectUUID, fc);
}
use of hellfirepvp.astralsorcery.common.base.patreon.FlareColor in project AstralSorcery by HellFirePvP.
the class ProviderNebulaCloud method buildEffect.
@Override
public TypeNebulaCloud buildEffect(UUID playerUUID, List<String> effectParameters) throws Exception {
UUID effectUUID = UUID.fromString(effectParameters.get(0));
FlareColor fc = null;
if (!"null".equals(effectParameters.get(1))) {
fc = FlareColor.valueOf(effectParameters.get(1));
}
return new TypeNebulaCloud(effectUUID, fc, playerUUID);
}
use of hellfirepvp.astralsorcery.common.base.patreon.FlareColor in project AstralSorcery by HellFirePvP.
the class ProviderStarHalo method buildEffect.
@Override
public TypeStarHalo buildEffect(UUID playerUUID, List<String> effectParameters) throws Exception {
UUID effectUUID = UUID.fromString(effectParameters.get(0));
FlareColor fc = null;
if (!"null".equals(effectParameters.get(1))) {
fc = FlareColor.valueOf(effectParameters.get(1));
}
return new TypeStarHalo(effectUUID, fc, playerUUID);
}
Aggregations