2019-02-24 17:44:53 +01:00
|
|
|
package de.ellpeck.naturesaura.blocks;
|
|
|
|
|
2019-02-25 12:28:41 +01:00
|
|
|
import de.ellpeck.naturesaura.api.render.IVisualizable;
|
2020-01-22 01:32:26 +01:00
|
|
|
import de.ellpeck.naturesaura.blocks.tiles.TileEntityFireworkGenerator;
|
2020-01-29 01:34:58 +01:00
|
|
|
import de.ellpeck.naturesaura.data.BlockStateGenerator;
|
|
|
|
import de.ellpeck.naturesaura.reg.ICustomBlockState;
|
2019-02-25 12:28:41 +01:00
|
|
|
import net.minecraft.block.SoundType;
|
2019-02-24 17:44:53 +01:00
|
|
|
import net.minecraft.block.material.Material;
|
2019-02-25 12:28:41 +01:00
|
|
|
import net.minecraft.util.math.AxisAlignedBB;
|
|
|
|
import net.minecraft.util.math.BlockPos;
|
|
|
|
import net.minecraft.world.World;
|
2019-10-20 22:30:49 +02:00
|
|
|
import net.minecraftforge.api.distmarker.Dist;
|
|
|
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
2019-02-24 17:44:53 +01:00
|
|
|
|
2020-01-29 01:34:58 +01:00
|
|
|
public class BlockFireworkGenerator extends BlockContainerImpl implements IVisualizable, ICustomBlockState {
|
2019-02-24 17:44:53 +01:00
|
|
|
public BlockFireworkGenerator() {
|
2020-01-22 01:32:26 +01:00
|
|
|
super("firework_generator", TileEntityFireworkGenerator::new, ModBlocks.prop(Material.ROCK).hardnessAndResistance(3F).sound(SoundType.STONE));
|
2019-02-25 12:28:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2019-10-20 22:30:49 +02:00
|
|
|
@OnlyIn(Dist.CLIENT)
|
2019-02-25 12:28:41 +01:00
|
|
|
public AxisAlignedBB getVisualizationBounds(World world, BlockPos pos) {
|
|
|
|
return new AxisAlignedBB(pos).grow(4);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2019-10-20 22:30:49 +02:00
|
|
|
@OnlyIn(Dist.CLIENT)
|
2019-02-25 12:28:41 +01:00
|
|
|
public int getVisualizationColor(World world, BlockPos pos) {
|
|
|
|
return 0xa442f4;
|
2019-02-24 17:44:53 +01:00
|
|
|
}
|
2020-01-29 01:34:58 +01:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void generateCustomBlockState(BlockStateGenerator generator) {
|
|
|
|
generator.simpleBlock(this, generator.models().cubeBottomTop(this.getBaseName(),
|
|
|
|
generator.modLoc("block/" + this.getBaseName()),
|
|
|
|
generator.modLoc("block/" + this.getBaseName() + "_top"),
|
|
|
|
generator.modLoc("block/" + this.getBaseName() + "_top")));
|
|
|
|
}
|
2019-02-24 17:44:53 +01:00
|
|
|
}
|