9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-29 20:09:23 +00:00

fix: renewable coral particles(#566)

This commit is contained in:
MC_XiaoHei
2025-07-04 13:36:14 +08:00
parent 6a87dce5f1
commit 1affbb084c

View File

@@ -3,6 +3,7 @@ package org.leavesmc.leaves.util;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Holder;
import net.minecraft.core.HolderSet;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.core.registries.Registries;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.tags.BlockTags;
@@ -35,6 +36,7 @@ public interface FertilizableCoral extends BonemealableBlock {
@Override
default boolean isBonemealSuccess(@NotNull Level world, RandomSource random, @NotNull BlockPos pos, @NotNull BlockState state) {
((ServerLevel)world).sendParticles(ParticleTypes.HAPPY_VILLAGER, pos.getX() + 0.5, pos.getY() + 1.0, pos.getZ() + 0.5, 8, 0.3, 0.5, 0.3, 0.0);
return random.nextFloat() < 0.15D;
}