First release

Yay!
This commit is contained in:
Motschen
2020-10-29 13:47:16 +01:00
parent 4da8817481
commit 83279cc769
111 changed files with 3279 additions and 2 deletions

View File

@@ -0,0 +1,34 @@
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.STONE));
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);
}
}