2018-10-28 17:39:53 +01:00
|
|
|
package de.ellpeck.naturesaura.blocks;
|
|
|
|
|
|
|
|
import de.ellpeck.naturesaura.blocks.tiles.TileEntityAuraDetector;
|
2018-11-14 16:40:21 +01:00
|
|
|
import net.minecraft.block.SoundType;
|
2018-10-28 17:39:53 +01:00
|
|
|
import net.minecraft.block.material.Material;
|
2019-10-20 22:30:49 +02:00
|
|
|
import net.minecraft.block.BlockState;
|
2018-10-28 17:39:53 +01:00
|
|
|
import net.minecraft.tileentity.TileEntity;
|
|
|
|
import net.minecraft.util.math.BlockPos;
|
|
|
|
import net.minecraft.world.World;
|
|
|
|
|
|
|
|
public class BlockAuraDetector extends BlockContainerImpl {
|
|
|
|
|
|
|
|
public BlockAuraDetector() {
|
2019-11-04 19:08:49 +01:00
|
|
|
super("aura_detector", TileEntityAuraDetector.class, "aura_detector", ModBlocks.prop(Material.ROCK).hardnessAndResistance(2F).sound(SoundType.STONE));
|
2018-10-28 17:39:53 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2019-10-20 22:30:49 +02:00
|
|
|
public boolean hasComparatorInputOverride(BlockState state) {
|
2018-10-28 17:39:53 +01:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2019-10-20 22:30:49 +02:00
|
|
|
public int getComparatorInputOverride(BlockState blockState, World worldIn, BlockPos pos) {
|
2018-10-28 17:39:53 +01:00
|
|
|
TileEntity tile = worldIn.getTileEntity(pos);
|
|
|
|
if (tile instanceof TileEntityAuraDetector)
|
|
|
|
return ((TileEntityAuraDetector) tile).redstonePower;
|
|
|
|
else
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|