mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-05 12:59:08 +01:00
63 lines
2.2 KiB
Java
63 lines
2.2 KiB
Java
package de.ellpeck.naturesaura.blocks;
|
|
|
|
import de.ellpeck.naturesaura.Helper;
|
|
import de.ellpeck.naturesaura.blocks.tiles.ModTileEntities;
|
|
import de.ellpeck.naturesaura.blocks.tiles.TileEntityNatureAltar;
|
|
import de.ellpeck.naturesaura.blocks.tiles.render.RenderNatureAltar;
|
|
import de.ellpeck.naturesaura.reg.ITESRProvider;
|
|
import net.minecraft.block.BlockState;
|
|
import net.minecraft.block.material.Material;
|
|
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
|
|
import net.minecraft.entity.player.PlayerEntity;
|
|
import net.minecraft.util.Hand;
|
|
import net.minecraft.util.Tuple;
|
|
import net.minecraft.util.math.BlockPos;
|
|
import net.minecraft.util.math.BlockRayTraceResult;
|
|
import net.minecraft.world.World;
|
|
import net.minecraftforge.api.distmarker.Dist;
|
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
|
import net.minecraftforge.common.ToolType;
|
|
|
|
public class BlockNatureAltar extends BlockContainerImpl implements ITESRProvider {
|
|
|
|
// TODO bounds
|
|
public BlockNatureAltar() {
|
|
super("nature_altar", TileEntityNatureAltar::new, ModBlocks.prop(Material.ROCK).hardnessAndResistance(4F).harvestLevel(1).harvestTool(ToolType.PICKAXE));
|
|
}
|
|
|
|
@Override
|
|
public boolean onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
|
|
return Helper.putStackOnTile(player, handIn, pos, 0, true);
|
|
}
|
|
|
|
/* @Override
|
|
public boolean isFullCube(BlockState state) {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public boolean isOpaqueCube(BlockState state) {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public boolean isNormalCube(BlockState state, IBlockAccess world, BlockPos pos) {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public boolean isSideSolid(BlockState baseState, IBlockAccess world, BlockPos pos, Direction side) {
|
|
return side == Direction.DOWN;
|
|
}
|
|
|
|
@Override
|
|
public BlockFaceShape getBlockFaceShape(IWorld worldIn, BlockState state, BlockPos pos, Direction face) {
|
|
return BlockFaceShape.UNDEFINED;
|
|
}*/
|
|
|
|
@Override
|
|
@OnlyIn(Dist.CLIENT)
|
|
public Tuple<Class, TileEntityRenderer> getTESR() {
|
|
return new Tuple<>(TileEntityNatureAltar.class, new RenderNatureAltar());
|
|
}
|
|
}
|