diff --git a/gradle.properties b/gradle.properties index 0fc0b355e..0daf7e1d4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ org.gradle.daemon=false # Dependency Version minecraftVersion=1.18.2 forgeVersion=40.2.0 -lodestoneVersion=1.4.2.495 +lodestoneVersion=1.4.2.496 forgegradleVersion=5.1.53 mixingradleVersion=0.7-SNAPSHOT librarianVersion=1.+ diff --git a/src/main/java/com/sammy/malum/client/renderer/block/VoidConduitRenderer.java b/src/main/java/com/sammy/malum/client/renderer/block/VoidConduitRenderer.java index 4354ff744..f28e75084 100644 --- a/src/main/java/com/sammy/malum/client/renderer/block/VoidConduitRenderer.java +++ b/src/main/java/com/sammy/malum/client/renderer/block/VoidConduitRenderer.java @@ -19,21 +19,7 @@ public class VoidConduitRenderer implements BlockEntityRenderer { - public static final ArrayList COLORS = new ArrayList<>(); - static { - COLORS.add(new Color(242, 242, 89)); - COLORS.add(new Color(242, 89, 242)); - COLORS.add(new Color(89, 242, 242)); - COLORS.add(new Color(242, 89, 89)); - COLORS.add(new Color(116, 240, 30)); - COLORS.add(new Color(240, 30, 116)); - COLORS.add(new Color(30, 116, 240)); - COLORS.add(new Color(116, 30, 240)); - } - - public static final ResourceLocation VIGNETTE = MalumMod.malumPath("textures/block/weeping_well/primordial_soup_vignette.png"); - public static final ResourceLocation SQUARE = MalumMod.malumPath("textures/vfx/expanding_square.png"); public VoidConduitRenderer(BlockEntityRendererProvider.Context context) { } diff --git a/src/main/java/com/sammy/malum/common/block/curiosities/weeping_well/VoidConduitBlockEntity.java b/src/main/java/com/sammy/malum/common/block/curiosities/weeping_well/VoidConduitBlockEntity.java index a7ca950a3..2649ff35d 100644 --- a/src/main/java/com/sammy/malum/common/block/curiosities/weeping_well/VoidConduitBlockEntity.java +++ b/src/main/java/com/sammy/malum/common/block/curiosities/weeping_well/VoidConduitBlockEntity.java @@ -121,6 +121,7 @@ else if (streak != 0) { } else { WeepingWellParticleEffects.passiveWeepingWellParticles(this); + WeepingWellParticleEffects.radiantWeepingWellParticles(this); } } diff --git a/src/main/java/com/sammy/malum/registry/client/ParticleRegistry.java b/src/main/java/com/sammy/malum/registry/client/ParticleRegistry.java index 06bbe4a11..5724509b2 100644 --- a/src/main/java/com/sammy/malum/registry/client/ParticleRegistry.java +++ b/src/main/java/com/sammy/malum/registry/client/ParticleRegistry.java @@ -26,6 +26,8 @@ public class ParticleRegistry { public static RegistryObject ROUND_SPARK = PARTICLES.register("round_spark", LodestoneSparkParticleType::new); + public static RegistryObject SQUARE = PARTICLES.register("square", LodestoneDirectionalParticleType::new); + public static RegistryObject SCYTHE_CUT_ATTACK_PARTICLE = PARTICLES.register("scythe_cut_attack", () -> new SimpleParticleType(true)); public static RegistryObject SCYTHE_SWEEP_ATTACK_PARTICLE = PARTICLES.register("scythe_sweep_attack", () -> new SimpleParticleType(true)); @@ -39,6 +41,8 @@ public static void registerParticleFactory(ParticleFactoryRegisterEvent event) { Minecraft.getInstance().particleEngine.register(ROUND_SPARK.get(), LodestoneSparkParticleType.Factory::new); + Minecraft.getInstance().particleEngine.register(SQUARE.get(), LodestoneDirectionalParticleType.Factory::new); + Minecraft.getInstance().particleEngine.register(SCYTHE_CUT_ATTACK_PARTICLE.get(), ScytheAttackParticle.Factory::new); Minecraft.getInstance().particleEngine.register(SCYTHE_SWEEP_ATTACK_PARTICLE.get(), ScytheAttackParticle.Factory::new); } diff --git a/src/main/java/com/sammy/malum/visual_effects/WeepingWellParticleEffects.java b/src/main/java/com/sammy/malum/visual_effects/WeepingWellParticleEffects.java index e71a0b873..93074f1c4 100644 --- a/src/main/java/com/sammy/malum/visual_effects/WeepingWellParticleEffects.java +++ b/src/main/java/com/sammy/malum/visual_effects/WeepingWellParticleEffects.java @@ -72,6 +72,25 @@ public static void passiveWeepingWellParticles(VoidConduitBlockEntity voidCondui } } } + + + public static void radiantWeepingWellParticles(VoidConduitBlockEntity voidConduit) { + Level level = voidConduit.getLevel(); + final BlockPos blockPos = voidConduit.getBlockPos(); + Random rand = level.random; + int lifetime = RandomHelper.randomBetween(rand, 40, 80); + float xMotion = RandomHelper.randomBetween(rand, -0.02f, 0.02f); + float yMotion = 0.05f; + float zMotion = RandomHelper.randomBetween(rand, -0.02f, 0.02f); + Vec3 motion = new Vec3(xMotion, yMotion, zMotion); + DirectionalParticleBuilder.create(ParticleRegistry.SQUARE) + .setDirection(motion.normalize().scale(Math.PI/2f)) + .setLifetime(lifetime) + .setMotion(motion) + .setRenderType(LodestoneWorldParticleRenderType.LUMITRANSPARENT) + .spawn(level, blockPos.getX(), blockPos.getY()+4, blockPos.getZ()); + } + public static ParticleEffectSpawner weepingWellSpecs(Level level, Vec3 pos) { Random rand = level.random; Color color = getWeepingWellSmokeColor(rand); diff --git a/src/main/resources/assets/malum/particles/square.json b/src/main/resources/assets/malum/particles/square.json new file mode 100644 index 000000000..990ec69d0 --- /dev/null +++ b/src/main/resources/assets/malum/particles/square.json @@ -0,0 +1,7 @@ +{ + "textures": [ + "malum:square0", + "malum:square1", + "malum:square2" + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/malum/textures/particle/square0.png b/src/main/resources/assets/malum/textures/particle/square0.png new file mode 100644 index 000000000..1ad3cf984 Binary files /dev/null and b/src/main/resources/assets/malum/textures/particle/square0.png differ diff --git a/src/main/resources/assets/malum/textures/particle/square1.png b/src/main/resources/assets/malum/textures/particle/square1.png new file mode 100644 index 000000000..941f6dbd8 Binary files /dev/null and b/src/main/resources/assets/malum/textures/particle/square1.png differ diff --git a/src/main/resources/assets/malum/textures/particle/square2.png b/src/main/resources/assets/malum/textures/particle/square2.png new file mode 100644 index 000000000..092ec8d27 Binary files /dev/null and b/src/main/resources/assets/malum/textures/particle/square2.png differ diff --git a/src/main/resources/assets/malum/textures/vfx/expanding_square.png b/src/main/resources/assets/malum/textures/vfx/expanding_square.png deleted file mode 100644 index 89cc23622..000000000 Binary files a/src/main/resources/assets/malum/textures/vfx/expanding_square.png and /dev/null differ