Black spore particle

This commit is contained in:
paulevsGitch 2020-12-14 13:03:21 +03:00
parent 99f5a20d0b
commit ae172a1517
11 changed files with 107 additions and 4 deletions

View file

@ -6,9 +6,9 @@ import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.block.BlockState;
import net.minecraft.block.MaterialColor;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import ru.betterend.registry.EndParticles;
public class BlockShadowGrass extends BlockTerrain {
public BlockShadowGrass() {
@ -19,7 +19,7 @@ public class BlockShadowGrass extends BlockTerrain {
public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random) {
super.randomDisplayTick(state, world, pos, random);
if (random.nextInt(32) == 0) {
world.addParticle(ParticleTypes.SMOKE, (double) pos.getX() + random.nextDouble(), (double) pos.getY() + 1.1D, (double) pos.getZ() + random.nextDouble(), 0.0D, 0.0D, 0.0D);
world.addParticle(EndParticles.BLACK_SPORE, (double) pos.getX() + random.nextDouble(), (double) pos.getY() + 1.1D, (double) pos.getZ() + random.nextDouble(), 0.0D, 0.0D, 0.0D);
}
}
}