From d1dbffe1d6fdb13b7c473ac1e684061b1224cc0b Mon Sep 17 00:00:00 2001 From: FaeWulfs Date: Sun, 10 Nov 2024 14:14:53 +0700 Subject: [PATCH] ~ Change: Finalize the feature. --- .../bonemealSmallFlower/FlowerBlockMixin.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/common/src/main/java/xyz/faewulf/diversity/mixin/bonemealSmallFlower/FlowerBlockMixin.java b/common/src/main/java/xyz/faewulf/diversity/mixin/bonemealSmallFlower/FlowerBlockMixin.java index a3ecd50..5221a51 100644 --- a/common/src/main/java/xyz/faewulf/diversity/mixin/bonemealSmallFlower/FlowerBlockMixin.java +++ b/common/src/main/java/xyz/faewulf/diversity/mixin/bonemealSmallFlower/FlowerBlockMixin.java @@ -1,6 +1,7 @@ package xyz.faewulf.diversity.mixin.bonemealSmallFlower; import net.minecraft.core.BlockPos; +import net.minecraft.core.particles.ParticleTypes; import net.minecraft.server.level.ServerLevel; import net.minecraft.tags.BlockTags; import net.minecraft.util.RandomSource; @@ -53,6 +54,13 @@ public class FlowerBlockMixin implements ICustomBonemealable { if (compare.isHasTag(blockState.getBlock(), "diversity:rich_soil")) { level.setBlock(blockPos, state, Block.UPDATE_ALL); } + + level.sendParticles(ParticleTypes.HAPPY_VILLAGER, // Bonemeal-like particles + blockPos.getX() + 0.5, blockPos.getY() + 0.5, blockPos.getZ() + 0.5, // Position (above the block) + 7, // Number of particles + 0.3, 0.3, 0.3, // Particle spread on X, Y, Z axes + 0.1 // Particle speed + ); } } } @@ -65,5 +73,12 @@ public class FlowerBlockMixin implements ICustomBonemealable { } ++l; } + + level.sendParticles(ParticleTypes.HAPPY_VILLAGER, // Bonemeal-like particles + pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, // Position (above the block) + 7, // Number of particles + 0.3, 0.3, 0.3, // Particle spread on X, Y, Z axes + 0.1 // Particle speed + ); } }