2018-10-13 23:46:30 +02:00
|
|
|
package de.ellpeck.naturesaura.blocks;
|
|
|
|
|
2020-01-29 00:40:28 +01:00
|
|
|
import de.ellpeck.naturesaura.data.BlockStateGenerator;
|
|
|
|
import de.ellpeck.naturesaura.reg.ICustomBlockState;
|
2018-10-13 23:46:30 +02:00
|
|
|
import de.ellpeck.naturesaura.reg.IModItem;
|
|
|
|
import de.ellpeck.naturesaura.reg.ModRegistry;
|
2021-12-15 14:26:42 +01:00
|
|
|
import net.minecraft.world.level.block.RotatedPillarBlock;
|
|
|
|
import net.minecraft.world.level.block.SoundType;
|
|
|
|
import net.minecraft.world.level.material.Material;
|
|
|
|
import net.minecraft.world.level.material.MaterialColor;
|
2018-10-13 23:46:30 +02:00
|
|
|
|
2020-09-22 03:17:02 +02:00
|
|
|
public class BlockAncientLog extends RotatedPillarBlock implements IModItem, ICustomBlockState {
|
2018-10-13 23:46:30 +02:00
|
|
|
|
2018-12-22 12:51:11 +01:00
|
|
|
private final String baseName;
|
|
|
|
|
|
|
|
public BlockAncientLog(String baseName) {
|
2021-12-15 14:26:42 +01:00
|
|
|
super(Properties.of(Material.WOOD, MaterialColor.COLOR_PURPLE).strength(2.0F).sound(SoundType.WOOD));
|
2018-12-22 12:51:11 +01:00
|
|
|
this.baseName = baseName;
|
2022-06-27 15:24:04 +02:00
|
|
|
ModRegistry.ALL_ITEMS.add(this);
|
2018-10-13 23:46:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getBaseName() {
|
2018-12-22 12:51:11 +01:00
|
|
|
return this.baseName;
|
2018-10-13 23:46:30 +02:00
|
|
|
}
|
2020-01-29 00:40:28 +01:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void generateCustomBlockState(BlockStateGenerator generator) {
|
|
|
|
generator.logBlock(this);
|
|
|
|
}
|
2018-10-13 23:46:30 +02:00
|
|
|
}
|