Advertisement
jayhillx

particle

Apr 30th, 2022
935
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.79 KB | None | 0 0
  1. @Override
  2.     public void animateTick(BlockState state, Level level, BlockPos pos, Random random) {
  3.         super.animateTick(state, level, pos, random);
  4.  
  5.         if (random.nextInt(80) == 0) {
  6.             BlockPos belowPos = pos.below();
  7.  
  8.             if (level.isEmptyBlock(belowPos)) {
  9.                 double d0 = random.nextGaussian() * 0.02D;
  10.                 double d1 = random.nextGaussian() * 0.02D;
  11.                 double d2 = random.nextGaussian() * 0.02D;
  12.  
  13.                 double d3 = (float)pos.getX() + random.nextFloat();
  14.                 double d4 = (double)pos.getY() - 0.05D;
  15.                 double d6 = (float)pos.getZ() + random.nextFloat();
  16.  
  17.                 level.addParticle(MysticParticles.FALLING_JACARANDA.get(), d3, d4, d6, d0, d1, d2);
  18.             }
  19.         }
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement