forked from ethanicusss/AstralAdditions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBubbleBlock.java
More file actions
26 lines (21 loc) · 1.02 KB
/
BubbleBlock.java
File metadata and controls
26 lines (21 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package com.github.ethanicuss.astraladditions.blocks;
import com.github.ethanicuss.astraladditions.util.ModUtils;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.entity.Entity;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public class BubbleBlock extends Block {
public BubbleBlock(Settings settings) {
super(settings);
}
public void onSteppedOn(World world, BlockPos pos, BlockState state, Entity entity) {
world.setBlockState(pos, Blocks.AIR.getDefaultState());
ModUtils.spawnForcedParticles((ServerWorld)world, ParticleTypes.BUBBLE, pos.getX(), pos.getY(), pos.getZ(), 10, 0.8, 0.8, 0.8, 0.1);
ModUtils.spawnForcedParticles((ServerWorld)world, ParticleTypes.SPLASH, pos.getX(), pos.getY(), pos.getZ(), 10, 0.8, 0.8, 0.8, 0.1);
super.onSteppedOn(world, pos, state, entity);
}
}