2013-12-27 23:59:59 +01:00
|
|
|
package appeng.block.grindstone;
|
|
|
|
|
|
|
|
import java.util.EnumSet;
|
|
|
|
|
|
|
|
import net.minecraft.block.material.Material;
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
import net.minecraft.world.World;
|
2014-02-09 02:34:52 +01:00
|
|
|
import net.minecraftforge.common.util.ForgeDirection;
|
2013-12-27 23:59:59 +01:00
|
|
|
import appeng.block.AEBaseBlock;
|
|
|
|
import appeng.core.features.AEFeature;
|
|
|
|
import appeng.core.sync.GuiBridge;
|
|
|
|
import appeng.tile.grindstone.TileGrinder;
|
|
|
|
import appeng.util.Platform;
|
|
|
|
|
|
|
|
public class BlockGrinder extends AEBaseBlock
|
|
|
|
{
|
|
|
|
|
|
|
|
public BlockGrinder() {
|
|
|
|
super( BlockGrinder.class, Material.rock );
|
2014-09-20 23:24:29 +02:00
|
|
|
setFeature( EnumSet.of( AEFeature.GrindStone ) );
|
2014-09-20 23:23:39 +02:00
|
|
|
setTileEntity( TileGrinder.class );
|
2014-06-08 02:23:31 +02:00
|
|
|
setHardness( 3.2F );
|
2013-12-27 23:59:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean onActivated(World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ)
|
|
|
|
{
|
|
|
|
TileGrinder tg = getTileEntity( w, x, y, z );
|
|
|
|
if ( tg != null && !p.isSneaking() )
|
|
|
|
{
|
2014-06-08 02:23:31 +02:00
|
|
|
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_GRINDER );
|
2013-12-27 23:59:59 +01:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|