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

32 lines
988 B
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;
2019-10-20 22:30:49 +02:00
import net.minecraft.block.LogBlock;
2020-01-24 17:05:41 +01:00
import net.minecraft.block.SoundType;
2019-11-04 19:08:49 +01:00
import net.minecraft.block.material.Material;
import net.minecraft.block.material.MaterialColor;
2018-10-13 23:46:30 +02:00
2020-01-29 00:40:28 +01:00
public class BlockAncientLog extends LogBlock implements IModItem, ICustomBlockState {
2018-10-13 23:46:30 +02:00
private final String baseName;
public BlockAncientLog(String baseName) {
2020-01-24 17:05:41 +01:00
super(MaterialColor.PURPLE, ModBlocks.prop(Material.WOOD).hardnessAndResistance(2.0F).sound(SoundType.WOOD));
this.baseName = baseName;
2018-11-29 17:58:47 +01:00
ModRegistry.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
}