42 lines
1.5 KiB
Java
42 lines
1.5 KiB
Java
package com.thebrokenrail.energonrelics.block.structure;
|
|
|
|
import com.thebrokenrail.energonrelics.block.entity.structure.ResearchComplexGeneratorBlockEntity;
|
|
import com.thebrokenrail.energonrelics.block.util.SimpleBlockWithEntity;
|
|
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
|
import net.minecraft.block.Block;
|
|
import net.minecraft.block.BlockState;
|
|
import net.minecraft.block.Material;
|
|
import net.minecraft.block.entity.BlockEntity;
|
|
import net.minecraft.block.entity.BlockEntityType;
|
|
import net.minecraft.state.StateManager;
|
|
import net.minecraft.state.property.DirectionProperty;
|
|
import net.minecraft.state.property.Properties;
|
|
import net.minecraft.util.math.Direction;
|
|
|
|
import java.util.function.Function;
|
|
|
|
public class ResearchComplexGeneratorBlock extends SimpleBlockWithEntity {
|
|
public static DirectionProperty HORIZONTAL_FACING = Properties.HORIZONTAL_FACING;
|
|
|
|
public ResearchComplexGeneratorBlock() {
|
|
super(FabricBlockSettings.of(Material.STONE).strength(-1.0F, 3600000.0F).dropsNothing());
|
|
setDefaultState(getDefaultState().with(HORIZONTAL_FACING, Direction.NORTH));
|
|
}
|
|
|
|
@Override
|
|
protected boolean registerItem() {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
|
|
super.appendProperties(builder);
|
|
builder.add(HORIZONTAL_FACING);
|
|
}
|
|
|
|
@Override
|
|
protected Function<BlockEntityType<BlockEntity>, BlockEntity> getFactory() {
|
|
return ResearchComplexGeneratorBlockEntity::new;
|
|
}
|
|
}
|