Dragon tree prototype (WIP)

This commit is contained in:
paulevsGitch 2020-11-01 00:49:29 +03:00
parent 30f7f53c7f
commit 3691e4b67e
21 changed files with 324 additions and 15 deletions

View file

@ -0,0 +1,25 @@
package ru.betterend.blocks;
import java.util.Random;
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;
public class BlockShadowGrass extends BlockTerrain {
public BlockShadowGrass() {
super(MaterialColor.BLACK);
}
@Environment(EnvType.CLIENT)
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);
}
}
}