From 0edc581fa2b3832d4ef8250a06be79d00176ddbd Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 2 Feb 2019 14:54:52 +0100 Subject: [PATCH] allow the placer to be visualized --- .../naturesaura/blocks/BlockPlacer.java | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockPlacer.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockPlacer.java index db0d4d77..a29fe091 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/BlockPlacer.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockPlacer.java @@ -1,14 +1,32 @@ package de.ellpeck.naturesaura.blocks; +import de.ellpeck.naturesaura.api.render.IVisualizable; import de.ellpeck.naturesaura.blocks.tiles.TileEntityPlacer; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; -public class BlockPlacer extends BlockContainerImpl { +public class BlockPlacer extends BlockContainerImpl implements IVisualizable { public BlockPlacer() { super(Material.ROCK, "placer", TileEntityPlacer.class, "placer"); this.setSoundType(SoundType.STONE); this.setHardness(2.5F); } + + @Override + @SideOnly(Side.CLIENT) + public AxisAlignedBB getVisualizationBounds(World world, BlockPos pos) { + return new AxisAlignedBB(pos).grow(5); + } + + @Override + @SideOnly(Side.CLIENT) + public int getVisualizationColor(World world, BlockPos pos) { + return 0x078a93; + } }