Skip to content

Commit

Permalink
agh
Browse files Browse the repository at this point in the history
  • Loading branch information
SammySemicolon committed Oct 29, 2023
1 parent 7ee342c commit 1f13e95
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 15 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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.+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,7 @@

public class VoidConduitRenderer implements BlockEntityRenderer<VoidConduitBlockEntity> {

public static final ArrayList<Color> 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) {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ else if (streak != 0) {
}
else {
WeepingWellParticleEffects.passiveWeepingWellParticles(this);
WeepingWellParticleEffects.radiantWeepingWellParticles(this);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public class ParticleRegistry {

public static RegistryObject<LodestoneSparkParticleType> ROUND_SPARK = PARTICLES.register("round_spark", LodestoneSparkParticleType::new);

public static RegistryObject<LodestoneDirectionalParticleType> SQUARE = PARTICLES.register("square", LodestoneDirectionalParticleType::new);

public static RegistryObject<SimpleParticleType> SCYTHE_CUT_ATTACK_PARTICLE = PARTICLES.register("scythe_cut_attack", () -> new SimpleParticleType(true));
public static RegistryObject<SimpleParticleType> SCYTHE_SWEEP_ATTACK_PARTICLE = PARTICLES.register("scythe_sweep_attack", () -> new SimpleParticleType(true));

Expand All @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<WorldParticleBuilder> weepingWellSpecs(Level level, Vec3 pos) {
Random rand = level.random;
Color color = getWeepingWellSmokeColor(rand);
Expand Down
7 changes: 7 additions & 0 deletions src/main/resources/assets/malum/particles/square.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"textures": [
"malum:square0",
"malum:square1",
"malum:square2"
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.

0 comments on commit 1f13e95

Please sign in to comment.