aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CITEnchantment.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CITEnchantment.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CITEnchantment.java
index 09fbb90..6dc7a5a 100644
--- a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CITEnchantment.java
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CITEnchantment.java
@@ -26,7 +26,7 @@ public class CITEnchantment extends CIT {
public final Identifier textureIdentifier;
public final float speed, rotation, duration;
public final int layer;
- public final boolean useGlint;
+ public final boolean useGlint, blur;
public final Blend blend;
public final Map<GlintRenderLayer, RenderLayer> renderLayers = new EnumMap<>(GlintRenderLayer.class);
@@ -52,6 +52,12 @@ public class CITEnchantment extends CIT {
default -> throw new Exception("useGlint is not a boolean");
};
+ blur = switch (properties.getProperty("blur", "true").toLowerCase(Locale.ENGLISH)) {
+ case "true" -> true;
+ case "false" -> false;
+ default -> throw new Exception("blur is not a boolean");
+ };
+
blend = Blend.valueOf(properties.getProperty("blend", "add").toUpperCase(Locale.ENGLISH));
} catch (Exception e) {
throw new CITParseException(pack.resourcePack, identifier, (e.getClass() == Exception.class ? "" : e.getClass().getSimpleName() + ": ") + e.getMessage());
@@ -148,7 +154,7 @@ public class CITEnchantment extends CIT {
final float speed = enchantment.speed, rotation = enchantment.rotation;
//noinspection ConstantConditions
RenderLayer.MultiPhaseParameters.Builder layer = RenderLayer.MultiPhaseParameters.builder()
- .texture(new RenderPhase.Texture(enchantment.textureIdentifier, false, false))
+ .texture(new RenderPhase.Texture(enchantment.textureIdentifier, enchantment.blur, false))
.texturing(new RenderPhase.Texturing("citresewn_glint_texturing", () -> {
float l = Util.getMeasuringTimeMs() * CITResewnConfig.INSTANCE().citenchantment_scroll_multiplier * speed;
float x = (l % 110000f) / 110000f;