Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.9-SNAPSHOT'
id 'fabric-loom' version '1.10-SNAPSHOT'
id 'maven-publish'
id "me.modmuss50.mod-publish-plugin" version "0.5.1"
}
Expand Down
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.21.4
yarn_mappings=1.21.4+build.4
loader_version=0.16.9
minecraft_version=1.21.5
yarn_mappings=1.21.5+build.1
loader_version=0.16.14

# Mod Properties
mod_name=Particular
mod_version=1.1.1+1.21.4
mod_version=1.1.1+1.21.5
maven_group=com.chailotl.particular
archives_base_name=particular

# Dependencies
fabric_version=0.113.0+1.21.4
owo_version=0.12.19+1.21.4
fabric_version=0.121.0+1.21.5
owo_version=0.12.20+1.21.5
sushi_version=0.2.1+1.21
seasons_version=2.2.1+1.20
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/chailotl/particular/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public static void spawnBubble(ParticleEffect particle, World world, BlockPos po
double y = pos.getY() + 0.25d + world.random.nextDouble() * 0.5d;
double z = pos.getZ() + 0.25d + world.random.nextDouble() * 0.5d;

world.addParticle(particle, x, y, z, 0, 0, 0);
world.addParticleClient(particle, x, y, z, 0, 0, 0);
}

public static void spawnFirefly(World world, BlockPos pos, Random random)
Expand All @@ -280,7 +280,7 @@ public static void spawnFirefly(World world, BlockPos pos, Random random)
temp >= CONFIG.fireflySettings.minTemp() &&
temp <= CONFIG.fireflySettings.maxTemp())
{
world.addParticle(Particles.FIREFLY, pos.getX() + 0.5f, pos.getY() + 0.5f, pos.getZ() + 0.5f, 0, 0, 0);
world.addParticleClient(Particles.FIREFLY, pos.getX() + 0.5f, pos.getY() + 0.5f, pos.getZ() + 0.5f, 0, 0, 0);
}
}
}
Expand Down Expand Up @@ -340,7 +340,7 @@ public static void spawnDoubleBubbles(ParticleEffect particle, World world, Bloc
double y = pos.getY() + 0.25d + world.random.nextDouble() * 0.5d;
double z = pos.getZ() + 0.25d + world.random.nextDouble() * (0.5d + zLen) + zOffset;

world.addParticle(particle, x, y, z, 0, 0, 0);
world.addParticleClient(particle, x, y, z, 0, 0, 0);
}
}

