NaturesAura/src/main/java/de/ellpeck/naturesaura/blocks/BlockAncientLog.java

32 lines
1 KiB
Java
Raw Normal View History

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;
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
private final String baseName;
public BlockAncientLog(String baseName) {
super(Properties.of(Material.WOOD, MaterialColor.COLOR_PURPLE).strength(2.0F).sound(SoundType.WOOD));
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() {
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
}