Files
ThisRocks/src/main/java/eu/midnightdust/motschen/rocks/block/Pinecone.java
Motschen c6b4e00e0e This Rocks 1.1.0
Added Starfish
Added Underwater Generation
Changed Block Sounds
Changed SelectionBox sizes
New Seashell Loot Table
Update MidnightHats
2020-11-01 15:45:45 +01:00

35 lines
1.1 KiB
Java

package eu.midnightdust.motschen.rocks.block;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.*;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.world.BlockView;
import net.minecraft.world.WorldView;
public class Pinecone extends Block {
private static final VoxelShape SHAPE;
public Pinecone() {
super(FabricBlockSettings.copy(Blocks.POPPY).nonOpaque().sounds(BlockSoundGroup.WOOD));
this.setDefaultState(this.stateManager.getDefaultState());
}
@Override
public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext context) {
return SHAPE;
}
static {
VoxelShape shape = createCuboidShape(0, 0, 0, 16, 3, 16);
SHAPE = shape;
}
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
return world.getBlockState(pos.down()).isSideSolidFullSquare(world,pos,Direction.UP);
}
}