Expand Down Expand Up @@ -407,7 +407,7 @@ public static void spawnDoubleChestBubbles(ParticleEffect particle, World world,
double y = pos.getY() + 0.25d + world.random.nextDouble() * 0.5d;
double z = pos.getZ() + 0.25d + world.random.nextDouble() * (0.5d + zLen) + zOffset;

world.addParticle(particle, x, y, z, 0, 0, 0);
world.addParticleClient(particle, x, y, z, 0, 0, 0);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void spawnParticles(BlockState state, World world, BlockPos pos, Random r
double x = (double)pos.getX() + random.nextDouble();
double y = (double)pos.getY() + random.nextDouble();
double z = (double)pos.getZ() + random.nextDouble();
world.addParticle(Particles.CAVE_DUST, x, y, z, 0.0, 0.0, 0.0);
world.addParticleClient(Particles.CAVE_DUST, x, y, z, 0.0, 0.0, 0.0);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private static void randomlyOpen(World world, BlockPos pos, BlockState state, In
blockEntity.ticksUntilNextSwitch = world.random.nextBetween(minOpenTime, maxOpenTime);
((AccessorChestBlockEntity) blockEntity).getLidAnimator().setOpen(true);
((InvokerViewerCountManager)manager).invokeOnContainerOpen(world, pos, blockEntity.getCachedState());
world.playSound(pos.getX(), pos.getY(), pos.getZ(), SoundEvents.BLOCK_BUBBLE_COLUMN_UPWARDS_AMBIENT, SoundCategory.AMBIENT, 1f, 1f, true);
world.playSoundAtBlockCenterClient(pos, SoundEvents.BLOCK_BUBBLE_COLUMN_UPWARDS_AMBIENT, SoundCategory.AMBIENT, 1f, 1f, true);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private void addRipples(CallbackInfo ci)
float yWater = pos.getY() + fluidState.getHeight(world, pos);
if (y < yWater)
{
world.addParticle(Particles.WATER_RIPPLE, x, yWater, z, 0, 0, 0);
world.addParticleClient(Particles.WATER_RIPPLE, x, yWater, z, 0, 0, 0);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private static void randomlyOpen(World world, BlockPos pos, BlockState state, In
blockEntity.ticksUntilNextSwitch = world.random.nextBetween(minOpenTime, maxOpenTime);
((AccessorEnderChestBlockEntity) blockEntity).getLidAnimator().setOpen(true);
((InvokerViewerCountManager)manager).invokeOnContainerOpen(world, pos, blockEntity.getCachedState());
world.playSound(pos.getX(), pos.getY(), pos.getZ(), SoundEvents.BLOCK_BUBBLE_COLUMN_UPWARDS_AMBIENT, SoundCategory.AMBIENT, 1f, 1f, true);
world.playSoundAtBlockCenterClient(pos, SoundEvents.BLOCK_BUBBLE_COLUMN_UPWARDS_AMBIENT, SoundCategory.AMBIENT, 1f, 1f, true);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ private void waterParticles(CallbackInfo ci)

if (!foundSurface) { return; }

if (velocities.size() < 2) { return; }

// 3D splash
getWorld().addParticle(Particles.WATER_SPLASH_EMITTER, getX(), baseY + prevState.getHeight(), getZ(), dimensions.width(), Collections.max(velocities), 0.0);
getWorld().addParticleClient(Particles.WATER_SPLASH_EMITTER, getX(), baseY + prevState.getHeight(), getZ(), dimensions.width(), Collections.max(velocities), 0.0);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ private void waterParticles(World world, BlockPos pos, FluidState state, Random
z += random.nextDouble();
}

world.addParticle(Particles.WATERFALL_SPRAY, x, y, z, 0.0, 0.0, 0.0);
world.addParticleClient(Particles.WATERFALL_SPRAY, x, y, z, 0.0, 0.0, 0.0);
}
else
{
double x = (double) pos.getX() + random.nextDouble();
double y = (double) pos.getY() + (random.nextDouble() * state.getHeight());
double z = (double) pos.getZ() + random.nextDouble();
Vec3d vel = state.getVelocity(world, pos).multiply(0.075);
world.addParticle(Particles.WATERFALL_SPRAY, x, y, z, vel.x, 0.0, vel.z);
world.addParticleClient(Particles.WATERFALL_SPRAY, x, y, z, vel.x, 0.0, vel.z);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ protected WaterRippleParticle(ClientWorld world, double x, double y, double z, S
@Override
public void tick()
{
prevPosX = x;
prevPosY = y;
prevPosZ = z;
lastX = x;
lastY = y;
lastZ = z;
if (age++ >= maxAge)
{
markDead();
Expand All @@ -51,9 +51,9 @@ public ParticleTextureSheet getType()
public void render(VertexConsumer vertexConsumer, Camera camera, float tickDelta)
{
Vec3d vec3d = camera.getPos();
float f = (float)(MathHelper.lerp(tickDelta, prevPosX, x) - vec3d.getX());
float g = (float)(MathHelper.lerp(tickDelta, prevPosY, y) - vec3d.getY());
float h = (float)(MathHelper.lerp(tickDelta, prevPosZ, z) - vec3d.getZ());
float f = (float)(MathHelper.lerp(tickDelta, lastX, x) - vec3d.getX());
float g = (float)(MathHelper.lerp(tickDelta, lastY, y) - vec3d.getY());
float h = (float)(MathHelper.lerp(tickDelta, lastZ, z) - vec3d.getZ());

Vector3f[] vector3fs = new Vector3f[]{new Vector3f(-1.0F, 0.0F, -1.0f), new Vector3f(-1.0F, 0.0F, 1.0F), new Vector3f(1.0F, 0.0F, 1.0F), new Vector3f(1.0F, 0.0F, -1.0F)};
float j = getSize(tickDelta);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ protected WaterfallSprayParticle(ClientWorld clientWorld, double d, double e, do
@Override
public void tick()
{
prevPosX = x;
prevPosY = y;
prevPosZ = z;
lastX = x;
lastY = y;
lastZ = z;

if (maxAge-- <= 0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ else if (!expiring && (onGround || velocityY == 0))
}
}

prevAngle = angle;
lastAngle = angle;

BlockPos pos = BlockPos.ofFloored(x, y, z);
FluidState fluidState = world.getFluidState(pos);
Expand All @@ -105,7 +105,7 @@ else if (!expiring && (onGround || velocityY == 0))
y = pos.getY() + fluidState.getHeight(world, pos);
if (Main.CONFIG.fallingLeavesSettings.spawnRipples())
{
world.addParticle(Particles.WATER_RIPPLE, x, y, z, 0, 0, 0);
world.addParticleClient(Particles.WATER_RIPPLE, x, y, z, 0, 0, 0);
}
}

Expand Down Expand Up @@ -134,9 +134,9 @@ public ParticleTextureSheet getType()
public void render(VertexConsumer vertexConsumer, Camera camera, float tickDelta)
{
Vec3d vec3d = camera.getPos();
float f = (float)(MathHelper.lerp(tickDelta, prevPosX, x) - vec3d.getX());
float g = (float)(MathHelper.lerp(tickDelta, prevPosY, y) - vec3d.getY());
float h = (float)(MathHelper.lerp(tickDelta, prevPosZ, z) - vec3d.getZ());
float f = (float)(MathHelper.lerp(tickDelta, lastX, x) - vec3d.getX());
float g = (float)(MathHelper.lerp(tickDelta, lastY, y) - vec3d.getY());
float h = (float)(MathHelper.lerp(tickDelta, lastZ, z) - vec3d.getZ());

Vector3f[] vector3fs;
float j = getSize(tickDelta);
Expand All @@ -153,7 +153,7 @@ public void render(VertexConsumer vertexConsumer, Camera camera, float tickDelta
else
{
quaternionf = new Quaternionf(camera.getRotation());
quaternionf.rotateZ(MathHelper.lerp(tickDelta, prevAngle, angle));
quaternionf.rotateZ(MathHelper.lerp(tickDelta, lastAngle, angle));
}

for (int k = 0; k < 4; ++k)
Expand Down Expand Up @@ -203,7 +203,7 @@ else if (age > maxAge - fadeOutDuration)
l = m;
m = temp;
}

vertexConsumer.vertex(vector3fs[0].x(), vector3fs[0].y(), vector3fs[0].z()).texture(m, o).color(red, green, blue, alpha).light(p);
vertexConsumer.vertex(vector3fs[1].x(), vector3fs[1].y(), vector3fs[1].z()).texture(m, n).color(red, green, blue, alpha).light(p);
vertexConsumer.vertex(vector3fs[2].x(), vector3fs[2].y(), vector3fs[2].z()).texture(l, n).color(red, green, blue, alpha).light(p);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ public class WaterSplashEmitterParticle extends NoRenderParticle
this.width = width;
this.height = (speed / 2f + width / 3f);

clientWorld.addParticle(Particles.WATER_SPLASH, x, y, z, width, this.height, 0);
clientWorld.addParticle(Particles.WATER_SPLASH_FOAM, x, y, z, width, this.height, 0);
clientWorld.addParticle(Particles.WATER_SPLASH_RING, x, y, z, width, 0, 0);
clientWorld.addParticleClient(Particles.WATER_SPLASH, x, y, z, width, this.height, 0);
clientWorld.addParticleClient(Particles.WATER_SPLASH_FOAM, x, y, z, width, this.height, 0);
clientWorld.addParticleClient(Particles.WATER_SPLASH_RING, x, y, z, width, 0, 0);

if (speed > 0.5)
{
Expand All @@ -50,9 +50,9 @@ public void tick()

if (age == 8)
{
world.addParticle(Particles.WATER_SPLASH, x, y, z, width * 0.66f, height * 2f, 0);
world.addParticle(Particles.WATER_SPLASH_FOAM, x, y, z, width * 0.66f, height * 2f, 0);
world.addParticle(Particles.WATER_SPLASH_RING, x, y, z, width * 0.66f, 0, 0);
world.addParticleClient(Particles.WATER_SPLASH, x, y, z, width * 0.66f, height * 2f, 0);
world.addParticleClient(Particles.WATER_SPLASH_FOAM, x, y, z, width * 0.66f, height * 2f, 0);
world.addParticleClient(Particles.WATER_SPLASH_RING, x, y, z, width * 0.66f, 0, 0);
splash(width * 0.66f, (3f/8f + speed * 1/8f) + (width / 6f), 0.05f);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ public void tick()
public void render(VertexConsumer vertexConsumer, Camera camera, float tickDelta)
{
Vec3d vec3d = camera.getPos();
float f = (float)(MathHelper.lerp(tickDelta, prevPosX, x) - vec3d.getX());
float g = (float)(MathHelper.lerp(tickDelta, prevPosY, y) - vec3d.getY());
float h = (float)(MathHelper.lerp(tickDelta, prevPosZ, z) - vec3d.getZ());
float f = (float)(MathHelper.lerp(tickDelta, lastX, x) - vec3d.getX());
float g = (float)(MathHelper.lerp(tickDelta, lastY, y) - vec3d.getY());
float h = (float)(MathHelper.lerp(tickDelta, lastZ, z) - vec3d.getZ());

Vector3f[] vector3fs = new Vector3f[]{new Vector3f(-1.0F, 0.0F, -1.0f), new Vector3f(-1.0F, 0.0F, 1.0F), new Vector3f(1.0F, 0.0F, 1.0F), new Vector3f(1.0F, 0.0F, -1.0F)};
float ageDelta = MathHelper.lerp(tickDelta, age - 1, (float)age);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ public void tick()
public void render(VertexConsumer vertexConsumer, Camera camera, float tickDelta)
{
Vec3d vec3d = camera.getPos();
float f = (float) (MathHelper.lerp(tickDelta, prevPosX, x) - vec3d.getX());
float g = (float) (MathHelper.lerp(tickDelta, prevPosY, y) - vec3d.getY());
float h = (float) (MathHelper.lerp(tickDelta, prevPosZ, z) - vec3d.getZ());
float f = (float) (MathHelper.lerp(tickDelta, lastX, x) - vec3d.getX());
float g = (float) (MathHelper.lerp(tickDelta, lastY, y) - vec3d.getY());
float h = (float) (MathHelper.lerp(tickDelta, lastZ, z) - vec3d.getZ());

Vector3f[] vector3fs = new Vector3f[]{new Vector3f(-1.0F, 0.0F, -1.0f), new Vector3f(-1.0F, 0.0F, 1.0F), new Vector3f(1.0F, 0.0F, 1.0F), new Vector3f(1.0F, 0.0F, -1.0F)};
float ageDelta = MathHelper.lerp(tickDelta, age - 1, (float)age);
Expand Down